Submission #1203563

#TimeUsernameProblemLanguageResultExecution timeMemory
1203563emad234Magic 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)

# 1번째 컴파일 단계

Alice.cpp: In function 'std::vector<std::pair<int, int> > Alice()':
Alice.cpp:14:2: error: expected '}' at end of input
   14 | }
      |  ^
Alice.cpp:4:30: note: to match this '{'
    4 | vector<pair<int,int>> Alice(){
      |                              ^
Alice.cpp:14:2: warning: control reaches end of non-void function [-Wreturn-type]
   14 | }
      |  ^