ENG  RUSTimus Online Judge
Online Judge
Online contests
About Online Judge
Frequently asked questions
Site news
Problem set
Submit solution
Judge status
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
back to board

Discussion of Problem 1991. The battle near the swamp

To admins
Posted by Silent 3 Nov 2013 02:22
I wrote a simple solution (http://acm.timus.ru/getsubmit.aspx/5309080.go), and it got WA3. The second solution (http://acm.timus.ru/getsubmit.aspx/5309073.go) got AC. I can't realise why v1 reads test #3 incorrectly. Is it a fmt-library error?
Re: To admins
Posted by kostan3 (kostan3@spaces.ru) 3 Nov 2013 19:22
задача решается всё норм
Re: To admins
Posted by Silent 3 Nov 2013 20:55
я знаю что она решается, у меня AC. я говорю про то, что на Go 1.1 простой способ считывания входных данных работает некорректно, и прошу разобраться - это бага fmt.Scanf или что-то с форматом test #3.
Re: To admins
Posted by Sandro (USU) 4 Nov 2013 12:31
Try to read integers in the first string using format "%v %v\n" instead of "%v %v".
Re: To admins
Posted by Silent 4 Nov 2013 14:48
It's not evident, but... it works! If solution reads the first string using fmt.Scanf("%v %v\n",&n,&k) then it gets AC. Thanks, Sandro (USU)!