criyle/codenet-compile-errors huggingface dataset:
Language: C++

//#include <bits/stdc++.h>
#include <iostream>
using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, n, m) for (int i = (int)(n); i <= (int)(m); i++)
#define all(obj) (obj).begin(), (obj).end()
#define rall(obj) (obj).rbegin(), (obj).rend()
#define int long long

string S;
signed main(){
    cin >> S;
    int N = S.length();
    int minimum = INT_MAX;
    rep(i, N-2){
        int t = abs(753-stoi(S.substr(i,3)));
        minimum = min(t,minimum);
    }
    cout << minimum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: 'INT_MAX' was not declared in this scope
   15 |     int minimum = INT_MAX;
      |                   ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include <iostream>
  +++ |+#include <climits>
    3 | using namespace std;
Language: C++

n=input()
a=0
b=753
ans=100000000
for i in renge(len(n)-2):
	a=int(n[i])*100+int(n[i+1])*10+int(n[i+2])
    ans=min(abs(a-b),ans)
print(ans)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n=input()
      | ^
Language: C

#include <stdio.h>
#include <string.h>
int main(){
  int result=999;
  int i,tmp,n;
  char s[11];
  
  scanf("%s",s);
  n=length(s);
  for(i=0;i<n-2;i++){
    tmp=(s[i]-'0')*100;
    tmp+=(s[i+1]-'0')*10;
    tmp+=s[i+2]-'0';
    tmp=753-tmp;
    if(tmp<0) tmp=0-tmp;
    if(tmp<result) result=tmp;
  }
  
  printf("%d",result);
}

Compiler output:
main.c: In function 'main':
main.c:9:5: error: implicit declaration of function 'length' [-Wimplicit-function-declaration]
    9 |   n=length(s);
      |     ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;
  cin >> S;
  int N = S.size();
  int answer = 999;
  for(int i = 0; i < N; i++){
    int sumsum = (c[i] - '0') * 100 + (c[i+1] - '0') * 10 + c[i+2] - '0';
    answer = min(answer abs(num - 753));
  }
  cout << answer << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 'c' was not declared in this scope
   10 |     int sumsum = (c[i] - '0') * 100 + (c[i+1] - '0') * 10 + c[i+2] - '0';
      |                   ^
a.cc:11:24: error: expected ')' before 'abs'
   11 |     answer = min(answer abs(num - 753));
      |                 ~      ^~~~
      |                        )
a.cc:11:17: error: no matching function for call to 'min(int&)'
   11 |     answer = min(answer abs(num - 753));
      |              ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   template argument deduction/substitution failed:
