Why does this code not cause a SIGSEGV?
Why does this code not cause a segmentation fault when it is supplied with input 1 1000?#include <iostream> #define MAX 1000 using namespace std; long long dp[MAX] = {-1}; long long func(int n) {...
View ArticleInternal Server Error in LTIME62 Forced Particles question
@admin I have been trying to submit solution for this problem for the past one day, but every time I'm getting internal server error on the submission result page!
View Articlerepeating of staement
#include <stdio.h> int main(void) { float bal,total; int amt; printf("enter the amount"); scanf("%d%f",&amt,&bal); if(amt%5==0 && amt<bal) { total=bal-amt; printf("the balance...
View ArticleQM10P5A editorial
PROBLEM LINK:PracticeContestAuthor:Chandan BoruahTester:Taranpreet SinghEditorialist:TaranPreet SinghDIFFICULTY:SimplePREREQUISITES:GreedyPROBLEM:Given N balls, each ball colored either red or blue, we...
View ArticleQM10P5B editorial
PROBLEM LINK:PracticeContestAuthor:Chandan BoruahTester:Taranpreet SinghEditorialist:TaranPreet SinghDIFFICULTY:EasyPREREQUISITES:Slope of a line, Observation.PROBLEM:Given $N$ lines represented by two...
View ArticleA Learning Module for Beginners (Currently in Development, Feedback requested)
Hi fellow programmers,We are planning to create a course for beginners. Beginners often come to the site and got overwhelmed by so many problems present on the site. Many of them often ask where to...
View ArticleCan anyone be blamed for plagiarism in Practice Questions ?
After contests are over, I do look at solutions of other coders and try understand and and improve solutions for lower time..... Can I be warned / banned in this case ?
View ArticleWhy is my solution is wrong for practice Question FLOW006
include<stdio.h>main() { int t,i,n,sum=0; scanf("\n%d",&t); for(i=0;i<t;i++) { scanf("%d",&n); sum=0; while(n!=0) { sum=sum+n%10; n=n/10; } printf("\n%d",sum); } return 0; }
View Articlehow many approx loops are allowed in 2.5 sec lime limit
How many approx loops can be traversed in 2.5 sec? And what should be best complexity to traverse 10^6?
View ArticleIs Code Chef a competitive site or can I learn to code also here?
I am new to coding and in search of online certification courses in Coding and Programming. So is this a site for me?
View ArticleNeed help to find out why my approach is failing for RECTSQ
Hi I was trying to solve the problem RECTSQ, and somehow succeeded to solve it for the provided testcases, but codechef shows WA. Please help me to find the flaws in my approach or concept. Since the...
View Articlejavascript on macbook
Hi guys I have been trying javascript language on macbook sometimes some codes don't work. such as substituting names for some id elements. when I click the button click for greeting nothing comes up!...
View Articlewhy is this wrong? Re
#include<iostream> using namespace std; int main(){ int n,a[100]; cin>>n; for(int i=0;i<n;i++){ int fact=1; cin>>a[i]; for(int j=1;j<a[i]+1;j++) fact = fact*j; a[i]=fact; }...
View ArticleInvitation to CodeChef August Long Challenge 2018 sponsored by ShareChat!
Hello CodeChef Community!We are thrilled to invite you to participate in the August Long Challenge 2018 sponsored by ShareChat. In addition, there are some exciting internship and full-time job...
View ArticleGetting started here, questions about strategy, etiquitte, etc.
Hi guys. I've just started here, I have a few questions about how I approach this place. Firstly, let me just say that wow - some of the problems here are pretty difficult, even for easy!Alright, so...
View ArticlePRMDIV - Editorial
Problem LinkPracticeContestAuthor:Ivan FeketeTester:Misha ChorniyEditorialist:Bhuvnesh JainDifficultyEASYPrerequisitesSieving TechniquesProblemLet $S(x)$ denote the sum of distinct prime divisors of...
View Articleexecution time taken by methods
how can i calculate the execution time of each methods in my program . if my method is calling some other method then it should tell the execution time of current method along with the method that is...
View ArticleCampus Chapter
hii good morning sir/mam i want to ask some queries related to campus chapter.1-My college students are very new to competitive programming so for first few contests can you host some easy contests??...
View ArticleWrong solution for problem KMXOR
for problem "https://www.codechef.com/problems/KMXOR", I am getting wrong answerMy solution: https://www.codechef.com/viewsolution/19707356Can somone please tell what is wrong in my solution since am...
View Article