# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
740633 | abczz | Bali Sculptures (APIO15_sculpture) | C++14 | 87 ms | 8408 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#define ll long long
using namespace std;
ll n, a, b, f, z, mn, x, y, A[2000], ps[2000], MX[2000][2000], dp[2000][2000];
void AOne() {
for (int t=40; t>=0; --t) {
z = (1LL << t);
for (int i=0; i<n; ++i) {
dp[i][0] = 1e18;
if ((ps[i] & x) == 0 && (ps[i] & z) == 0) dp[i][0] = 1;
for (int k=0; k<i; ++k) {
y = ps[i]-ps[k];
if ((y & x) == 0 && (y & z) == 0) {
dp[i][0] = min(dp[i][0], dp[k][0]+1);
}
}
}
if (dp[n-1][0] <= b) x += z;
else f += z;
}
cout << f << '\n';
}
void ANot() {
for (int t=40; t>=0; --t) {
z = (1LL << t);
for (int i=0; i<n; ++i) {
# | 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... |