# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
149750 | Avengers (#200) | HicCup (FXCUP4_hiccup) | C++17 | 40 ms | 15104 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define fr(i, n, m) for(int i = (n); i < (m); i ++)
#define pb push_back
#define st first
#define nd second
#define pq priority_queue
#define all(x) begin(x), end(x)
using namespace std;
typedef long long ll;
#include "hiccup.h"
int HicCup(std::string s) {
int n = s.size();
int cnt[n];
int c = 0;
for(int i = n - 1; i >= 0; i --){
if(s[i] == '!') c ++;
cnt[i] = c;
if(s[i] == 'C') c = 0;
else if(s[i] == 'H' && c > 0) return -1;
}
if(c > 0) return -1;
stack <int> S;
S.push(0);
int sums[n + 1];
int nums[n + 1];
memset(sums, 0, sizeof(sums));
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |