結果
| 問題 |
No.120 傾向と対策:門松列(その1)
|
| コンテスト | |
| ユーザー |
あかりき
|
| 提出日時 | 2021-02-13 14:27:31 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 365 bytes |
| コンパイル時間 | 888 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 78,208 KB |
| 最終ジャッジ日時 | 2024-07-20 17:15:03 |
| 合計ジャッジ時間 | 1,902 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 4 |
ソースコード
import collections
t=int(input())
for i in range(t):
n=int(input())
l=list(map(int,input().split()))
l=collections.Counter(l)
l=list(l.values())
l.sort()
l.reverse()
ans=0
for i in range(n//3+1):
ct=0
for j in range(len(l)):
if l[j]>0:
ct+=1
l[j]-=1
if ct==3:
break
if ct==3:
ans+=1
print(ans)
あかりき