Language: C++

#pragma comment(linker, "/STACK:128777216")
#pragma GCC optimize("fast-maths")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("no-stack-protector")
#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <bitset>
#include <stack>
#include <deque>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <math.h>
#include <cmath>
#include <climits>
#include <ctime>
#include <random>
#include <complex>
using namespace std;

#define forx(_name, _from, _to, _value) for (int _name = _from; _name < _to; _name += _value)
#define rforx(_name, _from, _to, _value) for (int _name = _from; _name > _to; _name -= _value)
#define all(_STL_NAME) _STL_NAME.begin(), _STL_NAME.end()
#define rall(_STL_NAME) _STL_NAME.rbegin(), _STL_NAME.rend()
#define mp(_FIRST,_SECOND) make_pair(_FIRST, _SECOND)

typedef long long ll;
typedef unsigned long long llu;
typedef long double ld;
const ld eps = 1e-6;
mt19937 rndm;

void start() {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	cout.precision(6); cout.setf(ios::fixed);
	string FILENAME = "\-_-/";
	rndm.seed(time(0));
#ifdef _DEBUG
	freopen("input.txt", "rt", stdin);
	freopen("output.txt", "wt", stdout);
#else
	//freopen((FILENAME + ".in").c_str(), "rt", stdin);
	//freopen((FILENAME + ".out").c_str(), "wt", stdout);
#endif
}

inline bool FastIn(int& val, FILE* streamin = stdin) {
	val = 0;
	char c = ' ';
	while (!isdigit(c)) {
		c = _getchar_nolock();
		if (c == EOF)
			return false;
	}
	while (isdigit(c)) {
		val *= 10;
		val += c - '0';
		c = _getchar_nolock();
	}
	return true;
}

inline void FastOut(int val, FILE* streamout = stdout) {
	bool fst = true;
	const int degree = 1000000000ll;
	for (int i = degree; i > 0; i /= 10) {
		int dl = val / i;
		if (dl || !fst) {
			_putchar_nolock('0' + dl);
			fst = false;
		}
		val %= i;
	}
	if (fst)
		_putchar_nolock('0');
	_putchar_nolock(' ');
}

int f(string s, string t) {
	int res = 0;
	for (int i = 0; i < s.size(); ++i)
		res += (s[i] != t[i]);
	return res;
}

int main() {
	/* File On */
	start();
	string s, t;
	cin >> s >> t;
	int ans = 1e9;
	for (int i = 0; i + t.size() <= s.size(); ++i)
		ans = min(ans, f(s.substr(i, t.size()), t));
	cout << ans;
#ifdef _DEBUG
	cout << "\nTime: " << 1.0 * clock() / CLOCKS_PER_SEC << endl;
#endif
	return 0;
}

Compiler output:
a.cc:2:34: warning: bad option '-ffast-maths' to pragma 'optimize' [-Wpragmas]
    2 | #pragma GCC optimize("fast-maths")
      |                                  ^
a.cc:40:12: warning: bad option '-ffast-maths' to attribute 'optimize' [-Wattributes]
   40 | void start() {
      |            ^
a.cc: In function 'void start()':
a.cc:43:27: warning: unknown escape sequence: '\-'
   43 |         string FILENAME = "\-_-/";
      |                           ^~~~~~~
a.cc: At global scope:
a.cc:54:52: warning: bad option '-ffast-maths' to attribute 'optimize' [-Wattributes]
   54 | inline bool FastIn(int& val, FILE* streamin = stdin) {
      |                                                    ^
a.cc: In function 'bool FastIn(int&, FILE*)':
a.cc:58:21: error: '_getchar_nolock' was not declared in this scope; did you mean 'getchar_unlocked'?
   58 |                 c = _getchar_nolock();
      |                     ^~~~~~~~~~~~~~~
      |                     getchar_unlocked
a.cc:65:21: error: '_getchar_nolock' was not declared in this scope; did you mean 'getchar_unlocked'?
   65 |                 c = _getchar_nolock();
      |                     ^~~~~~~~~~~~~~~
      |                     getchar_unlocked
a.cc: At global scope:
a.cc:70:54: warning: bad option '-ffast-maths' to attribute 'optimize' [-Wattributes]
   70 | inline void FastOut(int val, FILE* streamout = stdout) {
      |                                                      ^
a.cc: In function 'void FastOut(int, FILE*)':
a.cc:76:25: error: '_putchar_nolock' was not declared in this scope; did you mean 'putchar_unlocked'?
   76 |                         _putchar_nolock('0' + dl);
      |                         ^~~~~~~~~~~~~~~
      |                         putchar_unlocked
a.cc:82:17: error: '_putchar_nolock' was not declared in this scope; did you mean 'putchar_unlocked'?
   82 |                 _putchar_nolock('0');
      |                 ^~~~~~~~~~~~~~~
      |                 putchar_unlocked
a.cc:83:9: error: '_putchar_nolock' was not declared in this scope; did you mean 'putchar_unlocked'?
   83 |         _putchar_nolock(' ');
      |         ^~~~~~~~~~~~~~~
      |         putchar_unlocked
a.cc: At global scope:
a.cc:86:25: warning: bad option '-ffast-maths' to attribute 'optimize' [-Wattributes]
   86 | int f(string s, string t) {
      |                         ^
a.cc:93:10: warning: bad option '-ffast-maths' to attribute 'optimize' [-Wattributes]
   93 | int main() {
      |          ^