# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
747709 | Sami_Massah | Dango Maker (JOI18_dango_maker) | C++17 | 1 ms | 428 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const long long maxn = 3000 + 12 ;
long long n, m, ans, dp[maxn][4][4];
string s[maxn];
vector <int> nums;
bool val(int a, int b){
if(a < 0 || a >= n)
return 0;
if(b < 0 || b >= m)
return 0;
return 1;
}
int get_max(){
// for(int i: nums)
// cout << i << ' ';
//cout << endl;
for(int i = 0; i <= nums.size(); i++)
for(int j = 0; j < 4; j++)
for(int c = 0; c < 4; c++)
dp[i][j][c] = 0;
for(int i = 3; i < nums.size(); i++){
for(int j = 0; j < 4; j++)
for(int c = 0; c < 4; c++){
if(j & 1)
dp[i][c][j] = max(dp[i][c][j], dp[i - 2][nums[i - 2] & 1][nums[i - 3] & 1] + 1 + (c > 0));
if(j & 2)
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |