結果
| 問題 |
No.2401 Dirty Shoes and Stairs
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-08-04 21:58:38 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 2,000 ms |
| コード長 | 378 bytes |
| コンパイル時間 | 1,652 ms |
| コンパイル使用メモリ | 195,164 KB |
| 最終ジャッジ日時 | 2025-02-15 22:43:05 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<bool> d(N + 1, true);
int M1;
cin >> M1;
int now = 0;
while(M1--) {
int A;
cin >> A;
d[now += A] = false;
}
int M2;
cin >> M2;
while(M2--) {
int B;
cin >> B;
d[now -= B] = false;
}
cout << accumulate(d.begin(), d.end(), 0) << '\n';
return 0;
}