Submission #561130

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
5611302022-05-12 10:03:51two_sidesReconstruction Project (JOI22_reconstruction)C++17
100 / 100
2406 ms27480 KiB
#include <bits/stdc++.h>
using namespace std;
const int N = 505;
const int M = 100005;
struct edge {
int u, v, w;
bool operator < (const edge &o) const {
return w < o.w;
}
};
struct disjoint {
int par[N];
void reset() {
iota(par, par + N, 0);
}
int find(int u) {
if (par[u] == u) return u;
return par[u] = find(par[u]);
}
void unite(int u, int v) {
par[find(v)] = find(u);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

reconstruction.cpp: In function 'int main()':
reconstruction.cpp:62:50: warning: narrowing conversion of '((r == m) ? (1.0e+9 + (double)1) : (double)((grp[r].edge::w + grp[i].edge::w + 1) / 2))' from 'double' to 'int' [-Wnarrowing]
   62 |         event[i * 3 + 2] = {grp[i].w, -1, r == m ?
      |                                           ~~~~~~~^
   63 |         1e9 + 1 : (grp[r].w + grp[i].w + 1) / 2};
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#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...