Submission #1138745

#TimeUsernameProblemLanguageResultExecution timeMemory
1138745adiyerMagic 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 = setN(5000), k = 61; vector < pair < int, int > > g; for(int v = 2; v <= 61; v++) g.push_back({1, v}); for(int v = 2; v <= 61; v++){ if(!(x >> (v - 2) & 1) || k == 5000) continue; x -= (1ll << (v - 2)); for(ll j = 1; j <= 82; j++) g.push_back({v, ++k}); if(!x) while(k < 5000) g.push_back({v, ++k}); } while(k < 5000) g.push_back({1, ++k}); return g; }
#include <bits/stdc++.h> #include "Bob.h" using namespace std; typedef long long ll; long long Bob(vector < pair < int, int > > V){ ll x = 0; vector < int > g[5050]; for(int i = 0; i < V.size(); i++){ g[V[i].first].push_back(V[i].second); g[V[i].second].push_back(V[i].first); } for(int v = 2; v <= 61; v++){ if(g[u].size() <= 1) continue; x |= (1ll << (v - 2)); } return x; }

Compilation message (stderr)

# 2번째 컴파일 단계

Bob.cpp: In function 'long long int Bob(std::vector<std::pair<int, int> >)':
Bob.cpp:16:14: error: 'u' was not declared in this scope
   16 |         if(g[u].size() <= 1) continue;
      |              ^