結果
| 問題 |
No.110 しましまピラミッド
|
| コンテスト | |
| ユーザー |
threepipes_s
|
| 提出日時 | 2016-01-03 04:07:34 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 5,000 ms |
| コード長 | 365 bytes |
| コンパイル時間 | 179 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-31 11:14:06 |
| 合計ジャッジ時間 | 2,157 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 26 |
ソースコード
def counter(c, l):
r = 0
o = 0
for p in l:
if p[1] != c and p[0] > o:
c = p[1]
r += 1
o = p[0]
return r
input()
w = list(map(lambda x: (int(x), 1), input().split()))
input()
b = list(map(lambda x: (int(x), 0), input().split()))
w = sorted(w+b, key=lambda p: p[0])
print(max(counter(1, w), counter(0, w)))
threepipes_s