Search found 10 matches

by catweazle352
Wed Aug 10, 2016 1:11 pm
Forum: Volume 102 (10200-10299)
Topic: 10212 - The Last Non-zero Digit.
Replies: 63
Views: 29897

Re: 10212 - The Last Non-zero Digit.

Nevertheless there is an O(log_10(n)) solution. Pre-Calculate all blocks with 18 numbers with suffixes 21..39 and 61..79. e.g. 121*122*..*129*131*132*..*139 (same with 61..79) and store results in an array [2][400000]. Note that even 5^10 will be compensated this way if you do the precalculation cor...
by catweazle352
Fri Jul 22, 2016 7:40 pm
Forum: Volume 112 (11200-11299)
Topic: 11262 - Weird Fence
Replies: 16
Views: 7177

Re: 11262 - Weird Fence

Hi, I did a binary search answer. I only used integer arithmetic. Providing my code with the sample input of udebug results in a correct answer. I even generated random input on myself and tested it on udebug, my output was always correct. I now heavily documented my code and hope that someone give ...
by catweazle352
Sun Jul 17, 2016 7:47 pm
Forum: Bugs and suggestions
Topic: "Quick access info and search" does not work any more
Replies: 0
Views: 941

"Quick access info and search" does not work any more

Hi, just a few days ago (and it's still the same now) I used on the left hand menu of the UVA website the menu entry "Quick access info and search". But - in contrast to the behaviour I experienced formerly) - now a new log in window pops up demanding username and password. Though already being logg...
by catweazle352
Sun Jul 17, 2016 7:40 pm
Forum: Bugs and suggestions
Topic: Using UVa in computer science courses
Replies: 0
Views: 1392

Using UVa in computer science courses

Hi, being a computer science teacher I used many of your problems in my lessons. To this purpose, I chosed almost 100 problems, solved them and classified them (quite subjective, of course) into five "level of difficulty" groups. Moreover, I developed an offline-judge who automatically checks the so...
by catweazle352
Thu Jul 07, 2016 8:32 pm
Forum: Volume 105 (10500-10599)
Topic: 10505 - Montesco vs Capuleto
Replies: 73
Views: 36328

Re: 10505 - Montesco vs Capuleto

Hi,

I finally got AC. For all others:
There are inputs like this (i.e. A Person may be an enemy of himself(!!))

Code: Select all

2

1
1 1

2
1 1
2 1
AC output is

Code: Select all

0
0
Good luck!
by catweazle352
Thu Jul 07, 2016 6:42 pm
Forum: Volume 105 (10500-10599)
Topic: 10505 - Montesco vs Capuleto
Replies: 73
Views: 36328

Re: 10505 - Montesco vs Capuleto

Hi, I tested my code with all examples of this thread from page 1 to page 5. Moreover, I used UDebug input with 266 test cases and my output is the same with that of UDebug, but still WA. My algorithm is as follows: - I did take into account the case of "neutral" persons who have neither friends nor...
by catweazle352
Wed Oct 08, 2014 3:11 pm
Forum: Volume 116 (11600-11699)
Topic: 11635 - Hotel booking
Replies: 39
Views: 10668

Re: 11635 - Hotel booking

I am not quite sure if I understand your bfs code correctly, so I'd like to apologize in advance for any misunderstanding. I think one must use a kind of priority queue of visits during the bfs in order to get the correct answer and I cannot quite find a prio queue in your code (Sorry again if I mis...
by catweazle352
Wed Oct 08, 2014 1:41 pm
Forum: Volume 116 (11600-11699)
Topic: 11635 - Hotel booking
Replies: 39
Views: 10668

Re: 11635 - Hotel booking

Hi,

did you take into account that there are cases in which you have to visit an edge more than once? See the test cases above.

Kind Regards

Christof
by catweazle352
Tue Jul 08, 2014 4:13 pm
Forum: Volume 116 (11600-11699)
Topic: 11635 - Hotel booking
Replies: 39
Views: 10668

Re: 11635--Hotel Booking

Hi lbv,

thank you for your test cases. Using those I found my mistake, because they revealed a case I did not take into concern.

Christof
by catweazle352
Mon Jul 07, 2014 9:41 pm
Forum: Volume 116 (11600-11699)
Topic: 11635 - Hotel booking
Replies: 39
Views: 10668

Re: 11635--Hotel Booking

My code passes all test cases of this thread, but I still get WA. My approach is a modified dijkstra where my distance is a pair of count of hotels slept and drive distance since the last hotel I slept in. During dijkstra I get the next node from my priority queue (using stl multimap), check the dis...

Go to advanced search