#2220
DifMax
Se consideră un șir a[1]
, a[2]
, …, a[n]
de numere întregi. Să se determine diferența maximă de forma a[i] - a[j]
, unde 1 ≤ i < j ≤ n
.
-
Problema | DifMax | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.15 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #44666840 | Utilizator | |
Fișier | difmax.cpp | Dimensiune | 534 B |
Data încărcării | 17 Septembrie 2023, 18:45 | Scor / rezultat | 40 puncte |
difmax.cpp: In function 'int main()': difmax.cpp:13:16: warning: unused variable 'i' [-Wunused-variable] int long long i = 0, j = 0, k = 1, a, b,p=1,h1=0,g1=1,max=0,min=0,dr=0,st=0; ^ difmax.cpp:13:23: warning: unused variable 'j' [-Wunused-variable] int long long i = 0, j = 0, k = 1, a, b,p=1,h1=0,g1=1,max=0,min=0,dr=0,st=0; ^ difmax.cpp:13:30: warning: unused variable 'k' [-Wunused-variable] int long long i = 0, j = 0, k = 1, a, b,p=1,h1=0,g1=1,max=0,min=0,dr=0,st=0; ^ difmax.cpp:13:40: warning: unused variable 'b' [-Wunused-variable] int long long i = 0, j = 0, k = 1, a, b,p=1,h1=0,g1=1,max=0,min=0,dr=0,st=0; ^ difmax.cpp:13:42: warning: unused variable 'p' [-Wunused-variable] int long long i = 0, j = 0, k = 1, a, b,p=1,h1=0,g1=1,max=0,min=0,dr=0,st=0; ^ difmax.cpp:13:46: warning: unused variable 'h1' [-Wunused-variable] int long long i = 0, j = 0, k = 1, a, b,p=1,h1=0,g1=1,max=0,min=0,dr=0,st=0; ^ difmax.cpp:13:51: warning: unused variable 'g1' [-Wunused-variable] int long long i = 0, j = 0, k = 1, a, b,p=1,h1=0,g1=1,max=0,min=0,dr=0,st=0; ^ difmax.cpp:13:62: warning: unused variable 'min' [-Wunused-variable] int long long i = 0, j = 0, k = 1, a, b,p=1,h1=0,g1=1,max=0,min=0,dr=0,st=0; ^ difmax.cpp:13:68: warning: unused variable 'dr' [-Wunused-variable] int long long i = 0, j = 0, k = 1, a, b,p=1,h1=0,g1=1,max=0,min=0,dr=0,st=0; ^ difmax.cpp:13:73: warning: unused variable 'st' [-Wunused-variable] int long long i = 0, j = 0, k = 1, a, b,p=1,h1=0,g1=1,max=0,min=0,dr=0,st=0; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
0 | 0 secunde | OK. | 10 | 10 | ||
1 | 0 secunde | OK. | 10 | 10 | ||
2 | 0 secunde | OK. | 10 | 10 | ||
3 | 0.084 secunde | OK. | 10 | 10 | ||
4 | Depășit | Limita de timp depășită | 10 | 0 | ||
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 | ||
Punctaj total | 40 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema DifMax 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ă.