結果
問題 | No.120 傾向と対策:門松列(その1) |
ユーザー |
|
提出日時 | 2017-02-10 09:08:21 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 365 bytes |
コンパイル時間 | 194 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,656 KB |
最終ジャッジ日時 | 2024-12-26 14:22:38 |
合計ジャッジ時間 | 1,876 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 4 |
ソースコード
#yuki_120 from collections import Counter n=int(raw_input()) for i in xrange(n): int(raw_input()) s=Counter(map(int,raw_input().split())).values() s=sorted(s,reverse=True) res=0 if len(s)>=3: while True: if s[0] and s[1] and s[2]: s[0]-=1 s[1]-=1 s[2]-=1 res+=1 else: s=sorted(s,reverse=True) if s[2]==0: break print res