Submission #71642

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
716422018-08-25 09:35:24istleminDivide and conquer (IZhO14_divide)C++14
0 / 100
301 ms50516 KiB
#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i = a; i<int(b);++i)
#define all(v) v.begin(),v.end()
#define sz(v) v.size()
#define trav(a,c) for(auto a: c)
typedef long long ll;
typedef vector<ll> vi;
typedef pair<ll,ll> pii;
vi allPos;
class Node {
public:
ll data = -1e9;
ll lazy = 0;
ll dn,up;
Node *left;
Node *right;
bool hasChildren = false;
Node(ll dn,ll up):dn(dn),up(up){
}
void ensure(){
if(dn+1==up) return;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

divide.cpp: In function 'int main()':
divide.cpp:82:14: warning: 'st.Node::right' may be used uninitialized in this function [-Wmaybe-uninitialized]
   return max(left->query(a,b),right->query(a,b));
              ^~~~
divide.cpp:149:10: note: 'st.Node::right' was declared here
     Node st(0,allPos.size());
          ^~
divide.cpp:82:14: warning: 'st.Node::left' may be used uninitialized in this function [-Wmaybe-uninitialized]
   return max(left->query(a,b),right->query(a,b));
              ^~~~
divide.cpp:149:10: note: 'st.Node::left' was declared here
     Node st(0,allPos.size());
          ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...