#289
Se dă un şir cu n elemente, numere naturale. Să se verifice dacă în şir există elemente impare.
| Problema | ExistaImpare | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64218767 | Utilizator | |
| Fișier | existaimpare.cpp | Dimensiune | 322 B |
| Data încărcării | 23 Aprilie 2026, 14:54 | Scor/rezultat | 50 puncte |
existaimpare.cpp: In function ‘int main()’: existaimpare.cpp:10:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 10 | for(i=1;i<=n;i++) | ^~~ existaimpare.cpp:12:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 12 | if(x[i]%2==0) | ^~ existaimpare.cpp:6:24: warning: variable ‘s’ set but not used [-Wunused-but-set-variable] 6 | {long long i,x[1001],n,s,j,k,m,p,s5,a,b,p1,p2,minim; | ^ existaimpare.cpp:6:26: warning: unused variable ‘j’ [-Wunused-variable] 6 | {long long i,x[1001],n,s,j,k,m,p,s5,a,b,p1,p2,minim; | ^ existaimpare.cpp:6:28: warning: unused variable ‘k’ [-Wunused-variable] 6 | {long long i,x[1001],n,s,j,k,m,p,s5,a,b,p1,p2,minim; | ^ existaimpare.cpp:6:30: warning: unused variable ‘m’ [-Wunused-variable] 6 | {long long i,x[1001],n,s,j,k,m,p,s5,a,b,p1,p2,minim; | ^ existaimpare.cpp:6:32: warning: unused variable ‘p’ [-Wunused-variable] 6 | {long long i,x[1001],n,s,j,k,m,p,s5,a,b,p1,p2,minim; | ^ existaimpare.cpp:6:34: warning: unused variable ‘s5’ [-Wunused-variable] 6 | {long long i,x[1001],n,s,j,k,m,p,s5,a,b,p1,p2,minim; | ^~ existaimpare.cpp:6:37: warning: unused variable ‘a’ [-Wunused-variable] 6 | {long long i,x[1001],n,s,j,k,m,p,s5,a,b,p1,p2,minim; | ^ existaimpare.cpp:6:39: warning: unused variable ‘b’ [-Wunused-variable] 6 | {long long i,x[1001],n,s,j,k,m,p,s5,a,b,p1,p2,minim; | ^ existaimpare.cpp:6:41: warning: unused variable ‘p1’ [-Wunused-variable] 6 | {long long i,x[1001],n,s,j,k,m,p,s5,a,b,p1,p2,minim; | ^~ existaimpare.cpp:6:44: warning: unused variable ‘p2’ [-Wunused-variable] 6 | {long long i,x[1001],n,s,j,k,m,p,s5,a,b,p1,p2,minim; | ^~ existaimpare.cpp:6:47: warning: unused variable ‘minim’ [-Wunused-variable] 6 | {long long i,x[1001],n,s,j,k,m,p,s5,a,b,p1,p2,minim; | ^~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 20 | 20 | ||
| 3 | 0.001 secunde | OK. | 10 | 10 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 10 | 0 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 6 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 50 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ExistaImpare 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ă.