답안 #1000922

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1000922 2024-06-18T11:24:14 Z 변재우(#10901) 축구 경기장 (IOI23_soccer) C++17
컴파일 오류
0 ms 0 KB
#include "soccer.h"

int biggest_stadium(int N, std::vector<std::vector<int>> F)
{
    int a=0, b=0;
    for(int i=0; i<N; i++) for(int j=0; j<N; j++) if(F[i][j]) a=i, b=i;
    return N*N-1-min(a, N-a-1)-min(b, N-b-1);
}

Compilation message

soccer.cpp: In function 'int biggest_stadium(int, std::vector<std::vector<int> >)':
soccer.cpp:7:18: error: 'min' was not declared in this scope; did you mean 'std::min'?
    7 |     return N*N-1-min(a, N-a-1)-min(b, N-b-1);
      |                  ^~~
      |                  std::min
In file included from /usr/include/c++/10/vector:60,
                 from soccer.h:1,
                 from soccer.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: 'std::min' declared here
  278 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~