Submission #925964

#TimeUsernameProblemLanguageResultExecution timeMemory
925964andrei_boacaSuper Dango Maker (JOI22_dango3)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "dango3.h" #ifndef ONLINE_JUDGE #include "grader.cpp" #endif // ONLINE_JUDGE using namespace std; int cul[10005]; int nn,mm; vector<int> poz; bool bad[10005]; bool have(int x,int l,int r) { bad[x]=1; for(int i=l;i<=r;i++) bad[poz[i]]=1; vector<int> v; for(int i=1;i<=nn*mm;i++) { if(!bad[i]) v.push_back(i); else bad[i]=0; } int rez=Query(v); return rez==mm-2; } bool f[10005]; void Solve(int n,int m) { nn=n; mm=m; cul[1]=1; poz.push_back(1); for(int i=2;i<=n*m;i++) { int st=0; int dr=poz.size(); dr--; int who=0; while(st<=dr) { int mij=(st+dr)/2; if(have(i,st,mij)) { if(st==mij) { who=st+1; break; } dr=mij; } else st=mij+1; } if(who==0) { poz.push_back(i); who=poz.size(); } cul[i]=who; } for(int z=1;z<=m;z++) { for(int i=1;i<=n;i++) f[i]=0; vector<int> v; for(int i=1;i<=n*m;i++) if(cul[i]!=0&&f[cul[i]]==0) { v.push_back(i); f[cul[i]]=1; cul[i]=0; } Answer(v); } }

Compilation message (stderr)

/usr/bin/ld: /tmp/cc7Xbkt3.o: in function `Query(std::vector<int, std::allocator<int> > const&)':
grader.cpp:(.text+0x50): multiple definition of `Query(std::vector<int, std::allocator<int> > const&)'; /tmp/ccnYP6r5.o:dango3.cpp:(.text+0x190): first defined here
/usr/bin/ld: /tmp/cc7Xbkt3.o: in function `Answer(std::vector<int, std::allocator<int> > const&)':
grader.cpp:(.text+0x1c0): multiple definition of `Answer(std::vector<int, std::allocator<int> > const&)'; /tmp/ccnYP6r5.o:dango3.cpp:(.text+0x1c0): first defined here
/usr/bin/ld: /tmp/cc7Xbkt3.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccnYP6r5.o:dango3.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status