Submission #952024

#TimeUsernameProblemLanguageResultExecution timeMemory
952024goodspeed0208Super Dango Maker (JOI22_dango3)C++17
7 / 100
436 ms608 KiB
#include "dango3.h" #include<bits/stdc++.h> #include <vector> using namespace std; namespace { int variable_example = 1; } // namespace void Solve(int n, int m) { vector<int>used(n*m+1, 0); for (int k = 1 ; k <= m ; k++) { vector<int>v; vector<int>ans; for (int i = 1 ; i <= n*m ; i++) if (!used[i]) v.push_back(i); int num = 0; for (int i = 1 ; i <= n*m ; i++) { if (used[i]) continue; v.erase(find(v.begin(), v.end(), i)); //cout << i <<"\n"; int q = Query(v); if (q == m-k) { ans.push_back(i); used[i] = 1; } else { v.push_back(i); } if (ans.size() == n) break; } Answer(ans); } } //g++ -std=gnu++14 -O2 -o grader grader.cpp dango3.cpp

Compilation message (stderr)

dango3.cpp: In function 'void Solve(int, int)':
dango3.cpp:30:19: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   30 |    if (ans.size() == n) break;
      |        ~~~~~~~~~~~^~~~
dango3.cpp:18:7: warning: unused variable 'num' [-Wunused-variable]
   18 |   int num = 0;
      |       ^~~
dango3.cpp: At global scope:
dango3.cpp:8:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
    8 | int variable_example = 1;
      |     ^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...