結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
Respect2D
|
| 提出日時 | 2014-11-21 01:17:30 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 458 bytes |
| 記録 | |
| コンパイル時間 | 461 ms |
| コンパイル使用メモリ | 60,500 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-24 20:50:37 |
| 合計ジャッジ時間 | 1,440 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include <iostream>
#include <cstring>
using namespace std;
int n;
int cnt[10];
int main(){
while(cin >> n){
memset(cnt, 0, sizeof(cnt));
for(int i = 0; i < n; i++){
for(int j = 0; j < 3; j++){
int x;
cin >> x;
cnt[x - 1]++;
}
}
int ans = 0;
for(int i = 0; i < 10; i++){
ans += cnt[i] / 2;
}
ans += (n * 3 - ans * 2) / 4;
cout << ans << endl;
}
}
Respect2D