#505
Identice
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 | #28027453 | Utilizator | |
Fișier | identice.cpp | Dimensiune | 448 B |
Data încărcării | 19 Februarie 2021, 09:42 | Scor / rezultat | Eroare de compilare |
identice.cpp: In function 'int main()': identice.cpp:8:6: error: cannot bind 'std::istream {aka std::basic_istream<char>}' lvalue to 'std::basic_istream<char>&&' cin>>a>>b; ^ In file included from /usr/include/c++/4.8/iostream:40:0, from identice.cpp:1: /usr/include/c++/4.8/istream:872:5: error: initializing argument 1 of 'std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = int [1000]]' operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) ^ identice.cpp:12:3: error: 'aux' was not declared in this scope { aux=a[i]; ^ identice.cpp:18:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if(b[i]=b[j]) ^ identice.cpp:19:3: error: 'aux' was not declared in this scope { aux=b[i]; ^ identice.cpp:6:30: warning: unused variable 'v' [-Wunused-variable] { int n,a[1000],b[1000],j,i,v[1000]; ^
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ă.