結果
| 問題 |
No.110 しましまピラミッド
|
| コンテスト | |
| ユーザー |
JunOnuma
|
| 提出日時 | 2017-06-16 12:50:38 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 13 ms / 5,000 ms |
| コード長 | 521 bytes |
| コンパイル時間 | 445 ms |
| コンパイル使用メモリ | 6,912 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-31 11:31:46 |
| 合計ジャッジ時間 | 1,367 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 26 |
ソースコード
def func(na, la, nb, lb):
c = 1
a = 0
b = 0
while a < na and b < nb:
while b < nb and lb[b] <= la[a]:
b += 1
if b < nb:
c += 1
else:
break
a += 1
while a < na and la[a] <= lb[b]:
a += 1
if a < na:
c += 1
return c
nw = int(raw_input())
lw = sorted(map(int, raw_input().split()))
nb = int(raw_input())
lb = sorted(map(int, raw_input().split()))
print max(func(nw,lw,nb,lb), func(nb,lb,nw,lw))
JunOnuma