| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 1111792 | Marco_Escandon | Dango Maker (JOI18_dango_maker) | C++11 | 1635 ms | 18572 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define x first
#define y second
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    ll n,m;
    cin>>n>>m;
    char cad[n+5][m+5];
    for(int i=2; i<n+2; i++)
        for(int j=2; j<m+2; j++)
            cin>>cad[i][j];
    vector<pair<ll,ll>> asd;
    for(int i=2; i<n+2; i++)
        asd.push_back({i,2});
    for(int i=3; i<m+2; i++)
        asd.push_back({n+1,i});
    ll cont=0;
    for(int z=0; z<asd.size(); z++)
    {
        ll bs=0;
        map<ll,ll> dp[2];
        pair<ll,ll> p=asd[z];
        ll i=0;
        while(p.x>=2&&p.y<m+2)
        {
            dp[0][i]=max(dp[0][i-1],dp[1][i-2])+(cad[p.x-1][p.y]=='R'&&cad[p.x][p.y]=='G'&&cad[p.x+1][p.y]=='W');
            dp[1][i]=max(dp[1][i-1],dp[0][i-2])+(cad[p.x][p.y-1]=='R'&&cad[p.x][p.y]=='G'&&cad[p.x][p.y+1]=='W');
            p.x--;p.y++;i++;
        }
        cont+=max(dp[0][i-1],dp[1][i-1]);
    }
    cout<<cont;
    return 0;
}
컴파일 시 표준 에러 (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... | ||||
