結果
問題 | No.1722 [Cherry 3rd Tune C] In my way |
ユーザー | Shirotsume |
提出日時 | 2021-10-29 21:27:40 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 75 ms / 2,000 ms |
コード長 | 433 bytes |
コンパイル時間 | 288 ms |
コンパイル使用メモリ | 82,360 KB |
実行使用メモリ | 66,432 KB |
最終ジャッジ日時 | 2024-10-07 09:51:23 |
合計ジャッジ時間 | 2,365 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
from collections import deque n, m = map(int,input().split()) x = list(map(int,input().split())) y = list(map(int,input().split())) z = x + y z.sort() s = [-1] * n g = [-1] * n for i in range(n + m): if z[i] in x: s[x.index(z[i])] = z[i] if z[i] in y: for j in range(n): if s[j] >= 0 and g[j] < 0: g[j] = z[i] for i in range(n): print(g[i] - s[i] if g[i] > 0 else 'Infinity')