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

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

Hi, I am facing some confusions about the time complexity of the codes we submit. If the time limit per test=1 second,

doesn't that mean if t=3, total 3*1 seconds will be needed at max? I mean maximum 3 seconds in total is available , right?

My submission

According to my calculation, the time complexity of my provided solution is

n*log(a_max), where a_max= max(vector a)

I am confused why it is getting TLE everytime.

And I think I have little knowledge, so asking.

Do enlighten me with your knowledge's lumen.

Thanks

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

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

Автор TaskForce141, история, 6 месяцев назад, По-английски

I use a header named printContainer.h for printing STL containers for debugging purposes, but I always have to comment it out before submission , sometimes I forget and get Compilation error which causes much problem and most importantly every second counts here... my template is like this:

#include <bits/stdc++.h>
#include <iostream>
#include <cmath>
#include<iomanip>
#include<cstring>
#include <queue>
#include "Templates/printContainer.h"

//Rest of the code

please tell me what to do? I heard ifdef or endif works but I couldn't make it work...maybe I am using the wrong way.

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

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

Автор TaskForce141, история, 9 месяцев назад, По-английски

Hello,hope you are doing well, it would be extremely helpful for us (Muslims) if the codeforces contest timings were a bit adjusted due to Ramadan... Thank you very much for your valuable time Hope MikeMirzayanov would do something about this, thanks.

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

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