# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
826333 | MasterTaster | Growing Vegetable is Fun 3 (JOI19_ho_t3) | C++14 | 81 ms | 97244 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>
#define ll long long
#define pii pair<int, int>
#define xx first
#define yy second
#define pb push_back
#define MAXN 410
#define MAXX 1000000010LL
using namespace std;
int n;
ll cnt1, cnt2, cnt3, cnt[5][MAXN][5];
string s;
ll koliko(int a, int i, int j, int k)
{
if (a==1)
return max(0LL, cnt[1][i][2]-j)+max(0LL, cnt[1][i][3]-k);
else if (a==2)
return max(0LL, cnt[2][j][1]-i)+max(0LL, cnt[2][j][3]-k);
else
return max(0LL, cnt[3][k][1]-i)+max(0LL, cnt[3][k][2]-j);
}
int main(){
///R=1; G=2; Y=3;
cin>>n>>s;
# | 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... |