Submission #550233

#TimeUsernameProblemLanguageResultExecution timeMemory
550233rafatoaMutating DNA (IOI21_dna)C++17
Compilation error
0 ms0 KiB
#include <iostream> #include <string> #include <cassert> using namespace std; #define int long long int n; string ga, gb; void init(string a, string b){ ga = a; gb = b; } int get_distance(int x, int y){ if(x == y){ return (ga[x] == gb[x] ? 0 : -1); } else if(y-x == 1){ if(ga[x] == gb[x] && ga[y] == gb[y]) return 0; if(ga[y] == gb[x] && ga[x] == gb[y]) return 1; else return -1; } return -1; }

Compilation message (stderr)

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