Submission #240939

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2409392020-06-21 15:57:11brcodeIzlet (COI19_izlet)C++14
100 / 100
731 ms72568 KiB
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
const int MAXN =5e3+5;
int dist[MAXN][MAXN];
vector<int> v1[MAXN];
int cnt[MAXN];
int col[MAXN];
vector<pair<int,int>> edges;
bool visited[MAXN];
int p[MAXN];
int n;
int nxt;
int sz[MAXN];
void colour(int a,int b,int c){
if(cnt[col[b]] == 0 && dist[a][b] == dist[a][c]){
col[a] = col[b];
}
if(c!=-1){
cnt[col[b]]++;
}
for(int x:v1[b]){
if((!visited[x])||x==c){
continue;
}
colour(a,x,b);
}
if(c!=-1){
cnt[col[b]]--;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

izlet.cpp: In function 'int main()':
izlet.cpp:94:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i=0;i<nodes.size();i++){
                 ~^~~~~~~~~~~~~
izlet.cpp:95:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int j=i+1;j<nodes.size();j++){
                       ~^~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...