Блог пользователя ALT__

Автор ALT__, история, 3 года назад, По-английски

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

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

My solution is very similar (or almost same) to the editorial's solution: https://codeforces.com/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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится

Автор ALT__, история, 3 года назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

Автор ALT__, история, 3 года назад, По-английски

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!

Полный текст и комментарии »

  • Проголосовать: нравится
  • -6
  • Проголосовать: не нравится