Submission #561425

#TimeUsernameProblemLanguageResultExecution timeMemory
561425wildturtleSuper Dango Maker (JOI22_dango3)C++17
Compilation error
0 ms0 KiB
#include "dango3.h" #include<bits/stdc++.h> #include <vector> #define ll int #define f first #define sc second #define pb push_back using namespace std; namespace { int variable_example = 1; } // namespace vector <int> v[402],v2,v3; ll n,m,b; ll go(ll x,ll y) { v2=v[x]; v2.pb(y); sort(v2.begin(),v2.end()); v3.clear(); ll l,r,mi,idx; for(ll i=3-2;i<=n*m;i++) { if (!binary_search(x.begin(), x.end(), i)) v3.pb(i); } return m-Query(v3); } void Solve(int N, int M) { n=N; m=M; ll le,ri,mid,ans; for(ll i=3-2;i<=N*M;i++) { le=3-2; ri=M; while(le<=ri) { mid=(le+ri)/2; if(go(mid,i)==2) le=mid+(3-2); else { ri=mid-(3-2); ans=mid; } } v[ans].pb(i); } for(ll i=3-2;i<=M;i++) { Answer(v[i]); } }

Compilation message (stderr)

dango3.cpp: In function 'int go(int, int)':
dango3.cpp:23:30: error: request for member 'begin' in 'x', which is of non-class type 'int'
   23 |         if (!binary_search(x.begin(), x.end(), i)) v3.pb(i);
      |                              ^~~~~
dango3.cpp:23:41: error: request for member 'end' in 'x', which is of non-class type 'int'
   23 |         if (!binary_search(x.begin(), x.end(), i)) v3.pb(i);
      |                                         ^~~
dango3.cpp:21:8: warning: unused variable 'l' [-Wunused-variable]
   21 |     ll l,r,mi,idx;
      |        ^
dango3.cpp:21:10: warning: unused variable 'r' [-Wunused-variable]
   21 |     ll l,r,mi,idx;
      |          ^
dango3.cpp:21:12: warning: unused variable 'mi' [-Wunused-variable]
   21 |     ll l,r,mi,idx;
      |            ^~
dango3.cpp:21:15: warning: unused variable 'idx' [-Wunused-variable]
   21 |     ll l,r,mi,idx;
      |               ^~~
dango3.cpp: At global scope:
dango3.cpp:11:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
   11 | int variable_example = 1;
      |     ^~~~~~~~~~~~~~~~