結果
問題 | No.5004 Room Assignment |
ユーザー |
![]() |
提出日時 | 2021-12-01 00:18:44 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 490 bytes |
コンパイル時間 | 247 ms |
実行使用メモリ | 99,200 KB |
スコア | 0 |
平均クエリ数 | 1.00 |
最終ジャッジ日時 | 2021-12-01 00:19:17 |
合計ジャッジ時間 | 25,015 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 100 |
ソースコード
t,r = map(int,input().split()) p = 1 for _ in range(n): n,*S = map(int,input().split()) L = [] stack = [] for _,i in sorted([(s,i) for i,s in enumerate(S,p)]): stack.append(i) if len(stack) == 4: for j in range(3): L.append(stack[j],stack[j+1]) stack.clear() for j in range(len(stack)-1): L.append(stack[j],stack[j+1]) print(len(L),flush=True) for u,v in L: print(u,v,flush=True) p += n