結果
| 問題 |
No.1460 Max of Min
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-31 21:17:11 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 498 bytes |
| コンパイル時間 | 394 ms |
| コンパイル使用メモリ | 82,912 KB |
| 実行使用メモリ | 77,084 KB |
| 最終ジャッジ日時 | 2024-12-15 14:06:00 |
| 合計ジャッジ時間 | 14,384 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 68 WA * 23 |
ソースコード
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(2*10**5+10)
write = lambda x: sys.stdout.write(x+"\n")
debug = lambda x: sys.stderr.write(x+"\n")
k,n = list(map(int, input().split()))
a = list(map(int, input().split()))
b = list(map(int, input().split()))
def sub(a,b):
return max([min(a[i], b[i]) for i in range(k)])
l = a[:]
for i in range(10*k+1):
l.append(sub(l[-k:], b))
if n<len(l):
print(l[n])
else:
tmp = l[-k:]
print(tmp[(n-len(l))%k])