# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
492246 | inluminas | Skyscraper (JOI16_skyscraper) | C++14 | 214 ms | 197444 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include"bits/stdc++.h"
using namespace std;
#define ll long long
#define endl "\n"
#define fastio ios_base::sync_with_stdio(false)
#define inf LLONG_MAX
const ll mod=1e9+7;
ll dp[120][120][1020][5];
int main(){
fastio;
int n,L;
cin>>n>>L;
int a[n+1];
for(int i=1;i<=n;i++) cin>>a[i];
sort(a+1,a+n+1);
for(int open=0;open<=2;open++){
dp[1][1][0][open]=1+(open==1);
}
for(int i=1;i<n;i++){
int d=a[i+1]-a[i];
for(int j=1;j<=n;j++){
for(int cost=0;cost<=L;cost++){
for(int close=0;close<=2;close++){
int nxt=cost+(j+j-close)*d;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |