← Back to topics
Topic

z-green very fast TLE

p
pr0ton
hello, i'm trying to solve z-green

i am using 3D BIT (binary indexed trees) for the problem

however. i get really fast TLE in < 0.5 secs
i mean the TLE message shows up really fast for all test cases

the problem time limit is 1 second, and i dont clear any of them

is this a judge problem ?
because i think my code is right...

thanks...
m
msantl
a fast TLE may apper when you use too much memory.
p
pr0ton
afaik there is a another exception called memory limited exceeded...

a lot of well rated people have said they have faced similar TLE problems...

the only case that i see a TLE would be if i'm passing 0 in any of the BIT functions.

however i have just kept a check for that, still there is some TLE, i'm assuming there is some judge problem... can anybody give more information on this ?

t
tgudlek
Very fast TLE is memory limit ;)

Hint: use shorts :)

Btw, 202^3 = 8 242 408, and 32 MB is 8 388 608 integers ( but your includes also use your memory :) )
p
pr0ton
k thanks a lot, but short is upto 128 right ? or i'm mistaken ?
d
demjan0001
in C++ short is up to 2^15-1 ...