제출 #1131101

#제출 시각아이디문제언어결과실행 시간메모리
1131101ozner77Mutating DNA (IOI21_dna)C++20
컴파일 에러
0 ms0 KiB
#define ll long long #include <bits/stdc++.h> using namespace std; int n; string a1,b1; vector<int> V; void init(string a,string b){ a1=a;b1=b; V.push_back(0); for(int i=0;i<a1.size();i++){ if(a1[i]!=b1[i]){ V.push_back(V[i]+1); }else{ V.push_back(V[i]); } } } int get_distance(int x, int y){ x++; y++; int res=V[y]-V[x-1]; if(res%2==0)return res/2; return res/2+1; } int main(){ init("TCAAT","ATCTA"); int res=get_distance(0,4); cout<<res<<"\n"; } //no saco 100 porque pase todo el dia con el minimun spanning porqueria y quiero ir a celebrar navidad bye //https://oj.uz/problem/view/IOI21_dna

컴파일 시 표준 에러 (stderr) 메시지

/usr/bin/ld: /tmp/ccgUzlv0.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccjNs4en.o:dna.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status