# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
861017 | phoenix0423 | Collecting Stamps 3 (JOI20_ho_t3) | C++17 | 30 ms | 67028 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pll;
#define fastio ios::sync_with_stdio(false), cin.tie(0)
#pragma GCC optimize("Ofast")
#define pb push_back
#define eb emplace_back
#define f first
#define s second
#define lowbit(x) x&-x
#define ckmin(a, b) a = min(a, b)
#define ckmax(a, b) a = max(a, b)
const int maxn = 4e5 + 5;
const int INF = 1e9 + 7;
int dp[205][205][2][205]; // 0 = l, 1 = r
int x[205], t[205];
int main(void){
fastio;
int n, l;
cin>>n>>l;
for(int i = 1; i <= n; i++) cin>>x[i];
for(int i = 1; i <= n; i++) cin>>t[i];
for(int i = 0; i <= n + 1; i++) for(int j = 0; j <= n + 1; j++) for(int d = 0; d < 2; d++) for(int k = 0; k <= n; k++) dp[i][j][d][k] = INF;
dp[1][n + 1][0][(x[1] <= t[1])] = x[1];
dp[0][n][1][(l - x[n] <= t[n])] = l - x[n];
x[0] = x[n] - l, x[n + 1] = x[1] + l;
for(int len = 1; len <= n; len++){
for(int i = 0; i <= len; 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... |