結果
問題 | No.29 パワーアップ |
ユーザー |
|
提出日時 | 2016-05-13 21:35:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 365 bytes |
コンパイル時間 | 1,641 ms |
コンパイル使用メモリ | 165,496 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-11 00:35:49 |
合計ジャッジ時間 | 2,384 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include<bits/stdc++.h> using namespace std; // 9(6) -> 7(3) ->1(2) int item[11]; int main(){ int i, j, k, l; int n,m; cin >>n; for (i=0;i<n*3;i++){ cin >> j; item[j]++; } int pu=0,pc=0; for (i=1;i<=10;i++){ pu+=item[i]>>1; pc+=item[i]&1; } cout<<(pu+pc/4)<<endl; return 0; }