Submission #344540

# Submission time Handle Problem Language Result Execution time Memory
344540 2021-01-06T05:26:25 Z nevermoree Xoractive (IZhO19_xoractive) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>

#define ld long double
#define ll long long
#define ull unsigned long long
#define F first
#define S second
#define nl '\n'
#define pii pair <ll, ll>
#define pb push_back
#define mp make_pair
#define pi 3.14159265358979323846264
#define y1 abacaba
#define fn "abc"
#define sz(a) (int)(a).size()
#define all(a) (a).begin(), (a).end()
#define pcnt(i) __builtin_popcount(i)
#define lcm(a,b) (a * b) / __gcd(a, b)
#define chill_wave ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define pressF freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);

using namespace std;

const long long MXN = 1e7 + 3;
const long long MAXN = 2e3 + 7;
const long long MOD = 1e9 + 7;
const long long INF = 1e18;
const long long MAXLOG = 22;
const long long MAX = 32000;

inline void f_math(bool ok = 0) { chill_wave if(ok) { pressF; } }

//int dx[]= {1,0,-1,0}; int dy[]= {0,1,0,-1}; //4 Direction
//int dx[]={1,1,0,-1,-1,-1,0,1}; int dy[]={0,1,1,1,0,-1,-1,-1};//8 direction
//int dx[]={2,1,-1,-2,-2,-1,1,2}; int dy[]={1,2,2,1,-1,-2,-2,-1};//Knight Direction
//int dx[]={-1,-1,+0,+1,+1,+0}; int dy[]={-1,+1,+2,+1,-1,-2}; //Hexagonal Direction

ll n;

vector <int> v;

int main() {

	//f_math();
    cout << "guess(n)";
    cin >> n;
    int id = 1;
    while(n--) {
        int x;
        cout << "ask(" << id << ')' << nl;
        cin >> x;
        v.pb(x);
        id++;
    }
    cout << sz(v) << nl;
    for(auto u : v) {
        cout << u << ' ';
    }
    return 0;
}

Compilation message

/tmp/ccL3p1Ss.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccTshWWS.o:Xoractive.cpp:(.text.startup+0x0): first defined here
/tmp/ccL3p1Ss.o: In function `main':
grader.cpp:(.text.startup+0x164): undefined reference to `guess(int)'
collect2: error: ld returned 1 exit status