結果
| 問題 | No.2401 Dirty Shoes and Stairs |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-08-05 08:47:41 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 111 ms / 2,000 ms |
| + 798µs | |
| コード長 | 573 bytes |
| 記録 | |
| コンパイル時間 | 78 ms |
| コンパイル使用メモリ | 81,152 KB |
| 実行使用メモリ | 146,216 KB |
| 最終ジャッジ日時 | 2026-09-17 22:11:29 |
| 合計ジャッジ時間 | 5,081 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
n = int(input())
#alist = list(map(int,input().split()))
#alist = []
#s = input()
#n,m = map(int,input().split())
#for i in range(n):
# alist.append(list(map(int,input().split())))
m = int(input())
alist = list(map(int,input().split()))
m = int(input())
blist = list(map(int,input().split()))
ans = set()
temp = 0
ans.add(temp)
for i in alist:
temp += i
ans.add(temp)
for i in blist:
temp -= i
ans.add(temp)
print(n+1-len(ans))