rohit_1402's blog

By rohit_1402, 4 years ago, In English

In educational round 88 Problem C I have submitted my solution in GNU C++17 (64) it gives WA on test 4 at the time of contest. But today I have submitted my same code in GNU C++ 17 and it is accepted.

Code submitted in GNU C++ 17 (64)

Code submitted in GNU C++ 17

Both are the same code

Can anyone tell me why it is so??

UPD: Now I have use long double instead of double and submitted the same code using GNU C++17 (64) compiler and it is AC. But by just using double why it was giving WA using GNU C++17 (64) and AC using GNU C++17 ?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By rohit_1402, history, 4 years ago, In English

[submission:78417751]I have formed the recursive solution for the problem Heaters https://codeforces.com/contest/1066/problem/B. In order to optimise the solution I am trying to use memoization approach but stuck in defining the state for dp.

My solution — https://codeforces.com/contest/1066/submission/78417751

Thanks in advance!

Full text and comments »

  • Vote: I like it
  • +1
  • Vote: I do not like it