結果
問題 |
No.120 傾向と対策:門松列(その1)
|
ユーザー |
|
提出日時 | 2024-12-05 07:52:39 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 422 bytes |
コンパイル時間 | 253 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 77,312 KB |
最終ジャッジ日時 | 2024-12-05 07:52:41 |
合計ジャッジ時間 | 1,946 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 4 |
ソースコード
from bisect import bisect_right T = int(input()) for _ in range(T): N = int(input()) L = sorted(list(map(int,input().split()))) ans = 0 while L: A = [] A.append(L.pop(0)) ind = bisect_right(L,A[-1]) if ind==len(L):break A.append(L.pop(ind)) ind = bisect_right(L,A[-1]) if ind==len(L):break A.append(L.pop(ind)) ans += 1 print(ans)