結果
| 問題 |
No.2401 Dirty Shoes and Stairs
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-08-05 11:53:48 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 100 ms / 2,000 ms |
| コード長 | 337 bytes |
| コンパイル時間 | 346 ms |
| コンパイル使用メモリ | 81,820 KB |
| 実行使用メモリ | 110,700 KB |
| 最終ジャッジ日時 | 2024-10-15 08:57:25 |
| 合計ジャッジ時間 | 3,124 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
from itertools import accumulate
def main():
N = int(input())
Z = [0]*(N+1)
input()
*A, = accumulate(map(int, input().split()))
input()
*B, = accumulate(map(int, input().split()))
for a in A:
Z[a] = 1
for b in B:
Z[N-b] = 1
print(N+1-sum(Z))
if __name__ == '__main__':
main()