#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 | #50014702 | Utilizator | |
Fișier | memory006.cpp | Dimensiune | 831 B |
Data încărcării | 23 Martie 2024, 19:11 | Scor / rezultat | Eroare de compilare |
memory006.cpp:3:15: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix] ofstream fout("memory006."out); ^ memory006.cpp:2:1: error: 'ifstream' does not name a type ifstream fin("input.txt" in); ^ memory006.cpp:3:1: error: 'ofstream' does not name a type ofstream fout("memory006."out); ^ memory006.cpp: In function 'int main()': memory006.cpp:7:3: error: 'fin' was not declared in this scope fin >> n >> k; ^ memory006.cpp:18:27: error: 'r' was not declared in this scope if (s == k) r++; ^ memory006.cpp:23:33: error: 'r' was not declared in this scope } if (s == k) r++; ^ memory006.cpp:30:9: error: 'fout' was not declared in this scope } fout << r; ^ memory006.cpp:30:17: error: 'r' was not declared in this scope } fout << r; ^
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ă.