Submission #1354013

#TimeUsernameProblemLanguageResultExecution timeMemory
1354013lizi14CONSUL (info1cup19_consul)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
//#include "grader.h"
const int N=1e9;
void solve(int n){
    srand(time(0));
    int hi=0;
    for(int i=0; i<50; i++){
        int bati=rand()%n;
        int ixvi=kth(bati);
        int batuka=cnt(ixvi+1);
        if(batuka>n/3){
            return ixvi;
            //break;
        }
        
    }
    return -1;
    
}

Compilation message (stderr)

consul.cpp: In function 'void solve(int)':
consul.cpp:10:18: error: 'kth' was not declared in this scope
   10 |         int ixvi=kth(bati);
      |                  ^~~
consul.cpp:11:20: error: 'cnt' was not declared in this scope; did you mean 'int'?
   11 |         int batuka=cnt(ixvi+1);
      |                    ^~~
      |                    int
consul.cpp:13:20: error: return-statement with a value, in function returning 'void' [-fpermissive]
   13 |             return ixvi;
      |                    ^~~~
consul.cpp:18:12: error: return-statement with a value, in function returning 'void' [-fpermissive]
   18 |     return -1;
      |            ^~