Submission #424413

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4244132021-06-11 22:40:39APROHACKHoliday (IOI14_holiday)C++14
0 / 100
18 ms1988 KiB
#include"holiday.h"
#include <bits/stdc++.h>
#define PB push_back
#define F first
#define S second
using namespace std;
int att[100000];
struct segTree{
long long dd, ht, mid, val1, val2;
segTree *L, *R;
segTree(int l, int r){
dd=l;
ht=r;
mid=(dd+ht)/2;
if(dd!=ht){
L=new segTree(l, mid);
R=new segTree(mid+1, r);
}
val1=0;
val2=0;
}
void encender(int ps, bool enc){
if(dd==ht){
if(enc){
val1++;
val2+=att[ps];
}else{
val1=0;
val2=0;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

holiday.cpp: In member function 'long long int segTree::query(int)':
holiday.cpp:49:5: warning: control reaches end of non-void function [-Wreturn-type]
   49 |     }
      |     ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...