Submission #1157784

#TimeUsernameProblemLanguageResultExecution timeMemory
1157784SmuggingSpunMagic Show (APIO24_show)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "Alice.h" using namespace std; typedef long long ll; vector<pair<int, int>>Alice(){ ll X = get_n(5000); vector<pair<int, int>>ans; for(int i = 2; i <= 5000; i++){ ans.emplace_back(X % (i - 1) + 1, i); } return ans; }
#include<bits/stdc++.h> #include "Bob.h" using namespace std; typedef long long ll; template<class T>bool maximize(T& a, T b){ if(a < b){ a = b; return true; } return false; } ll Bob(vector<pair<int, int>>edge){ int max_v = 0, start; for(auto& [u, v] : edge){ if(maximize(max_v, v)){ start = u; } } max_v--; for(int i = start - 1; i <= 25000000; i += max_v){ bool can = true; for(auto& [u, v] : edge){ if(i % (v - 1) + 1 != u){ can = false; break; } } if(can){ return i; } } }

Compilation message (stderr)

# 1번째 컴파일 단계

Alice.cpp: In function 'std::vector<std::pair<int, int> > Alice()':
Alice.cpp:6:12: error: 'get_n' was not declared in this scope
    6 |     ll X = get_n(5000);
      |            ^~~~~