Submission #315950

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3159502020-10-24 14:01:06jhnah917Werewolf (IOI18_werewolf)C++14
100 / 100
1703 ms136580 KiB
#ifndef LOCAL
#include "werewolf.h"
#endif
#include <bits/stdc++.h>
#define x first
#define y second
#define all(v) v.begin(), v.end()
#define compress(v) sort(all(v)), v.erase(unique(all(v)), v.end())
using namespace std;
typedef long long ll;
struct UnionFind{
int par[202020];
UnionFind(){ iota(par, par+202020, 0); }
int find(int v){ return v == par[v] ? v : par[v] = find(par[v]); }
bool merge(int P, int C){
P = find(P); C = find(C);
if(P == C) return false;
par[C] = P; return true;
}
} uf;
struct MergeSortTree{
static const int sz = 1 << 18;
vector<int> tree[1 << 19];
void set(int x, int v){
tree[x|sz].push_back(v);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

werewolf.cpp: In function 'std::vector<int> check_validity(int, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
werewolf.cpp:79:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   79 |     for(auto &i : X) i++; for(auto &i : Y) i++; // I love 1-based!
      |     ^~~
werewolf.cpp:79:27: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   79 |     for(auto &i : X) i++; for(auto &i : Y) i++; // I love 1-based!
      |                           ^~~
werewolf.cpp:80:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   80 |     for(auto &i : S) i++; for(auto &i : E) i++; // I love 1-based!
      |     ^~~
werewolf.cpp:80:27: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   80 |     for(auto &i : S) i++; for(auto &i : E) i++; // I love 1-based!
      |                           ^~~
werewolf.cpp:81:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   81 |     for(auto &i : L) i++; for(auto &i : R) i++; // I love 1-based!
      |     ^~~
werewolf.cpp:81:27: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   81 |     for(auto &i : L) i++; for(auto &i : R) i++; // I love 1-based!
      |                           ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...