Submission #1319394

#TimeUsernameProblemLanguageResultExecution timeMemory
1319394lrnnzMagic Show (APIO24_show)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "Alice.h"
using namespace std;

#define ll long long


vector<pair<int,int>> Alice(){
    ll n = 100;
    ll x = setN(n);
    vector<pair<int,int>> tree;

    for (int i = 2; i <= n; i++) {
        tree.pb({i, x % i});
    }

    return tree;
}
#include <bits/stdc++.h>
#include "Bob.h"
using namespace std;

#define ll long long

ll Bob(vector<pair<int,int>> V){
    
    ll ans = 1, d = 1;
    for (auto [rem, div] : V) {
        if (rem > div) swap(rem, div);
        while (ans % div != rem) {
            ans += d;
        }

        d = lcm(d, div);
    }

    return ans;
}

Compilation message (stderr)

# 1번째 컴파일 단계

Alice.cpp: In function 'std::vector<std::pair<int, int> > Alice()':
Alice.cpp:14:14: error: 'class std::vector<std::pair<int, int> >' has no member named 'pb'
   14 |         tree.pb({i, x % i});
      |              ^~