Submission #881113

#TimeUsernameProblemLanguageResultExecution timeMemory
881113smartmonkySecret (JOI14_secret)C++14
Compilation error
0 ms0 KiB
#include "secret.h" #include <bits/stdc++.h> #define ff first #define ss second #define pb push_back #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define int long long using namespace std; int t[10][1001],msk[1001],b[1001]; build(){ } void Init(int n, int a[]) { for(int i=0;i<n;i++)b[i]=a[i]; build(); //build(0,0,n-1,a); } int Query(int l, int r) { vector <int> prev, cur; for(int i = l ; i <= r; i++) cur.pb(b[i]); while((int)cur.size() != 1){ for(int i = 0; i + 1 < r; i += 2){ //prev.pb(Secret(cur[i], cur[i + 1])); } cur = prev; prev.clear(); } return cur[0]; }

Compilation message (stderr)

secret.cpp:14:1: error: ISO C++ forbids declaration of 'build' with no type [-fpermissive]
   14 | build(){
      | ^~~~~
secret.cpp: In function 'int build()':
secret.cpp:16:1: warning: no return statement in function returning non-void [-Wreturn-type]
   16 | }
      | ^