Submission #965119

#TimeUsernameProblemLanguageResultExecution timeMemory
965119owoovoAncient Machine 2 (JOI23_ancient2)C++17
10 / 100
86 ms1788 KiB
#include "ancient2.h" #include<bits/stdc++.h> using namespace std; namespace { int variable_example = 1; } // namespace string Solve(int n) { string s(n, '0'); vector<int> a, b; for(int i=0;i<n;i++){ a.resize(i+3),b.resize(i+3); for(int j=0;j<i;j++){ a[j]=j+1; b[j]=j+1; } a[i]=i+1; b[i]=i+2; for(int j=i+1;j<=i+2;j++)a[j]=j,b[j]=j; int u=Query(i+3,a,b); cerr<<u<<"\n"; if(u==i+1){ s[i]='0'; }else{ s[i]='1'; } } cerr<<s<<"\n"; return s; }

Compilation message (stderr)

ancient2.cpp:7:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
    7 | int variable_example = 1;
      |     ^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...