結果
問題 | No.5016 Worst Mayor |
ユーザー | Kiri8128 |
提出日時 | 2023-04-29 17:43:16 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 246 ms / 2,000 ms |
コード長 | 2,172 bytes |
コンパイル時間 | 703 ms |
コンパイル使用メモリ | 87,404 KB |
実行使用メモリ | 93,840 KB |
スコア | 22,991,220,121 |
平均クエリ数 | 400.00 |
最終ジャッジ日時 | 2023-04-29 17:43:34 |
合計ジャッジ時間 | 16,943 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
純コード判定しない問題か言語 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 223 ms
93,260 KB |
testcase_01 | AC | 217 ms
93,752 KB |
testcase_02 | AC | 237 ms
93,192 KB |
testcase_03 | AC | 220 ms
93,232 KB |
testcase_04 | AC | 218 ms
93,464 KB |
testcase_05 | AC | 217 ms
93,212 KB |
testcase_06 | AC | 215 ms
93,720 KB |
testcase_07 | AC | 218 ms
93,496 KB |
testcase_08 | AC | 220 ms
93,416 KB |
testcase_09 | AC | 220 ms
92,936 KB |
testcase_10 | AC | 221 ms
93,772 KB |
testcase_11 | AC | 230 ms
92,772 KB |
testcase_12 | AC | 220 ms
92,952 KB |
testcase_13 | AC | 222 ms
93,768 KB |
testcase_14 | AC | 220 ms
93,696 KB |
testcase_15 | AC | 222 ms
93,340 KB |
testcase_16 | AC | 231 ms
93,424 KB |
testcase_17 | AC | 219 ms
93,396 KB |
testcase_18 | AC | 220 ms
93,072 KB |
testcase_19 | AC | 216 ms
93,656 KB |
testcase_20 | AC | 218 ms
92,880 KB |
testcase_21 | AC | 242 ms
93,272 KB |
testcase_22 | AC | 222 ms
93,540 KB |
testcase_23 | AC | 219 ms
93,544 KB |
testcase_24 | AC | 218 ms
93,840 KB |
testcase_25 | AC | 207 ms
93,816 KB |
testcase_26 | AC | 222 ms
93,600 KB |
testcase_27 | AC | 218 ms
93,208 KB |
testcase_28 | AC | 217 ms
93,556 KB |
testcase_29 | AC | 218 ms
93,600 KB |
testcase_30 | AC | 216 ms
93,360 KB |
testcase_31 | AC | 246 ms
92,748 KB |
testcase_32 | AC | 217 ms
93,696 KB |
testcase_33 | AC | 218 ms
93,508 KB |
testcase_34 | AC | 216 ms
93,284 KB |
testcase_35 | AC | 218 ms
93,408 KB |
testcase_36 | AC | 241 ms
93,396 KB |
testcase_37 | AC | 216 ms
92,752 KB |
testcase_38 | AC | 217 ms
93,428 KB |
testcase_39 | AC | 216 ms
92,876 KB |
testcase_40 | AC | 221 ms
93,048 KB |
testcase_41 | AC | 217 ms
93,572 KB |
testcase_42 | AC | 216 ms
93,704 KB |
testcase_43 | AC | 215 ms
93,656 KB |
testcase_44 | AC | 218 ms
93,552 KB |
testcase_45 | AC | 220 ms
93,216 KB |
testcase_46 | AC | 218 ms
92,820 KB |
testcase_47 | AC | 220 ms
93,504 KB |
testcase_48 | AC | 218 ms
93,344 KB |
testcase_49 | AC | 219 ms
93,592 KB |
ソースコード
def cost(): a = int(10 ** 7 / supporter ** 0.5 + 2) while supporter * a ** 2 > 10 ** 14: a -= 1 return a N, T = map(int, input().split()) supporter = 1 for _ in range(N): input() priority = [(0, 6, 6), (1, 7, 5), (0, 6, 5), (1, 6, 4), (0, 6, 4), (1, 7, 3), (0, 6, 3), (1, 6, 2), (0, 6, 2), (1, 7, 1), (0, 6, 1), (1, 6, 0), (0, 6, 0), (1, 6, 6), (0, 6, 7), (1, 7, 7), (0, 6, 8), (1, 6, 8), (0, 6, 9), (1, 7, 9), (0, 6, 10), (1, 6, 10), (0, 6, 11), (1, 7, 11), (0, 6, 12), (1, 6, 12), (0, 6, 13), (0, 0, 6), (1, 1, 5), (0, 0, 5), (1, 0, 4), (0, 0, 4), (1, 1, 3), (0, 0, 3), (1, 0, 2), (0, 0, 2), (1, 1, 1), (0, 0, 1), (1, 0, 0), (0, 0, 0), (1, 0, 6), (0, 0, 7), (1, 1, 7), (0, 0, 8), (1, 0, 8), (0, 0, 9), (1, 1, 9), (0, 0, 10), (1, 0, 10), (0, 0, 11), (1, 1, 11), (0, 0, 12), (1, 0, 12), (0, 0, 13), (0, 12, 6), (1, 12, 5), (0, 12, 5), (1, 13, 4), (0, 12, 4), (1, 12, 3), (0, 12, 3), (1, 13, 2), (0, 12, 2), (1, 12, 1), (0, 12, 1), (1, 13, 0), (0, 12, 0), (1, 13, 6), (0, 12, 7), (1, 12, 7), (0, 12, 8), (1, 13, 8), (0, 12, 9), (1, 12, 9), (0, 12, 10), (1, 13, 10), (0, 12, 11), (1, 12, 11), (0, 12, 12), (1, 13, 12), (0, 12, 13), (0, 5, 7), (1, 5, 6), (0, 4, 6), (1, 4, 6), (0, 3, 7), (1, 3, 6), (0, 2, 6), (1, 2, 6), (0, 1, 7), (0, 7, 6), (1, 8, 6), (0, 8, 7), (1, 9, 6), (0, 9, 6), (1, 10, 6), (0, 10, 7), (1, 11, 6), (0, 11, 6), (0, 5, 1), (1, 5, 0), (0, 4, 0), (1, 4, 0), (0, 3, 1), (1, 3, 0), (0, 2, 0), (1, 2, 0), (0, 1, 1), (0, 7, 0), (1, 8, 0), (0, 8, 1), (1, 9, 0), (0, 9, 0), (1, 10, 0), (0, 10, 1), (1, 11, 0), (0, 11, 0), (0, 5, 13), (1, 5, 12), (0, 4, 12), (1, 4, 12), (0, 3, 13), (1, 3, 12), (0, 2, 12), (1, 2, 12), (0, 1, 13), (0, 7, 12), (1, 8, 12), (0, 8, 13), (1, 9, 12), (0, 9, 12), (1, 10, 12), (0, 10, 13), (1, 11, 12), (0, 11, 12)][::-1] for q in range(T): u, v = map(int, input().split()) if not 15 < q < T - 1: print(3) continue if u >= cost(): if priority: t, i, j = priority.pop() ni, nj = (i + 1, j) if t == 0 else (i, j + 1) print(1, i + 1, j + 1, ni + 1, nj + 1) else: print(3) else: print(2) supporter += 1