제출 #1252063

#제출 시각아이디문제언어결과실행 시간메모리
1252063islam_2010선물 (IOI25_souvenirs)C++20
컴파일 에러
0 ms0 KiB
#include "souvenirs.h"
#include <bits/stdc++.h>
using namespace std;


void buy_souvenirs(int N, long long P0){
    if(N==2){
        transaction(P0-1);
    }else {
        for(int i = 0; i < n-1; i++){
            int m = n-i-1;
            for(int j = 0; j <= i; j++){
                transaction(m);
            }
        }

    }
}

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

souvenirs.cpp: In function 'void buy_souvenirs(int, long long int)':
souvenirs.cpp:10:28: error: 'n' was not declared in this scope
   10 |         for(int i = 0; i < n-1; i++){
      |                            ^