結果

問題 No.29 パワーアップ
ユーザー dgd1724
提出日時 2016-09-09 18:58:08
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 531 bytes
コンパイル時間 617 ms
コンパイル使用メモリ 68,500 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-16 08:53:57
合計ジャッジ時間 11,259 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;

}
0