Problem source:https://www.codechef.com/problems/FENCE Solution Approach We will use the STL properties to solve this kind of problems, initially, we will consider making fence all around the four sides of the
In this question ofcodechefwhen I usemap(int, raw_input().split())it generatedRuntime Error (NZEC)and when I used[int(x) for x in raw_input().split()]it worked like charm. Could anyone help me with this? My solution which worked correctly:...
The second seems to be a mix of greedy thinking (use big numbers to escape the sum range when you get to it) and a well known greedy problem (with numbers [1,x] you can always find a subset of sum for every value in [0, 1+2+3+...+x]). I've seen easier problems in div1...
Oh, it's nice to find my problem from codechef ported to spoj. Cheers :) Submit solution! Added by:Yash Date:2009-06-12 Time limit:1s Source limit:11111B Memory limit:1536MB Cluster:Cube (Intel G860) Languages:All except: ERL JS-RHINO NODEJS PERL6 VB.NET ...
Euler theorem can solve this in O(1) for those that are stuck messifcbarcel:2021-08-13 03:02:22 Solved in first attempt instead of a compilation error because of that 700B thing shubh3082:2021-06-15 11:08:08 i am getting correct solution for the problem on codechef but getting WA ...
Update: I write stuffHerein Bengali. I probably have one or two basic DP tutorials too. If you understand Bengali, it may help. Note: If you have some other tutorial links and nice problems, mention them. I'll add them here. It'll help me too. ...