結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-08-22 21:15:54 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 5,000 ms |
| コード長 | 401 bytes |
| 記録 | |
| コンパイル時間 | 144 ms |
| コンパイル使用メモリ | 12,160 KB |
| 実行使用メモリ | 10,240 KB |
| 最終ジャッジ日時 | 2025-10-24 21:17:31 |
| 合計ジャッジ時間 | 1,435 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
n=int(input())
lst=[0]*(11)
ans=0
for _ in range(n):
a,b,c=map(int,input().split())
lst[a]+=1
lst[b]+=1
lst[c]+=1
# print(lst)
for i in range(1,11):
if lst[i]>=2:
tmp=lst[i]//2
ans+=tmp
lst[i]-=(tmp*2)
tmp1=0
# print(lst,ans)
# print(lst)
for j in range(1,11):
if lst[j]==1:
tmp1+=1
# print(tmp1)
# print(tmp1)
ans+=(tmp1//4)
print(ans)