Loading...

Във форума е въведено ограничение, което позволява на потребителите единствено да разглеждат публикуваните въпроси.

ioanna.konova avatar ioanna.konova 47 Точки

02. SoftUni Karaoke от Programming Fundamentals Retake Exam - Part 1 - 6 January 2017 - Compile time error в Judge

Здравейте, колеги,

Някой има ли идея как да оправя тази грешка:

"Compiled file is missing. Compiler output: ...\tmp11ED.tmp(12,24): error CS1503: Argument 1: cannot convert from 'string' to 'char'

...\tmp11ED.tmp(12,30): error CS1503: Argument 2: cannot convert from 'System.StringSplitOptions' to 'char'
...\tmp11ED.tmp(14,24): error CS1503: Argument 1: cannot convert from 'string' to 'char'
...\tmp11ED.tmp(14,30): error CS1503: Argument 2: cannot convert from 'System.StringSplitOptions' to 'char'
...\tmp11ED.tmp(22,28): error CS1503: Argument 1: cannot convert from 'string' to 'char'
...\tmp11ED.tmp(22,34): error CS1503: Argument 2: cannot convert from 'System.StringSplitOptions' to 'char'"?

Досега не ми е излизала такава грешка. Знам, че проблемът е в разделителя ", ", но като го променя на ',', пък се чупят входовете.

Код

Линк към Judge

Условие на задача:

SoftUni cultivates talent whether it's coding talent or something else and in this case, something else is singing. Since you love music you want to take part in the event but as a programmer you simply lack the "something else" so your job is to make the software to track participants' awards.
On the first line, you will receive a list with all participants that applied for performance.
On the second line, you will receive the list with all available songs.
On the next lines, until the "dawn" command, you will get the names of people, the song that they are performing on stage and the award they get from the audience.
However, not every time the plan goes according to schedule. In other words, everyone (listed or not) can go on stage and perform a song that is not even available and he still gets awards from the audience. However, you should record only the awards for listed participants that perform songs available in the list. In case someone is not listed or sings a song that is not available you should not record neither the participant, nor his award.  
When the "dawn" comes, you need to print all participants, the count of the unique awards they received and all unique awards. Participants should be sorted by number of awards in descending order and then by participant name alphabetically. Awards should be sorted in alphabetical order.
Input
•    On the first line, you will receive list with all participants that applied for performance in the format: "{participant}, {participant} … {participant}"
•    On the second line, you will get all available songs in the in the format: "{song}, {song} … {song}"
•    On the next lines, until the "dawn" command you will receive every stage performance in the format: "{participant}, {song}, {award}"
•    Performances and songs will be separated by a comma and a single or multiple white spaces
Output
•    Print all participants along with the number of unique awards they won in the format:
o    "{participant}: {award count} awards"
o    "--{award}"
•    Print participants sorted by unique awards count in descending order. If two participants have the same unique award count, sort them alphabetically by name
•    Print unique awards for every participant sorted alphabetically
•    If there are no awards, print "No awards"
Constrains
•    The number of total participants will be in range [1 … 100]
•    The number of total songs will be in range [1 … 100]
•    The input will always end with the "dawn" command

Examples
Input    Output
Trifon, Vankata, Gesha
Dragana - Kukavice, Bon Jovi - It's my life, Lorde - Royals
Gesha, Bon Jovi - It's my life, Best Rock
Vankata, Dragana - Kukavice, Best Srabsko
Vankata, Dragana - Kukavice, Best Srabsko
Vankata, Dragana - Kukavice, Stiga Tolko Srabsko
Vankata, PHP Web, Educational 101
dawn    Vankata: 2 awards
--Best Srabsko
--Stiga Tolko Srabsko
Gesha: 1 awards
--Best Rock
Gesha
Bon Jovi - It's my life
Gesha, Bon Jovi - It's my life, Best Rock
Vankata, Dragana - Kukavice, Best Srabsko
Vankata, Dragana - Kukavice, Stiga Tolko Srabsko
Vankata, PHP Web, Educational 101
dawn    Gesha: 1 awards
--Best Rock
Sino
Vasko Naidenov - Nova Godina
dawn    No awards

 

Тагове:
0
Fundamentals Module
icowwww avatar icowwww 2673 Точки

Здравей,

Изглежда, че теста е с net framework.

Промени сплитването на:

.Split(',').Select(p => p.Trim()).ToArray();

Цялото:

https://pastebin.com/xnk8SfY4

1
ioanna.konova avatar ioanna.konova 47 Точки

Много ти благодаря! :)

1
Можем ли да използваме бисквитки?
Ние използваме бисквитки и подобни технологии, за да предоставим нашите услуги. Можете да се съгласите с всички или част от тях.
Назад
Функционални
Използваме бисквитки и подобни технологии, за да предоставим нашите услуги. Използваме „сесийни“ бисквитки, за да Ви идентифицираме временно. Те се пазят само по време на активната употреба на услугите ни. След излизане от приложението, затваряне на браузъра или мобилното устройство, данните се трият. Използваме бисквитки, за да предоставим опцията „Запомни Ме“, която Ви позволява да използвате нашите услуги без да предоставяте потребителско име и парола. Допълнително е възможно да използваме бисквитки за да съхраняваме различни малки настройки, като избор на езика, позиции на менюта и персонализирано съдържание. Използваме бисквитки и за измерване на маркетинговите ни усилия.
Рекламни
Използваме бисквитки, за да измерваме маркетинг ефективността ни, броене на посещения, както и за проследяването дали дадено електронно писмо е било отворено.