#include <bits/stdc++.h>
#include "dango3.h"
#pragma GCC optimize("Ofast")
#define AquA cin.tie(0);ios_base::sync_with_stdio(0);
#define fs first
#define sc second
#define p_q priority_queue
using namespace std;
void Solve(int n,int m){
n*=m;
vector<vector<int> > ans(m);
vector<int> vis(n);
for(int i=0;i<n/m;i++){
vector<int> gg=ans[0],zz;
int c=0;
for(int j=1;j<=n;j++){
if(vis[j]){
continue;
}
gg.push_back(j);
int y=Query(gg);
if(y==1){
ans[c].push_back(j);
c++;
vis[j]=1;
gg.pop_back();
}
}
}
for(auto h:ans){
Answer(h);
}
}
/*
g++ -std=gnu++17 -O2 -o grader grader.cpp temp6.cpp
.\grader.exe
*/
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
340 KB |
Output is correct |
3 |
Correct |
1 ms |
340 KB |
Output is correct |
4 |
Correct |
1 ms |
340 KB |
Output is correct |
5 |
Correct |
1 ms |
340 KB |
Output is correct |
6 |
Correct |
1 ms |
340 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
106 ms |
376 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
624 ms |
436 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1265 ms |
648 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |