Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using st = string;
using P = pair<int, int>;
#define mrep(i, m, n) for(int i = m; i < n; i++)
#define rep(i, n) mrep(i, 0, n)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define INF 1e4
#define sz(x) { (int)x.size(); }

int main() {
    st s, t;
    cin >> s >> t;
    int sz_s = sz(s);
    int sz_t = sz(t);
    int ans = sz_t;
    rep(i, sz_s - sz_t + 1){
        int cnt = 0;
        rep(j, sz_t){
            if(t.at(j) != s.at(i + j)) cnt++;
        }
        chmin(ans, cnt);
    }
    /*rep(i, sz_t){
        rep(j, sz_s){
            if(s.at(j) == t.at(i)){
                int cnt = 0;
                rep(k, sz_t){
                    if(j - i + k < 0 || j - i + k >= sz_s) break;
                    if(t.at(k) != s.at(j - i + k)){
                        cnt++;
                    }      
                }
                chmin(ans, cnt);
            }
        }     
    }*/
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:30: error: expected '}' before ';' token
   11 | #define sz(x) { (int)x.size(); }
      |               ~              ^
a.cc:16:16: note: in expansion of macro 'sz'
   16 |     int sz_s = sz(s);
      |                ^~
a.cc: At global scope:
a.cc:17:19: error: 't' was not declared in this scope; did you mean 'tm'?
   17 |     int sz_t = sz(t);
      |                   ^
a.cc:11:22: note: in definition of macro 'sz'
   11 | #define sz(x) { (int)x.size(); }
      |                      ^
a.cc:11:30: error: expected '}' before ';' token
   11 | #define sz(x) { (int)x.size(); }
      |               ~              ^
a.cc:17:16: note: in expansion of macro 'sz'
   17 |     int sz_t = sz(t);
      |                ^~
a.cc:11:32: error: expected declaration before '}' token
   11 | #define sz(x) { (int)x.size(); }
      |                                ^
a.cc:17:16: note: in expansion of macro 'sz'
   17 |     int sz_t = sz(t);
      |                ^~
a.cc:6:23: error: expected unqualified-id before 'for'
    6 | #define mrep(i, m, n) for(int i = m; i < n; i++)
      |                       ^~~
a.cc:7:19: note: in expansion of macro 'mrep'
    7 | #define rep(i, n) mrep(i, 0, n)
      |                   ^~~~
a.cc:19:5: note: in expansion of macro 'rep'
   19 |     rep(i, sz_s - sz_t + 1){
      |     ^~~
a.cc:19:9: error: 'i' does not name a type
   19 |     rep(i, sz_s - sz_t + 1){
      |         ^
a.cc:6:38: note: in definition of macro 'mrep'
    6 | #define mrep(i, m, n) for(int i = m; i < n; i++)
      |                                      ^
a.cc:19:5: note: in expansion of macro 'rep'
   19 |     rep(i, sz_s - sz_t + 1){
      |     ^~~
a.cc:19:9: error: 'i' does not name a type
   19 |     rep(i, sz_s - sz_t + 1){
      |         ^
a.cc:6:45: note: in definition of macro 'mrep'
    6 | #define mrep(i, m, n) for(int i = m; i < n; i++)
      |                                             ^
a.cc:19:5: note: in expansion of macro 'rep'
   19 |     rep(i, sz_s - sz_t + 1){
      |     ^~~
a.cc:40:5: error: 'cout' does not name a type
   40 |     cout << ans << endl;
      |     ^~~~
a.cc:41:5: error: expected unqualified-id before 'return'
   41 |     return 0;
      |     ^~~~~~
a.cc:42:1: error: expected declaration before '}' token
   42 | }
      | ^