結果
問題 | No.29 パワーアップ |
ユーザー |
![]() |
提出日時 | 2018-02-01 16:32:24 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 450 bytes |
コンパイル時間 | 729 ms |
コンパイル使用メモリ | 63,528 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-31 00:19:21 |
合計ジャッジ時間 | 1,330 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include<iostream> #include<vector> #include<algorithm> #include<cstdio> #include<cmath> #include<string> using namespace std; int main(){ int n,a,b,c,table[11]={},sum=0,ans=0; cin >> n; while(n--){ cin >> a >> b >> c; table[a]++; table[b]++; table[c]++; } for(int i=1;i<=10;i++){ ans += (table[i]/2); sum += (table[i]%2); } ans += (sum/4); cout << ans; return 0; }