Borderou de evaluare (job #3345168)
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 |
| 1 | 0ms | 303kb | Incorect | 0 | 0 |
| 2 | 0ms | 303kb | Incorect | 0 |
| 3 | 0ms | 303kb | Incorect | 0 | 0 |
| 4 | 0ms | 303kb | Incorect | 0 |
| 5 | 0ms | 303kb | Incorect | 0 |
| 6 | 1ms | 303kb | Incorect | 0 | 0 |
| 7 | 1ms | 303kb | Incorect | 0 |
| 8 | 1ms | 303kb | Incorect | 0 | 0 |
| 9 | 1ms | 303kb | Incorect | 0 |
| 10 | 1ms | 303kb | Incorect | 0 |
| 11 | 9ms | 303kb | Incorect | 0 | 0 |
| 12 | 9ms | 303kb | Incorect | 0 |
| 13 | 9ms | 303kb | Incorect | 0 |
| 14 | 39ms | 303kb | Incorect | 0 | 0 |
| 15 | 39ms | 303kb | Incorect | 0 |
| 16 | 39ms | 303kb | Incorect | 0 |
| 17 | 24ms | 303kb | Incorect | 0 | 0 |
| 18 | 54ms | 303kb | Incorect | 0 |
| 19 | 54ms | 303kb | Incorect | 0 |
| 20 | 54ms | 303kb | Incorect | 0 |
| Punctaj total | 0 |