Help needed for completing the task

  • From: Darko Pogačić <darko.pogacic@xxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Wed, 6 Jul 2011 15:41:47 +0200

Hi There!
How I feeling the formular for my new job title, I need to complete one task.
How I developed a Windows applications, I need to make a calculation 
application, and I need help to complete this task.
I only need the instructions, and code in any programming language, and I'll 
convert it to C#.
In this attachment, is the file "task.txt", and there are detailed instruction, 
what program needs to do, but instructions are and in this text below.

Best regards!


Your friend Mirko found company, which develops projects, which nobody develops 
in Croatia.
In one day, Mirko got requests for development a large number of projects, and 
he decided to do it one by one project, and the first step was the time 
calculation for each.
After the calculation, Mirko concluded that he needs more time, and he decided 
that he can develop the N requests, which can bring profit.
Mirko doesn't know to calculate it, and he asked you for help.
Write the program, which from the input file "" reads data about N 
projects, and into the output file "podaci.out" writes which projects Mirko 
needs to select, and how much money they brings.
If exist more possible selections, program can write anyone.

Input data

In the first line of the input file, is the natural number N (1 <= N <= 10000) 
and  the avaylable time V (1 <= V <=10000000). In the following lines are two 
natural numbers P i C (1 <= P <= 1000, 1 <= C <= 1000000) which defines 
estimated time, and price for each project.

Output data

In the first line of the output file, program have to write a maximum profit, 
and a number of the selected projects (0 <= O <= N),.
In the following lines, program have to write numbers of the selected projects.

Test Data Example

5 20 1 5 4 8 5 4 7 56 5 13 
82 4 1 2 4 5 

Other related posts:

  • » Help needed for completing the task - Darko Pogačić