제출 #372976

#제출 시각아이디문제언어결과실행 시간메모리
372976MilosMilutinovic자리 배치 (IOI18_seats)C++14
컴파일 에러
0 ms0 KiB
#include "seats.h" #include <bits/stdc++.h> using namespace std; const int N=10050; int h,w,x[N],y[N]; int swap_seats(int a,int b){ swap(x[a],x[b]); swap(y[a],y[b]); int row[2]={(int)1e9,0},col[2]={(int)1e9,0},ans=0; for(int i=0;i<h*w;i++){ ckmn(row[0],x[i]); ckmx(row[1],x[i]); ckmn(col[0],y[i]); ckmx(col[1],y[i]); int Area=(row[1]-row[0]+1)*(col[1]-col[0]+1); if(Area==i+1)ans++; } return ans; } void give_initial_chart(int H,int W,int* R,int* C){ h=H,w=W; for(int i=0;i<H*W;i++)x[i]=R[i],y[i]=C[i]; }

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

seats.cpp: In function 'int swap_seats(int, int)':
seats.cpp:11:3: error: 'ckmn' was not declared in this scope
   11 |   ckmn(row[0],x[i]);
      |   ^~~~
seats.cpp:12:3: error: 'ckmx' was not declared in this scope
   12 |   ckmx(row[1],x[i]);
      |   ^~~~