結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
dgd1724
|
| 提出日時 | 2016-09-09 18:58:59 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 535 bytes |
| 記録 | |
| コンパイル時間 | 800 ms |
| コンパイル使用メモリ | 73,664 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-24 20:58:50 |
| 合計ジャッジ時間 | 1,349 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <time.h>
#include <cstdlib>
#include <cmath>
#include <fstream>
int main(void) {
//test用
//std::ifstream in("test.txt");
//std::cin.rdbuf(in.rdbuf());
int N;
std::cin >> N;
std::vector<int> n(10);
for (int i = 0; i < 3 * N; i++) {
int temp;
std::cin >> temp;
n[temp - 1]++;
}
int pu = 0;
int left = 0;
for (int i = 0; i < 10; i++) {
pu += n[i] / 2;
left += n[i] % 2;
}
pu += left / 4;
std::cout << pu << std::endl;
}
dgd1724