| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 896225 | Sir_Ahmed_Imran | DNA 돌연변이 (IOI21_dna) | C++17 | 33 ms | 6272 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
///~~~LOTA~~~///
#include "dna.h"
#include <bits/stdc++.h>
using namespace std;
#define nl '\n'
#define ff first
#define ss second
#define ll long long
#define append push_back
#define pii pair<int,int>
#define all(x) (x).begin(),(x).end()
#define N 100001
int AC[N];
int AT[N];
int CA[N];
int CT[N];
int TA[N];
int TC[N];
void init(string a,string b){
for(int i=0;i<a.size();i++){
AC[i]=AC[i-1]+(a[i]=='A' && b[i]=='C');
AT[i]=AT[i-1]+(a[i]=='A' && b[i]=='T');
CA[i]=CA[i-1]+(a[i]=='C' && b[i]=='A');
CT[i]=CT[i-1]+(a[i]=='C' && b[i]=='T');
TA[i]=TA[i-1]+(a[i]=='T' && b[i]=='A');
TC[i]=TC[i-1]+(a[i]=='T' && b[i]=='C');
}
}
int get_distance(int l,int r){
int o,p,q,s;
int ac,at,ca,ct,ta,tc;
l--;
ac=AC[r];
at=AT[r];
ca=CA[r];
ct=CT[r];
ta=TA[r];
tc=TC[r];
if(l>=0){
ac-=AC[l];
at-=AT[l];
ca-=CA[l];
ct-=CT[l];
ta-=TA[l];
tc-=TC[l];
}
p=min(ac,ca);
q=min(at,ta);
s=min(ct,tc);
o=p+q+s;
p=max(ac,ca)-p;
q=max(at,ta)-q;
s=max(ct,tc)-s;
if(p!=q || q!=s) o=-1;
else o+=p+q;
return o;
}컴파일 시 표준 에러 (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... | ||||
