답안 #1081533

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1081533 2024-08-30T07:07:22 Z djs100201 마술쇼 (APIO24_show) C++17
컴파일 오류
0 ms 0 KB
#include<bits/stdc++.h>
#define all(v) v.begin(),v.end()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using PP = pair<ll, P>;
const ll n_ =1e6+10, inf = (ll)2e9 * (ll)1e9 + 7, mod = 998244353;
ll n, m, tc = 1, a, b, c, d, sum, x, y, z, base, ans, k;
#include "Alice.h"
#include "Bob.h"
vector<pair<int,int>> Alice(){
	// add your code here
	
	// change below into your code
    long long x = setN(5000);
    vector<pair<int,int>>res;
    for(int i=1;i<=5000;i++)idx[i]=i;
    for(int i=2;i<5000;i++){
        bit[i]=(++base)%60;
        //0 ~ 59
    }
    for(int i=2;i<n;i++){
        if((1ll<<bit[i]) & x){
            res.push_back({i,5000});
        }
        else{
            res.push_back({1,i});
        }
    }
    res.push_back({1,5000});
    return res;
}




    

Compilation message

Alice.cpp: In function 'std::vector<std::pair<int, int> > Alice()':
Alice.cpp:17:29: error: 'idx' was not declared in this scope
   17 |     for(int i=1;i<=5000;i++)idx[i]=i;
      |                             ^~~
Alice.cpp:19:9: error: 'bit' was not declared in this scope
   19 |         bit[i]=(++base)%60;
      |         ^~~
Alice.cpp:23:18: error: 'bit' was not declared in this scope
   23 |         if((1ll<<bit[i]) & x){
      |                  ^~~

/usr/bin/ld: /tmp/ccopflLe.o: in function `main':
grader_bob.cpp:(.text.startup+0x324): undefined reference to `Bob(std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >)'
collect2: error: ld returned 1 exit status