結果
問題 | No.110 しましまピラミッド |
ユーザー |
![]() |
提出日時 | 2020-12-04 21:15:38 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 41 ms / 5,000 ms |
コード長 | 469 bytes |
コンパイル時間 | 267 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 52,480 KB |
最終ジャッジ日時 | 2024-09-15 07:58:18 |
合計ジャッジ時間 | 2,821 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 26 |
ソースコード
def solve(a,b): res = [10**9] j = len(b)-1 for i in a[::-1]: if i >= res[-1]: continue res.append(i) while j >= 0: if b[j] < res[-1]: res.append(b[j]) break j -= 1 if j == -1: break return len(res)-1 n = int(input()) *w, = map(int,input().split()) m = int(input()) *b, = map(int,input().split()) w.sort() b.sort() ans = max(solve(w,b),solve(b,w)) print(ans)