#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <queue>
#include <deque>
#include <list>
#include "simurgh.h"
using namespace std;
typedef int ll;
typedef unsigned long long int ull;
#define REP(i,a,b) for(ll i=(ll)a; i<(ll)b; i++)
#define pb push_back
#define mp make_pair
#define pl pair<ll,ll>
#define ff first
#define ss second
#define whole(x) x.begin(),x.end()
#define DEBUG(i) cout<<"Pedro Is The Master "<<i<<endl
#define INF 100000000
ll insig;
#define In(vecBRO, LENBRO) REP(IBRO,0,LENBRO) {cin>>insig; vecBRO.pb(insig);}
void Out(vector<ll> x) {REP(i,0,x.size()) {cout<<x[i]<<" ";} cout<<endl;}
ll N,M; vector<pl> ed; vector<ll> ans;
void f(vector<int> a)
{
if(!ans.empty()) {return;}
if(a.size()==N-1)
{
int common = count_common_roads(a);
if(common==N-1) {ans=a; return;}
}
else
{
ll last=0LL; if(a.size()>0) {last=a[a.size()-1]+1;}
REP(i,last,M)
{
a.pb(i); f(a); a.pop_back();
}
}
return;
}
vector<int> find_roads(int n, vector<int> u, vector<int> v)
{
N=(ll) n; M=u.size();
REP(i,0,M) {ed.pb(mp(u[i],v[i]));}
vector<int> em;
f(em);
return ans;
}
Compilation message
simurgh.cpp: In function 'void f(std::vector<int>)':
simurgh.cpp:34:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(a.size()==N-1)
~~~~~~~~^~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
384 KB |
WA in grader: NO |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
384 KB |
WA in grader: NO |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
384 KB |
WA in grader: NO |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
384 KB |
correct |
2 |
Incorrect |
5 ms |
256 KB |
WA in grader: NO |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
384 KB |
WA in grader: NO |
2 |
Halted |
0 ms |
0 KB |
- |