제출 #235262

#제출 시각아이디문제언어결과실행 시간메모리
235262Goolakh경찰관과 강도 (BOI14_coprobber)C++17
0 / 100
351 ms4344 KiB
/// Be Kind :) #include <bits/stdc++.h> #include "coprobber.h" using namespace std; #pragma GCC optimize("O2") #pragma GCC optimize("unroll-loops") //#pragma GCC optimize("Os") /* Bitch, where you when I was walkin'? Now I run the game, got the whole world talkin' */ /* You never likes us anyway, fuck your friendship, I meant it */ /* The Chanel or Balenciaga, Louis and Vuitton She know I got Fendi, Prada when I hit Milan */ /* Niggas been counting me out I'm counting my bullets, I'm loading my clips I'm writing down names, I'm making a list */ /* I ran away, I don't think I'm coming back home */ #define F first #define S second #define pb push_back #define SZ(x) (ll)(x.size()) #define all(x) x.begin(),x.end() typedef int ll; typedef pair<ll,ll> pll; //mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); const ll maxn=5e2+10, maxm=51, lg=23, mod=1e9+7, inf=1e18; ll n,cur; bool g[maxn][maxn],win[maxn][maxn]; ll cnt[maxn][maxn],nxt[maxn][maxn]; ll tg[maxn]; ll start(int N,bool A[MAX_N][MAX_N]){ n=N; for(int i=0;i<n;i++){ tg[i]=0; for(int j=0;j<n;j++){ g[i][j]=A[i][j]; tg[i]+=g[i][j]; cnt[i][j]=0; } } deque<pair<ll,pll>> q; for(int i=0;i<n;i++){ q.pb({0,{i,i}}); q.pb({1,{i,i}}); win[i][i]=1; } while(!q.empty()){ auto v=q.front(); q.pop_front(); if(v.F==1){ for(int i=0;i<n;i++)if(g[i][v.S.F] || i==v.S.F)if(!win[i][v.S.S]){ win[i][v.S.S]=1; nxt[i][v.S.S]=v.S.F; q.pb({0,{i,v.S.S}}); } } if(v.F==0){ for(int i=0;i<n;i++)if(g[i][v.S.S]){ cnt[v.S.F][i]++; if(cnt[v.S.F][i]==tg[i]) q.pb({1,{v.S.F,i}}); } } } } ll nextMove(int R){ return cur=nxt[cur][R]; } /* int main(){ ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0); return 0; } */

컴파일 시 표준 에러 (stderr) 메시지

coprobber.cpp:35:54: warning: overflow in implicit constant conversion [-Woverflow]
 const ll maxn=5e2+10, maxm=51, lg=23, mod=1e9+7, inf=1e18;
                                                      ^~~~
coprobber.cpp: In function 'll start(int, bool (*)[500])':
coprobber.cpp:74:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...