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

Two different scanning techniques One passing The other showing TLE.

My first solution http://www.codechef.com/viewsolution/2302310 in which i use cin cout gets passed while the other one in which i use printf scanf show TLE: http://www.codechef.com/viewsolution/2302323...

View Article


PERMUTE - Editorial

Problem Link:PracticeContestDifficulty:Medium-HardPre-requisites:ad-hoc, mathProblem:Given integers N and M, find how many permutations are there from 1 to N, such that the sum of adjacent numbers does...

View Article


C using datastructure

A 5X5 matrix is given....suppose{1,3,13,......with some free space denoted by 0}.First of all we have to search the free space in the given matrix and then we have to allocate the the car in that free...

View Article

Time complexity of bfs and dfs

It is just that i am unable to understand how complexity(time) of bfs/dfs are O(v+e). why not O(v*e)???since most of the times i have seen we just multiply inner loop and outer loop iterations and...

View Article

Remove spaces from a string in C++ and convert into integer.

How to remove spaces from a string in C++ and convert it into integer in a simple way.

View Article


C# Timing

Anybody know how can i reduce the execution time of my C# program.... ANy help is highly appreciated. I tried: Removing unused namespaces. Removed Unused declarations. Removed SOme looping- not all-as...

View Article

NUMFACT - Time limit exceed error

It gives a TLE when i use the function 'prime' to find the prime factorisation of the number.Can someone please tell me where i went wrong? Thanks in advance. Here is the link to my code :...

View Article

Prizes for lunch time .

@admin : Are there any prizes for lunch time contest , in terms of cash or goodies . If so , please give the details for schools category and open category .

View Article


GRTRIP - Editorial

Author: Roman Rubanenko Tester: Vamsi Kavala Editorialist: Bruno OliveiraPROBLEM LINKSPracticeContestDIFFICULTYMediumPRE-REQUISITESGraphs, DFS, Shortest-Path TreesProblem:The Chef is going on a trip...

View Article


I am not able to set my institution to Delhi Public School R.K. Puram while...

I am not able to set my institution to the above mentioned. Whenever I try to select this institution, it says "choose from suggestion box". But that is what I am doing, i.e., selecting from the drop...

View Article

How can I practice an ended contest?

Hi Everyone How can I practice an ended contest. I wanna practice LunchTime contest.

View Article

All Possible Combination

Given four numbers(say 1,2,3,6). How Can we generate all possible combinations using addition,subtraction,multiplication,division and brackets.I have found a similar problem: Free Parentheses (ACM ICPC...

View Article

Ideas for a Graphic Project

Hey, I'm a high school student with some level of mastery over java. I want to study computer science further on, and I would like to do a CS project to showcase my passion to different colleges. But...

View Article


What are the problem sections Challenge and Peer?

Easy, medium, hard are arranged by difficulty. School section is the new one introduced. What are these 2 other sections in practice?

View Article

explain me this code...

#include<stdio.h> int call(int); int main() { int n=9; printf("1 function"); call(n); getchar(); return 0; } int call(int n) { if(n<=0) return 0; else call(--n); printf("\n%d function",n);...

View Article


lunch time ratings

Will there be any ratings for lunch time???if yes till when will they be uploaded...if at all..nice concept

View Article

My interview question...

Given a n (large number) lists of customers who visited n webpages on n (large number) days, design a data structure to get customers who have visited the website on exactly "k" days and should have...

View Article


How to compile and run C/C++ code from "Sublime Text 2" editor?

I use ST2 for writing C/C++ code during competitions, but I have to use CodeBlocks for compiling and running the code. Is there any way to compile and run code within the ST2. I have googled for this...

View Article

ambiguous permutation

import java.io.*; import java.util.Scanner;class test1 {public static void main(String[] args)throws IOException { int count=1; BufferedReader br = new BufferedReader(new InputStreamReader(System.in));...

View Article

ambiguous permutation

import java.io.*; import java.util.Scanner; public class test { public int search(int i,String a[]) { for(int j=0;j<a.length;j++) { if(Integer.parseInt(a[j])==i) { return j+1; } } return 0; } public...

View Article
Browsing all 39796 articles
Browse latest View live


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