kirankumarmitra's blog

By kirankumarmitra, history, 8 days ago, In English,

How can I reduce sillies while in programming contests ?

For example, in the last contest I took in some other coding site, I solved (solved means got the idea, just need to implement them) FIVE questions within twenty mintues (out of two hour contest). Now the first two was completely trivial to implement — I did that within ten minutes. So half hour, two questions down and I only need to implement four — sounds trivial right ? But I couldn't successfully implement any of them ! In one question I forgot to use long long instead of int, in another I forgot to increment by one in a case (but I didn't test that case), and in another question I couldn't figure out how to implement them (it looked very difficult).

So some questions:

  • How do I reduce the excessive amount of sillies I make while implementing ?
  • How do I implement effortlessly ? (In ideal world, implementation shouldn't take much thought right ?)
  • How do stop losing my sweat over those edge cases/off by one errors ?

Read more »

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

By kirankumarmitra, history, 2 months ago, In English,

Can someone suggest any good resources to learn about how various integer data types are manipulated in C++ from a competitive programming perspective ? I'm having problems with understanding them, for example

  • When you do something like long int x = y*z, where y and z are long long int, but the value of y and z are small (say 100), would it cause overflow ?

  • When you do something like int x = (a*b) % prime when a, b, prime are of the order 109 (but still stored in int), would it cause overflow ?

  • What is the difference between double/point/long double etc ? How they're manipulated (like the above) ?

  • Does using longer (for example, using long long int instead of int) causes the programme to run slower ? If yes, then how much (like a factor of 2 ? a factor of 4 ?)

  • Why almost nobody uses long double in competitive programming ?

  • When manipulating digits of HUGE orders (like 10500), how that's done in CP ?

  • Why the strange result in running the following code ?

code

Read more »

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

By kirankumarmitra, history, 2 months ago, In English,

IMO 2014 perfect score Alex Gunning will stream IMO 2018 solutions. Check this thread on Art of Problem Solving: https://artofproblemsolving.com/community/c6h1669224 for more info. Just wanted to share with CF community because you might be interested and more people watching this will give him more enthusiasm so this can happen again in the future.

PS: I'm in no way related to Alex Gunning

Read more »

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

By kirankumarmitra, history, 4 months ago, In English,

Hello,

Where I can find Hard DP problems using different ideas in codeforces ? Sorting the problems tagged by dp in order of submission doesn't helps, as most of them recycle a few small set of ideas again and again. Some contains some new and novel ideas (http://codeforces.com/contest/626/problem/F) and are also hard, I'm looking for such problems.

Thanks !

Read more »

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