제출 #867900

#제출 시각아이디문제언어결과실행 시간메모리
867900bucz죄수들의 도전 (IOI22_prison)C++17
컴파일 에러
0 ms0 KiB
//NORMAL #include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define st first #define nd second const int M=1e6+50; //const int MOD=1e9+7; //BUCZ®, 2023 //CZEMU TE ZADANIA ZAWSZE MAJA TAKIE OBVIOUS ROZWIAZANIA //SZUKAC OPTYMALIZACJI!!! int bity_index[10000][10]; void oblicz_bity(){ for(int i=0;i<10000;i++){ int x=i; for(int j=9;j>-1;j--){ bity_index[i][j]=x%3; x=x/3; } } } vector<vector<int>> devise strategy (int N){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); vector<vector<int>> wynik(30); oblicz_bity(); //int N=12; //for(int i=0;i<10;i++){ //cout << bity_index[192][i]; //} for(int i=0;i<30;i++){ int index = i%10; int bitek = i/10; wynik[i].resize(N+1); wynik[i][0]=index%2; int moj=-1-index%2; int twoj=-2+index%2; for(int j=1; j<=N;j++){ if(j==1)wynik[i][j]=moj; else if(j==N)wynik[i][j]=twoj; else if(bitek < bity_index[j][index])wynik[i][j]=twoj; else { wynik[i][j]=index+1+10*bity_index[j][index+1]; } } } /*for(int i=0;i<30;i++){ for(int j=1; j<=N;j++){ cout << wynik[i][j] << " "; } cout << "\n"; }*/ return wynik; }

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

prison.cpp:26:28: error: expected initializer before 'strategy'
   26 | vector<vector<int>> devise strategy (int N){
      |                            ^~~~~~~~