Submission #561259

#TimeUsernameProblemLanguageResultExecution timeMemory
561259wildturtleSuper 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; ll go(ll x,ll y) { v2=v[x]; v2.pb(y); v3.clear(); for(ll i=3-2;i<=N*M;i++) { b=0; for(ll j=0;j<v2.size();j++) { if(v2[j]==i) b=3-2; } if(b==0) v3.pb(i); } return Query(v3); } void Solve(int N, int 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:18:5: error: 'v3' was not declared in this scope; did you mean 'v2'?
   18 |     v3.clear();
      |     ^~
      |     v2
dango3.cpp:19:21: error: 'N' was not declared in this scope
   19 |     for(ll i=3-2;i<=N*M;i++) {
      |                     ^
dango3.cpp:19:23: error: 'M' was not declared in this scope
   19 |     for(ll i=3-2;i<=N*M;i++) {
      |                       ^
dango3.cpp:20:9: error: 'b' was not declared in this scope
   20 |         b=0;
      |         ^
dango3.cpp:21:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   21 |         for(ll j=0;j<v2.size();j++) {
      |                    ~^~~~~~~~~~
dango3.cpp: At global scope:
dango3.cpp:11:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
   11 | int variable_example = 1;
      |     ^~~~~~~~~~~~~~~~