Submission #1111218

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11112182024-11-11 19:00:31nikolashamiDreaming (IOI13_dreaming)C++17
0 / 100
63 ms16112 KiB
#include <bits/stdc++.h>
using namespace std;
#include "dreaming.h"
const int N=1e5+4;
vector<array<int,2>>adj[N];
int d[N][2],vis[N];
vector<int>passed,path;
void dfs(int u,bool x){
passed.push_back(u);
vis[u]=1;
for(auto&[v,w]:adj[u]){
if(vis[v])
continue;
d[v][x]=d[u][x]+w;
dfs(v,x);
}
}
bool findpath(int u,int p,int s,int e){
if(u==e){
path.push_back(e);
return 1;
}
for(auto&[v,w]:adj[u]){
if(v==p)
continue;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

dreaming.cpp: In function 'int jednostablo(int)':
dreaming.cpp:89:21: warning: unused variable 'kraj2' [-Wunused-variable]
   89 |     int mx=-1,kraj1,kraj2;
      |                     ^~~~~
dreaming.cpp:99:8: warning: 'kraj1' may be used uninitialized in this function [-Wmaybe-uninitialized]
   99 |     dfs(kraj1,0);
      |     ~~~^~~~~~~~~
dreaming.cpp: In function 'int findmxlen(int)':
dreaming.cpp:75:13: warning: 'kraj2' may be used uninitialized in this function [-Wmaybe-uninitialized]
   75 |     findpath(kraj1,-1,kraj1,kraj2);
      |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
dreaming.cpp:75:13: warning: 'kraj1' may be used uninitialized in this function [-Wmaybe-uninitialized]
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...