#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 | #64983059 | Utilizator | |
| Fișier | identice.cpp | Dimensiune | 255 B |
| Data încărcării | 03 Iulie 2026, 15:11 | Scor/rezultat | 50 puncte |
identice.cpp: In function ‘int main()’: identice.cpp:16:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 16 | if(a[1001]=b[1001]) | ~~~~~~~^~~~~~~~ identice.cpp:16:18: warning: array subscript 1001 is above array bounds of ‘int [1001]’ [-Warray-bounds=] 16 | if(a[1001]=b[1001]) | ~~~~~~^ identice.cpp:5:15: note: while referencing ‘b’ 5 | int n,a[1001],b[1001]; | ^ identice.cpp:16:10: warning: array subscript 1001 is above array bounds of ‘int [1001]’ [-Warray-bounds=] 16 | if(a[1001]=b[1001]) | ~~~~~~^ identice.cpp:5:7: note: while referencing ‘a’ 5 | int n,a[1001],b[1001]; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.002 secunde | OK. | 30 | 30 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 30 | 0 | ||
| 4 | 0.002 secunde | Raspuns gresit. | 10 | 0 | ||
| 5 | 0.002 secunde | Raspuns gresit. | 10 | 0 | ||
| Punctaj total | 50 | |||||
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ă.