結果
問題 |
No.1682 Unfair Game
|
ユーザー |
![]() |
提出日時 | 2021-09-17 21:47:12 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 521 bytes |
コンパイル時間 | 4,710 ms |
コンパイル使用メモリ | 251,036 KB |
最終ジャッジ日時 | 2025-01-24 14:48:10 |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 WA * 7 |
ソースコード
#include <stdio.h> #include <bits/stdc++.h> #include <atcoder/all> using namespace atcoder; using mint = modint1000000007; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000001 int main(){ int n; cin>>n; vector<int> p(n); rep(i,n)cin>>p[i]; vector<mint> dp(2,0); dp[0] = 1; rep(i,n){ vector<mint> ndp(2,0); rep(j,2){ ndp[j] += dp[j]; int nj = j; if(p[i]>50)nj ^= 1; ndp[nj] += dp[j]; } swap(dp,ndp); } cout<<dp[1].val()<<endl; return 0; }