ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1086. Cryptography

still TLE
Posted by Mehedi Hasan 15 Feb 2017 23:56
i use seive but it still verdict TLE
my code https://ideone.com/MV23r8
Re: still TLE
Posted by ToadMonster 16 Feb 2017 10:01
Looks like you re-valuate a[] for every input number.
Why? It can be valued once, before "while(t--) {...}" cycle.

Formatting is weird a bit. Why? To prevent reading?
Re: still TLE
Posted by Mehedi Hasan 18 Feb 2017 03:56
sorry can you plz this one ??
https://ideone.com/b9GzyF
Re: still TLE
Posted by ToadMonster 18 Feb 2017 20:16
Looks like you re-valuate status[] for every input number.
Why? It can be valued once, before "while(t--) {...}" cycle.

What do you think, why this comment is the same with previous one?
Have you read previous one?