# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
636290 | hy_1 | Mutating DNA (IOI21_dna) | C++17 | 33 ms | 3696 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 "dna.h"
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <cmath>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <unordered_map>
using namespace std;
#define MOD 1000000007
#define all(x) x.begin(),x.end()
#define ios ios_base::sync_with_stdio(0);cin.tie(0);
vector<string> you;
void init(std::string a, std::string b) {
you.push_back(a);
you.push_back(b);
}
int get_distance(int x, int y) {
bool ok = true;
string h,s;
h = s = "";
for(int i =x; i<=y; i++){
h += you[0][i];
s += you[1][i];
}
for(int i = 0; i <h.size(); i ++){
if(count(all(h) , h[i]) != count(all(s) , h[i])) ok = false;
}
if(ok == false){
return -1;
}else{
if(h == s){
return 0;
}else{
for(int i=0; i <h.size(); i++){
if(s[i] == h[i]){
return 1;
}
}
return 2;
}
}
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |