#505
Se dau doi vectori cu câte n elemente, numere naturale. Verificați dacă cei doi vectori conțin exact aceleași elemente.
| Problema | Identice | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64379808 | Utilizator | |
| Fișier | identice.cpp | Dimensiune | 429 B |
| Data încărcării | 04 Mai 2026, 13:20 | Scor/rezultat | Eroare de compilare |
identice.cpp: In function ‘int main()’: identice.cpp:10:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 10 | for(i=1; i<=n; i++) | ^~~ identice.cpp:12:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 12 | for(i=1; i<=n; i++){ | ^~~ identice.cpp:13:9: error: ‘gasit’ was not declared in this scope 13 | gasit=0; | ^~~~~ identice.cpp:17:24: error: expected primary-expression before ‘]’ token 17 | if(gasit!=0) a[]=-1; else ok=0; | ^ identice.cpp:22:2: error: expected ‘}’ at end of input 22 | } | ^ identice.cpp:6:1: note: to match this ‘{’ 6 | {int n, i, j, ok=1, v[1001], a[1001]; | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Identice 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ă.