제출 #1157784

#제출 시각아이디문제언어결과실행 시간메모리
1157784SmuggingSpun마술쇼 (APIO24_show)C++20
컴파일 에러
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; } } }

컴파일 시 표준 에러 (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);
      |            ^~~~~