제출 #1250020

#제출 시각아이디문제언어결과실행 시간메모리
1250020haiphong5g0선물 (IOI25_souvenirs)C++20
컴파일 에러
0 ms0 KiB
#include "souvenirs.h"
#include <bits/stdc++.h>
#define task "TEST"
#define task2 "A"
#define pl pair<ll, ll>
#define pf push_front
#define pb push_back
#define pob pop_back
#define pof pop_front
#define mp make_pair
#define fi first
#define se second
#define FOR(i, a, b, c) for (int i=a; i<=b; i+=c)
#define FORE(i, a, b, c) for (int i=a; i>=b; i+=c)
using namespace std;
using ll = long long;
using ull = unsigned long long;
const int Mod = 998244353;
const int maxn = 1e3;
const ll Inf = 1e16;
pair<vector<int>, ll> res;
ll P[maxn+1], num[maxn+1];
void Sub2_3(ll n) {
    FOR(i, 1, n-2, 1) {
        res = transaction(P[i-1]-2);
        for (auto p : res.fi) num[p]++;
        if (res.fi[0] != i) P[i] = P[i-1] - 1;
        else P[i] = P[i-1] - 2;
    }
    FOR(i, 1, n-2, 1) FOR(j, num[i], i-1, 1)
        transaction(P[i]);
    FOR(j, num[n-1], n-2, 1) transaction(P[n-2]-1);
}
// std::pair<std::vector<int>, long long> transaction(long long M)
void buy_souvenirs(int n, long long P0) {
    P[0] = P0;
    if (n == 2) transaction(P[0]-1);
    else if (n == 3) {
        res = transaction(P[0]-1);
        if (res.fi.size() == 1) {
            transaction(P[0]-res.se-2);
            transaction(P[0]-res.se-2);
        }
        else transaction((P[0]-1-res.se)/2);
    }
    else Sub2_3(n);
}
7 6 5 4 3 2 1

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

souvenirs.cpp:48:1: error: expected unqualified-id before numeric constant
   48 | 7 6 5 4 3 2 1
      | ^