#1839
Memory006
Se dă un şir de numere naturale nenule. Să se afle numărul secvenţelor din şir care au produsul elementelor egal cu 2
k
, unde k
este un număr dat.
Problema | Memory006 | Operații I/O |
![]() memory006.in /memory006.out
|
---|---|---|---|
Limita timp | 0.16 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0 MB
|
Id soluție | #50431107 | Utilizator | |
Fișier | memory006.cpp | Dimensiune | 1.32 KB |
Data încărcării | 09 Aprilie 2024, 12:40 | Scor / rezultat | Eroare de compilare |
memory006.cpp:11:13: error: variable 'std::ifstream cin' has initializer but incomplete type ifstream cin("memory006.in"); ^ memory006.cpp:12:14: error: variable 'std::ofstream cout' has initializer but incomplete type ofstream cout("memory006.out"); ^ memory006.cpp: In function 'char cb()': memory006.cpp:24:18: warning: array subscript has type 'char' [-Wchar-subscripts] if(p2[mij]==x) ^ memory006.cpp:26:20: warning: array subscript has type 'char' [-Wchar-subscripts] if(x>p2[mij]) ^ memory006.cpp: In function 'int main()': memory006.cpp:40:5: error: reference to 'cin' is ambiguous cin>>n>>k; ^ memory006.cpp:11:10: note: candidates are: <typeprefixerror>cin ifstream cin("memory006.in"); ^ In file included from memory006.cpp:7:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ memory006.cpp:43:9: error: reference to 'cin' is ambiguous cin>>x; ^ memory006.cpp:11:10: note: candidates are: <typeprefixerror>cin ifstream cin("memory006.in"); ^ In file included from memory006.cpp:7:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ memory006.cpp:73:5: error: reference to 'cout' is ambiguous cout<<nrs; ^ memory006.cpp:12:10: note: candidates are: <typeprefixerror>cout ofstream cout("memory006.out"); ^ In file included from memory006.cpp:7: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 Memory006 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ă.