masaow's blog

By masaow, history, 5 years ago, In English

I am trying to solve 1287C - Garland I wrote 70338791 It's working fine on my machine but showing runtime error on codeforces. Can someone explain me why this is happening.

Full text and comments »

  • Vote: I like it
  • -16
  • Vote: I do not like it

By masaow, history, 5 years ago, In English

The problem [https://mirror.codeforces.com/contest/579/problem/D] can be solved using a simple greedy approach by precalculating prefix ors and suffix ors but I wanted to solve it using DP in which we multiply an array element at most K times ranging from 0 to k. But it fails on test 23. Thanks in advance... my solution : 69268483

Full text and comments »

  • Vote: I like it
  • -9
  • Vote: I do not like it