a.cc:11:17: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   11 |     answer = min(answer abs(num - 753));
      |              ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   candidate expects 2 arguments, 1 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  string S;
  cin >> S;
  int N = S.size();
  int mi = 1e9;
  rep(i,N-2){
    string T = S.substr(i,3);
    int X = stoi(T);
    mi = min(mi,X);
  }
  cout << mi << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope; did you mean 'mi'?
    9 |   rep(i,N-2){
      |       ^
      |       mi
a.cc:9:3: error: 'rep' was not declared in this scope
    9 |   rep(i,N-2){
      |   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  string S;
  cin >> S;
  int mi = 1e9;
  rep(i,N-2){
    string T = S.substr(i,3);
    int X = stoi(T);
    mi = min(mi,X);
  }
  cout << mi << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope; did you mean 'mi'?
    8 |   rep(i,N-2){
      |       ^
      |       mi
a.cc:8:9: error: 'N' was not declared in this scope
    8 |   rep(i,N-2){
      |         ^
a.cc:8:3: error: 'rep' was not declared in this scope
    8 |   rep(i,N-2){
      |   ^~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;
#define rep(i,n) for (int i=0;i<n;i++)

string s;

int main() {
  cin>>s;
  int L=s.size();
  int ans=753;
  rep(i,L-2) {
    int n=(s[i]-'0')*100+(s[i+1]-'0')*10)+(s[i+2]);
    ans=min(ans,abs(n-753));
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:41: error: expected ',' or ';' before ')' token
   15 |     int n=(s[i]-'0')*100+(s[i+1]-'0')*10)+(s[i+2]);
      |                                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina cout << ' '
#define in(n) cin >> n
#define in2(n, m) cin >> n >> m
#define in3(n, m, l) cin >> n >> m >> l
#define out(n) cout << n
const ll mei = (ll)1e9 + 7;

int main(){
  string a, b, c, s;
  in(s);
  ll k = 9999;
  ll m;
  rep(i, n - 2){
    a = s[i];
    b = s[i + 1];
    c = s[i + 2];
    a = a + b + c;
    m = (ll)a - 753;
    k = min(k, abs(m));
  }
  out(k);
  memi;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:10: error: 'n' was not declared in this scope
   22 |   rep(i, n - 2){
      |          ^
a.cc:4:42: note: in definition of macro 'rep'
    4 | #define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
      |                                          ^
a.cc:27:9: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'll' {aka 'long long int'}
   27 |     m = (ll)a - 753;
      |         ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina cout << ' '
#define in(n) cin >> n
#define in2(n, m) cin >> n >> m
#define in3(n, m, l) cin >> n >> m >> l
#define out(n) cout << n
const ll mei = (ll)1e9 + 7;

int main(){
  string a, b, c, s;
  in(s);
  ll k = 9999;
  rep(i, n - 2){
    a = s[i];
    b = s[i + 1];
    c = s[i + 2];
    a = a + b + c;
    k = min(k, abs((ll)a - 753ll));
  }
  out(k);
  memi;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:10: error: 'n' was not declared in this scope
   21 |   rep(i, n - 2){
      |          ^
a.cc:4:42: note: in definition of macro 'rep'
    4 | #define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
      |                                          ^
a.cc:26:20: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'll' {aka 'long long int'}
   26 |     k = min(k, abs((ll)a - 753ll));
      |                    ^~~~~
Language: C++

#include<iostream>
using namespace std ;

int main()
{
  string S ;
  cin>>S ;
  
  int min=1e9 ;
  for(int i=0;i<N-2;i++){
    int X=100*(S.at(i)-'0')+10*(S.at(i+1)-'0')+(S.at(i+2)-'0') ;
    int dif=(X>753?X-753:753-X) ;
    if(dif<min) dif=min ;
  }
  
  cout<<min<<endl ;
  
  return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'N' was not declared in this scope
   10 |   for(int i=0;i<N-2;i++){
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string S;cin>>S;int m=999;
  for(int i=0;i<S.size()-2){
    m=min(m,abs(stoi(S.substr(i,3))-753));
  }
  cout<<m<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:27: error: expected ';' before ')' token
    5 |   for(int i=0;i<S.size()-2){
      |                           ^
      |                           ;
Language: C++

/*#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
	int t;
	cin >> t;
	while (t--)
	{
		int m, n;
		cin >> m >> n;
		int p[100000], q[100000],temp[100000];
		int i,j;
		bool flag[10000] = { 0 };
		for (i = 0; i < m; i++)
		{
			cin >> p[i];
			temp[i] = p[i];
		}
		for (i = 0; i < n; i++)
		{
			cin >> q[i];
		}
		sort(temp, temp + m);
		for (i = 0; i < m; i++)
		{
			for (j = 0; j < m; j++)
			{
				if (p[i] == temp[j])
				{
					if (i - j < 0)
					{
						int k = abs(i - j);
						//g = 0;
						while (k--)
						{
							flag[i++] = 1;
						}
					}
					else
					{
						int k = i - j;
						while (k--)
						{
							flag[--i] = 1;
						}
					}
				}
				else
					continue;
			}
		}
		for (i = 0; i < m; i++)
		{
			cout << flag[i] << " ";
		}
	}
}*//*
#include<iostream>
#include<set>
using namespace std;
int main()
{
	int n;
	cin >> n;
	int i, count = 0;
	int a[10000];
	set<int>s;
	for (i = 0; i < n; i++)
		cin >> a[i];
	for (i = 0; i < n - 2; i++)
	{
		if (a[i] != a[i + 2])
		{
			count++;
			s.insert(a[i]);
			s.insert(a[i + 2]);
		}
		s.insert(a[i]);
	}
	if (s.size() == 1)
		cout << count + n/2;
	else
		cout << count;
}

*/
#include<iostream>
#include<cstring>

using namespace std;
int main()
{
	string s;
	cin >> s;
	int min = INT_MAX;
	int l = s.length();
	int i, j, k, m;
	for (i = 0; i < l-2; i++)
	{
		for (j = i + 1; j < i+2 ; j++)
		{
			for (k = i + 2; k < i + 3; k++)
			{
				m = 753-((s[i] - '0')*100 + (s[j] - '0')*10 + (s[k] - '0')*1);
				if (abs(m) < min)
					min = abs(m);
				//cout << m << " ";
			}
		}

	}
	cout << abs(min);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:97:19: error: 'INT_MAX' was not declared in this scope
   97 |         int min = INT_MAX;
      |                   ^~~~~~~
a.cc:91:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   90 | #include<cstring>
  +++ |+#include <climits>
   91 |
Language: C++

/*#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
	int t;
	cin >> t;
	while (t--)
	{
		int m, n;
		cin >> m >> n;
		int p[100000], q[100000],temp[100000];
		int i,j;
		bool flag[10000] = { 0 };
		for (i = 0; i < m; i++)
		{
			cin >> p[i];
			temp[i] = p[i];
		}
		for (i = 0; i < n; i++)
		{
			cin >> q[i];
		}
		sort(temp, temp + m);
		for (i = 0; i < m; i++)
		{
			for (j = 0; j < m; j++)
			{
				if (p[i] == temp[j])
				{
					if (i - j < 0)
					{
						int k = abs(i - j);
						//g = 0;
						while (k--)
						{
							flag[i++] = 1;
						}
					}
					else
					{
						int k = i - j;
						while (k--)
						{
							flag[--i] = 1;
						}
					}
				}
				else
					continue;
			}
		}
		for (i = 0; i < m; i++)
		{
			cout << flag[i] << " ";
		}
	}
}*//*
#include<iostream>
#include<set>
using namespace std;
int main()
{
	int n;
	cin >> n;
	int i, count = 0;
	int a[10000];
	set<int>s;
	for (i = 0; i < n; i++)
		cin >> a[i];
	for (i = 0; i < n - 2; i++)
	{
		if (a[i] != a[i + 2])
		{
			count++;
			s.insert(a[i]);
			s.insert(a[i + 2]);
		}
		s.insert(a[i]);
	}
	if (s.size() == 1)
		cout << count + n/2;
	else
		cout << count;
}

*/
#include<iostream>
#include<cstring>

using namespace std;
int main()
{
	string s;
	cin >> s;
	int min = INT_MAX;
	int l = s.length();
	int i, j, k, m;
	for (i = 0; i < l-2; i++)
	{
		for (j = i + 1; j < i+2 ; j++)
		{
			for (k = i + 2; k < i + 3; k++)
			{
				m = 753-((s[i] - '0')*100 + (s[j] - '0')*10 + (s[k] - '0')*1);
				if (abs(m) < min)
					min = m;
				//cout << m << " ";
			}
		}

	}
	cout << abs(min);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:97:19: error: 'INT_MAX' was not declared in this scope
   97 |         int min = INT_MAX;
      |                   ^~~~~~~
a.cc:91:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   90 | #include<cstring>
  +++ |+#include <climits>
   91 |
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
    string s;
    cin >> s;
    int ans=1000;
    int dis;
    for(int i=0;i<s.size()-2;i++){
        int a = (s.at(i))-'0')*100+(s.at(i+1)-'0')*10+(s.at(i+2)-'0');
        dis = abs(a-753);
        ans = min(ans,dis);
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:30: error: expected ',' or ';' before ')' token
   10 |         int a = (s.at(i))-'0')*100+(s.at(i+1)-'0')*10+(s.at(i+2)-'0');
      |                              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
    string s;
    cin >> s;
    int ans=1000;
    int dis;
    for(int i=0;i<s.size()-2;i++){
        dis = abs((s.at(i))-'0')*100+(s.at(i+1)-'0')*10+(s.at(i+2)-'0')-753);
        ans = min(ans,dis);
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:76: error: expected ';' before ')' token
   10 |         dis = abs((s.at(i))-'0')*100+(s.at(i+1)-'0')*10+(s.at(i+2)-'0')-753);
      |                                                                            ^
      |                                                                            ;
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  long long int S;
  cin >> S;
  int ans = 10000;
  while (S >= 100) {
    ans = min(ans, abs((S % 1000) - 753));
    S /= 10;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: no matching function for call to 'min(int&, long long int)'
    9 |     ans = min(ans, abs((S % 1000) - 753));
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:9:14: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
    9 |     ans = min(ans, abs((S % 1000) - 753));
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:9:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    9 |     ans = min(ans, abs((S % 1000) - 753));
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  string S;
  cin >> S;
  int N = S.size();
  int ans =999;
  for(int i=0;i<=N-3;++i){
    int num = (S[i] - '0')*100 +(S[i+1] - '0')*10 + (S[i+2] - '0');
    ans = min(ans,abs(num-753);
              }
              cout << ans << endl;
              }


Compiler output:
a.cc: In function 'int main()':
a.cc:11:31: error: expected ')' before ';' token
   11 |     ans = min(ans,abs(num-753);
      |              ~                ^
      |                               )
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  stirng S;
  cin >> S;
  int N = S.size();
  int ans =999;
  for(int i=0;i<=N-3;++i){
    int num = (S[i] - '0')*100 +(S[i+1] - '0')*10 + (S[i+2] - '0');
    ans = min(ans,abs(num-753);
              }
              cout << ans << endl;
              }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'stirng' was not declared in this scope
    5 |   stirng S;
      |   ^~~~~~
a.cc:6:10: error: 'S' was not declared in this scope
    6 |   cin >> S;
      |          ^
a.cc:11:31: error: expected ')' before ';' token
   11 |     ans = min(ans,abs(num-753);
      |              ~                ^
      |                               )
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
	string s;
	cin >> s;

	int ans = 1001001;
	for(int i=0;i<s.size()-2;i++){
		int n = stoi(substr(i, 3));
		ans = min(ans, abs(753-n));
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:30: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   10 |                 int n = stoi(substr(i, 3));
      |                              ^~~~~~
      |                              strstr
Language: C++

#include "bits/stdc++.h"
using namespace std;

int main() {
	string S;
	cin >> S;
	int N = S.size();
	int ans = 99999, const Integer = 753;
	for (int i = 0; i < N - 2; i++) {
		int a = S.at(i) - 48, b = S.at(i + 1) - 48, c = S.at(i + 2) - 48;
		int num = a * 100 + b * 10 + c;
		if (ans > abs(Integer - num))ans = abs(Integer - num);
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: expected unqualified-id before 'const'
    8 |         int ans = 99999, const Integer = 753;
      |                          ^~~~~
a.cc:12:31: error: 'Integer' was not declared in this scope
   12 |                 if (ans > abs(Integer - num))ans = abs(Integer - num);
      |                               ^~~~~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
#define int ll
#define double long double
#define YES {cout<<"YES"<<'\n';}
#define NO {cout<<"NO"<<'\n';}
#define Yes {cout<<"Yes"<<'\n';}
#define No {cout<<"No"<<'\n';}
#define yes {cout<<"yes"<<'\n';}
#define no {cout<<"no"<<'\n';}
void YN(bool flg){cout<<(flg?"YES":"NO")<<'\n';}
void Yn(bool flg){cout<<(flg?"Yes":"No")<<'\n';}
void yn(bool flg){cout<<(flg?"yes":"no")<<'\n';}
#define SORT(a) sort(a.begin(),a.end())
#define REVERSE(a) reverse(a.begin(),a.end())
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define out(n) {cout << n << '\n';}
typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<bool> VB;
typedef vector<VI> VVI;
const int MOD = 1000000007;
const long long INF = 10e10;
const double PI = acos(-1.0);
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T>auto MAX(const T& a) { return *max_element(a.begin(),a.end()); }
template<class T>auto MIN(const T& a) { return *min_element(a.begin(),a.end()); }
template<class T, class U>U SUM(const T& a, const U& v) { return accumulate(a.begin(),a.end(), v); }
template<class T, class U>U COUNT(const T& a, const U& v) { return count(a.begin(),a.end(), v); }
template<class T, class U>int LOWER(const T& a, const U& v) { return lower_bound(a.begin(),a.end(), v) - a.begin(); }
template<class T, class U>int UPPER(const T& a, const U& v) { return upper_bound(a.begin(),a.end(), v) - a.begin(); }
int GCD(int a, int b) { return b ? GCD(b, a%b) : a; }
int LCM(int a, int b) { int g = GCD(a, b); return a / g * b; }
int POW(int a, int n) { int r = 1; while (n > 0) { if (n & 1)r *= a; a *= a; n /= 2; }return r; }
int isPrime(int n){if(n<2){return 0;}for(int i=2; i*i<=n; i++){if(n%i==0){return 0;}}return 1;}
/*素因数分解*/map< int, int >prime_factor(int n){map< int, int > ret;for(int i = 2; i * i <= n; i++) {while(n % i == 0) {ret[i]++;n /= i;}}if(n != 1) ret[n] = 1;return ret;}
/*約数列挙*/vector<int> divisor(int n){vector<int> v; for(int i=1; i*i<=n; i++){if(n%i==0){v.push_back(i);if(i!=n/i){v.push_back(n/i);}}}sort(v.begin(),v.end()); return v;}
//----------------ライブラリとか----------------

signed main(){
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout<<fixed<<setprecision(15);

    int s; cin >> s;
    int ans = INF;
    for(s; s>100; s/=10) chmin(ans,abs(i%1000*753));
    out(ans);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:40: error: 'i' was not declared in this scope
   52 |     for(s; s>100; s/=10) chmin(ans,abs(i%1000*753));
      |                                        ^
Language: C++

#include<iostream>
#include<cmath>
using namespace std;

int main(){
 	int mini(753);
  	long int i;
  	cin >> i;
  	for( i ; i > 100 ; i /= 10) mini = min(abs(i % 1000 - 753),mini);
  	cout << mini << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:47: error: no matching function for call to 'min(long int, int&)'
    9 |         for( i ; i > 100 ; i /= 10) mini = min(abs(i % 1000 - 753),mini);
      |                                            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:9:47: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
    9 |         for( i ; i > 100 ; i /= 10) mini = min(abs(i % 1000 - 753),mini);
      |                                            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
   	Scanner sc = new Scanner(System.in);
	String S = sc.next();
    int min = 753;
   	for(int i = 0;i<N-2;i++)
   {
	    if(753-Integer.valueOf(S.substring(i,i+3)) < min) min = 753-Integer.valueOf(S.substring(i,i+3));
   }
   	System.out.println(min);
 }
}

Compiler output:
Main.java:7: error: cannot find symbol
   	for(int i = 0;i<N-2;i++)
   	                ^
  symbol:   variable N
  location: class Main
1 error
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include <functional>
#include<stdio.h>
#include<string>
using namespace std;


int main() {
	int x = 0, y=753;
	string s;
	cin >> s;
	for (int i = 0; i < s.size() - 2; i++) {
		int a = (s[i] - '0') * 100 + (s[i + 1] - '0') * 10 + (s[i + 2] - '0') * 1;
		x = fabs(a - 753);
		if (y > x)y = x;
	}
	cout << y << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   16 |                 x = fabs(a - 753);
      |                     ^~~~
      |                     labs
Language: C++

#include<bits/stdc++.h>
using namespace std;
int func1(int X){
  return X>=0?X:-X;
  }
int main(){
  string S;
  cin>>S;
  int ans=1000;
  rep(i,2,S.size()){
    string N;
    N+=S.at(i-2);
    N+=S.at(i-1);
    N+=S.at(i);
    int X=stoi(N);
    ans=min(ans,func1(X-753));
    }
  cout<<ans<<endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   rep(i,2,S.size()){
      |       ^
a.cc:10:3: error: 'rep' was not declared in this scope
   10 |   rep(i,2,S.size()){
      |   ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int func1(int X){
  return X>=0?X:-X;
  }
int main(){
  string S;
  cin>>S;
  int ans=MOD;
  rep(i,2,S.size()){
    string N;
    N+=S.at(i-2);
    N+=S.at(i-1);
    N+=S.at(i);
    int X=stoi(N);
    ans=min(ans,func1(X-753));
    }
  cout<<ans<<endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'MOD' was not declared in this scope
    9 |   int ans=MOD;
      |           ^~~
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   rep(i,2,S.size()){
      |       ^
a.cc:10:3: error: 'rep' was not declared in this scope
   10 |   rep(i,2,S.size()){
      |   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
string s;
int minv=1e9;
for(int i=0;i<s.size()-3; i++){
string tmp = s[i];
tmp += s[i+1];
tmp += s[i+2];
int tmpv = stoi(tmp);
minv = min(minv,abs(753-tmpv));
}
cout<<minv<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 | string tmp = s[i];
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int convert(string s)
{
  int g=3;
  int ans=0;
  for(auto i:s)
  {ans+=(i-'0')*pow(10,g);g--;}
  return ans;
}
int main()
{
 string s;
  cin>>s;
  for(int i=0;i<s.length()-2;i++)
  {
    int diff = abs(convert(s.substr(i,3))-753);
    if(diff<ans)
      ans=diff;
  }
  cout<<ans<<"\n";
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |     if(diff<ans)
      |             ^~~
      |             abs
a.cc:21:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |   cout<<ans<<"\n";
      |         ^~~
      |         abs
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;

int main(){
    long S; cin>>S;

    int ans=1000;
    while(S){
        ans=min(ans,abs(S%1000-753));
        S/=10;
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: no matching function for call to 'min(int&, long int)'
   10 |         ans=min(ans,abs(S%1000-753));
      |             ~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:10:16: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long int')
   10 |         ans=min(ans,abs(S%1000-753));
      |             ~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:10:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   10 |         ans=min(ans,abs(S%1000-753));
      |             ~~~^~~~~~~~~~~~~~~~~~~~~
Language: C++

#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using datas=pair<ll,ll>;
using ddatas=pair<double,double>;
using tdata=pair<ll,datas>;
using vec=vector<ll>;
using mat=vector<vec>;
using pvec=vector<datas>;
using pmat=vector<pvec>;
#define For(i,a,b) for(i=a;i<b;i++)
#define bFor(i,a,b) for(i=a;i>=b;i--)
#define rep(i,N) For(i,0,N)
#define rep1(i,N) For(i,1,N)
#define brep(i,N) bFor(i,N-1,0)
#define all(v) (v).begin(),(v).end()
#define allr(v) (v).rbegin(),(v).rend()
#define vsort(v) sort(all(v))
#define vrsort(v) sort(allr(v))
#define endl "\n"
#define pb push_back
#define output(v) do{bool f=0;for(auto outi:v){cout<<(f?" ":"")<<outi;f=1;}cout<<endl;}while(0)
const ll mod=1000000007;
const ll inf=1LL<<60;
template<class T> inline bool chmax(T& a,T b){bool x=a<b;if(x)a=b;return x;} 
template<class T> inline bool chmin(T& a,T b){bool x=a>b;if(x)a=b;return x;} 

double distance(ddatas& x,ddatas& y){
  double a=x.first-y.first,b=x.second-y.second;
  return sqrt(a*a+b*b);
}

ll modinv(ll a) {
  ll b=mod,u=1,v=0,t;
  while(b){
    t=a/b;
    a-=t*b; swap(a,b);
    u-=t*v; swap(u,v);
  }
  return (u+mod)%mod;
}

ll moddevide(ll a,ll b){return (a*modinv(b))%mod;}

vec modncrlistp,modncrlistm;

ll modncr(ll n,ll r){
  ll i,size=modncrlistp.size();
  if(size<=n){
    modncrlistp.resize(n+1);
    modncrlistm.resize(n+1);
    if(!size){
      modncrlistp[0]=modncrlistm[0]=1;
      size++;
    }
    For(i,size,n+1){
      modncrlistp[i]=modncrlistp[i-1]*i%mod;
      modncrlistm[i]=modinv(modncrlistp[i]);
    }
  }
  return modncrlistp[n]*modncrlistm[r]%mod*modncrlistm[n-r]%mod;
}

ll modpow(ll a,ll n){
  ll res=1;
  while(n){
    if(n&1)res=res*a%mod;
    a=a*a%mod;
    n>>=1;
  }
  return res;
}

ll gcd(ll a,ll b){if(!b)return a;return (a%b==0)?b:gcd(b,a%b);}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

ll countdigits(ll n){
  ll ans=0;
  while(n){n/=10;ans++;}
  return ans;
}

ll sumdigits(ll n){
  ll ans=0;
  while(n){ans+=n%10;n/=10;}
  return ans;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll i,ans,res;
  string s;cin>>s;
  res=(s[0]-'0')*100+(s[1]-'0')*10+s[2]-'0';
  ans=abs(res-753);
  For(i,3,N){
    res=res*10%1000+s[i]-'0';
    chmin(ans,(ll)abs(res-753));
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:97:11: error: 'N' was not declared in this scope
   97 |   For(i,3,N){
      |           ^
a.cc:12:30: note: in definition of macro 'For'
   12 | #define For(i,a,b) for(i=a;i<b;i++)
      |                              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  
  string S;
  cin >> S;
  
  int num;
  int num2 = 1e9;
  int num3;
  
  for(int i = 0;i < N - 2;++i){
    num = (int)S[i] * 100 + (int)S[i + 1] * 10 + (int)S[i + 2];
    num3 = abs(num3 - 753);
    num2 = min(num3,num2);
  }
  
  cout << num2 << endl;
    
    
  
}





Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: 'N' was not declared in this scope
   12 |   for(int i = 0;i < N - 2;++i){
      |                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int i,j;
  long n;
  cin>>n;
  int mi=1000;
  int prod;
  for(i=0;i<9;i++){
	prod=1;
    for(j=0;j<i;j++){
      prod*=10;
    }
    if((n/prod)%1000>99){
      mi=min(mi,abs(753-(n/prod)%1000));
    }
  }
  cout<<mi;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: no matching function for call to 'min(int&, long int)'
   16 |       mi=min(mi,abs(753-(n/prod)%1000));
      |          ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:16:13: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long int')
   16 |       mi=min(mi,abs(753-(n/prod)%1000));
      |          ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:16:13: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   16 |       mi=min(mi,abs(753-(n/prod)%1000));
      |          ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int n,i;
  cin>>n;
  int mi=1000;
  int prod;
  for(i=0;i<9;i++){
	prod=1;
    if((n/(int)pow(10,i))%1000>99){
      for(j=0;j<i;j++){
        prod*=10;
      }
      mi=min(mi,abs(753-(n/prod)%1000));
    }
  }
  cout<<mi;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'j' was not declared in this scope
   12 |       for(j=0;j<i;j++){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for( int i = 0 ; i < n ; i++ )
typedef long long ll ;
int ctoi(char c) {
	if (c >= '0' && c <= '9') {
		return c - '0';
	}
	return 0;
}
int main() {

string S ;
cin >> S ;
int A=S.size() ;
  int ans = 1000 ;
rep(i,A-2){
  int B = ctoi(S.at(i));
  int C = ctoi(S.at(i+1));
  int D = ctoi(S.at(i+2));
  //cout << B*100+C*10+D<<endl;
  ans = min(ans,abs(753-(B*100+C*10+D))) ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:11:12: note: to match this '{'
   11 | int main() {
      |            ^
Language: C++

#include <iostream>

using namespace std;

int main(){
	string s;
  	cin >> s;
 	int ans = 1000;
 	for(int i = 0; i < s.size() - 3; i++) {
    	ans = min(ans, abs(753 - int(s.substr(i, 3))));
    }
  	cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:34: error: invalid cast from type 'std::__cxx11::basic_string<char>' to type 'int'
   10 |         ans = min(ans, abs(753 - int(s.substr(i, 3))));
      |                                  ^~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
//#include <bits/stdc++.h>

using namespace std;

int main()
{
	string s;
	cin >> s;
	int num = 753;
	int ans = INT_MAX;
	int x = 0;

	for (int i = 0; i < s.size() - 2; i++)
	{
		int tmp = (s.at(i) - '0') * 100 + (s.at(i + 1) - '0') * 10 + (s.at(i + 2) - '0');
		int tmp_delta = abs(num - tmp);
		if (tmp_delta < ans)
		{
			ans = tmp_delta;
			//x = tmp;
		}
	}
	cout << ans << endl;
	//cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: 'INT_MAX' was not declared in this scope
   13 |         int ans = INT_MAX;
      |                   ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <algorithm>
  +++ |+#include <climits>
    4 | //#include <bits/stdc++.h>
Language: C++

#include <bits/stdc++.h>
#include <iostream>
using namespace std;

int main(){
   string a;
  cin >> a;
  int e;
  e =1000;
  for(int i=0;i<a.size()-2;i++){
    e = min(abs(s[i]*100+s[i+1]*10+s[i+2] -754),e);
  }
  cout << e << endl;
}
  
  
 

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 's' was not declared in this scope
   11 |     e = min(abs(s[i]*100+s[i+1]*10+s[i+2] -754),e);
      |                 ^
Language: C++

int main() {
	int g;
	int S[10];
	cin >> g;
	for (int i; i < 10; i++) {
		int y = 10;
		for (int x = 0; x < i; x++) {
			y = 10 * y;
		}
		S[i] = (g % y) / (y/10);
	}
	int min = 1000 ;
int num;
	for (int i = 0; i < 8; i++) {
		if (S[i+2]==0) {
			break;
		}
		num= S[i]*100 + S[i + 1]*10 + S[i + 2];

			if (753 - num < 0){
				num=-(753 - num);
			}
			else { num = 753 - num; }
			
			if (num < min) {
				min = num;
			}
		
	}
	
	cout << min;
}/*

Compiler output:
a.cc:32:2: error: unterminated comment
   32 | }/*
      |  ^
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> g;
      |         ^~~
a.cc:31:9: error: 'cout' was not declared in this scope
   31 |         cout << min;
      |         ^~~~
Language: C

import java.util.Scanner;

class Main{
    static Scanner scan=new Scanner(System.in);
    public static void main(String args[]){
        String s=scan.nextLine();
        String x="";
        int min=99999999,tmp;
        for(int i=0;i+2<s.length();i++){
            x="";
            x+=s.charAt(i);
            x+=s.charAt(i+1);
            x+=s.charAt(i+2);
            //System.out.println(">>"+x);
            tmp=Integer.parseInt(x)-753;
            tmp=Math.abs(tmp);
            if(min>tmp){
                min=tmp;
            }
        }
        System.out.println(min);
    }
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.Scanner;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.Scanner;
      |            ^
main.c:3:1: error: unknown type name 'class'
    3 | class Main{
      | ^~~~~
main.c:3:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    3 | class Main{
      |           ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0;i < (n);i++)
using namespace std;
  
int main () {
  string s;
  cin >> s;
  int ans = 1e9;
  rep(i,n-3) {
    int a = s.at(i) - '0';
    int b = s.at(i+1) - '0';
    int c = s.at(i+2) - '0';
    int x = a*100 + b*10 + c;
    ans = min(ans, x);
  }
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'n' was not declared in this scope
    9 |   rep(i,n-3) {
      |         ^
a.cc:2:38: note: in definition of macro 'rep'
    2 | #define rep(i,n) for (int i = 0;i < (n);i++)
      |                                      ^
Language: C++

#include <cstdio>

#define min(a, b) ((a) < (b) ? a : b)
#define abs(a) (a < 0 ? -(a) : a)

int main()
{
  char s[11];
  scanf("%s", s);
  int min = 0x10000;
  for (int i = 0; i <= strlen(s) - 3; ++i)
  {
    int n = s[i] * 100 + s[i + 1] * 10 + s[i + 2];
    if (min > abs(753 - n)) min = abs(753 - n);
  }
  printf("%d\n", min);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: 'strlen' was not declared in this scope
   11 |   for (int i = 0; i <= strlen(s) - 3; ++i)
      |                        ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <cstdio>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <cstdio>

#define min(a, b) ((a) < (b) ? a : b)
#define abs(a) (a < 0 ? -(a) : a)

int main()
{
  char s[11];
  scanf("%s", s);
  int min = 0x10000;
  for (int i = 0; i <= strlen(s) - 3; ++i)
  {
    int i = s[i] * 100 + s[i + 1] * 10 + s[i + 2];
    if (min > abs(753 - i)) min = abs(753 - i);
  }
  printf("%d\n", min);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: 'strlen' was not declared in this scope
   11 |   for (int i = 0; i <= strlen(s) - 3; ++i)
      |                        ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <cstdio>
  +++ |+#include <cstring>
    2 | 
a.cc:13:9: error: redeclaration of 'int i'
   13 |     int i = s[i] * 100 + s[i + 1] * 10 + s[i + 2];
      |         ^
a.cc:11:12: note: 'int i' previously declared here
   11 |   for (int i = 0; i <= strlen(s) - 3; ++i)
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int s,m=753,t,n=0;cin>>s;t=s
  while(t>0){
    t/=10;
    n++;
  }
  for(int i=0;i<n-2;i++){
    int u=s%1000,v;
    v=max(u-753,753-u);
    m=min(m,v);
  }
  cout<<m<<endl;
}
    
    
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:4:31: error: expected ';' before 'while'
    4 |   int s,m=753,t,n=0;cin>>s;t=s
      |                               ^
      |                               ;
    5 |   while(t>0){
      |   ~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    string s;cin>>s;
    int d=999999;
    for(int i=0;i<s.sizeof()-2;i++){
        x = 100*(int)(s[i]-'0')+10*(int)(s[i+1]-'0')+(int)(s[i+2]-'0');
        d = min(d,x);
    }
    cout<<d<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: expected unqualified-id before 'sizeof'
    6 |     for(int i=0;i<s.sizeof()-2;i++){
      |                     ^~~~~~
a.cc:6:21: error: expected ';' before 'sizeof'
    6 |     for(int i=0;i<s.sizeof()-2;i++){
      |                     ^~~~~~
      |                     ;
a.cc:6:28: error: expected primary-expression before ')' token
    6 |     for(int i=0;i<s.sizeof()-2;i++){
      |                            ^
a.cc:6:31: error: expected ')' before ';' token
    6 |     for(int i=0;i<s.sizeof()-2;i++){
      |        ~                      ^
      |                               )
a.cc:6:32: error: 'i' was not declared in this scope
    6 |     for(int i=0;i<s.sizeof()-2;i++){
      |                                ^
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(){
  string S;cin>>S;
  long long tmp=10000000000;
  string s1;
  long long s2,s3;
  for (int i=0;i<S.size()-2;i++){
    s1=S.substr(i,3);
    s2=s1-'0';
    s3=abs(s2-753);
    tmp=min(tmp,s3);
  }
  cout<<tmp<<endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
   12 |     s2=s1-'0';
      |        ~~^~~~
      |        |  |
      |        |  char
      |        std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/string:48,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  618 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note:   template argument deduction/substitution failed:
a.cc:12:11: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
   12 |     s2=s1-'0';
      |           ^~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1790 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note:   template argument deduction/substitution failed:
a.cc:12:11: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
   12 |     s2=s1-'0';
      |           ^~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(){
  string S;cin>>S;
  long long tmp=10000000000;
  string s1;
  long long s2;
  for (int i=0;i<S.size()-2;i++){
    s1=S.substr(i,3);
    s2=s1-'0';
    tmp=abs(s2-753);
    tmp=min(tmp,s2);
  }
  cout<<tmp<<endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
   12 |     s2=s1-'0';
      |        ~~^~~~
      |        |  |
      |        |  char
      |        std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/string:48,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  618 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note:   template argument deduction/substitution failed:
a.cc:12:11: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
   12 |     s2=s1-'0';
      |           ^~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1790 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note:   template argument deduction/substitution failed:
a.cc:12:11: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
   12 |     s2=s1-'0';
      |           ^~~