結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
Shirakami4LFE
|
| 提出日時 | 2022-12-28 17:29:09 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 5,000 ms |
| コード長 | 625 bytes |
| 記録 | |
| コンパイル時間 | 1,215 ms |
| コンパイル使用メモリ | 163,768 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-10-24 21:19:02 |
| 合計ジャッジ時間 | 1,979 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int N; cin >> N;
vector<int>items(N*3);
for(int i=0; i<N*3; i++){
cin >> items.at(i);
}
vector<int>itemnums(10);
for(int i=0; i<10; i++){
itemnums.at(i)=count(items.begin(),items.end(),i+1);
}
int countup=0; int remain=0;
for(int i=0; i<10; i++){
int temp=itemnums.at(i);
if(temp%2==0){
countup+=temp/2;
}
else{
countup+=temp/2;
remain++;
}
}
cout << countup+remain/4 << endl;
return 0;
}
Shirakami4LFE