Submission #95260

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
952602019-01-29 07:03:03andy627Simurgh (IOI17_simurgh)C++17
51 / 100
180 ms5340 KiB
#include "simurgh.h"
#include <bits/stdc++.h>
using namespace std;
int G[505][505];
int T[505][505];
int N;
bool vst[505];
int E[505][505];
vector<int> Q;
int P[505];
vector<int> ans;
int S[505][505];
int I;
bool C[505];
void maketree(int now) {
vst[now] = true;
for(int i = 0; i < N; i++) {
if(vst[i]) continue;
if(G[now][i] == -2) continue;
T[now][i] = T[i][now] = 1;
Q.push_back(E[now][i]);
P[i] = now;
maketree(i);
}
}
void sib() {
for(int i = 0; i < N; i++) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

simurgh.cpp: In function 'void dfs(int, int)':
simurgh.cpp:55:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0; i < Q.size(); i++) if(Q[i] == E[now][par]) idx = i;
                    ~~^~~~~~~~~~
simurgh.cpp: In function 'std::vector<int> find_roads(int, std::vector<int>, std::vector<int>)':
simurgh.cpp:117:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0; i < u.size(); i++) {
                    ~~^~~~~~~~~~
simurgh.cpp: In function 'void dfs(int, int)':
simurgh.cpp:54:9: warning: 'idx' may be used uninitialized in this function [-Wmaybe-uninitialized]
     int idx;
         ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...