結果
問題 |
No.2401 Dirty Shoes and Stairs
|
ユーザー |
|
提出日時 | 2023-09-22 17:37:53 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 40 ms / 2,000 ms |
コード長 | 351 bytes |
コンパイル時間 | 1,672 ms |
コンパイル使用メモリ | 195,976 KB |
最終ジャッジ日時 | 2025-02-17 00:07:59 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll=long long; int main() { ll N,M,A,S=0,an=0; cin>>N; vector<bool> F(N+1,1); for(int t=0;t<3;t+=2){ cin>>M; for(int i=0;i<M;i++){ cin>>A; S-=A*(t-1); F[S]=0; } } for(int i=0;i<=N;i++)an+=F[i]; cout<<an<<endl; }