Submission #1142551

#TimeUsernameProblemLanguageResultExecution timeMemory
1142551sam12345678910112Mutating DNA (IOI21_dna)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; # define ll long long string A ,B; ll f[100003]; ll fra[100003]; ll frt[100003]; ll fra2[100003]; ll frt2[100003]; void init(string a, string b){ string A=a; string B=b; for(int so=0;so<A.size();so++){ f[so]=0; if(so!=0){f[so]+=f[so];} if(A[so]!=B[so]){ f[so]+=1;} if(A[so]=='T'){frt[so]=0;frt[so]+=1+frt[max(so-1,0)];} if(A[so]=='A'){fra[so]=0;fra[so]+=1+fra[max(so-1,0)];} if(B[so]=='T'){frt2[so]=0;frt2[so]+=1+frt2[max(so-1,0)];} if(B[so]=='A'){fra2[so]=0;fra2[so]+=1+fra2[max(so-1,0)];} } } ll get_distance(ll x, ll y){ if(frt[y]-frt[x]==frt2[y]-frt2[x]&&fra[y]-fra[x]==fra2[y]-fra2[x]){return f[y]-f[x];} else{ return -1;} }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccT8Fypq.o: in function `main':
grader.cpp:(.text.startup+0x39a): undefined reference to `get_distance(int, int)'
collect2: error: ld returned 1 exit status