結果
問題 | No.29 パワーアップ |
ユーザー |
|
提出日時 | 2016-10-30 05:39:03 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 243 bytes |
コンパイル時間 | 480 ms |
コンパイル使用メモリ | 64,076 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-24 23:30:55 |
合計ジャッジ時間 | 1,349 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include<iostream> using namespace std;int main() { int a[11]={}; int n;cin>>n; int aa; for(int i=0;i<3* n;i++) { cin>> aa;a[aa] ++; } int sum=0,all =0;for(int i=1;i<= 10;i++){ sum+=a[i] /2;all +=a[i] %2; } cout<<sum +all/4<< endl; return 0; }