結果
| 問題 |
No.29 パワーアップ
|
| コンテスト | |
| ユーザー |
dsytk7
|
| 提出日時 | 2016-03-22 10:27:56 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 695 bytes |
| コンパイル時間 | 605 ms |
| コンパイル使用メモリ | 90,452 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-24 20:56:43 |
| 合計ジャッジ時間 | 1,336 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <sstream>
#include <string>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <limits>
#include <complex>
#include <functional>
using namespace std;
#define rep(i,n) for (int (i)=0;(i)<(int)(n);++(i))
int num[10];
int main() {
int n, ans = 0; cin >> n;
rep(i, n) {
rep(j, 3) {
int id;
cin >> id; id--;
num[id]++;
}
}
int t = 0;
rep(i, 10) {
ans += num[i]/2;
t += num[i]%2;
}
ans += t/4;
cout << ans << endl;
}
dsytk7