結果
| 問題 |
No.2401 Dirty Shoes and Stairs
|
| コンテスト | |
| ユーザー |
satoyuyapyaa
|
| 提出日時 | 2023-08-09 20:50:05 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 110 ms / 2,000 ms |
| コード長 | 458 bytes |
| コンパイル時間 | 501 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 14,888 KB |
| 最終ジャッジ日時 | 2024-11-15 18:39:13 |
| 合計ジャッジ時間 | 2,661 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
def main():
n = int(input())
m1 = int(input())
a = list(map(int,input().split()))
m2 = int(input())
b = list(map(int,input().split()))
is_dirty = [False] * (n+1)
here = 0
is_dirty[here] = True
for i in range(m1):
here += a[i]
is_dirty[here] = True
for i in range(m2):
here -= b[i]
is_dirty[here] = True
print((n+1) - is_dirty.count(True))
if __name__ == '__main__':
main()
satoyuyapyaa