#3286
nrnot
Fișierul nrnot.in conține pe prima linie un număr natural n
(\( n \in [2,10^7] \)) , iar pe următoarele linii un șir de cel mult 1000
numere naturale din intervalul [1,n]
. Numerele sunt ordonate descrescător și sunt separate prin câte un spațiu. Se cere să se determine numărul valorilor naturale distincte din intervalul [1,n]
care NU se găsesc în șir.
Problema | nrnot | Operații I/O |
nrnot.in /nrnot.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 1 MB
/
Stivă 1 MB
|
Id soluție | #47731368 | Utilizator | |
Fișier | nrnot.cpp | Dimensiune | 328 B |
Data încărcării | 29 Decembrie 2023, 11:53 | Scor / rezultat | Eroare de compilare |
nrnot.cpp:5:24: warning: missing terminating " character [enabled by default] ofstream cout(nrnot.out"); ^ nrnot.cpp:5:1: error: missing terminating " character ofstream cout(nrnot.out"); ^ nrnot.cpp:5:15: error: 'nrnot' was not declared in this scope ofstream cout(nrnot.out"); ^ nrnot.cpp:6:7: error: 'x' was not declared in this scope int n,x,k,nr,y; ^ nrnot.cpp:6:9: error: 'k' was not declared in this scope int n,x,k,nr,y; ^ nrnot.cpp:6:11: error: 'nr' was not declared in this scope int n,x,k,nr,y; ^ nrnot.cpp:6:14: error: 'y' was not declared in this scope int n,x,k,nr,y; ^ nrnot.cpp: In function 'int main()': nrnot.cpp:8:10: error: 'n' was not declared in this scope cin>>n; ^ nrnot.cpp:9:5: error: 'y' was not declared in this scope y=n+1; ^ nrnot.cpp:10:16: error: 'x' was not declared in this scope while(cin>>x){ ^ nrnot.cpp:12:16: error: 'nr' was not declared in this scope if(k>0)nr+=k; ^ nrnot.cpp:15:5: error: 'k' was not declared in this scope k=y-1; ^ nrnot.cpp:16:12: error: 'nr' was not declared in this scope if(k>0)nr+=k; ^ nrnot.cpp:17:11: error: 'nr' was not declared in this scope cout<<nr; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema nrnot 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ă.