제출 #1370411

#제출 시각아이디문제언어결과실행 시간메모리
1370411dssfsuper2축구 경기장 (IOI23_soccer)C++20
컴파일 에러
0 ms0 KiB
#include "soccer.h"
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
using pii = pair<int, int>;
int biggest_stadium(int N, vector<vector<int>> F){
    pii ps={0, 0};
    for(int i = 0;i<N;i++){
        for(int j = 0;j<N;j++){
            if(F[i][j]==1)ps={i, j};
        }
    }
    return rs=N*N-min(ps.first, N-ps.first-1)-min(ps.second, N-ps.second-1);
}

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

soccer.cpp: In function 'int biggest_stadium(int, std::vector<std::vector<int> >)':
soccer.cpp:13:12: error: 'rs' was not declared in this scope; did you mean 'ps'?
   13 |     return rs=N*N-min(ps.first, N-ps.first-1)-min(ps.second, N-ps.second-1);
      |            ^~
      |            ps