제출 #1285530

#제출 시각아이디문제언어결과실행 시간메모리
1285530lizi14선물 (IOI25_souvenirs)C++20
컴파일 에러
0 ms0 KiB
#include "souvenirs.h" #include <utility> #include <vector> #include <bits/stdc++.h> using namespace std; void buy_souvenirs(int N, long long P0) { //int ans=P0-1-a; //res=transaction(ans); if(N==3){ pair<vector<int>, long long> res = transaction(P0-1); int a=res.second; vector<int> b=res.first; //cout<<b[0]<<" "<<a<<endl; res=transaction((P0/2); // a=res.second; // b=res.first; // if(b[0]==2){ // } // else{ // } //cout<<b[0]<<" "<<a<<endl; //if(a>0)transaction((P0-1)/2); } else{ for(int i=0; i<N; i++){ for(int j=1; j<=i; j++){ transaction(P0-1); } P0--; } } return; }

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

souvenirs.cpp: In function 'void buy_souvenirs(int, long long int)':
souvenirs.cpp:18:35: error: expected ')' before ';' token
   18 |             res=transaction((P0/2);
      |                            ~      ^
      |                                   )