#1262
subsecv
Se dau n
numere naturale. Să se găsească o subsecvență astfel încât suma elementelor din această subsecvență să fie divizibilă cu n
.
Problema | subsecv | Operații I/O |
subsecv.in /subsecv.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #50416867 | Utilizator | |
Fișier | subsecv.cpp | Dimensiune | 538 B |
Data încărcării | 08 Aprilie 2024, 21:08 | Scor / rezultat | Eroare de compilare |
subsecv.cpp: In function 'int main()': subsecv.cpp:10:2: error: 'undefined' was not declared in this scope undefined long long n, v[10000], x, y[10000], ok = 0, j = 1; ^ subsecv.cpp:10:12: error: expected ';' before 'long' undefined long long n, v[10000], x, y[10000], ok = 0, j = 1; ^ subsecv.cpp:11:9: error: 'n' was not declared in this scope fin >> n; ^ subsecv.cpp:15:10: error: 'x' was not declared in this scope fin >> x; ^ subsecv.cpp:16:3: error: 'v' was not declared in this scope v[i] = x % n; ^ subsecv.cpp:17:3: error: 'y' was not declared in this scope y[i] = v[i]; ^ subsecv.cpp:19:8: error: 'ok' was not declared in this scope while(ok != 1) ^ subsecv.cpp:23:7: error: 'y' was not declared in this scope if(y[i] % n ==0) ^ subsecv.cpp:25:29: error: 'j' was not declared in this scope fout << i << " " << i + j - 1; ^ subsecv.cpp:31:23: error: 'j' was not declared in this scope for(int i = 1; (i + j) <= n; ++i) ^ subsecv.cpp:33:4: error: 'y' was not declared in this scope y[i] += v[i + j]; ^ subsecv.cpp:33:12: error: 'v' was not declared in this scope y[i] += v[i + j]; ^ subsecv.cpp:35:3: error: 'j' was not declared in this scope j++; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema subsecv 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ă.