# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
542113 | 2022-03-25T12:25:58 Z | T0p_ | Bali Sculptures (APIO15_sculpture) | C++14 | 1 ms | 308 KB |
#include <bits/stdc++.h> using namespace std; const int N = 2e3 + 10; long long dp[N][N]; int main() { int n, a, b; scanf(" %d %d",&n,&a,&b); for(int i=1 ; i<=n ; i++) { scanf(" %lld",&dp[1][i]); dp[1][i] += dp[1][i-1]; } for(int i=2 ; i<=b ; i++) { for(int j=i ; j<=n ; j++) { dp[i][j] = 1e18; for(int k=i ; k<=j ; k++) { dp[i][j] = min(dp[i][j], dp[i][k-1] | (dp[1][j] - dp[1][k-1])); } } } printf("%lld\n",dp[b][n]); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 308 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 308 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |