# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
548156 | QuantumK9 | Martian DNA (BOI18_dna) | C++17 | 233 ms | 13596 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>
#define ll long long
#define pb push_back
#define mp make_pair
#define mt make_tuple
using namespace std;
void solve(){
int n,k,r; cin >> n >> k >> r;
int count[k]; memset( count, 0, sizeof count );
bool needs[k]; memset( needs, false, sizeof needs );
int a[n]; for( int i = 0; i < n; i++ ){ cin >> a[i]; count[ a[i] ]++; }
map<int,int> required;
set<int> unsatisfied;
for( int i = 0; i < r; i++ ){
int b,k; cin >> b >> k;
required[b] = k;
needs[b] = true;
unsatisfied.insert(b);
}
for( auto i : required ){
if( count[ i.first ] < i.second ){ cout << "impossible" << endl; return; }
# | 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... |