結果
問題 | No.29 パワーアップ |
ユーザー |
|
提出日時 | 2020-05-22 23:16:21 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 341 bytes |
コンパイル時間 | 1,373 ms |
コンパイル使用メモリ | 172,436 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-05 20:49:46 |
合計ジャッジ時間 | 2,176 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i=0; i<(n); i++) using namespace std; typedef long long ll; int main(){ int n; cin>>n; set<int> st; int ans=0; rep(i,n){ rep(j,3){ int a; cin>>a; if(st.count(a)==1){ ans++; st.erase(a); } else { st.insert(a); } } } ans+=st.size()/4; cout << ans << endl; }