Submission #1022575

#TimeUsernameProblemLanguageResultExecution timeMemory
1022575manizareLibrary (JOI18_library)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #pragma GCC optimize("O3,unroll-loops") #define pb push_back #define F first #define S second #define all(a) a.begin(),a.end() #define pii pair <int,int> #define PII pair<pii , pii> #define ld long double #define int long long #define sz(v) (int)v.size() #define rep(i , a , b) for(int i=a;i <= b;i++) #define per(i, a , b) for(int i=a;i >= b;i--) using namespace std ; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); const int maxn = 2000 + 10 , sq = 550, inf = 1e8+10 , mod = 10007 , lg = 20 ; int nx[maxn] , n , mark[maxn] ; void int q2(vector <int> vec){ rep(i ,1, n)mark[i] = 0 ; while(sz(vec)){ int v = vec.back() ;vec.pop_back() ; while(1){ mark[v] = 1; if(nx[v] == 0)break; v = nx[v] ; } } return que() ; } int find(vector <int> vec , int x){ if(sz(vec) == 1){ return vec[0] ; } vector <int> a ; rep(i ,0 ,sz(vec)/2-1){ a.pb(vec[i]) ; } a.pb(x) ; if(q2(a)==sz(a)){ vector <int> b ; rep(i , sz(vec)/2 , sz(vec)-1){ b.pb(vec[i]) ; } return find(b , x) ; } a.pop_back() ; return find(a , x) ; } signed main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n ; rep(i ,1 , n){ cin } } /* */

Compilation message (stderr)

library.cpp:12:18: error: 'long long' specified with 'void'
   12 | #define int long long
      |                  ^~~~
library.cpp:23:1: note: in expansion of macro 'int'
   23 | int q2(vector <int> vec){
      | ^~~
library.cpp: In function 'void q2(std::vector<long long int>)':
library.cpp:33:12: error: 'que' was not declared in this scope
   33 |     return que() ;
      |            ^~~
library.cpp: In function 'long long int find(std::vector<long long int>, long long int)':
library.cpp:45:13: error: invalid operands of types 'void' and 'long long int' to binary 'operator=='
   45 |     if(q2(a)==sz(a)){
      |        ~~~~~^~
      |          |
      |          void
library.cpp: In function 'int main()':
library.cpp:60:12: error: expected ';' before '}' token
   60 |         cin
      |            ^
      |            ;
   61 |     }
      |     ~       
library.cpp:60:9: warning: statement has no effect [-Wunused-value]
   60 |         cin
      |         ^~~