제출 #1250761

#제출 시각아이디문제언어결과실행 시간메모리
1250761alex0152선물 (IOI25_souvenirs)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; void buy_souvenirs(int n, long long P0) { long long x; if(n==2) { pair<vector<int>, long long> p; p=transaction(P0-1LL); return; } if(n==3) { pair<vector<int>, long long> p; p=transaction(P0-1LL); if(p.first.size()==1) { x=p.second; p=transaction(P0-2LL-x); p=transaction(P0-2LL-x); return; } x=P0-p.second-1LL; p=transaction(x/2LL); return ; } }

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

souvenirs.cpp: In function 'void buy_souvenirs(int, long long int)':
souvenirs.cpp:12:11: error: 'transaction' was not declared in this scope
   12 |         p=transaction(P0-1LL);
      |           ^~~~~~~~~~~
souvenirs.cpp:18:11: error: 'transaction' was not declared in this scope
   18 |         p=transaction(P0-1LL);
      |           ^~~~~~~~~~~