# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
59297 |
2018-07-21T12:34:29 Z |
mhnd |
Parrots (IOI11_parrots) |
C++14 |
|
0 ms |
0 KB |
#include "garden.h"
#include "gardenlib.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int N = 5e5+50;
const ll oo = 1e18;
const ll mod = 1e9+7;
vector<pair<int,int>> g[1010];
int cur,ans;
bool used[1010],vis[1010];
void dfs(int u,int p,int k){
if(!k){
ans += !used[cur];
used[cur]=1;
return;
}
if(vis[u])return;
vis[u]=1;
vector<pair<int,int>> s;
for(int i=0;i<g[u].size();i++){
int v = g[u][i].first;
int b = g[u][i].second;
if(v==p)continue;
s.push_back({b,v});
}
sort(s.begin(),s.end());
for(int i=0;i<s.size();i++)dfs(s[i].second,u,k-1);
}
void count_routes(int N, int M, int P, int R[][2], int Q, int G[]){
int i;
for(int i=0;i<M;i++){
g[R[i][0]].push_back({R[i][1],i});
g[R[i][1]].push_back({R[i][0],i});
}
for(int i=0;i<N;i++){
cur=i;
memset(vis,0,sizeof(vis));
dfs(i,-1,G[0]);
}
for(i=0; i<Q; i++)
answer(ans);
}
Compilation message
encoder.cpp:1:10: fatal error: garden.h: No such file or directory
#include "garden.h"
^~~~~~~~~~
compilation terminated.
/tmp/ccpQeg8C.o: In function `main':
grader_decoder.cpp:(.text.startup+0x1f6): undefined reference to `decode(int, int, int*)'
collect2: error: ld returned 1 exit status