#4266
MITM
Fie un număr natural s
și un șir de n
numere naturale nenule. Să se determine suma maximă posibilă, mai mică sau egală cu s
ce se poate obține dintr-un subșir al șirului.
Folclorul informatic
Problema | MITM | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.3 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58260833 | Utilizator | |
Fișier | mitm.cpp | Dimensiune | 848 B |
Data încărcării | 22 Mai 2025, 20:16 | Scor / rezultat | 55 puncte |
mitm.cpp: In function 'int main()': mitm.cpp:10:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=1;i<=n;i++) ^ mitm.cpp:12:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=1;i<=n-1;i++) ^ mitm.cpp:13:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j=i+1;j<=n;j++) ^ mitm.cpp:17:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=1;i<=n;i++) ^ mitm.cpp:25:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int j=b+1;j<=n-1;j++) ^ mitm.cpp:30:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=b+1;i<=n;i++) ^ mitm.cpp:7:29: warning: variable 'i' set but not used [-Wunused-but-set-variable] unsigned long int s,n,c=0,i,b; ^ mitm.cpp:25:28: warning: 'b' may be used uninitialized in this function [-Wmaybe-uninitialized] for(int j=b+1;j<=n-1;j++) ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
0 | 0 secunde | OK. | 5 | 5 | ||
1 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
2 | 0 secunde | OK. | 5 | 5 | ||
3 | 0 secunde | OK. | 5 | 5 | ||
4 | 0 secunde | OK. | 5 | 5 | ||
5 | 0 secunde | OK. | 5 | 5 | ||
6 | 0 secunde | OK. | 5 | 5 | ||
7 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
8 | 0 secunde | OK. | 5 | 5 | ||
9 | 0 secunde | OK. | 5 | 5 | ||
10 | 0 secunde | OK. | 5 | 5 | ||
11 | 0 secunde | OK. | 5 | 5 | ||
12 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
13 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
14 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
15 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
16 | 0 secunde | OK. | 5 | 5 | ||
17 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
18 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
19 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
Punctaj total | 55 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MITM 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ă.