#1744
Fișierul de intrare conține cel mult 1.000.000 de numere întregi. Se cere să se afișeze în fișierul de ieșire cel mai mic număr din intervalul [-100,100] care nu apare în fișierul de intrare.
| Problema | NrLipsa2 | Operații I/O |
nrlipsa2.in/nrlipsa2.out
|
|---|---|---|---|
| Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64817941 | Utilizator | |
| Fișier | nrlipsa2.cpp | Dimensiune | 391 B |
| Data încărcării | 03 Iunie 2026, 12:53 | Scor/rezultat | 0 puncte |
nrlipsa2.cpp: In function ‘int main()’: nrlipsa2.cpp:10:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 10 | if(x<0) | ^~ nrlipsa2.cpp:12:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 12 | for(x=-100;x<0&&!ok;x++) | ^~~ nrlipsa2.cpp:11:26: warning: array subscript -1 is below array bounds of ‘int [101]’ [-Warray-bounds=] 11 | if(x*(-1)<=100)fvn[x]++; | ~~~~~^ nrlipsa2.cpp:6:16: note: while referencing ‘fvn’ 6 | int x,fvp[101],fvn[101]; bool ok; | ^~~ nrlipsa2.cpp:11:26: warning: array subscript -1 is below array bounds of ‘int [101]’ [-Warray-bounds=] 11 | if(x*(-1)<=100)fvn[x]++; | ~~~~~^ nrlipsa2.cpp:6:16: note: while referencing ‘fvn’ 6 | int x,fvp[101],fvn[101]; bool ok; | ^~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 3 | 0.002 secunde | Raspuns gresit. | 20 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema NrLipsa2 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ă.