結果
問題 |
No.2401 Dirty Shoes and Stairs
|
ユーザー |
![]() |
提出日時 | 2025-03-20 18:53:37 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 112 ms / 2,000 ms |
コード長 | 335 bytes |
コンパイル時間 | 210 ms |
コンパイル使用メモリ | 82,768 KB |
実行使用メモリ | 129,852 KB |
最終ジャッジ日時 | 2025-03-20 18:54:50 |
合計ジャッジ時間 | 2,929 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
n = int(input()) m1 = int(input()) a = list(map(int, input().split())) m2 = int(input()) b = list(map(int, input().split())) dirty = set() current = 0 dirty.add(current) for num in a: current += num dirty.add(current) sum_b = 0 for num in b: sum_b += num pos = n - sum_b dirty.add(pos) print(n + 1 - len(dirty))