제출 #400641

#제출 시각아이디문제언어결과실행 시간메모리
400641ioiTraffic (IOI10_traffic)C++14
컴파일 에러
0 ms0 KiB
#include "traffic.h"
#include<bits/stdc++.h>
using namespace std ;

int LocateCentre(int N, int pp[], int S[], int D[]) {
    int mx = 1e9 + 9 ;
    mx = 0 ;
    for(int i = 0 ; i < N ; i ++)
        mn = max(mn , pp[i]);

    for(int i = 0 ; i < N ; i ++)
        if(mn == pp[i])return i ;
   return N/2;
}

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

traffic.cpp: In function 'int LocateCentre(int, int*, int*, int*)':
traffic.cpp:9:9: error: 'mn' was not declared in this scope; did you mean 'mx'?
    9 |         mn = max(mn , pp[i]);
      |         ^~
      |         mx
traffic.cpp:12:12: error: 'mn' was not declared in this scope; did you mean 'mx'?
   12 |         if(mn == pp[i])return i ;
      |            ^~
      |            mx