Exercises: Dictionaries, Lambda and LINQ - 10. ** Сръбско Unleashed
Admit it – the СРЪБСКО is your favorite sort of music. You never miss a concert and you have become quite the geek concerning everything involved with СРЪБСКО. You can’t decide between all the singers you know who your favorite one is. One way to find out is to keep statistics of how much money their concerts make. Write a program that does all the boring calculations for you.
On each input line you’ll be given data in format: "singer @venue ticketsPrice ticketsCount". There will be no redundant whitespaces anywhere in the input. Aggregate the data by venue and by singer. For each venue, print the singer and the total amount of money his/her concerts have made on a separate line. Venues should be kept in the same order they were entered; the singers should be sorted by how much money they have made in descending order. If two singers have made the same amount of money, keep them in the order in which they were entered.
Keep in mind that if a line is in incorrect format, it should be skipped and its data should not be added to the output. Each of the four tokens must be separated by a space, everything else is invalid. The venue should be denoted with @ in front of it, such as @Sunny Beach
SKIP THOSE: Ceca@Belgrade125 12378, Ceca @Belgrade12312 123
The singer and town name may consist of one to three words.
----
Проблемът ми е следният. В judge-a ми гърмят 3 от проверките. Мисля, че проблема е в това, че не пропускам грешните входове правилно, защото не знам как да чета и сортирам подобен вход правилно. В случаят съм измислил един много плебейски начин който просто хваща дали има грешка, но явно това не е достатъчно. Въпросът ми е как да го оправя? Ето го и кодът ми.
И при мен гърми само 7мият тест. Много ми е интересно какъв е
И при мен гърми на 7ми тест и не мога да го докарам и да хвана къде бъркам. Гледам другите решения и не хващам какво липсва. Его го и моя код - http://pastebin.com/fbnrNhEn , без RegEx e.
Тествайте си задачите с:
*липсва ticketsCount.
damyan91, тествай си задачата с:
* няма @ в командата .
Оправиха ли се?