#4015
Dându-se un șir de numere naturale, să se determine câte dintre ele apar o singură dată.
| Problema | unique | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.5 secunde | Limita memorie |
Total: 0.2 MB
/
Stivă 0.2 MB
|
| Id soluție | #64806171 | Utilizator | |
| Fișier | unique.cpp | Dimensiune | 232 B |
| Data încărcării | 02 Iunie 2026, 15:40 | Scor/rezultat | Eroare de compilare |
unique.cpp: In function ‘int main()’: unique.cpp:7:2: error: ‘shor’ was not declared in this scope; did you mean ‘short’? 7 | shor int n,t[200001]={0},s,ok=1,i,nagy=0,db=0; | ^~~~ | short unique.cpp:7:26: error: expected primary-expression before ‘,’ token 7 | shor int n,t[200001]={0},s,ok=1,i,nagy=0,db=0; | ^ unique.cpp:7:27: error: ‘s’ was not declared in this scope 7 | shor int n,t[200001]={0},s,ok=1,i,nagy=0,db=0; | ^ unique.cpp:7:29: error: ‘ok’ was not declared in this scope 7 | shor int n,t[200001]={0},s,ok=1,i,nagy=0,db=0; | ^~ unique.cpp:7:34: error: ‘i’ was not declared in this scope 7 | shor int n,t[200001]={0},s,ok=1,i,nagy=0,db=0; | ^ unique.cpp:7:36: error: ‘nagy’ was not declared in this scope 7 | shor int n,t[200001]={0},s,ok=1,i,nagy=0,db=0; | ^~~~ unique.cpp:7:43: error: ‘db’ was not declared in this scope 7 | shor int n,t[200001]={0},s,ok=1,i,nagy=0,db=0; | ^~ unique.cpp:8:12: error: ‘n’ was not declared in this scope 8 | while(cin>>n) | ^ unique.cpp:10:7: error: ‘t’ was not declared in this scope; did you mean ‘tm’? 10 | t[n]++; | ^ | tm unique.cpp:13:12: error: ‘t’ was not declared in this scope; did you mean ‘tm’? 13 | if(t[i]==1)db++; | ^ | tm
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema unique 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ă.