Submission #777136

#TimeUsernameProblemLanguageResultExecution timeMemory
777136LeaRouseCONSUL (info1cup19_consul)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include <grader.h> #define ff first #define ss second #define fastio ios_base::sync_with_stdio(0); cin.tie(0); #define ll long long using namespace std; map<int,int>m; void say_answer(int n){ for(int i=0;i<n;i++){ m[kth(i+1)]++; } for(auto it:m){ if(it.ss>n/3) return it.ff; } return -1; }

Compilation message (stderr)

consul.cpp: In function 'void say_answer(int)':
consul.cpp:3:12: error: return-statement with a value, in function returning 'void' [-fpermissive]
    3 | #define ff first
      |            ^
consul.cpp:14:35: note: in expansion of macro 'ff'
   14 |         if(it.ss>n/3)   return it.ff;
      |                                   ^~
consul.cpp:16:12: error: return-statement with a value, in function returning 'void' [-fpermissive]
   16 |     return -1;
      |            ^~