Submission #00081
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; vector<pair< int ,pair< int , int >>> p; bool f=0; int ans=0; for ( int i=0;i<n;i++){ int a[3]; cin>>a[0]>>a[1]>>a[2]; sort(a,a+3); if (i!=0){ f=0; for ( int j=0;j<p.size();j++){ if (a[0]==p[j].first&&a[1]==p[j].second.first&&a[2]==p[j].second.second){ f = 1; } } } if (!f){ p.push_back(make_pair(a[0],make_pair(a[1],a[2]))); } else { ans++; } } cout<<ans<<endl; return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0005 - 形式データ処理 |
ユーザー名 | ei2119 |
投稿日時 | 2022-07-19 16:52:10 |
言語 | C++17 |
状態 | Accepted |
得点 | 5 |
ソースコード長 | 678 Byte |
最大実行時間 | 28 ms |
最大メモリ使用量 | 748 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 5 / 5 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in01.txt | AC | 20 ms | 604 KB |
1
|
in02.txt | AC | 27 ms | 576 KB |
1
|
in03.txt | AC | 24 ms | 676 KB |
1
|
in04.txt | AC | 21 ms | 620 KB |
1
|
in05.txt | AC | 25 ms | 468 KB |
1
|
in06.txt | AC | 23 ms | 564 KB |
1
|
in07.txt | AC | 20 ms | 520 KB |
1
|
in08.txt | AC | 16 ms | 740 KB |
1
|
in09.txt | AC | 22 ms | 708 KB |
1
|
in10.txt | AC | 22 ms | 668 KB |
1
|
in11.txt | AC | 24 ms | 612 KB |
1
|
in12.txt | AC | 18 ms | 452 KB |
1
|
in13.txt | AC | 23 ms | 528 KB |
1
|
in14.txt | AC | 28 ms | 604 KB |
1
|
in15.txt | AC | 20 ms | 560 KB |
1
|
in16.txt | AC | 23 ms | 508 KB |
1
|
in17.txt | AC | 22 ms | 456 KB |
1
|
in18.txt | AC | 20 ms | 552 KB |
1
|
in19.txt | AC | 20 ms | 500 KB |
1
|
in20.txt | AC | 23 ms | 600 KB |
1
|
in21.txt | AC | 20 ms | 576 KB |
1
|
in22.txt | AC | 18 ms | 676 KB |
1
|
in23.txt | AC | 18 ms | 644 KB |
1
|
in24.txt | AC | 21 ms | 748 KB |
1
|