結果
問題 |
No.387 ハンコ
|
ユーザー |
![]() |
提出日時 | 2024-10-13 11:04:54 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 525 bytes |
コンパイル時間 | 128 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-10-13 11:04:56 |
合計ジャッジ時間 | 1,347 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 9 |
ソースコード
def Hoa(n, m, S, a, b): tong = 0 for j in range(m): x, y = 0, n - 1 while x <= y: i = (x + y) // 2 if a[i] + b[j] <= S: x = i + 1 else: y = i - 1 if x > 0: tong = max(tong, a[x - 1] + b[j]) return tong n, m, S = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) kq = Hoa(n, m, S, a, b) print(kq) a,b = map(int, input().split()) g = (a+2)*(a+1)//2 print(g*(b+1))