Submission #210534

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2105342020-03-17 15:53:45Dan13llljwsDreaming (IOI13_dreaming)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
int dist[100001], pre[100001]; bool vis[100001];
int travelTime(int N, int M, int L, int A[], int B[], int T[]){
int maxDiameter = 0;
vector<int> radius;
vector<pair<int, int>> adj[N];
for (int i = 0; i < M; i++){
adj[A[i]].push_back(make_pair(T[i], B[i]));
adj[B[i]].push_back(make_pair(T[i], A[i]));
}
for (int i = 0; i < N; i++){
if (!vis[i]){
int maxd = 0, far = i, cur;
queue<pair<int, int>> q;
q.push(make_pair(i, 0));
vector<int> clean;
vis[i] = 1;
clean.push_back(i);
while(!q.empty()){
int p = q.front().first, d = q.front().second; q.pop();
if (d > maxd){
maxd = d;
far = p;
}
for (auto v : adj[p]){
if (!vis[v.second]){
vis[v.second] = 1;
clean.push_back(v.second);
q.push(make_pair(v.second, v.first + d));
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

/tmp/cc3HTxUg.o: In function `main':
dreaming.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccQ8epQw.o:grader.c:(.text.startup+0x0): first defined here
/tmp/ccQ8epQw.o: In function `main':
grader.c:(.text.startup+0xa2): undefined reference to `travelTime'
collect2: error: ld returned 1 exit status