Submission #1203564

#TimeUsernameProblemLanguageResultExecution timeMemory
1203564emad234Magic Show (APIO24_show)C++20
Compilation error
0 ms0 KiB
#include "Alice.h" #include "bits/stdc++.h" using namespace std; vector<pair<int,int>> Alice(){ long long x = setN(5000); vector<int>idx; for(int i = 1;i <= 5000;i++) idx.push_back(i / 83); shuffle(idx.begin(),idx.end(),mt19937(234)); vector<pair<int, int>>v = {{1,2},{1,3}}; for(int i = 4;i <= 5000;i++) if((x & (1LL << (idx[i - 1])))) v.push_back({2,i}); else v.push_back({3,i}); return v; }
#include "Bob.h" #include "bits/stdc++.h" using namespace std; long long Bob(vector<pair<int,int>> V){ int vis[70] = {}; vector<long long>idx,v[4]; for(int i = 1;i <= 5000;i++)idx.push_back(i / 83); shuffle(idx.begin(),idx.end(),mt19937(234)); for(auto x : V) if(x.F == 3 || x.F == 2) v[x.F].push_back(x.S); long long st = (v[2].size() > v[3].size() ? 2 : 3); long long ans = (st == 3 ? ans = (1LL << 61) - 1 : 0); for(auto x : v[st]) if(!vis[idx[x - 1]]++) ans += (1LL << idx[x - 1]) * (st == 2 ? 1 : -1); return ans; }

Compilation message (stderr)

# 2번째 컴파일 단계

Bob.cpp: In function 'long long int Bob(std::vector<std::pair<int, int> >)':
Bob.cpp:9:30: error: 'struct std::pair<int, int>' has no member named 'F'
    9 |         for(auto x : V) if(x.F == 3 || x.F == 2) v[x.F].push_back(x.S);
      |                              ^
Bob.cpp:9:42: error: 'struct std::pair<int, int>' has no member named 'F'
    9 |         for(auto x : V) if(x.F == 3 || x.F == 2) v[x.F].push_back(x.S);
      |                                          ^
Bob.cpp:9:54: error: 'struct std::pair<int, int>' has no member named 'F'
    9 |         for(auto x : V) if(x.F == 3 || x.F == 2) v[x.F].push_back(x.S);
      |                                                      ^
Bob.cpp:9:69: error: 'struct std::pair<int, int>' has no member named 'S'
    9 |         for(auto x : V) if(x.F == 3 || x.F == 2) v[x.F].push_back(x.S);
      |                                                                     ^