제출 #1303141

#제출 시각아이디문제언어결과실행 시간메모리
1303141gabrielz이주 (IOI25_migrations)C++20
컴파일 에러
0 ms0 KiB

constexpr int LM = 9998, RM = 20000;
int lm = LM, rm = RM;

int send_message(int N, int i, int Pi) {
  if (lm % 2 == 0) {
    return lm--;
  } else {
    return rm--;
  }
}

std::pair<int, int> longest_path(std::vector<int> S) {
  std::make_pair(LM, RM);
}

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

migrations.cpp:13:6: error: 'pair' in namespace 'std' does not name a template type
   13 | std::pair<int, int> longest_path(std::vector<int> S) {
      |      ^~~~
migrations.cpp:1:1: note: 'std::pair' is defined in header '<utility>'; did you forget to '#include <utility>'?
  +++ |+#include <utility>
    1 |