結果
| 問題 | No.110 しましまピラミッド |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-27 22:28:48 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 21 ms / 5,000 ms |
| + 976µs | |
| コード長 | 543 bytes |
| 記録 | |
| コンパイル時間 | 60 ms |
| コンパイル使用メモリ | 14,848 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2026-09-28 03:31:13 |
| 合計ジャッジ時間 | 2,630 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)))