結果

問題 No.29 パワーアップ
ユーザー twkmathtwkmath
提出日時 2018-10-19 19:38:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 257 bytes
コンパイル時間 243 ms
コンパイル使用メモリ 10,732 KB
実行使用メモリ 8,016 KB
最終ジャッジ日時 2023-08-11 21:40:49
合計ジャッジ時間 2,086 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,920 KB
testcase_01 AC 16 ms
7,968 KB
testcase_02 AC 15 ms
7,864 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 15 ms
7,852 KB
testcase_09 AC 16 ms
7,956 KB
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 15 ms
7,864 KB
testcase_21 AC 16 ms
7,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

i = set(); c = 0
for _ in range(int(input())):
	j = sorted([int(e) for e in input().split()])
	if j[0]==j[1]: del j[0]; del j[1]; c+=1
	elif j[1]==j[2]: del j[1]; del j[2]; c+=1
	for e in j:
		if e in i: i.remove(e); c+=1
		else: i.add(e)
print(c+len(i)//4)
0