제출 #682895

#제출 시각아이디문제언어결과실행 시간메모리
682895irmuunPrisoner Challenge (IOI22_prison)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> #include "prison.h" using namespace std; #define ll long long vector<vector<int>> devise_strategy(int n){ vector<vector<int>>v(n+1,vector<int>(n+1,0)); for(int i=1;i<=n;i++){ s[0][i]=i; } for(int i=1;i<=n;i++){ s[i][0]=1; for(int j=1;j<=n;j++){ if(j<i){ s[i][j]=-2; } else{ s[i][j]=-1; } } } return s; }

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

prison.cpp: In function 'std::vector<std::vector<int> > devise_strategy(int)':
prison.cpp:8:3: error: 's' was not declared in this scope
    8 |   s[0][i]=i;
      |   ^
prison.cpp:11:3: error: 's' was not declared in this scope
   11 |   s[i][0]=1;
      |   ^
prison.cpp:21:9: error: 's' was not declared in this scope
   21 |  return s;
      |         ^