This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/**
* بسم الله الرحمن الرحيم *
﴾ رَبِّ اشْرَحْ لِي صَدْرِي * وَيَسِّرْ لِي أَمْرِي * وَاحْلُلْ عُقْدَةً مِّن لِّسَانِي * يَفْقَهُوا قَوْلِي ﴿
*/
/// author : "ASGA"
#include <bits/stdc++.h>
using namespace std;
#include "speedrun.h"
void assignHints(int sub, int n, int* A, int* B){
setHintLen(n);
for(int i = 1;i <= n;i++){
for(int j = 1;j <= n;j++)setHint(i,j,0);
}
for(int i = 1;i < n;i++){
int u = A[i];
int v = B[i];
setHint(u,v,1);
setHint(v,u,1);
}
return;
}
namespace solve{
int n;
void calc(int i,int p){
for(int j = 1;j <= n;j++){
if(j != p && getHint(j)){
goTo(j);
calc(j,i);
goTo(i);
}
}
}
}
void speedrun(int sub,int N,int u){
solve::n = N;
//solve::calc(u,-1);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |