# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
536877 | jamezzz | Speedrun (RMI21_speedrun) | C++17 | 104 ms | 856 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "speedrun.h"
#include <bits/stdc++.h>
using namespace std;
#define pf printf
#define pb push_back
void assignHints(int subtask, int N, int A[], int B[]) { /* your solution here */
if(subtask==1){
setHintLen(N);
for(int i=1;i<N;++i){
setHint(A[i],B[i],1);
setHint(B[i],A[i],1);
}
}
if(subtask==2){
setHintLen(20);
vector<int> cnt(N+1,0);
for(int i=1;i<N;++i)++cnt[A[i]],++cnt[B[i]];
int mx=1;
for(int i=1;i<=N;++i)if(cnt[i]>cnt[mx])mx=i;
for(int j=1;j<=20;++j){
for(int i=1;i<=N;++i){
if(mx&(1<<(j-1))){
setHint(i,j,1);
}
}
}
}
if(subtask==3){
Compilation message (stderr)
# | 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... |