# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
458057 | JovanB | Martian DNA (BOI18_dna) | C++17 | 71 ms | 4456 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int n, k, R;
int niz[200005];
int treba[200005];
int br[200005];
bool check(int x){
for(int i=1; i<=k; i++){
br[i] = 0;
}
int cnt = 0;
for(int i=1; i<=x; i++){
br[niz[i]]++;
if(br[niz[i]] == treba[niz[i]]) cnt++;
}
if(cnt >= R) return 1;
for(int i=x+1; i<=n; i++){
br[niz[i]]++;
if(br[niz[i]] == treba[niz[i]]) cnt++;
br[niz[i-x]]--;
if(br[niz[i-x]] == treba[niz[i-x]]-1) cnt--;
if(cnt >= R) return 1;
}
return 0;
# | 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... |