Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

Why is the usage of a boolean flag variable instead of an int flag variable causing a TLE?

$
0
0

Problem code: PRIME1 (warning for fast IO is included)

Slow IO with boolean: https://www.codechef.com/viewsolution/19890625 (TLE)

Slow IO with int: https://www.codechef.com/viewsolution/19890658 (0.94s AC)

Fast IO with int: https://www.codechef.com/viewsolution/19892348 (0.93S AC)

Fast IO with boolean and no flushing: https://www.codechef.com/viewsolution/19892367 (TLE)

Fast IO with int and no flushing: https://www.codechef.com/viewsolution/19892381 (0.92s AC)

This means the program bottleneck must be in the boolean flag variable, but why?


Viewing all articles
Browse latest Browse all 39796

Trending Articles