|
|
5 plus 1 plus 1 plus 1 plus 1 plus 1 plus 3 plus 1 plus 1 plus 1 plus 1 plus 1 plus 1 is ... 19!!!!! NINETEEN!!!1111!! FFFFUUUUU~~~~~ Okay, have to read prob statement again. :D You could have used brute force ;) var a:integer; begin read(a); if a=0 then write(5); if a=1 then write(21); if a=2 then write(12); if a=3 then write(2); if a=4 then write(1); if a=5 then write(4); if a=6 then write(6); if a=7 then write(1); if a=8 then write(4); if a=9 then write(4); if a=10 then write(1); if a=11 then write(0); if a=12 then write(1); if a=13 then write(1); end. Edited by author 28.10.2019 15:01 using namespace std; int main() { int n, d[13]; scanf("%d", &n); d[0] = 5; d[1] = 21; d[2] = 12; d[3] = 2; d[4] = 1; d[5] = 4; d[6] = 6; d[7] = 1; d[8] = 4; d[9] = 4; d[10] = 1; d[11] = 0; d[12] = 1; d[13] = 1; printf("%d", d[n]); return 0; } It's not a programming challenge. It's more of "Can you read me whole?" challenge. Kinda reminds License agreement... Moreover, it was rejudged recently. And I have no idea now where is mistake. My AC was in 2012 :D nikita.seleznev, we have addition 1 game & 2 new peoples. They added one more paragraph. - In this paragraph there is a description of a new contest, and two new teammates: "The numbers of Timothée and Alexandre are 12 and 13 respectively." They only took part in that one last contest. This also meant that Vadik has one new contest to add to hes experience. As we can read in the description "Vadik — 1", "And a number one participated in 21 contests." That's why results of test #1 changed today from 20 to 21 ;) int main() { int n; scanf("%d", &n); d[0] = 5; d[1] = 20; d[2] = 12; d[3] = 2; d[4] = 1; d[5] = 4; d[6] = 6; d[7] = 1; d[8] = 4; d[9] = 4; d[10] = 1; d[11] = 0; printf("%d", d[n]); return 0; } Yeah, I solved it without looking into discussions. int n, p[]={5,20,12,2,1,4,6,1,4,4,1,0}; int main() { cin >> n; cout << p[n]; return 0; } P.S. this problem is EVIL! (o_O) Hey, let others also solve it, don't just post here the solution! Why Sasha is 2, he didnt visit 1 contest Thank you for your solution, I didn't want to read these megabytes of letters by myself. + + + - - - - - - - - - + + + - - - - - - - - - + + + - - - - - - - - - + + + - - - - - - - - - + + + - - - - - - - - - // Dissolution of Alarm - + + - - - - - - - - - - + + + - - - - - - - - - + + - + - - - - - - - - + + - - + - - - - - - - + - - - + - - - - - - // Next year - + + - - - + - - - - - - + + - - - + - - - - - - + + - - - + - - - - - - + - - - - + + - - - - // Lesha gone - - - - - + + - - - - - - + - - - + + - - - - - // Nikita & Fedya gone - + - - - - - - + + - - - + - - - - - - + + - - - + - - - - - - + + - - - + - - - - - - + + - - // One more dissolution of team - + - - - - - - - - + + // UNCOUNT - + - + - - - - - - + - What a bad problem it is! It is more like a reading comprehension problem in an English exam than a programming problem! At first I was also pissed off but this problem is awesome in that it makes you remember forever that you need to first read input/ouput rather than problem itself! По моему эта задача не имеет ничего общего со спортивным програмированием answer of output : Миша — 5 Вадик — 20 Лёша — 12 Саша — 2 Ваня Б. — 1 Никита — 4 Федя — 6 Ваня К. — 1 Ден — 4 Егор — 4 Сяохун — 1 Виталий — 0 this is very bad problem :( More a puzzle than a programming challenge.... 3- Ivan K 5- Nikita 7- Sasha 8- Ivan B 9-Fedor 10 -Den 11 -Egor Whos is the input in test 4? (name) The Game tournament should not be counted. Why then Xiaohong has 1 match (also Sasha one more)? Game Tournament before the Ural Championship shouldn't be counted, but the Ural Championship itself should be. "The third invited teammate unfortunately didn't come, so on the last minute Vadik took Vitaliy (medal winner of ACM ICPC World Finals) for the Game Tournament before the Ural Championship. Unfortunately, Vitaliy could not participate in the main contest, so Vadik took Sasha as an old friend. This was the last contest of Team.GOV." In my opinion "This was the last contest of Team.GOV" is more likely to be connected to the Game Torunament than the "main contest". Just pointing out, probably it is a good idea to paraphrase it differently. |
|
|