Showing posts with label Problems. Show all posts
Showing posts with label Problems. Show all posts

Tuesday, 5 March 2013

PROBLEM #12


Good Evening DCLites !

Finally we reached at the end of round 2. And today can be a big day for you as today’s problem may fetch you a maximum of 300 points. So, here’s your problem statement which is digressing from the trend of previous phase.

Problem Statement: Suppose you are a thief and you have broken into a Richie Rich’s house. You have a carry bag with you that can take up to M units of weight. The house is having N different riches having different profit values and weights. Your task is to fill your carry bag in such a way so that you can earn maximum profit. Either an item can be picked completely or totally rejected, that is, you can’t pick up fraction of an item.

You need to take input as N(different items available), Pi (their corresponding profit values), Wi (their corresponding weights) and M (capacity of your carry bag). And then you need to give output maximum profit that can be earned.

Samples:

Test case-I

Input: N=4     M=20         Pi={2,3,3,2}         Wi={5,7,3,10}
Output: Maximum Profit=8
Hint: Because we are taking items 1,2,3 and rejecting just item 4.

Test case-II

Input: N=6           M=30         Pi={3,8,4,3,20,6}        Wi={3,5,2,6,10,4}
Output: Maximum Profit=44

Test case-III

Input: N=4         M=25           Pi={8,9,10,11}            Wi={4,8,6,6}
Output: Maximum Profit=38


You can't pickup more than the capacity of carry bag as in case-I


BEST OF LUCK

Monday, 4 March 2013

PROBLEM #11


Good Evening DCLites !

We are almost at the end of Round II. Tomorrow, you guys will get your last problem. But before that, we would like to mention something.

There was an uncertainity about the criteria for evaluation of results. So we are now proclaiming it right away. Each solution was given score out of 60, which was calculated as 12 X 5.

Where 12 point multiplier depend upon the arrival of your first submission, like if the submission time is 9:50pm, it is in period 9pm-10pm so gets a multiplier of 12, 10pm-11pm get a multiplier of 11 and so on...

The 5 point multiplier depend upon the quality of your code, it was judged on the basis of execution time of your code.

Today the problem is again an .exe file but taking into consideration the logic behind it. We have decided to increase its value by a factor of 3. Yes, you can earn a maximum of 180 points.

So guys, get some coffee and start coding as today you can make a big difference to your final score.

Click here to download: Problem 11

Expect something big tomorrow

Saturday, 2 March 2013

PROBLEM #10


Good Evening DCLites !

We have reached so far. Good to see you guys at work. Your next problem is again in the form of an executable file. After giving input, please press any key to analyze its real operation.

Click here to download: Problem 10

Friday, 1 March 2013

PROBLEM #9


Good Evening DCLites !

Here you go with your problem number 9. In the series again you have the source code problem. Find the logic, write the code and brighten your chances to win the event.

Click here to download: LINK 1: Problem No. 9 
                                        LINK 2: Problem No. 9

Thursday, 28 February 2013

PROBLEM #8


Good Evening DCLites,

Today, we again have a source code problem for you. Given an executable file which do some task. You have develop the source code for it. But you can’t use the inbuilt functions like delay. However, you may create one if you can.

Click here to download : Problem 8

Wednesday, 27 February 2013

PROBLEM #7

Good Evening DCLites !

Today, Problem no. 7 carries a deal for you. There are 2 problems namely Problem 7a and Problem 7b. You can attempt any one of these. Each problem has different weight-age in terms of score.


Problem 7a: Write a code that accepts two integers as input and prints all the prime numbers between (and including) these two numbers.

1. Problem 7a carries 40 marks.

Sample:

Input:
2
12

Output:
2
3
5
7
11

OR

Problem 7b: Your input should be an array.And you have to output all the pairs (each pair comprising two numbers each) of numbers which are co-prime.

1. Problem 7b carries 60 marks.

Sample:

Input:
Array :{2,3,5,8,9} 

Output:
Possible Pairs are
2,3
2,5
2,9
3,5
3,8
5,8
5,9
8,9

Rules:
1.Only one submission will be considered.
2.Any participant with more than one submission will not gain any marks.

Tuesday, 26 February 2013

PROBLEM #6


Hello DCLites !

Here is your problem no. 6. This is a source code problem. Given an executable which accepts an input and produces an output based on some logic behind it. All you have to do is decode the logic and write the code. 

Click here to download : http://bit.ly/XdyFIP

Sunday, 24 February 2013

PROBLEM #5


Good Evening DCLites ! Here we are on the refreshing Sunday. We hope you must have enjoyed the day and got yourself prepared for your next task.

After having hands on the pattern puzzles, its time to have some taste of strings again. Yeah, right we got a string problem for you this time.


Problem Statement :

You have to accept 2 strings. First string (String) must be 10 characters long and the second string (Sub-String) must be 5 characters long. Both the strings should contain a sequence of 0's and 1's.

You have to find whether the first string (String) contains the second string (Sub-String) or not. It should output 1, if first string (String) contains the second string (Sub-String) and 0 otherwise.

Sample :






Saturday, 23 February 2013

PROBLEM #4


Good Evening DCLites, its time for your next problem but without any digression from last night it is of the same type, yes its a pattern problem again. So, here is your problem.

Problem:

Following figures are displaying some of the sample outputs for sample inputs.

Some important points : 
1.Be careful regarding the odd number as input.
2.Outputs for small inputs like 3,5,7 may seem to be based on some different logic, but it is not so, all the figures are based on same logic. 

Sample:


Friday, 22 February 2013

PROBLEM #3


Do you recognize this logo




It is the default logo for windows 8 apps. And this is your NEXT TASK.

Don’t worry you need not develop a windows 8 app but you certainly have to prepare this logo and yes through coding.

Confused, let us elaborate, you have to print this pattern using symbol “*” and you have to take input a number to determine its size.


SAMPLE:

Thursday, 21 February 2013

PROBLEM #2


Here is your second problem DCLites.

Ever wondered about longest words in english(or any other long sequences) and about counting the number of distinct characters and frequency of those characters in that word or sequence?

Let us take example of this one of  the longest words in english

‘Pneumonoultramicroscopicsilicovolcanoconiosis’

Seems to be onerous task  to count the repititions of ‘a’,’o’,’c’ and etc. in this rubbbish lung disease ! But for your computer processors it is not so,so use it.


Problem Statement:

You have to take string or a number sequence or a combination of both  as input and have to output the frequency of diifferent characters or numbers in the input.



New Submission Rule:
1.Send your solutions as a zip(or rar) file to us.
Your rar file should have name in this format, "your dclid_problem_number".For example:
if participant with dclid 'DCLHS201' is sending its solution for 'Problem 2' to us then rar file should have name in this  format "DCLHS201_problem_2.rar".
2.Don't write your source code in the body of mail and don't send us your source code in .doc file.Source code files must be in their respective extensions.E.g : for a C++ file .cpp,C# file .cs and so  is for other languages.

Sample:

Wednesday, 20 February 2013

PROBLEM #1



Have you ever seen your name in reverse order ? If no,then its time to do it with your name and others’ also.

But if your name is having more than 15 alphabets then sorry you can’t do it..........hahahahahah ...don’t worry ,name doesn’t matter guys.

So here is your problem statement : -
You have to take input in the form of string not longer than 15 alphabets and output should be a string written in reverse order. 

Rules:
1.Don’t use inbuilt functions for string reversal and string length calculation.
2.More earlier and harder you code the problem,more points you will gain.
3.Follow all the submission rules strictly.

Sample: