# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
497669 | LittleCube | Martian DNA (BOI18_dna) | C++14 | 95 ms | 4508 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define F first
#define S second
using namespace std;
int N, K, R, arr[200005], acc[200005], lim[200005], remain, ans = 1e9;
signed main()
{
cin >> N >> K >> R;
remain = R;
for (int i = 1; i <= N; i++)
cin >> arr[i];
for (int i = 1; i <= R; i++)
{
int B, Q;
cin >> B >> Q;
lim[B] = Q;
}
for (int l = 1, r = 1; l <= N; l++)
{
while(r <= N && remain > 0)
{
acc[arr[r]]++;
if(acc[arr[r]] == lim[arr[r]])
remain--;
r++;
# | 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... |