Submission #1188116

#TimeUsernameProblemLanguageResultExecution timeMemory
1188116Muaath_5Magic Show (APIO24_show)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define pii pair<int, int> #include "Alice.h" #ifndef MUDF #define MUDF const int SEED = 717171, CNT = 83, BIT = 60; int vals[BIT][CNT]; void build_ls() { vector<int> ls; for (int i = 3; i <= CNT*BIT+2; i++) { ls.push_back(i); } shuffle(ls.begin(), ls.end(), rng); int idx = 0; for (int i = 0; i < BIT; i++) { for (int j = 0; j < CNT; j++) { vals[i][j] = ls[idx]; idx++; } } } #endif // 0: 11, 318, 97, 4447, 54, 62, 12 // 1: // 2: // 0: // 1: vector<pii> Alice() { build_ls(); long long x = setN(CNT*BIT+2); vector<pii> res = {{1, 2}}; for (int i = 0; i < BIT; i++) { if (x>>i&1) { for (int j : vals[i]) res.push_back({2, j}); } else { for (int j : vals[i]) res.push_back({1, j}); } } return res; }
#include <bits/stdc++.h> using namespace std; #define ll long long #define pii pair<int, int> #include "Bob.h" const int SEED = 717171, CNT = 83, BIT = 60; mt19937 rng(SEED); ll Bob(vector<pii> adj) { int vals[BIT][CNT]; vector<int> ls; for (int i = 3; i <= CNT*BIT+2; i++) { ls.push_back(i); } shuffle(ls.begin(), ls.end(), rng); int idx = 0; for (int i = 0; i < BIT; i++) { for (int j = 0; j < CNT; j++) { vals[i][j] = ls[idx]; idx++; } } map<int, int> mp; for (int i = 0; i < BIT; i++) { for (int j : vals[i]) { mp[j] = i; } } ll x = 0; for (auto [u, v] : adj) { if (u == 2) { x |= (1 << mp[v]); } } return x; }

Compilation message (stderr)

# 1번째 컴파일 단계

Alice.cpp: In function 'void build_ls()':
Alice.cpp:17:35: error: 'rng' was not declared in this scope
   17 |     shuffle(ls.begin(), ls.end(), rng);
      |                                   ^~~