Submission #474384

#TimeUsernameProblemLanguageResultExecution timeMemory
474384hhhhauraCONSUL (info1cup19_consul)C++14
85 / 100
38 ms200 KiB
#include "grader.h" #define wiwihorz #include <bits/stdc++.h> #pragma GCC optimize("Ofast") #pragma loop-opt(on) #define rep(i, a, b) for(int i = a; i <= b; i ++) #define rrep(i, a, b) for(int i = b; i >= a; i--) #define all(x) x.begin(), x.end() #define ceil(a, b) ((a + b - 1) / (b)) using namespace std; #define lld long double #define pii pair<int, int> #define random mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count()) #ifdef wiwihorz #define print(a...) cerr << "Line: " << __LINE__, kout("[" + string(#a) + "] = ", a) void vprint(auto L, auto R) { cerr << *L << " \n"[next(L) == R], ++L; } void kout() { cerr << endl; } template<class T1, class ... T2> void kout(T1 a, T2 ... e) { cerr << a << " ", kout(e...);} #else #define print(...) 0 #define vprint(...) 0 #endif random; void solve(int n) { set<int> s; rep(i, 1, 30) { int k; while(k = rnd() % n + 1, s.find(k) != s.end()); s.insert(k); k = kth(k); if(cnt(k) > n / 3) { say_answer(k); return; } } say_answer(-1); }

Compilation message (stderr)

consul.cpp:5: warning: ignoring '#pragma loop ' [-Wunknown-pragmas]
    5 | #pragma loop-opt(on)
      | 
consul.cpp:20:13: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
   20 | void vprint(auto L, auto R) { cerr << *L << " \n"[next(L) == R], ++L; }
      |             ^~~~
consul.cpp:20:21: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
   20 | void vprint(auto L, auto R) { cerr << *L << " \n"[next(L) == R], ++L; }
      |                     ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...