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

Online Technology Quiz @Technex 2014

Technex and Google Developer Group, Hyderabad presents ,Wizards of Byteland an online programming quiz contest.Preliminary Round: Date: 2nd March 2014, Time Limit: 30 minutesContest Portal is now open...

View Article


Modular Multiplication

Many teams have used the following function to perform modular multiplication. Can someone explain how it works?Click here to see code

View Article


register as input in C

i found it while i was going through some solutionsinline void fastread(int *a) {register char c;while(c<33) c=getchar_unlocked();*a=0;while(c>=33) {a=a*10+c-'0'; c=getchar_unlocked(); } }can any...

View Article

Wrong Answer in Modaks inTrinity(TR004)

What's wrong with my solution ?Here's the link of the problem(link-http://www.codechef.com/TRNT2014/problems/TR004/)import java.io.BufferedReader;import java.io.InputStreamReader;import...

View Article

TR001...what was my mistake??

int main() { long long int n,m,t,x; cin>>t; while(t--) { cin>>n>>m; if(n>=m) { x=(n/2); cout<<x<<"\n"; } else { x=(m/2); cout<<x<<"\n"; } } return 0; }

View Article


RESIST - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONThis problem may look scary at first to someone who haven't seen electrical resistors before, but the basic things needed to solve are explained in...

View Article

Discrepancies in the Voters List

i am getting Runtime Error(SIGSEGV) although its running fine in my systemthis is the code...http://www.codechef.com/viewsolution/3495629memory usage is 2.9M pls help !!

View Article

Run time error

when i use my codeblocks to compile my program its working fyn...... but when i enter the same code in code chef ...it is showing runtime error....How can i overcome this problem ............THANKS IN...

View Article


Logic behind TROO1 Trinity 2014 ( Notorious Gunner ) ?

I have seen many solutions and they all look like this :int f( int x) { int ans ; while ( x > 1) { ans++ ; x /= 2 ; } return ans ; } final_ans = max ( f(a) , f(b)) ; where a and b are no.of rows and...

View Article


CHSEQ22-Editorial

PROBLEM LINK:PracticeContestAuthor:Roman FurkoTester:Hiroto Sekido, Gerald AgapovEditorialist:Ajay K. VermaDIFFICULTY:Easy-MediumPREREQUISITES:Connected componentsPROBLEM:We are given an array of N...

View Article

Getting TLE for ATOM

Question : ATOMThis is my code for above question#include<iostream> #include<cstdio> using namespace std; long long int get_num() { long long int num=0; char c=getchar_unlocked();...

View Article

Fibonacci Returns Help

Could someone provide hint/editorial for this question http://www.codechef.com/IOPC2014/problems/IOPC14FIts mentioned everywhere that there is no general formula to find pisano period...

View Article

Cheating Trinity 2014 and Unethical Karma Farming

Here are 2 users with exactly same codes for all 3 problems of Trinity 2014 organized on Codechef today.Contest organizers please take note.Problem : TR001: (exactly same codes)1) @bit_cracker007 :...

View Article


Easy Question - Birthday Candles

for the easy level question Birthday Candles : http://www.codechef.com/problems/CANDLE/ i have tried all the test cases that i could but i m still getting wrong answer. Please tell me the tell case for...

View Article

Getting NZEC in java ??

package practice; import java.util.Scanner; class Cricket { /** * @param args */ public static void main(String[] args) throws Exception { // TODO Auto-generated method stub // BufferedReader br = new...

View Article


Image may be NSFW.
Clik here to view.

A tutorial on Suffix Arrays

Hello @all,This text will focus on the construction of Suffix Arrays, it will aim to explain what they are and what they are used for and hopefully some examples will be provided (it will be mainly...

View Article

DEFACING - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEASYPREREQUISITESBrute force, GreedyPROBLEMWe are given an integer S represented in a 7-segment display. Add some segments or digits into it to create the as large...

View Article


Modular Exponentiation and large numbers

I am having trouble in understanding how this code is giving the correct answer for larger test cases (TL > limit of long long int). Suppose TL =...

View Article

NZEC error.

Hi, I always recieve a non zero exit code? Why is that happening? Could someone look at my code?def fact(n):#factorial function if(n==0): return 1 return(n*fact(n-1)) def coeff(n,k):#binomial...

View Article

ATM why can't i submit a program in TCL?

I just completed the ATM script in TCL, but when I goto upload it TCL is not an available option!! what gives?

View Article
Browsing all 39796 articles
Browse latest View live


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