# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
58744 | leejseo | 스탬프 수집 (JOI16_ho_t2) | C++98 | 13 ms | 6800 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;
typedef long long lld;
const int MAXN = 100000;
int N, L[MAXN+1][3], R[MAXN+1][3], A[MAXN];
lld X[MAXN+1], Y[MAXN+1];
char s[MAXN+1];
lld S;
inline int conv(char c){
if (c == 'J') return 0;
if (c == 'O') return 1;
return 2;
}
void input(){
scanf("%d\n", &N);
scanf("%s", s);
for (int i=0; i<N; i++) A[i] = conv(s[i]);
}
void init(){
for (int i=0; i<N; i++){
L[i+1][0] = L[i][0];
L[i+1][1] = L[i][1];
L[i+1][2] = L[i][2];
L[i+1][A[i]]++;
}
for (int i=N-1; i>=0; i--){
R[i][0] = R[i+1][0];
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |