Submission #1039313

#TimeUsernameProblemLanguageResultExecution timeMemory
1039313AndreySuper Dango Maker (JOI22_dango3)C++17
100 / 100
641 ms852 KiB
#include "dango3.h" #include<bits/stdc++.h> using namespace std; vector<int> ans[1000]; int br = 0; void dude(int n, int m, vector<int> haha) { int c = haha.size()/n; if(c == 0) { return; } if(c == 1) { ans[br] = haha; br++; return; } int mid = c/2; vector<bool> yeah(haha.size(),true); for(int i = 0; i < haha.size(); i++) { vector<int> a(0); yeah[i] = false; for(int j = 0; j < haha.size(); j++) { if(yeah[j]) { a.push_back(haha[j]); } } if(Query(a) < mid) { yeah[i] = true; } } vector<int> a(0); vector<int> b(0); for(int i = 0; i < haha.size(); i++) { if(yeah[i]) { a.push_back(haha[i]); } else { b.push_back(haha[i]); } } dude(n,m,a); dude(n,m,b); } void Solve(int n, int m) { vector<int> haha(0); for(int i = 1; i <= n*m; i++) { haha.push_back(i); } dude(n,m,haha); for(int i = 0; i < m; i++) { Answer(ans[i]); } }

Compilation message (stderr)

dango3.cpp: In function 'void dude(int, int, std::vector<int>)':
dango3.cpp:20:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   20 |     for(int i = 0; i < haha.size(); i++) {
      |                    ~~^~~~~~~~~~~~~
dango3.cpp:23:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   23 |         for(int j = 0; j < haha.size(); j++) {
      |                        ~~^~~~~~~~~~~~~
dango3.cpp:34:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   34 |     for(int i = 0; i < haha.size(); i++) {
      |                    ~~^~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...