結果
| 問題 | No.110 しましまピラミッド |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-27 22:28:48 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 96 ms / 5,000 ms |
| コード長 | 543 bytes |
| 記録 | |
| コンパイル時間 | 362 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2026-05-16 14:12:26 |
| 合計ジャッジ時間 | 4,634 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 26 |
ソースコード
Nw = int(input())
W = sorted(list(map(int, input().split())), reverse=True)
Nb = int(input())
B = sorted(list(map(int, input().split())), reverse=True)
def solve(P, Q):
i, j = 1, 0
x = P[0]
ct = 1
while True:
while j < len(Q) and Q[j] >= x:
j += 1
if j == len(Q):
return ct
x = Q[j]
ct += 1
while i < len(P) and P[i] >= x:
i += 1
if i == len(P):
return ct
x = P[i]
ct += 1
print(max(solve(W, B), solve(B, W)))