Submission #988166

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9881662024-05-24 07:42:43vjudge1Super Dango Maker (JOI22_dango3)C++17
100 / 100
2056 ms1104 KiB
#include<bits/stdc++.h>
#include "dango3.h"
using namespace std;
/*int Query(vector<int> &x)
{
cout<<"? ";
for(int i : x) cout<<i<<" ";
cout<<endl;
int a; cin>>a;
return a;
}
void Answer(vector<int> &a)
{
cout<<"! ";
for(int i : a) cout<<i<<" ";
cout<<endl;
}*/
void Solve(int n, int m)
{ //n: number of color
bool f[n*m+1]; memset(f, 0, sizeof(f));
vector<vector<int>> wtf;
for(int i = 1; i < n*m; i++){
int l = 0, r = wtf.size()-1, ans = -1;
while(l <= r){
int mid = (l+r+2)/2-1;
vector<int> question;
for(int j = 0; j <= mid; j++){
for(int k : wtf[j]) f[k] = 1;
}
f[i] = 1;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

dango3.cpp: In function 'void Solve(int, int)':
dango3.cpp:49:49: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   49 |     for(int i = 0; i < m; i++) if(wtf[i].size() < n) wtf[i].push_back(n*m);
      |                                   ~~~~~~~~~~~~~~^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...