# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
60448 | istlemin | Bali Sculptures (APIO15_sculpture) | C++14 | 256 ms | 1156 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i = a; i<int(b);++i)
#define all(v) v.begin(),v.end()
#define sz(v) v.size()
#define trav(a,c) for(auto a: c)
typedef long long ll;
typedef vector<ll> vi;
typedef pair<ll,ll> pii;
ll n,a,b;
vi y;
ll fewest(ll forbiddenBits){
//cout<<forbiddenBits<<": "<<endl;
vi dp(n+1,0); //dp[index];
dp[n] = 0;
for(ll i = n-1;i>=0;--i){
dp[i] = 1e18;
ll sum = 0;
rep(j,i+1,n+1){
sum += y[j-1];
if((sum&forbiddenBits)==0)
dp[i] = min(dp[i],dp[j]+1);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |