結果
問題 | No.29 パワーアップ |
ユーザー |
![]() |
提出日時 | 2019-09-24 18:00:08 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 328 bytes |
コンパイル時間 | 1,201 ms |
コンパイル使用メモリ | 158,872 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 05:11:23 |
合計ジャッジ時間 | 1,988 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include "bits/stdc++.h" using namespace std; int main() { int n; cin >>n; vector<int>a(10,0); int ans =0; for(int i=0;i<n*3;i++){ int z; cin >>z; a.at(z-1)++; if(a.at(z-1)==2){ a.at(z-1)=0; ans++; } } int che =0; for(int i=0;i<10;i++){ che+=a.at(i); } ans+=che/4; cout << ans <<endl; }