# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
70466 | Diuven | 스탬프 수집 (JOI16_ho_t2) | C++14 | 6 ms | 3244 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 pair<int, int> pii;
typedef long long ll;
const int MX=100010, inf=2e9;
int n;
char S[MX];
int Jcnt[MX], Icnt[MX];
ll base;
ll J(){
ll res=base;
for(int i=1; i<=n; i++)
if(S[i]=='O') res+=Icnt[i];
return res;
}
ll I(){
ll res=base;
for(int i=n; i>=1; i--)
if(S[i]=='O') res+=Jcnt[i];
return res;
}
ll O(){
ll mx=0;
for(int i=1; i<=n; i++){
mx=max(mx, 1LL*Jcnt[i-1]*Icnt[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... |