Submission #00036


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include<iostream>
#include<queue>
#include<utility>
#include<set>
using namespace std;
int main(){
int n,m,x;
set<int>a;
cin>>n>>m;
for(int c=0; c!=n; c++){
cin>>x;
a.insert(x);
}
for(int c=0; c!=m; c++){
cin>>x;
a.erase(x);
}
n=a.size();
for(auto i:a){
cout<<i<<"\n";
}
return(0);
}

ステータス

項目 データ
問題 0003 - データの整理
ユーザー名 ei2437
投稿日時 2024-07-08 17:08:04
言語 C++
状態 Compile Error
得点 0
ソースコード長 390 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp: In function ‘int main()’:
./Main.cpp:19:14: error: ‘i’ does not name a type
     for(auto i:a){
              ^
./Main.cpp:21:6: error: expected ‘;’ before ‘return’
     }
      ^
      ;
     return(0);
     ~~~~~~
./Main.cpp:22:5: error: expected primary-expression before ‘return’
     return(0);
     ^~~~~~
./Main.cpp:21:6: error: expected ‘;’ before ‘return’
     }
      ^
      ;
     return(0);
     ~~~~~~
./Main.cpp:22:5: error: expected primary-expression before ‘return’
     return(0);
     ^~~~~~
./Main.cpp:21:6: error: expected ‘)’ before ‘return’
     }
      ^
      )
     return(0);
     ~~~~~~
./Main.cpp:19:8: note: to match this ‘(’
     for(auto i:a){
        ^

セット

セット 得点 Cases

テストケース

ファイル名 状態 実行時間 メモリ使用量 #