#1450
Să se afle câte coloane ale unei matrice au produsul elementelor divizibil cu un număr dat p.
| Problema | Memory003 | Operații I/O |
memory003.in/memory003.out
|
|---|---|---|---|
| Limita timp | 0.2 secunde | Limita memorie |
Total: 0.3 MB
/
Stivă 0 MB
|
| Id soluție | #64762714 | Utilizator | |
| Fișier | memory003.cpp | Dimensiune | 500 B |
| Data încărcării | 28 Mai 2026, 13:30 | Scor/rezultat | Eroare de compilare |
memory003.cpp:7:1: error: expected initializer before ‘int’ 7 | int n, m, p, cnt, x, i, j; | ^~~ memory003.cpp: In function ‘int main()’: memory003.cpp:11:12: error: ‘m’ was not declared in this scope; did you mean ‘tm’? 11 | fin >> m >> n >> p; | ^ | tm memory003.cpp:11:17: error: ‘n’ was not declared in this scope; did you mean ‘yn’? 11 | fin >> m >> n >> p; | ^ | yn memory003.cpp:11:22: error: ‘p’ was not declared in this scope 11 | fin >> m >> n >> p; | ^ memory003.cpp:12:10: error: ‘j’ was not declared in this scope; did you mean ‘jn’? 12 | for (j = 1; j <= n; j++) | ^ | jn memory003.cpp:13:9: error: ‘v’ was not declared in this scope 13 | v[j] = 1; | ^ memory003.cpp:15:10: error: ‘i’ was not declared in this scope 15 | for (i = 1; i <= m; i++) | ^ memory003.cpp:16:14: error: ‘j’ was not declared in this scope; did you mean ‘jn’? 16 | for (j = 1; j <= n; j++) | ^ | jn memory003.cpp:18:20: error: ‘x’ was not declared in this scope 18 | fin >> x; | ^ memory003.cpp:19:13: error: ‘v’ was not declared in this scope 19 | v[j] = v[j] * x % p; | ^ memory003.cpp:21:10: error: ‘j’ was not declared in this scope; did you mean ‘jn’? 21 | for (j = 1; j <= n; j++) | ^ | jn memory003.cpp:22:13: error: ‘v’ was not declared in this scope 22 | if (v[j] == 0) cnt++; | ^ memory003.cpp:22:24: error: ‘cnt’ was not declared in this scope; did you mean ‘int’? 22 | if (v[j] == 0) cnt++; | ^~~ | int memory003.cpp:23:13: error: ‘cnt’ was not declared in this scope; did you mean ‘int’? 23 | fout << cnt << "\n"; | ^~~ | int
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Memory003 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ă.