結果
問題 |
No.2401 Dirty Shoes and Stairs
|
ユーザー |
![]() |
提出日時 | 2023-09-08 00:41:18 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 107 ms / 2,000 ms |
コード長 | 400 bytes |
コンパイル時間 | 510 ms |
コンパイル使用メモリ | 81,852 KB |
実行使用メモリ | 107,592 KB |
最終ジャッジ日時 | 2024-06-25 17:50:52 |
合計ジャッジ時間 | 3,896 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
from collections import * import heapq import bisect import itertools INF = float("inf") MOD = 998244353 mod = 998244353 N = int(input()) now = 0 dirty = [0] * (N + 1) M = int(input()) A = list(map(int, input().split())) for a in A: now += a dirty[now] = 1 now = N M = int(input()) A = list(map(int, input().split())) for a in A: now -= a dirty[now] = 1 print(dirty[1:].count(0))