#1019
Maxim6
Se consideră un șir cu n
elemente, numere naturale. Folosind metoda Divide et Impera, determinați cel mai mare element din acest șir.
Problema | Maxim6 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #18783777 | Utilizator | |
Fișier | maxim6.cpp | Dimensiune | 482 B |
Data încărcării | 16 Noiembrie 2019, 19:21 | Scor / rezultat | Eroare de compilare |
maxim6.cpp:34:1: error: stray '\342' in program { cout<< “\n n=”; ^ maxim6.cpp:34:1: error: stray '\200' in program maxim6.cpp:34:1: error: stray '\234' in program maxim6.cpp:34:1: error: stray '\' in program maxim6.cpp:34:1: error: stray '\342' in program maxim6.cpp:34:1: error: stray '\200' in program maxim6.cpp:34:1: error: stray '\235' in program maxim6.cpp:40:1: error: stray '\342' in program { cout << “x[“<<i<<”]=”; ^ maxim6.cpp:40:1: error: stray '\200' in program maxim6.cpp:40:1: error: stray '\234' in program maxim6.cpp:40:1: error: stray '\342' in program maxim6.cpp:40:1: error: stray '\200' in program maxim6.cpp:40:1: error: stray '\234' in program maxim6.cpp:40:1: error: stray '\342' in program maxim6.cpp:40:1: error: stray '\200' in program maxim6.cpp:40:1: error: stray '\235' in program maxim6.cpp:40:1: error: stray '\342' in program maxim6.cpp:40:1: error: stray '\200' in program maxim6.cpp:40:1: error: stray '\235' in program maxim6.cpp:44:1: error: stray '\342' in program cout <<”\n Valoarea maxima este:” << div_imp(0,n-1); ^ maxim6.cpp:44:1: error: stray '\200' in program maxim6.cpp:44:1: error: stray '\235' in program maxim6.cpp:44:1: error: stray '\' in program maxim6.cpp:44:1: error: stray '\342' in program maxim6.cpp:44:1: error: stray '\200' in program maxim6.cpp:44:1: error: stray '\235' in program maxim6.cpp: In function 'int div_imp(int, int)': maxim6.cpp:10:8: error: expected primary-expression before '=' token if (p= =q) ^ maxim6.cpp: At global scope: maxim6.cpp:32:12: error: '::main' must return 'int' void main () ^ maxim6.cpp: In function 'int main()': maxim6.cpp:34:3: error: 'cout' was not declared in this scope { cout<< “\n n=”; ^ maxim6.cpp:34:3: note: suggested alternative: In file included from maxim6.cpp:2:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ maxim6.cpp:34:16: error: expected ';' before 'n' { cout<< “\n n=”; ^ maxim6.cpp:36:1: error: 'cin' was not declared in this scope cin >>n; ^ maxim6.cpp:36:1: note: suggested alternative: In file included from maxim6.cpp:2:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ maxim6.cpp:40:19: error: expected primary-expression before '<<' token { cout << “x[“<<i<<”]=”; ^ maxim6.cpp:40:27: error: expected primary-expression before ']' token { cout << “x[“<<i<<”]=”; ^ maxim6.cpp:40:32: error: expected primary-expression before ';' token { cout << “x[“<<i<<”]=”; ^ maxim6.cpp:44:25: error: expected ';' before 'Valoarea' cout <<”\n Valoarea maxima este:” << div_imp(0,n-1); ^ maxim6.cpp:46:7: error: 'getch' was not declared in this scope getch(); ^ maxim6.cpp: In function 'int div_imp(int, int)': maxim6.cpp:30:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Maxim6 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ă.