Page 7 of 9

Re: 10226 - Hardwood Species

Posted: Thu Dec 13, 2012 9:58 am
by alimbubt
brianfry713 wrote:post your updated code

Code: Select all

Accepted :D 

Re: 10226 - Hardwood Species

Posted: Fri Dec 14, 2012 12:39 am
by brianfry713
Instead of adding every tree to the vector check the map to see if that tree already exists.

Re: 10226 - Hardwood Species

Posted: Fri Dec 14, 2012 8:03 pm
by alimbubt
brianfry713 wrote:Instead of adding every tree to the vector check the map to see if that tree already exists.
Thanks a lot......now Accepted :D

Re: 10226 - Hardwood Species

Posted: Fri Dec 28, 2012 7:36 am
by @ce
Getting WA....plzz help

Code: Select all

AC

Re: 10226 - Hardwood Species

Posted: Sat Dec 29, 2012 9:50 pm
by brianfry713
Print a blank line between 2 consecutive data sets.

Re: 10226 - Hardwood Species

Posted: Sun Dec 30, 2012 7:37 pm
by @ce
Thanks brianfry713...i got AC. :)

10226 - Hardwood Species submission error?

Posted: Sun Jun 09, 2013 8:41 pm
by MauriWilde
Why am I getting submission error in this problem? I sent it like six times and always is the same.

You can see my submissions here: http://uhunt.felix-halim.net/id/129605

And here is my code:

Code: Select all

Removed after AC
Please help me :(

Re: 10226 - Hardwood Species submission error?

Posted: Mon Jun 10, 2013 12:41 am
by MauriWilde
I checked and this problem is giving submission error to everybody since 25 days ago u.u

Re: 10226 - Hardwood Species submission error?

Posted: Tue Jun 11, 2013 12:30 am
by brianfry713
Try a different problem.

Re: 10226 - Hardwood Species submission error?

Posted: Thu Jul 04, 2013 9:53 am
by aranjuda
I am getting submission error too. Is this a problem with the judge or with my code?

Re: 10226 - Hardwood Species submission error?

Posted: Fri Jul 05, 2013 11:01 pm
by brianfry713
It's probably an issue with the judge.

Re: 10226 - Hardwood Species submission error?

Posted: Sat Jan 04, 2014 1:07 pm
by uDebug
aranjuda wrote:I am getting submission error too. Is this a problem with the judge or with my code?
I tried this problem today and got a submission error as well.

But the strange thing is that I got an e-mail saying
Your submission with number XXXXXXXX for the problem 10226 - Hardwood Species has succeeded with verdict Accepted.
And it shows up as being solved on UVA Online when I click on the statistics for this problem. I see my ranking, submission ID run time and other details. However, it doesn't show any of these on uHunt. So, I wonder if there's something else going on.

Also, I found this on Submission Errors

http://uva.onlinejudge.org/index.php?op ... 1&Itemid=1

Update: After trying to submit this several times and not getting anywhere, I tried submitting it when there were relatively few submissions going on - and sure enough it went through. It looks like the problem has a very big dataset or seems to use a lot of the judge's resources. So, maybe given that my problem was the only one being judged for a few minutes when I submitted it helped.

Re: 10226 - Hardwood Species submission error?

Posted: Sat Jan 04, 2014 1:41 pm
by uDebug
Here's some input / output that helped me test/ debug my program.

Note that there's no newline after the last set of output. There's only one in between output sets.

Input:

Code: Select all

3

Red Alder
Ash
Aspen
Basswood
Ash
Beech
Yellow Birch
Ash
Cherry
Cottonwood
Ash
Cypress
Red Elm
Gum
Hackberry
White Oak
Hickory
Pecan
Hard Maple
White Oak
Soft Maple
Red Oak
Red Oak
White Oak
Poplan
Sassafras
Sycamore
Black Walnut
Willow

Tree1
Tree2
Tree3
Tree1

Tree5
Tree6
Tree1
Tree2
AC Output:

Code: Select all

Ash 13.7931
Aspen 3.4483
Basswood 3.4483
Beech 3.4483
Black Walnut 3.4483
Cherry 3.4483
Cottonwood 3.4483
Cypress 3.4483
Gum 3.4483
Hackberry 3.4483
Hard Maple 3.4483
Hickory 3.4483
Pecan 3.4483
Poplan 3.4483
Red Alder 3.4483
Red Elm 3.4483
Red Oak 6.8966
Sassafras 3.4483
Soft Maple 3.4483
Sycamore 3.4483
White Oak 10.3448
Willow 3.4483
Yellow Birch 3.4483

Tree1 50.0000
Tree2 25.0000
Tree3 25.0000

Tree1 25.0000
Tree2 25.0000
Tree5 25.0000
Tree6 25.0000

Re: 10226 - Hardwood Species submission error?

Posted: Tue Feb 11, 2014 9:17 pm
by piyukr
There are a few common pitfalls in this problem.Be sure to check the following:
1.)Between two input test cases, there is a blank line.
2.)There is EOF at the end of the last case , not a blank line.
3.)The names of the trees should be sorted in the output.
4.)Output cases should be separated by a printing blank line.
5.)There will not be any blank line after the last case's output.
6.)There may be a test case in which there is no tree at all i.e. a blank test case. For such a case do not print anything.
7.)In a case when there are no trees , if you are calculating the % of each tree , divide by zero may occur.
8.)There may be leading/trailing white spaces in the input lines. Be sure to remove them.

Re: 10226 - Hardwood Species submission error?

Posted: Wed Feb 12, 2014 12:09 am
by brianfry713
It looks like you figured it out