#include<bits/stdc++.h>
#include "icc.h"
using namespace std;
typedef long long int lld;
set<pair<int,int> >S;
int arr1[1000];
int arr2[1000];
int q(vector<int> a, vector<int> b){
for(int i=0;i<a.size();i++)arr1[i]=a[i];
for(int i=0;i<b.size();i++)arr2[i]=b[i];
return query(a.size(),b.size(),arr1,arr2);
}
set<int> nei[1000];
void run(int N){
/*if(v.size()<2){
v.clear();
for(int i=0;i<N;i++)v.push_back(i+1);
}
for(int i=v.size()-1;i>-1;i--){
int arr1[N];
int arr2[N];
arr1[0]=v[i];
for(int j=0;j<i;j++)arr2[j]=v[j];
if(query(1,i,arr1,arr2)){//arr[i] é vertice
for(int j=0;j<i;j++){
arr2[0]=v[j];
if(query(1,1,arr1,arr2)){
}
}
}
}*/
for(int i=1;i<=N;i++){
vector<int> v1,v2;
v1.push_back(i);
for(int j=i+1;j<=N;j++)v2.push_back(j);
if(q(v1,v2)){
v1.clear();
v2.clear();
for(int j=i+1;j<=N;j++){
v1.push_back(i);
v2.push_back(j);
if(q(v1,v2) && nei[i].find(j)==nei[i].end()){
nei[i].insert(j);//cout<<i<<" "<<j<<endl;
setRoad(i,j);
return;
}
v1.clear();
v2.clear();
}
}
v1.clear();v2.clear();
}
}
Compilation message
icc.cpp: In function 'int q(std::vector<int>, std::vector<int>)':
icc.cpp:9:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<a.size();i++)arr1[i]=a[i];
~^~~~~~~~~
icc.cpp:10:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<b.size();i++)arr2[i]=b[i];
~^~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
3 ms |
512 KB |
Not all edges were guessed! |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
6 ms |
640 KB |
Not all edges were guessed! |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
9 ms |
512 KB |
Not all edges were guessed! |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
10 ms |
640 KB |
Not all edges were guessed! |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
11 ms |
512 KB |
Not all edges were guessed! |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
9 ms |
512 KB |
Not all edges were guessed! |
2 |
Halted |
0 ms |
0 KB |
- |