# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
59595 | reality | Dango Maker (JOI18_dango_maker) | C++17 | 743 ms | 55196 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "bits/stdc++.h"
using namespace std;
#define fi first
#define se second
#define ll long long
#define dbg(v) cerr<<#v<<" = "<<v<<'\n'
#define vi vector<int>
#define vl vector <ll>
#define pii pair<int,int>
#define mp make_pair
#define db long double
#define pb push_back
#define all(s) s.begin(),s.end()
template < class T > T smin(T &a,T b) {if (a > b) a = b;return a;}
template < class T > T smax(T &a,T b) {if (a < b) a = b;return a;}
const int N = 3005;
int ok[N][N];
char str[N][N];
int dp[N][3];
int n,m;
int main(void) {
cin>>n>>m;
for (int i = 1;i <= n;++i)
cin>>(str[i] + 1);
for (int i = 1;i <= n;++i)
for (int j = 1;j <= m;++j) {
if (str[i - 1][j] == 'R' && str[i][j] == 'G' && str[i + 1][j] == 'W')
ok[i][j] |= 1;
if (str[i][j - 1] == 'R' && str[i][j] == 'G' && str[i][j + 1] == 'W')
ok[i][j] |= 2;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |