Submission #1354008

#TimeUsernameProblemLanguageResultExecution timeMemory
1354008takoshanavaCONSUL (info1cup19_consul)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "grader.h"
//#define int long long
#define pb push_back
#define fs first
#define sc second
using namespace std;

void solve(int n){
    srand(67);
    int ok = 0;
    for(int i = 0; i < 25; i++){
        int val = rand() % n;
        int c = kth(val);
        int v = cnt(c + 1)
        if(v > n / 3) ok = 1, say_answer(c);
    }
    if(!ok) say_answer(-1);
}

Compilation message (stderr)

consul.cpp: In function 'void solve(int)':
consul.cpp:16:9: error: expected ',' or ';' before 'if'
   16 |         if(v > n / 3) ok = 1, say_answer(c);
      |         ^~