結果
問題 |
No.110 しましまピラミッド
|
ユーザー |
![]() |
提出日時 | 2022-03-15 10:52:48 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 30 ms / 5,000 ms |
コード長 | 492 bytes |
コンパイル時間 | 175 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-22 02:09:19 |
合計ジャッジ時間 | 1,994 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 26 |
ソースコード
from bisect import bisect_left as bl , bisect_right as br s=int(input()) ss=list(map(int,input().split())) ss.sort() k=int(input()) kk=list(map(int,input().split())) kk.sort() def cal(x,f): cnt=1 while True: if f%2 == 0: t=bl(kk,x)-1 x=kk[t] else: t=bl(ss,x)-1 x=ss[t] if t == -1: return cnt cnt += 1 f += 1 S=cal(ss[-1],0) K=cal(kk[-1],1) print(max(S,K))