結果

問題 No.1722 [Cherry 3rd Tune C] In my way
ユーザー DrDrpilotDrDrpilot
提出日時 2022-02-23 19:37:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 349 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 10,612 KB
実行使用メモリ 8,336 KB
最終ジャッジ日時 2023-09-14 12:41:42
合計ジャッジ時間 2,838 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,804 KB
testcase_01 AC 19 ms
7,836 KB
testcase_02 AC 53 ms
8,276 KB
testcase_03 AC 49 ms
8,236 KB
testcase_04 AC 37 ms
7,896 KB
testcase_05 AC 23 ms
7,724 KB
testcase_06 AC 16 ms
7,916 KB
testcase_07 AC 19 ms
7,836 KB
testcase_08 AC 72 ms
8,320 KB
testcase_09 AC 21 ms
7,864 KB
testcase_10 AC 16 ms
7,908 KB
testcase_11 AC 83 ms
8,272 KB
testcase_12 AC 80 ms
8,224 KB
testcase_13 AC 81 ms
8,224 KB
testcase_14 AC 81 ms
8,272 KB
testcase_15 AC 79 ms
8,336 KB
testcase_16 AC 79 ms
8,296 KB
testcase_17 AC 83 ms
8,260 KB
testcase_18 AC 82 ms
8,292 KB
testcase_19 AC 86 ms
8,220 KB
testcase_20 AC 81 ms
8,324 KB
testcase_21 AC 16 ms
7,896 KB
testcase_22 AC 16 ms
7,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))
y.append(float('inf'))
y.sort()
for i in range(n):
    for j in range(m+1):
        if x[i]<y[j]:
            ans=y[j]-x[i]
            if ans==float('inf'):
                print('Infinity')
            else:
                print(ans)
            break
0