제출 #637486

#제출 시각아이디문제언어결과실행 시간메모리
637486Fidan죄수들의 도전 (IOI22_prison)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "prison.h" using namespace std; typedef int ll; vector<vector<ll>> devise_strategy(ll n){ vector<vector<ll>> v(24, vector<ll> (n+1, 0)); for(ll i=0; i<24; i++){ if(i%4==0 || i%4==1) v[i][0]=0; else v[i][0]=1; } for(ll i=1; i<=n; i++){ if(i>=4096) v[0][i]=23; else v[0][i]=22; } for(ll i=1; i<=n; i++){ if(i%4==3) v[1][i]=-2; else if(i%4==0) v[1][i]=-1; else if(i%4==1) v[1][i]=-1; else v[1][i]=-2; } for(ll i=2; i<4; i++){ for(ll j=1; j<=n; j++){ ll k=2, b=i%2, bj; if((j & (1<<k))>0) bj=1; else bj=0; if(b==bj){ if(j%4==0) v[i][j]=-1; else if(j%4==3) v[i][j]=-2; else v[i][j]=1; } else if(bj==1){ if(k%2==0) v[i][j]=-1; else v[i][j]=-2; } else{ if(k%2==0) v[i][j]=-2; else v[i][j]=-1; } } } for(ll i=4; i<24; i++){ for(ll j=1; j<=n; j++){ ll k=i/2+1, b=i%2, bj; if((j & (1<<k))>0) bj=1; else bj=0; if(b==bj){ ll bj1=0; if((j & (1<<(k-1)))>0) bj1=1; v[i][j]=2*k-4+bj1; } else if(bj==1){ if(k%2==0) v[i][j]=-1; else v[i][j]=-2; } else{ if(k%2==0) v[i][j]=-2; else v[i][j]=-1; } } } return v; } //~ int main(){ //~ ll n; //~ cin>>n; //~ vector<vector<ll>> v=devise_strategy(n); //~ for(ll i=0; i<24; i++){ //~ cout<<i<<" : "; //~ for(ll j=0; j<=n; j++){ //~ cout<<v[i][j]<<" "; //~ } //~ cout<<endl; //~ } //~ return 0; }

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

prison.cpp:75:1: error: expected declaration before '}' token
   75 | }
      | ^