#3735
Concurs3
În orașul X va avea loc o nouă ediție a concursului Y, la care participă trei echipe având numerele de concurs 1
, 2
și 3
. Echipele pot avea număr diferit de concurenți. Ordinea în care participanții intră în concurs este una oarecare. Fiecare concurent are de susținut 9
probe. La fiecare probă, un concurent obține un punctaj exprimat printr-un număr natural, cuprins între 0
și 10
, inclusiv.
Cunoscând numărul N
de concurenți, echipele din care fac parte precum și punctajele obținute de fiecare dintre ei, să se determine:
1. punctajul maxim obținut de un concurent și numărul de concurenți care au obținut acest punctaj;
2. numărul sau numerele de concurs ale echipelor declarate campioane, în ordine crescătoare, și punctajul obținut de acestea. Dacă toate echipele au punctajul final 0
, se va afișa textul FARA CAMPION
.
Problema | Concurs3 | Operații I/O |
concurs.in /concurs.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53194658 | Utilizator | |
Fișier | concurs3.cpp | Dimensiune | 1.50 KB |
Data încărcării | 21 Octombrie 2024, 00:26 | Scor / rezultat | Eroare de compilare |
concurs3.cpp:3:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("concurs.in"); ^ concurs3.cpp:4:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("concurs.out"); ^ concurs3.cpp: In function 'int main()': concurs3.cpp:7:5: error: reference to 'cin' is ambiguous cin >> C >> n; ^ concurs3.cpp:3:10: note: candidates are: <typeprefixerror>cin ifstream cin("concurs.in"); ^ In file included from concurs3.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ concurs3.cpp:9:9: error: reference to 'cin' is ambiguous cin >> L >> temp; ^ concurs3.cpp:3:10: note: candidates are: <typeprefixerror>cin ifstream cin("concurs.in"); ^ In file included from concurs3.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ concurs3.cpp:29:19: error: reference to 'cout' is ambiguous } if (C == 1) cout << maxim << " " << nr << "\n"; ^ concurs3.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("concurs.out"); ^ In file included from concurs3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ concurs3.cpp:30:42: error: reference to 'cout' is ambiguous else if (a == b && a == c && a == 0) cout << "FARA CAMPION\n"; ^ concurs3.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("concurs.out"); ^ In file included from concurs3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ concurs3.cpp:32:34: error: reference to 'cout' is ambiguous if (a == b && a > c) cout << "1 2 " << b << "\n"; ^ concurs3.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("concurs.out"); ^ In file included from concurs3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ concurs3.cpp:33:39: error: reference to 'cout' is ambiguous else if (a == c && a > b) cout << "1 3 " << c << "\n"; ^ concurs3.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("concurs.out"); ^ In file included from concurs3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ concurs3.cpp:34:43: error: reference to 'cout' is ambiguous else if (c == b && c > a) cout << "2 3 " << c << "\n"; ^ concurs3.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("concurs.out"); ^ In file included from concurs3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ concurs3.cpp:35:46: error: reference to 'cout' is ambiguous else if (a > b && a > c) cout << "1 " << a << "\n"; ^ concurs3.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("concurs.out"); ^ In file included from concurs3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ concurs3.cpp:36:50: error: reference to 'cout' is ambiguous else if (b > a && b > c) cout << "2 " << b << "\n"; ^ concurs3.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("concurs.out"); ^ In file included from concurs3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ concurs3.cpp:37:54: error: reference to 'cout' is ambiguous else if (c > a && c > b) cout << "3 " << c << "\n"; ^ concurs3.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("concurs.out"); ^ In file included from concurs3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ concurs3.cpp:38:40: error: reference to 'cout' is ambiguous else { cout << "1 2 3 " << c << "\n"; } ^ concurs3.cpp:4:10: note: candidates are: <typeprefixerror>cout ofstream cout("concurs.out"); ^ In file included from concurs3.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Concurs3 face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.