#include "dango3.h"
#include<bits/stdc++.h>
using namespace std;
#define rall(s) s.rbegin() s.rend()
#define all(s) s.begin(), s.end()
#define sz(s) (int)s.size()
#define s second
#define f first
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
void Solve(int n, int m) {
vector<int> s;
for (int i = 1; i <= n * m; i++) s.push_back(i);
for (int i = 1; i < m; i++) {
vector<int> ans = {s.back()};
s.pop_back();
while (sz(ans) < n) {
int x = s.back();
s.pop_back();
if (Query(s) == m - i) ans.push_back(x);
else {
reverse(all(s));
s.push_back(x);
reverse(all(s));
}
}
Answer(ans);
}
Answer(s);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
344 KB |
Output is correct |
2 |
Correct |
4 ms |
344 KB |
Output is correct |
3 |
Correct |
8 ms |
344 KB |
Output is correct |
4 |
Correct |
9 ms |
500 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
2 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
153 ms |
348 KB |
Output is correct |
2 |
Correct |
155 ms |
348 KB |
Output is correct |
3 |
Incorrect |
441 ms |
596 KB |
Wrong Answer [3] |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
664 ms |
852 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |