#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 | #64487291 | Utilizator | |
| Fișier | identice.cpp | Dimensiune | 529 B |
| Data încărcării | 10 Mai 2026, 18:23 | Scor/rezultat | 100 puncte |
identice.cpp: In function ‘int main()’: identice.cpp:10:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 10 | for(int i=0; i<n; i++) | ^~~ identice.cpp:12:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 12 | for(int i=0; i<n; i++) | ^~~ identice.cpp:8:27: warning: unused variable ‘c’ [-Wunused-variable] 8 | int x[1000],y[1000],n,c=0,u=0,s=0; | ^ identice.cpp:8:31: warning: unused variable ‘u’ [-Wunused-variable] 8 | int x[1000],y[1000],n,c=0,u=0,s=0; | ^ identice.cpp:8:35: warning: unused variable ‘s’ [-Wunused-variable] 8 | int x[1000],y[1000],n,c=0,u=0,s=0; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 30 | 30 | ||
| 3 | 0.001 secunde | OK. | 30 | 30 | ||
| 4 | 0.001 secunde | OK. | 10 | 10 | ||
| 5 | 0.001 secunde | OK. | 10 | 10 | ||
| Punctaj total | 100 | |||||
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ă.