# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
647092 | tvladm2009 | Martian DNA (BOI18_dna) | C++14 | 34 ms | 4588 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using ll = long long;
int const nmax = 200000;
int v[1 + nmax], mn[1 + nmax], fr[1 + nmax];
int main() {
std::ios_base::sync_with_stdio(0);
std::cin.tie(0);
int n, k, r;
std::cin >> n >> k >> r;
for(int i = 1;i <= n; i++)
std::cin >> v[i];
for(int i = 1;i <= r; i++) {
int x, y;
std::cin >> x >> y;
mn[x] = y;
}
int j = 1, cnt = 0;
while(j <= n && cnt != r) {
fr[v[j]]++;
if(fr[v[j]] == mn[v[j]])
cnt++;
j++;
}
if(j == n + 1) {
# | 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... |