結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
LV3zJigVW57oPGy
|
| 提出日時 | 2022-11-08 18:57:39 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 509 bytes |
| 記録 | |
| コンパイル時間 | 1,166 ms |
| コンパイル使用メモリ | 159,132 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-24 21:18:51 |
| 合計ジャッジ時間 | 1,987 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <ios>
#include <iomanip>
#include <iostream>
#include <string>
#include <algorithm>
int main(){
int a;
int count3=0;
int count2=0;
cin >>a;
a *=3;
vector<int> vec(a);
for(int i=0;i<a;i++){
cin >> vec.at(i);
}
for(int k=0;k<11;k++){
int count1=0;
for(int i=0;i<a;i++){
if(k==vec.at(i)){
count1 ++;
}
}
count2=count2+count1 /2;
count3=count3+count1 %2;
}
cout << count2+count3/4;
}
LV3zJigVW57oPGy