Submission #827694

#TimeUsernameProblemLanguageResultExecution timeMemory
827694Darren0724Political Development (BOI17_politicaldevelopment)C++17
4 / 100
1 ms340 KiB
#include<bits/stdc++.h> using namespace std; #define int long long #define all(x) x.begin(),x.end() #define pii pair<int,int> #define rz resize #define pb emplace_back #define chmin(a,b) a=min(a,b) #define chmax(a,b) a=max(a,b) #define x first #define y second #define ACorz ios_base::sync_with_stdio(false);cin.tie(0); //#define endl '\n' mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count()); const int INF=1e9,INF2=2e9; const int mod1=1e9+7; const int mod=998244353; const int N=100005; const int K=45000; const int M=5000; int32_t main(){ ACorz; int n,k;cin>>n>>k; if(k==1){ cout<<k<<endl; return 0; } for(int i=0;i<n;i++){ int p;cin>>p; if(p){ cout<<k<<endl; return 0; } } cout<<1<<endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...