結果

問題 No.1722 [Cherry 3rd Tune C] In my way
ユーザー U SU S
提出日時 2021-10-30 10:09:38
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 634 bytes
コンパイル時間 179 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 67,584 KB
最終ジャッジ日時 2024-04-16 16:13:59
合計ジャッジ時間 2,419 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
60,800 KB
testcase_01 AC 59 ms
62,208 KB
testcase_02 AC 75 ms
65,920 KB
testcase_03 AC 66 ms
65,280 KB
testcase_04 AC 67 ms
65,280 KB
testcase_05 AC 64 ms
63,104 KB
testcase_06 AC 55 ms
61,184 KB
testcase_07 AC 63 ms
63,104 KB
testcase_08 AC 71 ms
66,944 KB
testcase_09 AC 57 ms
61,696 KB
testcase_10 AC 56 ms
61,056 KB
testcase_11 AC 70 ms
67,200 KB
testcase_12 AC 71 ms
67,456 KB
testcase_13 AC 70 ms
66,816 KB
testcase_14 AC 70 ms
67,072 KB
testcase_15 AC 71 ms
67,072 KB
testcase_16 AC 70 ms
66,816 KB
testcase_17 AC 70 ms
67,328 KB
testcase_18 AC 70 ms
67,072 KB
testcase_19 AC 72 ms
67,200 KB
testcase_20 AC 72 ms
67,584 KB
testcase_21 AC 56 ms
60,928 KB
testcase_22 AC 55 ms
61,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#import sys
# input = sys.stdin.readline
def mp():return map(int,input().split())
def lmp():return list(map(int,input().split()))
def mps(A):return [tuple(map(int, input().split())) for _ in range(A)]
import math
import bisect
import heapq
from copy import deepcopy as dc
from itertools import accumulate
from collections import Counter, defaultdict, deque
def ceil(U,V):return (U+V-1)//V
def modf1(N,MOD):return (N-1)%MOD+1
inf = int(1e20)
mod = 998244353

n,m = mp()
a = lmp()
b = lmp()
b.sort()
for i in a:
    c = bisect.bisect_left(b,i)
    #print(c)
    if c == len(b):
        print("Infinity")
    else:
        print(b[c]-i)
0