이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "friend.h"
#include <bits/stdc++.h>
using namespace std;
#define pii pair <int,int>
#define f first
#define s second
#define mp make_pair
#define pb push_back
#define all(v) v.begin(),v.end()
#define ll long long
const int N = 3e5 + 100;
const int M = 20;
vector <int> g[N];
int tek,tek1;
int cost[N];
int findSample(int n,int c[],int st[],int type[]){
for(int i = 1;i < n;i++) {
if(type[i] == 0) {
g[st[i]].pb(i);
g[i].pb(st[i]);
}else if(type[i] == 1) {
for(auto to : g[st[i]]) {
g[to].pb(i);
g[i].pb(to);
}
}else {
g[st[i]].pb(i);
g[i].pb(st[i]);
for(auto to : g[st[i]]) {
g[to].pb(i);
g[i].pb(to);
}
}
}
int ans = 0;
return ans;
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |