Vicennial's blog

By Vicennial, history, 10 months ago, In English,

Note:Look for the new, updated contest timing at the end of the blog!.

Hello Codeforces community!

I am glad to announce Hack The Code , a contest where you hack the problem setter's solution to a given problem by providing any test case on which it would fail, similar to the system of Codeforces.

The contest will be held on April 3rd, 2018 at 15:30 UTC on HackerRank.
Contest link: Click
The contest is part of Euristica, IIT Indore's inaugural programming fest sponsored by Arcesium.

The problem setters of this contest are AakashHanda, deCryPt, killer_bee, Ashutosh_Bang, rohitranjan017, gi_sha, amandal799 and dc99 .
The contest will have 15 problems. The problem setter's solutions are written in C++.
The first successful hack on any problem will give you one point.
Beware, each unsuccessful hack will give you a 20 minute penalty!

The prize distribution is as follows:
- First: ₹5000 - Second: ₹3000

If you love hacking solutions on codeforces (I sure do :) ), then you will enjoy this contest for sure!

See you on the leaderboard!

Update 1: Due to clash with CF #473, the event has been moved to April 5th, 2018 at 15:30 UTC. Update your calender!

Update 2: Due to issues regarding processing times for submissions using custom checkers, We have made the last minute decision to postpone the contest to save the problems. We are extremely sorry for this! We will post an update regarding updated timings and contest platform(if we decide to change).

Read more »

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

By Vicennial, history, 22 months ago, In English,

I had to use recursion+strings for a problem in a contest and I stumbled upon this irregularity.

Sample Code 'A' with strings:

Using input=5
G++ 11 5.1.0 = 7987 ms, 2044 KB
G++ 14 6.2.0 = 889 ms, 1856 KB

Sample Code 'B' without strings:

Using input=6
G++ 11 5.1.0 = 3026 ms, 2012 KB
G++ 14 6.2.0 = 2995 ms, 1868 KB

To test it yourself, head over to

Why is there such a huge difference when strings are used?

Read more »

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

By Vicennial, history, 2 years ago, In English,

How would I check the divisibility of two numbers which are both taken under modulo M?
E.g I have calculated a very large sum modulo M and now I want to check if this sum is evenly divisible by a^b where a and b can be as large as 10^9.

Read more »


By Vicennial, history, 2 years ago, In English,

I often forget to check the threads where I commented for new replies.
Also when posting a query on an old thread, I think it would be useful when you get notified if someone answers your query.

Read more »

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

By Vicennial, history, 2 years ago, In English,

86D - Powerful array

I tried implementing Mo's Algorithm to solve this problem but I ran into a couple of TLE's when taking block size as sqrt(Max N) which is 448.
The submission can be viewed here-21756475 The result was TLE when using block size=448.
In the next submission-21756591 , I put block size=1000 and the result was AC.

So my question is how do I figure out what value to use as my block size?

Read more »