# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
387544 | kimbj0709 | Martian DNA (BOI18_dna) | C++14 | 116 ms | 8192 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
int32_t main(){
int no_of_input,base_length,no_of_case;
int input1,input2;
vector<int> vect1;
cin >> no_of_input >> base_length >> no_of_case;
vector<int> minimum(base_length,0);
vector<int> countt(base_length,0);
for(int i=0;i<no_of_input;i++){
cin >> input1;
vect1.push_back(input1);
}
for(int i=0;i<no_of_case;i++){
cin >> input1 >> input2;
minimum[input1] = input2;
}
int currhas=base_length-no_of_case;
int pos1 = 0,pos2=0;
int ans = INT_MAX;
vector<int> temp(base_length,0);
for(int i=0;i<no_of_input;i++){
temp[vect1[i]]++;
}
for(int i=0;i<base_length;i++){
if(temp[i]<minimum[i]){
cout << "impossible";
return 0;
}
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... |