Quantcast
Channel: CodeChef Discuss - latest questions
Browsing all 39796 articles
Browse latest View live
↧

hash table

can any one please suggest me some question in codechef based hash table and hash function implementation

View Article


Use long long or int??

I recently submitted problem NUMGAME from easy practice question. http://www.codechef.com/problems/NUMGAMEI submitted the answer but by mistake I took n of integer type and not long long which it must...

View Article


How to avoid printing -0.000?

Sometimes in a problem we are asked to print our values correct to 3 decimal places. Simply printing 3 d.p using printf ( "%.3lf\n", variable ) wrongly prints -0.000 sometimes. For example:printf (...

View Article

Unable to understand the compilation error here.

I have the following submission in scala for one of the practise questions at http://www.codechef.com/problems/INTEST/ and I keep getting compilation error. I compared it with other submissions and I...

View Article

Longest Regular Bracket Sequence

http://codeforces.com/problemset/problem/5/CDidn't understood the meaning of:"a bracket sequence is called regular, if by inserting «+» and «1» into it we can get a correct mathematical expression."In...

View Article


BYTECODE Editorials- Magic Sticks

Here is a link to my editorial on Magic Sticks problem asked in BYTECODE 2013. Critics are more than welcome.

View Article

SPOJ BITMAP. NZEC in JAVA.

EDIT: THIS ( http://ideone.com/Jyjgvi ) IS A MODIFIED CODE,BETTER AND CLEANER THAN THE PREVIOUS ONE. PLEASE HAVE A LOOK. THE OLDER ONE IS GIVEN BELOW. EVEN THIS MODIFIED CODE GETS NZEC. PLEASE LET ME...

View Article

Problem: Holes ; Below is the code I am trying to execute but the compiler...

#include<iostream> #include<string.h> using namespace std; int main() { int i,test,length; int count =0; char a[100]; cin>>test; while(test--) { cin>>a; length=strlen(a);...

View Article


about datatype

main() {float a=3.7; if (a==3.7) cout<<"true"; else cout<<"false"; } my output is false ,why ? give any solid explaination for it.

View Article


Division of problems by difficulty level

When the editorials are published there are 5 kind of divisions for difficulty level : 1. Cakewalk 2. Simple 3. Easy 4. Medium 5. Hard However , when the problems move to practice section the first...

View Article

Separate final test cases for Challenge Question.

@admin , @everyone : I believe final test cases for Challenge Question should be different from those used during the contest . The practice of making hundred's and thousand's of submission's to...

View Article

ROUTES - Editorial

Problem Link:PracticeContestDifficulty:Medium-HardPre-requisites:Biconnected ComponentsProblem:Maintain the sum of biconnected components' sizes squares during adding the edges in the...

View Article

Puzzle for interview

there is an infinite line.you are standing at a particular point you can either move 1 step forward or 1 step backward.you have to search for an object in that infinite line.your object can be in any...

View Article


Difference 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 Article

Perl Problem

How would i subtract first column of file1 to first column of file 2 where both the files are multi columnar ... help asap!

View Article


perl turbo sort

Hey everyone, I was trying to do the turbo sort challenge with perl and I am having a hard time splitting it. Here is what I have so far: my @numbers = <>; chomp(@numbers); my @sorted = sort {$a...

View Article

Transform the Expression- ONP

I have been coding this code ONP and its giving me the correct answer on my compiler but a wrong answer here. Please someone help me to find the error in my code.include<stdio.h>int POP(char...

View Article


DIVQUERY - editorial

Problem Link:PracticeContestauthor: Tasnim Imran Sunnytester: Roman Rubanenkoeditorialist: Utkarsh LathDifficulty:MediumPre-requisites:offline processing of queries, factorizing small...

View Article

[closed]WA in BEENUMS SPOJ

problem: http://www.spoj.com/problems/BEENUMS/my solution: http://ideone.com/CvvsjO#stdinIf anyone could tell me the cause behind the WA,it would be really helpful. Thanks in advance.

View Article

NZEC PYTHON

D:\Python32import stringt=1 st='fd' t=input() while(int(t) > 0): st=input() ctr=0 i=0 l=len(st) for i in range(0,l): if st[i]=='A' or st[i]=='D' or st[i]=='P' or st[i]=='O' or st[i]=='Q' or...

View Article
Browsing all 39796 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>