| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 212701 | iris2617 | Bali Sculptures (APIO15_sculpture) | C++14 | 1095 ms | 512 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define int long long
#define iris 998244353
using namespace std;
int arr[2010],n,a,b;
int cal(int ouo)
{
int i,res,cnt,sum;
res=cnt=sum=0;
for(i=0;i<n;i++)
{
sum+=arr[i];
if((ouo>>i)&1)
{
res|=sum;
sum=0;
cnt++;
}
}
if(cnt<a || cnt>b)
{
res=1e18;
}
return res;
}
signed main(){
ios::sync_with_stdio(0);
cin.tie(0);
int i,ans=1e18;
cin>>n>>a>>b;
for(i=0;i<n;i++)
{
cin>>arr[i];
}
for(i=(1<<(n-1));i<(1<<n);i++)
{
ans=min(ans, cal(i));
}
cout<<ans<<'\n';
return 0;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
