Submission #288205

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2882052020-09-01 10:01:52NemanjaSo2005Foehn Phenomena (JOI17_foehn_phenomena)C++14
40 / 100
538 ms15736 KiB
#include<bits/stdc++.h>
#define ll long long
#define LIMIT 7000000
using namespace std;
ll koliko[200005],povecaj,res=0,T,S,N,Q,u1,u2,r1,r2,r3,r4,segmentno[400010];
char buffer[LIMIT],*pos;
ll nadji(int gde){
ll ret=0;
while(gde){
ret+=segmentno[gde];
gde/=2;
}
return ret;
}
void dodaj(int gde,int lb,int db,int l,int r){
if(lb>db or l>r)
return;
if(lb==l and db==r){
segmentno[gde]+=povecaj;
return;
}
int mid=(l+r)/2;
dodaj(gde*2,lb,mid,l,min(mid,r));
dodaj(gde*2+1,mid+1,db,max(l,mid+1),r);
return;
}
ll getll(){
ll positive=1,number;
while(*pos!='-' and *pos<48)
*pos++;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

foehn_phenomena.cpp: In function 'long long int getll()':
foehn_phenomena.cpp:30:9: warning: value computed is not used [-Wunused-value]
   30 |         *pos++;
      |         ^~~~~~
foehn_phenomena.cpp:32:9: warning: value computed is not used [-Wunused-value]
   32 |         *pos++;
      |         ^~~~~~
foehn_phenomena.cpp:37:5: warning: value computed is not used [-Wunused-value]
   37 |     *pos++;
      |     ^~~~~~
foehn_phenomena.cpp:40:9: warning: value computed is not used [-Wunused-value]
   40 |         *pos++;
      |         ^~~~~~
foehn_phenomena.cpp: In function 'int main()':
foehn_phenomena.cpp:45:10: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
   45 |     fread(buffer,1,LIMIT,stdin);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...