getting wrong answer ambiguous permutation
include<iostream>using namespace std;int main(){int a[100000];unsigned long int b;unsigned long int c;unsigned long int x;unsigned long int l=0;while(b!=0){scanf("%d",b);if(b!=0){for(int...
View Articledynamic memory allocation.. array larger than 10^6
Please help making an array or something that can hold larger than 10^6 elements in it. Also tell about vectors. Thank you!
View ArticleKAN13A - Editorial
PROBLEM LINK:PracticeContestAuthor: Dr. Mustaq Ahmed Tester:Jingbo ShangEditorialist:Jingbo ShangDIFFICULTY:Easy - MediumPREREQUISITES:Dynamic ProgrammingPROBLEM:Given a M×N matrix Price (M days, N...
View ArticleKAN13F - Editorial
PROBLEM LINK:PracticeContestAuthor: Dr. M. Kaykobad Tester:Jingbo ShangEditorialist:Jingbo ShangDIFFICULTY:Medium – HardPREREQUISITES:GreedyPROBLEM:Given n files with different sizes, determine the...
View ArticleKAN13E - Editorial
PROBLEM LINK:PracticeContestAuthor: Abdullah Al Mahmud Tester:Jingbo ShangEditorialist:Jingbo ShangDIFFICULTY:Medium – HardPREREQUISITES:Split Graph, Degree Sequence, Quick Sort.PROBLEM:Given an...
View ArticleKAN13D - Editorial
PROBLEM LINK:PracticeContestAuthor: Asif Haque Tester:Jingbo ShangEditorialist:Jingbo ShangDIFFICULTY:MediumPREREQUISITES:Fast Matrix Power with ModPROBLEM:Given a m-order linear recurrence, calculate...
View ArticleKAN13C - Editorial
PROBLEM LINK:PracticeContestAuthor: Dr. M Sohel Rahman Tester:Jingbo ShangEditorialist:Jingbo ShangDIFFICULTY:MediumPREREQUISITES:KMPPROBLEM:Given a string S[1..n], for each prefix of S[1..i],...
View ArticleKAN13B - Editorial
PROBLEM LINK:PracticeContestAuthor: Tanaeem Moosa Tester:Jingbo ShangEditorialist:Jingbo ShangDIFFICULTY:MediumPREREQUISITES:Dijkstra, Binary HeapPROBLEM:Given a R×C matrix and the definition of the...
View ArticleKAN13I - Editorial
PROBLEM LINK:PracticeContestAuthor: Dr. M Kaykobad Tester:Jingbo ShangEditorialist:Jingbo ShangDIFFICULTY:Easy – MediumPREREQUISITES:Fraction, MathPROBLEM:Given a clock system, determine how many good...
View ArticleKAN13H - Editorial
PROBLEM LINK:PracticeContestAuthor: Dr. M Kaykobad Tester:Jingbo ShangEditorialist:Jingbo ShangDIFFICULTY:Easy – MediumPREREQUISITES:Dynamic ProgrammingPROBLEM:Given a method to solve the p-peg Hanoi...
View Articlereg time limite
I want to know the time limit for an problem because i have some problem as time limit exceded whether time limit is different for different problems or some other criteria is there
View ArticleKAN13G - Editorial
PROBLEM LINK:PracticeContestAuthor: Dr. M Kaykobad Tester:Jingbo ShangEditorialist:Jingbo ShangDIFFICULTY:EasyPREREQUISITES:GreedyPROBLEM:Given a coin system, with 1 and 0.01, greedily determine the...
View ArticleQPOINT - Editorial
PROBLEM LINK:PracticeContestAuthor:tuananh93Editorialist:liouzhou_101DIFFICULTY:HARDPREREQUISITES:Computational geometry, Point location, Scan line, Self-balancing binary search tree, Functional...
View ArticleCIELRCPT - Editorial
PROBLEM LINKPracticeContestDIFFICULTYCAKEWALKPREREQUISITESGreedy AlgorithmsPROBLEMYou need to find the representation of a given integer N as a sum of powers of two up to 211 with the smallest number...
View Articlewhy this code is giving a time limit exceeded problem?
#include <stdio.h> int main() { long long int n; long long int k; long long int a[1000000]; int i; int count; count = 0; scanf("%lld", &n); scanf("%lld", &k); for(i = 0; i < n; i++) {...
View ArticleTRSUBTR - Editorial
PROBLEM LINK:PracticeContestAuthor:Vineet PaliwalTester:Roman RubanenkoEditorialist:Jingbo ShangDIFFICULTY:MediumPREREQUISITES:Encoding Trees to Strings, KMP, HashPROBLEM:Given an original labeled...
View ArticleNUMPATH - Editorial
PROBLEM LINK:PracticeContestAuthor:Vineet PaliwalTester:Roman RubanenkoEditorialist:Jingbo ShangDIFFICULTY:MediumPREREQUISITES:Dynamic Programming, Suffix Sum, Fenwick TreePROBLEM:Given a...
View Articlememory allocation
can codechef allocate 145M memory for the c program? i am getting an runtime error my code runs on ideone
View ArticleHandling large integers in C++???
While going through some successful submissions of Am I Fibonacci Number in COOK40, I have seen that some of them just use unsigned long long to store digits of the form of 1000 digits and still...
View ArticleTLE in RECTQUER
why my code for RECTQUER is giving TLE while same algorithm in c++ is executing in 0.98 sec??import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import...
View Article