Submission #990736

#TimeUsernameProblemLanguageResultExecution timeMemory
990736snpmrnhlolSuper Dango Maker (JOI22_dango3)C++17
2 / 100
403 ms600 KiB
#include "dango3.h" #include <bits/stdc++.h> using namespace std; const int N = 400; const int M = 25; bool vis[N*M]; vector <int> ans; void Solve(int n, int m){ vector <int> v; vector <int> bucket[n]; for(int j = 0;j < n;j++){ v.clear(); for(int i = 0;i < n*m;i++){ if(vis[i])v.push_back(i + 1); } for(int i = 0;i < n*m;i++){ if(vis[i])continue; v.push_back(i + 1); if(Query(v) > 0){ v.pop_back(); bucket[j].push_back(i); vis[i] = 1; } if(bucket[j].size() >= m)break; } } for(int i = 0;i < m;i++){ ans.clear(); for(int j = 0;j < n;j++){ ans.push_back(bucket[j].back() + 1); bucket[j].pop_back(); } Answer(ans); } } /** 3 2 3 3 1 2 1 2 **/

Compilation message (stderr)

dango3.cpp: In function 'void Solve(int, int)':
dango3.cpp:24:33: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   24 |             if(bucket[j].size() >= m)break;
      |                ~~~~~~~~~~~~~~~~~^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...