Submission #892541

# Submission time Handle Problem Language Result Execution time Memory
892541 2023-12-25T13:24:33 Z iskhakkutbilim Super Dango Maker (JOI22_dango3) C++17
0 / 100
73 ms 1148 KB
#include "dango3.h"
#include <bits/stdc++.h>
using namespace std;



void Solve(int n, int m){
	vector<int> used(n * m + 1, 0);
	vector<vector<int> > ans(m);
	for(int i = 0;i < m; i++){
		vector<int> idx;
		for(int j = 1;j <= n * m; j++){
			if(used[j]) continue;
			idx.push_back(j);
			int cnt = Query(idx);
			if(cnt == 0){
				ans[i].push_back(j);
				used[j] = 1;
			}else idx.pop_back();
		}
		if(ans.size() != n) assert(false);	
	}
	
	for(int i = 0;i < m; i++){
		Answer(ans[i]);
	}
}


Compilation message

dango3.cpp: In function 'void Solve(int, int)':
dango3.cpp:21:17: warning: comparison of integer expressions of different signedness: 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   21 |   if(ans.size() != n) assert(false);
      |      ~~~~~~~~~~~^~~~
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Wrong Answer [4]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 604 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 19 ms 860 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 73 ms 1148 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -