Borderou de evaluare (job #3345168)

Utilizator RuxandraPro12_Metehau Ruxandra Maria RuxandraPro12_ Data 8 martie 2026 11:11:03
Problema Problema rucsacului Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Compilare: main.cpp: In function 'int main()': main.cpp:28:28: warning: array subscript 1 is above array bounds of 'int [1][10005]' [-Warray-bounds] 28 | dp[0][j] = dp[1][j]; | ~~~~^ main.cpp:12:31: note: while referencing 'dp' 12 | int n, g, w[N_MAX], p[N_MAX], dp[1][G_MAX]; | ^~ main.cpp:29:17: warning: array subscript 1 is above array bounds of 'int [1][10005]' [-Warray-bounds] 29 | dp[1][j] = 0; | ~~~~^ main.cpp:12:31: note: while referencing 'dp' 12 | int n, g, w[N_MAX], p[N_MAX], dp[1][G_MAX]; | ^~ main.cpp:24:21: warning: array subscript 1 is above array bounds of 'int [1][10005]' [-Warray-bounds] 24 | dp[1][j] = dp[0][j]; | ~~~~^ main.cpp:12:31: note: while referencing 'dp' 12 | int n, g, w[N_MAX], p[N_MAX], dp[1][G_MAX]; | ^~ main.cpp:22:21: warning: array subscript 1 is above array bounds of 'int [1][10005]' [-Warray-bounds] 22 | dp[1][j] = max(dp[0][j], dp[0][j - w[i]] + p[i]); | ~~~~^ main.cpp:12:31: note: while referencing 'dp' 12 | int n, g, w[N_MAX], p[N_MAX], dp[1][G_MAX]; | ^~ main.cpp:25:39: warning: array subscript 1 is above array bounds of 'int [1][10005]' [-Warray-bounds] 25 | maxim = max(maxim, dp[1][j]); | ~~~~~~~^ main.cpp:12:31: note: while referencing 'dp' 12 | int n, g, w[N_MAX], p[N_MAX], dp[1][G_MAX]; | ^~ main.cpp:25:36: warning: array subscript 1 is above array bounds of 'int [1][10005]' [-Warray-bounds] 25 | maxim = max(maxim, dp[1][j]); | ~~~~^ main.cpp:12:31: note: while referencing 'dp' 12 | int n, g, w[N_MAX], p[N_MAX], dp[1][G_MAX]; | ^~ main.cpp:28:22: warning: 'void* __builtin_memmove(void*, const void*, long unsigned int)' offset 40024 is out of the bounds [0, 40020] of object 'dp' with type 'int [1][10005]' [-Warray-bounds] 28 | dp[0][j] = dp[1][j]; | ~~~~~~~~~^~~~~~~~~~ main.cpp:12:31: note: 'dp' declared here 12 | int n, g, w[N_MAX], p[N_MAX], dp[1][G_MAX]; | ^~ main.cpp:29:22: warning: 'void* __builtin_memset(void*, int, long unsigned int)' offset 40024 is out of the bounds [0, 40020] of object 'dp' with type 'int [1][10005]' [-Warray-bounds] 29 | dp[1][j] = 0; | ~~~~~~~~~^~~ main.cpp:12:31: note: 'dp' declared here 12 | int n, g, w[N_MAX], p[N_MAX], dp[1][G_MAX]; | ^~
Test Timp executie Memorie folosita Mesaj Punctaj/test Punctaj/grupa
10ms303kbIncorect00
20ms303kbIncorect0
30ms303kbIncorect00
40ms303kbIncorect0
50ms303kbIncorect0
61ms303kbIncorect00
71ms303kbIncorect0
81ms303kbIncorect00
91ms303kbIncorect0
101ms303kbIncorect0
119ms303kbIncorect00
129ms303kbIncorect0
139ms303kbIncorect0
1439ms303kbIncorect00
1539ms303kbIncorect0
1639ms303kbIncorect0
1724ms303kbIncorect00
1854ms303kbIncorect0
1954ms303kbIncorect0
2054ms303kbIncorect0
Punctaj total0

Ceva nu functioneaza?