結果
問題 | No.1795 AtCoder Heuristic Rating coloring |
ユーザー | McGregorsh |
提出日時 | 2023-05-10 15:53:26 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 652 ms / 2,000 ms |
コード長 | 1,652 bytes |
コンパイル時間 | 530 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 125,040 KB |
最終ジャッジ日時 | 2024-11-26 21:07:09 |
合計ジャッジ時間 | 20,941 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 138 ms
88,704 KB |
testcase_01 | AC | 137 ms
89,344 KB |
testcase_02 | AC | 139 ms
88,960 KB |
testcase_03 | AC | 140 ms
89,344 KB |
testcase_04 | AC | 190 ms
90,752 KB |
testcase_05 | AC | 190 ms
90,880 KB |
testcase_06 | AC | 187 ms
90,880 KB |
testcase_07 | AC | 181 ms
90,624 KB |
testcase_08 | AC | 179 ms
90,880 KB |
testcase_09 | AC | 180 ms
90,752 KB |
testcase_10 | AC | 180 ms
90,624 KB |
testcase_11 | AC | 177 ms
90,752 KB |
testcase_12 | AC | 136 ms
89,472 KB |
testcase_13 | AC | 138 ms
88,960 KB |
testcase_14 | AC | 140 ms
88,960 KB |
testcase_15 | AC | 137 ms
88,576 KB |
testcase_16 | AC | 135 ms
89,472 KB |
testcase_17 | AC | 139 ms
88,960 KB |
testcase_18 | AC | 142 ms
88,960 KB |
testcase_19 | AC | 142 ms
88,576 KB |
testcase_20 | AC | 141 ms
89,216 KB |
testcase_21 | AC | 138 ms
89,344 KB |
testcase_22 | AC | 138 ms
89,344 KB |
testcase_23 | AC | 137 ms
89,088 KB |
testcase_24 | AC | 140 ms
89,472 KB |
testcase_25 | AC | 137 ms
88,704 KB |
testcase_26 | AC | 139 ms
89,344 KB |
testcase_27 | AC | 141 ms
89,472 KB |
testcase_28 | AC | 151 ms
88,960 KB |
testcase_29 | AC | 143 ms
88,960 KB |
testcase_30 | AC | 146 ms
89,216 KB |
testcase_31 | AC | 144 ms
89,344 KB |
testcase_32 | AC | 349 ms
104,448 KB |
testcase_33 | AC | 301 ms
99,456 KB |
testcase_34 | AC | 429 ms
108,928 KB |
testcase_35 | AC | 379 ms
106,240 KB |
testcase_36 | AC | 426 ms
109,952 KB |
testcase_37 | AC | 319 ms
100,608 KB |
testcase_38 | AC | 308 ms
101,248 KB |
testcase_39 | AC | 451 ms
112,128 KB |
testcase_40 | AC | 362 ms
104,832 KB |
testcase_41 | AC | 425 ms
111,104 KB |
testcase_42 | AC | 345 ms
102,144 KB |
testcase_43 | AC | 358 ms
103,680 KB |
testcase_44 | AC | 412 ms
108,032 KB |
testcase_45 | AC | 347 ms
102,144 KB |
testcase_46 | AC | 478 ms
113,408 KB |
testcase_47 | AC | 265 ms
96,000 KB |
testcase_48 | AC | 351 ms
102,528 KB |
testcase_49 | AC | 491 ms
111,952 KB |
testcase_50 | AC | 329 ms
101,376 KB |
testcase_51 | AC | 308 ms
100,352 KB |
testcase_52 | AC | 511 ms
117,120 KB |
testcase_53 | AC | 512 ms
117,376 KB |
testcase_54 | AC | 646 ms
125,040 KB |
testcase_55 | AC | 647 ms
124,780 KB |
testcase_56 | AC | 652 ms
124,900 KB |
testcase_57 | AC | 651 ms
124,900 KB |
ソースコード
import sys, refrom fractions import Fractionfrom math import ceil, floor, sqrt, pi, factorial, gcdfrom copy import deepcopyfrom collections import Counter, deque, defaultdictfrom heapq import heapify, heappop, heappushfrom itertools import accumulate, product, combinations, combinations_with_replacement, permutationsfrom bisect import bisect, bisect_left, bisect_rightfrom functools import reducefrom decimal import Decimal, getcontext, ROUND_HALF_UPdef i_input(): return int(input())def i_map(): return map(int, input().split())def i_list(): return list(i_map())def i_row(N): return [i_input() for _ in range(N)]def i_row_list(N): return [i_list() for _ in range(N)]def s_input(): return input()def s_map(): return input().split()def s_list(): return list(s_map())def s_row(N): return [s_input for _ in range(N)]def s_row_str(N): return [s_list() for _ in range(N)]def s_row_list(N): return [list(s_input()) for _ in range(N)]def lcm(a, b): return a * b // gcd(a, b)def get_distance(x1, y1, x2, y2):d = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)return ddef rotate(table):n_fild = []for x in zip(*table[::-1]):n_fild.append(x)return n_fildsys.setrecursionlimit(10 ** 7)INF = float('inf')MOD = 10 ** 9 + 7MOD2 = 998244353def main():N, M = i_map()juge = defaultdict(int)for i in range(N):s, a = s_map()juge[s] = afor i in range(M):t, b = s_map()juge[t] = bans = []for key, value in juge.items():ans.append([key, value])ans.sort()for i in ans:print(*i)if __name__ == '__main__':main()