제출 #1203561

#제출 시각아이디문제언어결과실행 시간메모리
1203561emad234마술쇼 (APIO24_show)C++20
컴파일 에러
0 ms0 KiB
#include "Alice.h" #include "bits/stdc++.h" using namespace std; vector<pair<int,int>> Alice(){ long long x = setN(5000); vector<long long>idx; for(int i = 1;i <= 5000;i++) idx.push_back(i / 83); shuffle(idx.begin(),idx.end(),mt19937(234)); vector<pair<long long,long long>>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 = 2; if(v[2].size() < v[3].size()) st = 3; long long ans = 0; if(st == 3) ans = (1LL << 61) - 1; for(auto x : v[st]) if(!vis[idx[x - 1]]++) ans += (1LL << idx[x - 1]) * (st == 2 ? 1 : -1); return ans; }

컴파일 시 표준 에러 (stderr) 메시지

# 1번째 컴파일 단계

Alice.cpp: In function 'std::vector<std::pair<int, int> > Alice()':
Alice.cpp:14:24: error: could not convert 'v' from 'vector<pair<long long int,long long int>>' to 'vector<pair<int,int>>'
   14 |                 return v;
      |                        ^
      |                        |
      |                        vector<pair<long long int,long long int>>
Alice.cpp:15:2: error: expected '}' at end of input
   15 | }
      |  ^
Alice.cpp:5:30: note: to match this '{'
    5 | vector<pair<int,int>> Alice(){
      |                              ^