# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
257366 |
2020-08-04T07:17:22 Z |
문홍윤(#5062) |
None (JOI16_snowy) |
C++14 |
|
8 ms |
1328 KB |
#include "Anyalib.h"
#include <bits/stdc++.h>
#define eb emplace_back
#define mp make_pair
#define F first
#define S second
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
static int getL;
int nn;
vector<pii> linkk[510];
pii edgg[510];
void InitAnya(int N, int A[], int B[]){
nn=N;
for(int i=0; i<nn-1; i++){
edgg[i+1]=mp(A[i], B[i]);
linkk[A[i]].eb(B[i], i);
linkk[B[i]].eb(A[i], i);
}
}
void Anya(int C[]){
for(int i=0; i<nn-1; i++)Save(i+1 , C[i]);
}
#include "Borislib.h"
#include <bits/stdc++.h>
#define eb emplace_back
#define mp make_pair
#define F first
#define S second
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
int n;
vector<pii> link[510];
pii edg[510];
int dis[510], cnt[510];
void InitBoris(int N, int A[], int B[]){
n=N;
for(int i=0; i<n-1; i++){
edg[i+1]=mp(A[i], B[i]);
link[A[i]].eb(B[i], i);
link[B[i]].eb(A[i], i);
}
}
void dfs(int num, int par, int d){
dis[num]=d;
for(auto i:link[num]){
if(i.F==par)continue;
dfs(i.F, num, d+cnt[i.S]);
}
}
int Boris(int city){
for(int i=1; i<n; i++)cnt[i]=Ask(i);
dfs(0, -1, 0);
return dis[city];
}
Compilation message
Anya.cpp:10:12: warning: 'getL' defined but not used [-Wunused-variable]
static int getL;
^~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
912 KB |
Wrong Answer [7] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
1180 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
8 ms |
1328 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
8 ms |
1324 KB |
Wrong Answer [6] |
2 |
Halted |
0 ms |
0 KB |
- |