812 - Trade on Verweggistan

All about problems in Volume 8. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
Mariano
New poster
Posts: 2
Joined: Sun Sep 22, 2002 1:42 am
Location: Buenos Aires, Argentina
Contact:

812 - Trade on Verweggistan

Post by Mariano » Tue Oct 01, 2002 1:22 am

What exactly should the output be like in this problem?
The output description given in the statement does not really match the
sample output. Also, the sample output says
[code]
Workyards 1
....etc
[/code]
and that should probably be simply `workyard', in singular? Does anyone have realistic input?

-- m

User avatar
cytse
Learning poster
Posts: 67
Joined: Mon Sep 16, 2002 2:47 pm
Location: Hong Kong
Contact:

Post by cytse » Wed Oct 09, 2002 6:46 pm

Always use "Workyards", forget about English grammar

Grzesiek
New poster
Posts: 8
Joined: Thu Feb 14, 2002 2:00 am

812 Trade on Verweggistan

Post by Grzesiek » Tue Nov 19, 2002 9:19 pm

What output is correct for the input:

1
5 10 12 8 15 5
0

My program produces:

Workyards 1
Maximum profit is 0.
Number of pruls to buy: 0 1 3 5

I get W.A.
Can anybody give me some clue?

Regards, Grzesiek

Sebasti
New poster
Posts: 10
Joined: Sun Apr 13, 2003 11:41 pm
Contact:

Post by Sebasti » Tue Apr 15, 2003 10:23 pm

Hi,

I've got a WA, and i don't know what's wrong. :(
Do you have anothers test cases?
What should be the output to this case:

1
3 11 12 13

anyone can help me?

User avatar
cytse
Learning poster
Posts: 67
Joined: Mon Sep 16, 2002 2:47 pm
Location: Hong Kong
Contact:

Post by cytse » Wed Apr 16, 2003 12:06 pm

Here is my output to your case:
Workyards 1
Maximum profit is 0.
Number of pruls to buy: 0

I think you may try the following:
2
0
0
0

My output is:
Workyards 1
Maximum profit is 0.
Number of pruls to buy: 0

carneiro
Learning poster
Posts: 54
Joined: Sun May 18, 2003 1:19 am
Location: Rio de Janeiro, Brazil
Contact:

Post by carneiro » Wed Nov 05, 2003 9:28 am

Can someone with an ACCEPTED problem please give me the correct output for this :

Code: Select all

50
20 13 18 2 1 2 16 6 4 15 6 5 3 9 2 20 9 5 6 16 15 
20 6 10 9 16 10 9 6 1 18 4 16 2 13 17 15 6 12 12 10 19 
20 17 6 1 6 7 13 14 4 18 1 10 15 11 19 2 20 19 7 12 16 
20 3 7 10 7 4 4 13 7 15 14 5 3 19 6 8 18 18 13 1 7 
20 6 10 1 16 20 14 7 18 1 10 6 15 9 15 1 12 10 5 10 4 
20 18 15 6 17 12 6 14 1 10 6 7 15 15 19 2 7 12 20 4 4 
20 10 9 10 18 15 3 1 4 7 10 7 17 16 5 5 7 2 18 19 3 
20 15 5 18 1 15 11 7 19 11 3 14 12 11 4 1 18 18 13 1 16 
20 2 20 12 10 16 16 8 17 5 7 19 19 3 8 12 18 19 18 8 1 
20 12 1 12 3 16 4 12 5 16 12 1 9 11 12 18 6 20 18 14 4 
20 4 5 15 18 12 18 7 2 7 14 2 19 7 5 13 14 8 4 11 15 
20 15 11 4 18 14 13 15 13 10 9 9 5 13 15 15 16 12 1 18 18 
20 7 19 8 5 16 20 10 15 3 20 10 10 10 5 7 16 9 1 8 19 
20 1 8 15 13 14 9 9 5 2 18 15 8 8 2 4 3 14 13 10 16 
20 13 19 5 2 15 3 17 3 4 17 13 4 16 8 9 10 8 9 6 1 
20 6 12 20 13 6 3 8 19 16 17 14 8 7 11 1 1 13 10 15 8 
20 18 8 12 13 7 12 2 6 20 20 7 17 11 6 1 16 9 8 14 16 
20 16 20 3 2 10 15 14 14 4 9 2 1 16 5 6 2 16 7 7 7 
20 6 5 3 9 11 15 4 11 3 18 6 10 17 20 12 18 14 5 11 10 
20 13 12 10 20 16 15 13 3 14 20 9 11 16 3 19 6 10 3 16 4 
20 12 13 13 20 12 4 17 6 1 19 15 5 3 16 5 10 3 17 13 8 
20 8 13 18 4 8 17 1 17 11 9 20 14 1 12 13 5 8 1 2 8 
20 11 16 4 13 3 8 15 17 17 7 4 16 11 2 11 10 10 12 18 20 
20 20 9 5 12 13 17 8 20 9 9 19 19 16 2 4 19 2 18 15 10 
20 16 19 5 18 12 16 8 1 19 17 12 10 6 16 1 18 4 9 9 12 
20 17 19 2 5 12 5 3 13 2 9 2 17 19 19 15 10 14 14 2 4 
20 10 5 13 7 20 13 16 15 13 4 18 2 14 20 6 6 16 20 10 18 
20 20 4 6 19 2 12 20 7 17 14 10 19 18 14 5 10 18 1 4 11 
20 16 2 4 10 13 1 7 8 12 8 17 11 11 15 1 4 6 13 2 15 
20 6 3 13 3 16 17 12 14 9 16 16 5 9 19 6 1 11 4 20 2 
20 11 17 4 14 11 5 17 8 17 11 2 2 13 6 16 9 15 8 14 3 
20 15 9 19 3 19 16 3 9 19 2 2 2 10 5 15 20 1 3 20 9 
20 13 13 2 6 19 18 6 13 17 19 7 11 19 6 13 17 13 7 17 12 
20 20 10 5 10 6 19 1 7 13 12 7 6 5 9 3 3 18 8 7 14 
20 18 13 4 16 10 16 4 3 14 12 14 13 1 10 14 6 20 7 4 12 
20 18 3 17 2 11 19 16 20 18 2 13 15 15 16 2 4 3 17 6 8 
20 8 11 12 20 12 6 18 11 4 1 3 1 3 19 15 5 10 10 4 7 
20 12 8 2 18 15 15 13 9 12 11 16 19 13 8 19 5 5 16 15 8 
20 8 17 20 3 8 14 19 17 4 3 3 7 2 16 4 17 11 8 5 2 
20 18 13 12 11 12 2 15 8 9 9 15 9 18 6 11 5 20 9 1 15 
20 3 15 13 5 3 16 13 5 3 17 18 13 1 9 3 12 3 9 19 11 
20 17 5 19 14 11 1 10 2 2 2 8 4 9 20 20 11 7 12 15 1 
20 1 12 13 1 12 7 5 14 15 3 17 4 20 7 9 2 8 19 15 1 
20 20 2 4 8 13 4 10 19 7 4 19 7 7 4 20 19 2 4 4 17 
20 6 20 20 17 7 8 18 6 18 12 6 18 5 1 17 17 16 7 15 3 
20 2 6 1 9 1 20 19 2 3 2 10 1 2 9 17 20 9 15 17 6 
20 18 14 15 3 14 12 19 10 10 6 4 3 3 4 11 3 4 9 16 18 
20 11 6 18 4 6 7 15 14 1 11 20 18 4 6 20 9 9 11 18 18 
20 16 13 1 18 17 3 12 12 4 7 1 6 12 19 9 18 5 3 3 17 
20 5 2 6 8 20 18 8 8 8 6 18 15 10 18 12 18 12 3 9 15 
0

My WA program outputs this :

Code: Select all

Workyards 1
Maximum profit is 624.
Number of pruls to buy: 443 445 446 448 453
[]s
Mauricio Oliveira Carneiro

fpmc
New poster
Posts: 23
Joined: Tue Sep 30, 2003 11:44 pm

Post by fpmc » Fri Jul 09, 2004 2:38 am

My AC solution gives:

Code: Select all

Workyards 3
Maximum profit is 624.
Number of pruls to buy: 443 445 446 447 448 449 450 451 452 453
Frank

sclo
Guru
Posts: 519
Joined: Mon Jan 23, 2006 10:45 pm
Location: Vancouver, BC, Canada
Contact:

Post by sclo » Thu Mar 30, 2006 1:25 pm

The solution should be:

Code: Select all

Workyards 1
Maximum profit is 624.
Number of pruls to buy: 443 445 446 447 448 449 450 451 452 453

martins256
New poster
Posts: 1
Joined: Sat Feb 02, 2008 11:04 am
Contact:

WA

Post by martins256 » Sat Feb 02, 2008 11:09 am

Can anyone give me input/output for this prob? I keep getting WA, I have tried all cases, what was in this disscusion and worked right.

arunmoezhi
New poster
Posts: 1
Joined: Thu May 01, 2014 1:03 am

Re: 812 - Trade in Verweggistan

Post by arunmoezhi » Thu May 01, 2014 1:06 am

Hi,
Can someone post some more inputs. I got the correct answers for all the inputs posted here. But I still get WA.
Thanks,
Arun

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 812 - Trade in Verweggistan

Post by brianfry713 » Thu May 01, 2014 9:25 pm

Input:

Code: Select all

9
19 18 13 8 1 8 6 16 13 6 8 17 5 18 5 3 5 4 12 1
2 7 12
8 4 12 8 7 1 15 5 10
9 9 17 4 8 15 20 12 20 7
0
2 5 5
1 1
0
18 13 4 8 16 12 3 7 19 1 7 5 6 9 9 6 17 12 6
1
14 17 10 10 5 6 6 1 4 18 1 5 10 16 5
5
5 19 3 17 20 9
5 17 9 10 2 6
2 7 16
17 16 18 17 12 3 14 13 18 11 5 2 12 20 18 8 6 17
18 2 8 10 15 4 19 16 17 4 1 16 11 8 11 8 4 2 2
7
0
6 19 10 13 10 9 10
17 6 18 6 20 17 7 14 12 5 2 9 20 2 16 11 9 6
5 12 19 4 20 5
10 18 6 14 19 15 16 15 12 5 12
10 14 18 5 5 15 18 13 6 19 20
9 7 17 18 10 16 1 1 12 14
10
8 20 8 3 7 14 7 11 17
18 16 6 13 1 20 10 5 6 8 5 13 6 1 2 15 16 14 7
18 8 16 8 7 3 2 13 8 8 15 4 17 11 10 9 3 1 19
8 18 6 11 3 12 12 4 18
14 10 17 10 17 12 9 15 7 10 7 14 10 13 10
16 15 11 14 17 11 12 16 1 10 6 3 13 9 18 2 20
15 18 9 3 10 17 17 8 18 15 13 19 20 2 4 14
5 10 3 3 13 18
6 14 3 17 6 4 14
19 3 1 17 11 15 18 19 12 5 16 18 18 7 17 19 10 11 3 11
5
13 16 2 19 9 16 7 15 19 20 14 1 12 10
1 7
2 13 10
3 1 7 1
19 16 12 8 18 14 19 2 10 14 3 20 2 18 18 8 17 17 1 9
1
17 12 19 2 4 8 5 16 6 18 2 1 1 10 18 6 8 19
7
8 1 18 6 11 15 14 7 3
3 7 3 20
0
17 1 14 20 18 9 6 7 3 18 7 12 16 4 11 6 10 15
18 7 20 9 1 5 7 15 3 13 18 2 3 10 3 8 10 12 8
2 18 10
1 4
3
19 7 3 17 8 17 15 14 9 15 6 13 13 20 7 5 9 9 19 19
6 18 8 14 18 14 11
7 17 6 12 16 4 6 4
1
20 18 16 3 4 1 7 16 12 14 20 1 14 11 11 16 20 18 9 17 3
0
AC output:

Code: Select all

Workyards 1
Maximum profit is 90.
Number of pruls to buy: 47 49 50

Workyards 2
Maximum profit is 27.
Number of pruls to buy: 11 12

Workyards 3
Maximum profit is 31.
Number of pruls to buy: 24

Workyards 4
Maximum profit is 7.
Number of pruls to buy: 2

Workyards 5
Maximum profit is 97.
Number of pruls to buy: 52 53 55 56 57

Workyards 6
Maximum profit is 26.
Number of pruls to buy: 6

Workyards 7
Maximum profit is 26.
Number of pruls to buy: 12 13

Workyards 8
Maximum profit is 60.
Number of pruls to buy: 20 21 23

Workyards 9
Maximum profit is 15.
Number of pruls to buy: 9

Workyards 10
Maximum profit is 11.
Number of pruls to buy: 6
Check input and AC output for thousands of problems on uDebug!

Post Reply

Return to “Volume 8 (800-899)”