제출 #1306943

#제출 시각아이디문제언어결과실행 시간메모리
1306943michael12선물 (IOI25_souvenirs)C++20
컴파일 에러
0 ms0 KiB
#include "souvenirs.h" #include<bits/stdc++.h> using namespace std; #define ff first #define ss second #define pb push_back #define mp make_pair #define sm pair<vector<int>, long long> void sub3(int n, P0){ sm T = transaction(P0 - 1); if(T.ff.size() == 1){ int p1 = P0 - 1 - T.ss; transaction(p1 - 1); transaction(p1 - 1); } else{ int sm2 = P0 - 1 - T.ss; transaction(sm2 / 2); transaction(sm2 / 2); } } void buy_souvenirs(int N, long long P0){ long long p = P0; if(N == 2){ transaction(p - 1); return; } if(N == 3){ sub3(N, P0); return; } }

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

souvenirs.cpp:9:18: error: 'P0' has not been declared
    9 | void sub3(int n, P0){
      |                  ^~
souvenirs.cpp: In function 'void sub3(int, int)':
souvenirs.cpp:10:23: error: 'P0' was not declared in this scope; did you mean 'y0'?
   10 |    sm T = transaction(P0 - 1);
      |                       ^~
      |                       y0