제출 #1368025

#제출 시각아이디문제언어결과실행 시간메모리
1368025mannshah1211드문 곤충 (IOI22_insects)C++20
컴파일 에러
0 ms0 KiB
#include "insects.h"

int min_cardinality(int n) {
  int mn = n + 1;
  for (int i = 0; i < n; i++) {
    move_inside(i);
    int howmany = 1;
    for (int j = 0; j < n; j++) {
      if (j == i) {
        continue;
      }
      move_inside(j);
      if (press_button() == 2) {
        howmany++;
      }
      move_outside(j);
    }
    move_outside(i);
    mn = min(mn, howmany);
  }
  return mn;
}

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

insects.cpp: In function 'int min_cardinality(int)':
insects.cpp:19:10: error: 'min' was not declared in this scope; did you mean 'mn'?
   19 |     mn = min(mn, howmany);
      |          ^~~
      |          mn