結果
| 問題 |
No.29 パワーアップ
|
| コンテスト | |
| ユーザー |
dgd1724
|
| 提出日時 | 2016-09-09 18:58:08 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 531 bytes |
| コンパイル時間 | 598 ms |
| コンパイル使用メモリ | 74,064 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-10-24 20:58:56 |
| 合計ジャッジ時間 | 7,813 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 17 TLE * 1 -- * 4 |
ソースコード
#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