# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
448549 | Edbert2397 | Martian DNA (BOI18_dna) | C++14 | 72 ms | 4476 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/*
~2021~
*/
# include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
typedef long long ll;
#define pii pair<int,int>
#define debug(x) cout << #x << '=' << x << endl;
const int N = 2e5 + 5;
const int INF = 1e9;
const ll mod = 1e9+7;
int need[N],arr[N],n,k,q,byk[N];
bool valid(int x){
for(int i = 0;i<k;i++) byk[i] = 0;
int cnt = 0;
for(int i = 1;i<=n;i++){
if(i > x){
if(byk[arr[i-x]] == need[arr[i-x]]) cnt--;
byk[arr[i-x]]--;
}
byk[arr[i]]++;
if(byk[arr[i]] == need[arr[i]]) cnt++;
if(cnt == q) return true;
}
return false;
}
# | 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... |