Runtime Error(SIGSEGV) plz help below my code
#include<stdio.h> int main() { int i=0,j[5],k=0; while(i!=5) { scanf("\n%d",&j[i]); i++; } while(j[k]!=42) { printf("\n%d",j[k]); k++; } return 0; }
View Articlelower bound in sorting algorithm
In geeksforgeeks.com there is an interesting fact about the lower bound of the sorting algorithm . the link is :----...
View ArticleDifference caused in run time by scanf/printf when used in place of cout/cin
I just want to know whether using scanf/printf instead of cout/cin can cause significant difference in the run time?I was solving a question CHMOD, and was getting TLE when I used cout/cin. But when I...
View ArticleHeavy-Light Decomposition
Can someone provide a good tutorial(well explained) or provide some link on how to exactly implement H-L Decomposition. I have searched a lot and been through almost all suggested websites. The main...
View Articlegetting 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 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 Articleproblem while submitting
hello!! since past few days whatever submissions i make..i dont get to see the outcome of it...it shows running after submission for a very long time..and then i have to see in my submissions to see...
View ArticleOpen Source Project
Hello everybody , I want to work on an open source project.Please suggest me how to start work and what technologies I should know .And also good links and some good article on open source projects and...
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 ArticleCodechef Code of Conduct for open source code
If i use open source code in my program, then what is the code of conduct in codechef as well as in other programming contests. PS: Open source code means, already built functions for algorithms like...
View Articlefunction are not working but no error in program
I have a project using linked list.In complete program there show no error.In the program i have several user choice option.at first when user input some data it takes.and after the end of input it...
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 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 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 Article