제출 #676129

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
6761292022-12-29 12:11:4312332100DNA 돌연변이 (IOI21_dna)C++17
컴파일 에러
0 ms0 KiB
#include "dna.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
string s,ss;
ll dna[2][3][100001],jem[100001],res[100001][6];
map<char,ll>mp;
void init(string s,string ss) {
mp['A']=0;
mp['T']=1;
mp['C']=2;
dna[0][mp[s[0]]][0]=1;
dna[1][mp[ss[0]]][0]=1;
for(int i=1;i<s.size();i++){
if(s[i]==ss[i])jem[i]=jem[i-1]+1;
else jem[i]=jem[i-1];
//
for(int j=0;j<3;j++){
dna[0][j][i]=dna[0][j][i-1];
dna[1][j][i]=dna[1][j][i-1];
}
dna[0][mp[s[i]]][i]++;
dna[1][mp[ss[i]]][i]++;
//
}
for(int i=0;i<s.size();i++){
if(i)for(int j=0;j<6;j++)res[i][j]=res[i-1][j];
if(s[i]=='A'){
if(ss[i]=='T'){
res[i][0]++;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

dna.cpp: In function 'void init(std::string, std::string)':
dna.cpp:14:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   14 |  for(int i=1;i<s.size();i++){
      |              ~^~~~~~~~~
dna.cpp:26:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   26 |  for(int i=0;i<s.size();i++){
      |              ~^~~~~~~~~
/usr/bin/ld: /tmp/cc76wRJN.o: in function `main':
grader.cpp:(.text.startup+0x39d): undefined reference to `get_distance(int, int)'
collect2: error: ld returned 1 exit status