Submission #1177626

#TimeUsernameProblemLanguageResultExecution timeMemory
1177626vneduSecret (JOI14_secret)C++20
Compilation error
0 ms0 KiB
#include "secret.h" #include<bits/stdc++.h> using namespace std; typedef long long ll; template<class T> bool maximize(T &a, const T &b){ return (a < b ? a = b, 1 : 0); } template<class T> bool minimize(T &a, const T &b){ return (a > b ? a = b, 1 : 0); } #define fi first #define se second #define pb push_back #define ii pair<int, int> #define all(x) x.begin(), x.end() #define TASK "nonsense" /// end of template /// const int N = 1e3 + 13; int n,a[N],dp[N][N]; void work(int l, int r) { if (l==r) { dp[l][r]=a[l]; return; } int mid((l+r)>>1); work(l,mid); work(mid+1,r); for (int i=mid-1; i>=l; --i) dp[i][mid]=Secret(a[i],dp[i+1][mid]); for (int i=mid+2; i<=r; ++i) dp[mid+1][i]=Secret(dp[mid+1][i-1],a[i]); } void Init(int N, int A[]) { n=N; for (int i=0; i<n; ++i) a[i+1]=A[i]; work(1,n); } int Query(int lo, int hi) { if (lo==hi) return a[lo]; int l=1,r=n,mid; while (1) { mid=(lo+hi)>>1; if (hi<=mid) r=mid; else if (mid+1<=lo) l=mid+1; else break; } mid=(l+r)>>1; return Secret(dp[lo][mid],dp[mid+1][hi]); } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); // freopen(TASK".inp","r",stdin); // freopen(TASK".out","w",stdout); int testcase=1; // cin>>testcase; while (testcase--) solve(); // #define TIME (1.0 * clock() / CLOCKS_PER_SEC) // cerr << "Time elapsed: " << TIME << " s.\n"; return 0; }

Compilation message (stderr)

secret.cpp: In function 'int main()':
secret.cpp:70:9: error: 'solve' was not declared in this scope
   70 |         solve();
      |         ^~~~~