number theory
Given 2 numbers a and b, what is the maximum number which can not be formed using na + mb
View ArticleDijkstra Positive weight Can I implement like this?
I tried to understand the concept of dijkstra algorithm and tried to write some piece of code to find single source shortest path (Not actual Dijkstra)....I think my logics were okay..My surely I have...
View Articlehow fastread function is faster than scanf function?
please tell me that how fastread function performs faster than scanf here is the code for fastreadinline void fastread(int* a) { register char c = 0; while (c < 33) c = getchar(); *a = 0; while (c...
View ArticleCan we use codeblocks compiler for Codechef submissions?
I'm trying to use codeblocks compiler to submit my code for codechef. When i execute a program in codeblocks, i get the correct output but when i submit the same code on CodeChef it shows an "WRONG...
View ArticleRIGHTRI - Editorial
Problem Link:PracticeContestauthor: Tasnim Imran Sunnytester: Roman Rubanenkoeditorialist: Utkarsh LathDifficulty:EasyPre-requisites:High School MathsProblem:Given n triangles in cartesian plane, count...
View ArticleCan we use codeblocks compiler for Codechef submissions?
I'm trying to use codeblocks compiler to submit my code for codechef. When i execute a program in codeblocks, i get the correct output but when i submit the same code on CodeChef it shows an "WRONG...
View ArticleDIVQUERY showing TLE even after using fastread with getchar_unlocked please help
I was submitting a problem in cookoff but it was showing time limit exceeded even after i used fastread function with getchar_unlocked please tell me how can i optimise it furtherproblemhere is my...
View ArticlePrime generator got TLE
hi im really frustated about my code since i already optimize my code and still got tle (T^T) here my codeclick hereor #include<iostream> #include<stdio.h> #include<set>...
View ArticleSTRDIG - Editorial
Problem Link:PracticeContestauthor: Tasnim Imran Sunnytester: Roman Rubanenkoeditorialist: Utkarsh LathDifficulty:Easy-MediumPre-requisites:ad-hoc, implementationProblem:A very long string P is formed...
View ArticleDIVQUERY - editorial
Problem Link:PracticeContestauthor: Tasnim Imran Sunnytester: Roman Rubanenkoeditorialist: Utkarsh LathDifficulty:MediumPre-requisites:offline processing of queries, factorizing small...
View ArticleGRIDCOL-editorial
Problem Link:PracticeContestauthor: Tasnim Imran Sunnytester: Roman Rubanenkoeditorialist: Utkarsh LathDifficulty:HardPre-requisites:inclusion-exclusion, dynamic-programming, combinatorics,...
View ArticleDFSGRID-Editorial
Problem Link:PracticeContestauthor: Tasnim Imran Sunnytester: Roman Rubanenkoeditorialist: Utkarsh LathDifficulty:Medium-HardPre-requisites:ad-hocProblem:The chef has written DFS traversal algorithm...
View ArticleICPC regionals at IIT Kanpur
When will the regionals be conducted at IIT Kanpur?? The dates for Amrita and IIT KGP are out...
View ArticleSPOJ Problem - ORDERSET
Hey can anyone please help me with this problem. I'm repeatedly getting wrong answer. I think this question is a implementation of augmenting data structures as described in cormen. I have done the...
View ArticleDivisor Summation PD13
Problem link : PD13 My code : http://ideone.com/kqh8S2 Tried a lot but still can't figure out why it's giving wrong output.
View ArticleAMSGAME2 - Editorial
Problem Link:PracticeContestDifficulty:SIMPLEPre-requisites:Dynamic ProgrammingProblem:Given a sequences of N positive numbers A[0], A[1], ..., A[N-1], find how many subsequences of the integers are...
View Articleranking in codechef
I don't think i should mention the name, but i saw a guy who got 680 long and 321 short global rank by just giving 37 solved problems. Whereas i've also seen coders that have solved about 100 problems...
View Article