ALT__'s blog

By ALT__, history, 3 years ago, In English

Problem Link: https://codeforces.me/contest/1417/problem/C

My solution: https://codeforces.me/contest/1417/submission/131124634

My solution is very similar (or almost same) to the editorial's solution: https://codeforces.me/blog/entry/83036 The only difference I noticed is that I'm using cin/cout instead of scanf/printf and I'm using vectors instead of arrays. Also, I'm using #define int long long.

Full text and comments »

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

By ALT__, history, 3 years ago, In English

Sorry if this is not the right place to post this but I tried lots of different thing but just couldn't get it to work. I can write a normal code and compile it with no input. But it just doesn't work with inputs, I tried bunch of different build system but nothing worked. How do I fix this? Or if you don't use sublime, then what do you use on mac? thanks.

Full text and comments »

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

By ALT__, history, 4 years ago, In English

So I was trying to solve this problem: Link

I got a TLE, my submission

I'm not sure if the solution is correct but I want to know why am I getting TLE, I think my solution is O(n), buy maybe because the numbers are too big I'm miscalculating something. I've added comments to my code too please let me know why is getting TLE. Thanks!

Full text and comments »

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