제출 #1274516

#제출 시각아이디문제언어결과실행 시간메모리
1274516linhhnt11072010선물 (IOI25_souvenirs)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll pp[105]; pair<vector<int>, ll> transaction(long long m); void buy_souvenirs(int n, ll p0){ ll tt = p0; for(int i = 1;i<n;i++){ pair<vector<int>, ll> pr = transaction(tt-1); d++; for(int j = 0;j<pr.first.size();j++) pp[pr.first[j]]++; if(pr.second>0) tt = tt-2; else tt = tt-1; for(int j = pp[i]+1;j<=i;j++) transaction(tt); } }

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

souvenirs.cpp: In function 'void buy_souvenirs(int, ll)':
souvenirs.cpp:10:17: error: 'd' was not declared in this scope
   10 |                 d++;
      |                 ^