Submission #704706

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7047062023-03-02 17:14:07piOOEReconstruction Project (JOI22_reconstruction)C++17
42 / 100
5061 ms621460 KiB
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr int Q = 1e6 + 1, N = 500;
vector<array<int, 3>> save[Q];
array<int, 3> e[Q];
int fa[N];
void init() {
iota(fa, fa + N, 0);
}
int leader(int x) {
// while (x != fa[x]) x = fa[x] = fa[fa[x]];
return x == fa[x] ? x : fa[x] = leader(fa[x]);
}
bool unite(int x, int y) {
x = leader(x), y = leader(y);
if (x == y) {
return false;
}
fa[y] = x;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

reconstruction.cpp: In function 'int main()':
reconstruction.cpp:70:37: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::array<int, 3> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   70 |                 for (int ii = 0; ii < mst.size(); ++ii) {
      |                                  ~~~^~~~~~~~~~~~
reconstruction.cpp:91:41: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::array<int, 3> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   91 |                         int weightL = L == mst.size() ? inf : X[pnt] - mst[L][0];
      |                                       ~~^~~~~~~~~~~~~
reconstruction.cpp:92:41: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::array<int, 3> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   92 |                         int weightR = R == oth.size() ? inf : oth[R][0] - X[pnt];
      |                                       ~~^~~~~~~~~~~~~
#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...