Submission #440327

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4403272021-07-02 06:11:09raidFountain (eJOI20_fountain)C++17
100 / 100
971 ms28244 KiB
#include <iostream>
#include <vector>
using namespace std;
const int MAXN = 100005;
const int MAXLOG = 18;
struct rsv {
int diam, vol;
} v[MAXN];
vector<int> s;
vector<int> G[MAXN];
int S[MAXN];
int anc[MAXLOG][MAXN];
int lg2[MAXN], lev[MAXN], w[MAXN];
inline int getAnc( int node, int k ) {
int lg = lg2[k];
while ( k ) {
node = anc[lg][node];
k -= (1 << lg);
lg = lg2[k];
}
return node;
}
void DFS( int node, int dep ) {
w[node] = 1;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

fountain.cpp: In function 'int bsn(int, int)':
fountain.cpp:44:7: warning: unused variable 'cpnode' [-Wunused-variable]
   44 |   int cpnode = node;
      |       ^~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...