# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
804749 | flappybird | Fun Palace (CCO18_fun) | C++17 | 66 ms | 79356 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
#define MAX 1010
#define MAXS 20
#define INF 1000000000
#define bb ' '
#define ln '\n'
#define Ln '\n'
#define MOD 1000000007
int A[MAX];
int B[MAX];
int dp[MAX][20010];
signed main() {
ios::sync_with_stdio(false), cin.tie(0);
int N, E;
cin >> N >> E;
int i, j;
int U = E - 1;
for (i = 2; i <= N; i++) {
cin >> A[i] >> B[i];
U = max(U, A[i] + B[i]);
}
fill(&dp[0][0], &dp[MAX - 1][MAX], -INF);
for (i = 0; i < E; i++) dp[1][i] = i;
for (i = 2; i <= N; i++) {
int mx = 0;
for (j = 0; j < A[i]; j++) mx = max(mx, dp[i - 1][j]);
# | 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... |