#include "dango3.h"
#include <bits/stdc++.h>
#define ll int
#define str string
#define ins insert
#define ld long double
#define pb push_back
#define pf push_front
#define pof pop_front()
#define pob pop_back()
#define lb lower_bound
#define ub upper_bound
#define endl "\n"
#define fr first
#define sc second
#define mpa make_pair
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define sz size()
#define bc back()
#define ar array
#define vll vector<ll>
using namespace std;
template <class _T>
bool chmin(_T &x, const _T &y){
if (x>y){x=y;return true;}
return false;
}
template <class _T>
bool chmax(_T &x, const _T &y){
if (x<y){x=y;return true;}
return false;
}
const ll mod=1e9+7;
const ld eps=1e-9;
void Solve(ll n,ll m) {
ll i,j;
vector<ll> lst;
map<ll,ll> mp;
vector<vll> col(n+5);
for(i=1;i<=n;i++){
vector<ll> v=lst;
for(j=1;j<=n*m;j++){
if(mp[j])continue;
v.pb(j);
ll x=Query(v);
if(x==1){
mp[j]++;
col[i].pb(j);
lst.pb(j);
}
}
}
for(i=1;i<=m;i++){
vector<ll> v;
for(j=1;j<=n;j++){
v.pb(col[j].bc);
col[j].pop_back();
}
Answer(v);
}
}
/*
*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
856 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
57 ms |
348 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
209 ms |
604 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
417 ms |
1620 KB |
Wrong Answer [3] |
2 |
Halted |
0 ms |
0 KB |
- |