Submission #639107

# Submission time Handle Problem Language Result Execution time Memory
639107 2022-09-08T15:12:34 Z LucaLucaM CONSUL (info1cup19_consul) C++17
Compilation error
0 ms 0 KB
#include "grader.h"
#include <bits/stdc++.h>

using namespace std;

void solve()
{
    int n;
    cin >> n;

    int Q = 25 + 5*(n > 50);

    Q = min(Q, n);
    for (int query = 0; query<Q; query++)
    {
        int i;
        i = chrono::duration_cast<chrono::nanoseconds>(chrono::high_resolution_clock::now().time_since_epoch()).count();
        i = abs(i), i %= n, i++;

        i = kth(i);
        if (cnt(i) > n/3)
        {
            say_answer(i);
            return;
        }
    }

    say_answer(-1);
}

Compilation message

/usr/bin/ld: /tmp/ccVgEwGl.o: in function `main':
grader.cpp:(.text.startup+0xa8): undefined reference to `solve(int)'
collect2: error: ld returned 1 exit status