#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 | #44666830 | Utilizator | |
Fișier | difmax.cpp | Dimensiune | 512 B |
Data încărcării | 17 Septembrie 2023, 18:44 | Scor / rezultat | 30 puncte |
difmax.cpp: In function 'int main()': difmax.cpp:13:6: warning: unused variable 'i' [-Wunused-variable] int 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:13: warning: unused variable 'j' [-Wunused-variable] int 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:20: warning: unused variable 'k' [-Wunused-variable] int 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 'b' [-Wunused-variable] int 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:32: warning: unused variable 'p' [-Wunused-variable] int 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:36: warning: unused variable 'h1' [-Wunused-variable] int 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:41: warning: unused variable 'g1' [-Wunused-variable] int 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:52: warning: unused variable 'min' [-Wunused-variable] int 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:58: warning: unused variable 'dr' [-Wunused-variable] int 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:63: warning: unused variable 'st' [-Wunused-variable] int 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 secunde | Caught fatal signal 11 | 10 | 0 | ||
4 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
5 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
6 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
7 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
8 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
9 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
Punctaj total | 30 |
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ă.