Submission #67747
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #include<iostream> #include<vector> #include<stack> #include<set> #include<queue> using namespace std; int main(){ int n,h; cin>>n; queue< int > a; set< int > s; for ( int i=0;i<n;i++){ cin>>h; if (!s.count(h)){ a.push(h); } s.insert(h); } while (!a.empty()){ cout<<a.front()<<endl; a.pop(); } return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 1360 - 同族嫌悪 |
ユーザー名 | ソロデュオ |
投稿日時 | 2021-07-27 11:27:52 |
言語 | C++17 |
状態 | Accepted |
得点 | 10 |
ソースコード長 | 435 Byte |
最大実行時間 | 264 ms |
最大メモリ使用量 | 10396 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 10 / 10 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in01.txt | AC | 23 ms | 604 KB |
1
|
in02.txt | AC | 17 ms | 700 KB |
1
|
in03.txt | AC | 29 ms | 800 KB |
1
|
in04.txt | AC | 90 ms | 2476 KB |
1
|
in05.txt | AC | 167 ms | 4440 KB |
1
|
in06.txt | AC | 260 ms | 7344 KB |
1
|
in07.txt | AC | 256 ms | 8492 KB |
1
|
in08.txt | AC | 258 ms | 9380 KB |
1
|
in09.txt | AC | 264 ms | 10396 KB |
1
|
in10.txt | AC | 54 ms | 5396 KB |
1
|
sample1.txt | AC | 22 ms | 5240 KB |
1
|