# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
768046 | raysh07 | Martian DNA (BOI18_dna) | C++17 | 151 ms | 140036 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;
#define int long long
#define INF (int)1e18
#define f first
#define s second
mt19937_64 RNG(chrono::steady_clock::now().time_since_epoch().count());
int n, k, r;
const int N = 2e5 + 69;
int a[N], need[N];
deque <int> pos[N];
void Solve()
{
cin >> n >> k >> r;
for (int i = 1; i <= n; i++) cin >> a[i], pos[a[i]].push_back(i);
while(r--){
int x, y; cin >> x >> y;
need[x] = y;
if (y > pos[x].size()){
cout << "impossible\n";
return;
}
}
int ans = n;
int mx = -1;
Compilation message (stderr)
# | 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... |