Submission #1188115

#TimeUsernameProblemLanguageResultExecution timeMemory
1188115Muaath_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:9:18: error: lvalue required as decrement operand
    9 | const int SEED = 717171--, CNT = 83, BIT = 60;
      |                  ^~~~~~
Alice.cpp:11:10: error: 'BIT' was not declared in this scope
   11 | int vals[BIT][CNT];
      |          ^~~
Alice.cpp:11:15: error: 'CNT' was not declared in this scope
   11 | int vals[BIT][CNT];
      |               ^~~
Alice.cpp: In function 'void build_ls()':
Alice.cpp:14:26: error: 'CNT' was not declared in this scope
   14 |     for (int i = 3; i <= CNT*BIT+2; i++) {
      |                          ^~~
Alice.cpp:14:30: error: 'BIT' was not declared in this scope
   14 |     for (int i = 3; i <= CNT*BIT+2; i++) {
      |                              ^~~
Alice.cpp:17:35: error: 'rng' was not declared in this scope
   17 |     shuffle(ls.begin(), ls.end(), rng);
      |                                   ^~~
Alice.cpp:19:25: error: 'BIT' was not declared in this scope
   19 |     for (int i = 0; i < BIT; i++) {
      |                         ^~~
Alice.cpp:20:29: error: 'CNT' was not declared in this scope
   20 |         for (int j = 0; j < CNT; j++) {
      |                             ^~~
Alice.cpp:21:13: error: 'vals' was not declared in this scope; did you mean 'ls'?
   21 |             vals[i][j] = ls[idx];
      |             ^~~~
      |             ls
Alice.cpp: In function 'std::vector<std::pair<int, int> > Alice()':
Alice.cpp:36:24: error: 'CNT' was not declared in this scope
   36 |     long long x = setN(CNT*BIT+2);
      |                        ^~~
Alice.cpp:36:28: error: 'BIT' was not declared in this scope
   36 |     long long x = setN(CNT*BIT+2);
      |                            ^~~
Alice.cpp:40:26: error: 'vals' was not declared in this scope
   40 |             for (int j : vals[i])
      |                          ^~~~
Alice.cpp:43:26: error: 'vals' was not declared in this scope
   43 |             for (int j : vals[i])
      |                          ^~~~