#2534
Bogdan
Se dă un șir de n
elemente, numere naturale. Problema constă în două operații:
1 i val
: Elementul de pe poziția i
se înlocuiește cu valoarea val
.
2 i j
: Stabiliți dacă secvența [i,j]
, din șirul curent, este ordonată crescător.
Problema | Bogdan | Operații I/O |
bogdan.in /bogdan.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #14469831 | Utilizator | |
Fișier | bogdan.cpp | Dimensiune | 1.61 KB |
Data încărcării | 05 Martie 2019, 15:10 | Scor / rezultat | 50 puncte |
In file included from /usr/include/c++/4.8/backward/strstream:51:0, from bogdan.cpp:2: /usr/include/c++/4.8/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp] #warning \ ^ bogdan.cpp: In function 'int interog(int, int, int, int, int)': bogdan.cpp:34:38: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if (x1 && x2 && (a<=m && m<b && v[m]<=v[m+1] || (a>m || m>=b))) return 1; ^ bogdan.cpp:28:21: warning: unused variable 'a1' [-Wunused-variable] int m,x1=1,x2=1,a1=-1,a2=0,a3=0,b1=-1,b2=0,b3=0; ^ bogdan.cpp:28:27: warning: unused variable 'a2' [-Wunused-variable] int m,x1=1,x2=1,a1=-1,a2=0,a3=0,b1=-1,b2=0,b3=0; ^ bogdan.cpp:28:32: warning: unused variable 'a3' [-Wunused-variable] int m,x1=1,x2=1,a1=-1,a2=0,a3=0,b1=-1,b2=0,b3=0; ^ bogdan.cpp:28:37: warning: unused variable 'b1' [-Wunused-variable] int m,x1=1,x2=1,a1=-1,a2=0,a3=0,b1=-1,b2=0,b3=0; ^ bogdan.cpp:28:43: warning: unused variable 'b2' [-Wunused-variable] int m,x1=1,x2=1,a1=-1,a2=0,a3=0,b1=-1,b2=0,b3=0; ^ bogdan.cpp:28:48: warning: unused variable 'b3' [-Wunused-variable] int m,x1=1,x2=1,a1=-1,a2=0,a3=0,b1=-1,b2=0,b3=0; ^ bogdan.cpp: In function 'int main()': bogdan.cpp:40:17: warning: unused variable 'a' [-Wunused-variable] int i,x,y,z,a,b,c; ^ bogdan.cpp:40:19: warning: unused variable 'b' [-Wunused-variable] int i,x,y,z,a,b,c; ^ bogdan.cpp:40:21: warning: unused variable 'c' [-Wunused-variable] int i,x,y,z,a,b,c; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | ||
2 | 0 secunde | OK. | 10 | 10 | ||
3 | 0 secunde | OK. | 10 | 10 | ||
4 | 0.104 secunde | OK. | 10 | 10 | ||
5 | Depășit | Limita de timp depășită | 10 | 0 | ||
6 | Depășit | Limita de timp depășită | 10 | 0 | ||
7 | Depășit | Limita de timp depășită | 10 | 0 | ||
8 | Depășit | Limita de timp depășită | 10 | 0 | ||
9 | Depășit | Limita de timp depășită | 10 | 0 | ||
10 | 0 secunde | OK. | 10 | 10 | Exemplu | |
Punctaj total | 50 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Bogdan 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ă.