# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
924077 | MercubytheFirst | Growing Vegetable is Fun 3 (JOI19_ho_t3) | C++17 | 475 ms | 757860 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;
using ll = long long;
using ld = long double;
#define pb push_back
const ll N = 105;
const ll inf = 1e9 + 37;
#define endl '\n'
/*
- have fun!
- monovariants?
- invariants?
- bs on ans?
- phrase it differently?
- quirky constraints?
- dp?
- greedy?
- find slow solution and try to optimize?
*/
void solve(void){
int n;
string s;
cin >> n >> s;
s = "0" + s;
for(int i = 1; i <= n; ++i){
if(s[i] == 'R') s[i] = 0;
else if(s[i] == 'G') s[i] = 1;
else if(s[i] == 'Y') s[i] = 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |