結果
問題 |
No.29 パワーアップ
|
ユーザー |
![]() |
提出日時 | 2017-01-02 20:27:17 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 304 bytes |
コンパイル時間 | 1,813 ms |
コンパイル使用メモリ | 170,096 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-16 05:19:35 |
合計ジャッジ時間 | 2,510 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 22 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int N,a,i,up=0,sum=0; vector<int> power(10); cin>>N; for(i=0;i<3*N;i++){ cin>>a; power[a]++; } for(i=1;i<=10;i++){ up+=(power[i]/2); if(power[i]%2) sum+=1; } up+=sum/4; string ans = to_string(up); cout<<ans<<endl; return 0; }