# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
148870 | Torat (#200) | HicCup (FXCUP4_hiccup) | C++17 | 78 ms | 8192 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 "hiccup.h"
#include <bits/stdc++.h>
using namespace std;
const int N=1e6+6;
string s;
int n;
int nxt[N];
int can(int x)
{
int cur=0,co=0,en=0;
for(int i=0;i<n;i++)
{
if(s[i]=='H') co++;
else if(s[i]=='C')
{
if(co==0) return 0;
en=1; cur=max(cur,i-1);
for(int j=0;j<x;j++)
{
cur=nxt[cur];
//cout << i << " " << cur << endl;
if(cur>n) return 0;
}
co--;
}
else
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |