#pragma GCC optimize("Ofast")
#include "grader.h"
#include<stdio.h>
#include<algorithm>
using namespace std;
int num[260];
vector<int> temp;
int Q(int n,int id,int j){
int i;
for(i=0;i<n;i++)
temp[i]=0;
temp[id]=j;
return query(temp);
}
void solve(int n){
int i,j;
temp.resize(n+1);
for(i=0;i<n;i++)
for(j=1;j<=n;j++){
if(Q(n,i,j)){
num[i]=j;
break;
}
}
vector<int> ans(n);
for(i=0;i<n;i++)
ans[i]=num[i];
query(ans);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
384 KB |
Integer 0 violates the range [1, 7] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
384 KB |
Integer 0 violates the range [1, 7] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
384 KB |
Integer 0 violates the range [1, 7] |
2 |
Halted |
0 ms |
0 KB |
- |