結果
| 問題 |
No.1682 Unfair Game
|
| コンテスト | |
| ユーザー |
umezo
|
| 提出日時 | 2021-09-17 23:21:52 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 573 bytes |
| コンパイル時間 | 2,940 ms |
| コンパイル使用メモリ | 195,000 KB |
| 最終ジャッジ日時 | 2025-01-24 15:30:01 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 WA * 7 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(v) v.begin(),v.end()
typedef long long ll;
#include<bits/stdc++.h>
using namespace std;
const int MOD=1e9+7;
ll modpow(ll x,ll n){
ll ans=1;
while(n){
if(n&1) ans=ans*x%MOD;
x=x*x%MOD;
n/=2;
}
return ans;
}
int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int n;
cin>>n;
vector<ll> P(n);
rep(i,n) cin>>P[i];
ll cnt=0;
rep(i,n){
if(P[i]>50) cnt++;
}
if(cnt==0) cout<<0<<endl;
else cout<<modpow(2,cnt-1)*modpow(2,n-cnt)%MOD<<endl;
return 0;
}
umezo