# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
542061 | Cookie197 | Growing Vegetable is Fun 3 (JOI19_ho_t3) | C++17 | 231 ms | 522776 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<iostream>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
using namespace std;
#define ll long long
#define endl "\n"
#define mp make_pair
#define out(x) cout<< #x << " = " << x << endl
#define pii pair<int,int>
#pragma GCC optimize("Ofast")
// 考慮前i個,放了r個R g個G i-r-g個Y,第i個恰是R/G/Y,所需最小步數
string s;
int n;
vector<int> rpos, gpos, ypos;
int rcnt, gcnt, ycnt;
int dp[405][405][405][3];
int rpre[405],gpre[405],ypre[405];
void chmin(int &a, int b){
a = min(a,b);
}
signed main(){
ios::sync_with_stdio(false); cin.tie(0);
cin>>n>>s;
s = '$' + s;
rpos.push_back(0), gpos.push_back(0), ypos.push_back(0);
for (int i=1;i<=n;i++){
# | 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... |