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

#include<bits/stdc++.h>   
using namespace std;    
int main(){
  string s;
  cin>> s;
  int si=s.size();
  int ans=0;
  for(int i=0;i<=si-3;i++){
    int a=s[i]-'o';
    int b=s[i+1]-'o':
    int c=s[i+2]-'o';
    int t=100*a+10*b+c;
    ans=min(ans.abs(753-t));
  }
  cout<<ans<<endl;
}



  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: expected ',' or ';' before ':' token
   10 |     int b=s[i+1]-'o':
      |                     ^
a.cc:12:22: error: 'c' was not declared in this scope
   12 |     int t=100*a+10*b+c;
      |                      ^
a.cc:13:17: error: request for member 'abs' in 'ans', which is of non-class type 'int'
   13 |     ans=min(ans.abs(753-t));
      |                 ^~~
Language: C++

#include<bits/stdc++.h>   
using namespace std;    
int main(){
  string s;
  cin>> s;
  int si=s.size();
  int ans=0;
  for(int i=0;i<=n-3;i++){
    int a=s[i]-'o';
    int b=s[i+1]-'o':
    int c=s[i+2]-'o';
    int t=100*a+10*b+c;
    ans=min(ans.abs(753-t));
  }
  cout<<ans<<endl;
}



  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: 'n' was not declared in this scope
    8 |   for(int i=0;i<=n-3;i++){
      |                  ^
a.cc:10:21: error: expected ',' or ';' before ':' token
   10 |     int b=s[i+1]-'o':
      |                     ^
a.cc:12:22: error: 'c' was not declared in this scope
   12 |     int t=100*a+10*b+c;
      |                      ^
a.cc:13:17: error: request for member 'abs' in 'ans', which is of non-class type 'int'
   13 |     ans=min(ans.abs(753-t));
      |                 ^~~
Language: C++

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

int main() {
    char S[11];
    cin >> S;
    int l = S.size();
    int a[l-2];
    int b[l-2];

    for(int i = 0; i < l-2; i++) {
        a[i] = stoi(S.substr(i, 3));
    }

    for(int i = 0; i < l-2; i++) {
        if(a[i] - 753 < 0) {
            b[i] = 753 - a[i];
        }
        else {
            b[i] = a[i] - 753;
        }
    }

    sort(b, b+l-2);

    cout << b[0];

    cout << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: request for member 'size' in 'S', which is of non-class type 'char [11]'
    9 |     int l = S.size();
      |               ^~~~
a.cc:14:23: error: request for member 'substr' in 'S', which is of non-class type 'char [11]'
   14 |         a[i] = stoi(S.substr(i, 3));
      |                       ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) {
REP(i,v.size()){if(i)os<<" ";os<<v[i];}return os;}
template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) {
REP(i,v.size()){if(i)os<<endl;os<<v[i];}return os;}

int main() {
	string s; cin >> s;
	std::vector<int> Ans;

	for (int i = 0; i < (int)s.size() - 2; ++i)
	{
		string a = s.substr(i,3);
		int b = (int)atoi(a);

		Ans.push_back(abs(b - 754));
	}

	sort(Ans.begin(), Ans.end());
	cout << Ans[0] << endl;
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:35: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   24 |                 int b = (int)atoi(a);
      |                                   ^
      |                                   |
      |                                   std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<strig.h>

int main(void)
{
    char s[10];
    int i;
    int min=999;
    int box;
    /*for(i=0;i<10;i++){
        scanf("%s",&s[i]);
    }*/gets(s);
    int l=strlen(s);
    for(i=0;i<l-2;i++){
        box=(s[i]-'0')*100+(s[i+1]-'0')*10+(s[i+2]-'0');
        if(abs(753-box)<min){
            min=abs(753-box);
        }
    }

    printf("%d\n",min);
    return 0;
}

Compiler output:
main.c:3:9: fatal error: strig.h: No such file or directory
    3 | #include<strig.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc.h>
using namespace std;
int main(){
  string S;
  cin >> S;
  int ans=999;
  int N=S.size();
  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:1:9: fatal error: bits/stdc.h: No such file or directory
    1 | #include<bits/stdc.h>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
int main(){
  int i, len, ans=100000;
  char s[12];
  cin >> s;
  len = strlen(s);
  for(i=0; i<len; i++){
    ans=min(|s[i]*100+s[i+1]*10+s[i+2]-753|,ans);
  }
  cout << ans;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: expected primary-expression before '|' token
   11 |     ans=min(|s[i]*100+s[i+1]*10+s[i+2]-753|,ans);
      |             ^
a.cc:11:44: error: expected primary-expression before ',' token
   11 |     ans=min(|s[i]*100+s[i+1]*10+s[i+2]-753|,ans);
      |                                            ^
Language: C++

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

int main(){
  stirng s;
  cin>>s;
  int ans=1000;
  for(int i=0;i<s.size();i++){
    int sum=0;
    sum+=s[i]*100;
    for(int j=i+1;j<s.size();j++){
      sum+=s[j]*10;
      for(int k=j+1;k<s.size();k++){
        sum+=s[k];
        if(abs(sum-753)<ans)
          ans=abs(sum-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:8: error: 's' was not declared in this scope
    6 |   cin>>s;
      |        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin>>s;
  int a = (s[0]-'0')*100+(s[1]-'0')*10+s[2]-'0';
  int ans = 100000;
  ans = min(ans, abs(a-753);
  for(int i=3;i<s.length();++i) {
    a %= 100;
    a *= 10;
    a += s[i]-'0';
    ans = min(ans, abs(a-753));
  }
  cout<<ans;
  return 0;
}

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

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main(void){
    char S[11];
    scanf("%s", S);
    
    int i, j;
    int X;
    int Y = 753;
    int min = 1000000;
    for(i = 0; i<=strlen(s)-3; i++) {
        X = 100 * (int)(S[i] - '0') + 10 * (int)(S[i+1] - '0') + (int)(S[i+2] - '0');
        if(abs(Y - X) < min) {
            min = abs(Y - X);
        }
    }

    printf("%d\n", min);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:26: error: 's' undeclared (first use in this function)
   13 |     for(i = 0; i<=strlen(s)-3; i++) {
      |                          ^
main.c:13:26: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main() {
	string s; cin >> s;
    int n = s.length();
  	int min = 753;
    for (int i = 0; i < n - 2; ++i) {
    	int m = (int)(s[i] - '0') * 100 + (int)(s[i+1] - '0') * 10 + (int)(s[i+2] - '0');  
		min = (abs(753 - m) < min) ? abs(753 - m) : min;
    }
  	cout << d << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'd' was not declared in this scope
   12 |         cout << d << endl;
      |                 ^
Language: C++

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

int main() {
	string s; cin >> s;
    int n = s.length();
  	int min = 753;
    for (int i = 0; i < n - 2; ++i) {
    	m = (int)(s[i] - '0') * 100 + (int)(s[i+1] - '0') * 10 + (int)(s[i+2] - '0');  
		min = (abs(753 - m) < min) ? abs(753 - m) : min;
    }
  	cout << d << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'm' was not declared in this scope
    9 |         m = (int)(s[i] - '0') * 100 + (int)(s[i+1] - '0') * 10 + (int)(s[i+2] - '0');
      |         ^
a.cc:12:17: error: 'd' was not declared in this scope
   12 |         cout << d << endl;
      |                 ^
Language: C++

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

int main() {
	string s; cin >> s;
    int n = s.length();
  	int arr[n-2];
    for (int i = 0; i < n - 2; ++i) {
    	arr[i] = (s[i] - '0') * 100 + (s[i+1] - '0') * 10 + (s[i+2] - '0');  
    }
  	cout << max(arr) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: no matching function for call to 'max(int [(n + -2)])'
   11 |         cout << max(arr) << endl;
      |                 ~~~^~~~~
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:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303: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:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:11:20: note:   mismatched types 'std::initializer_list<_Tp>' and 'int*'
   11 |         cout << max(arr) << endl;
      |                 ~~~^~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716: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.length();
  	int arr[n-2];
    for (int i = 0; i < n - 2; ++i) {
    	arr[i] = (s[i] - '0') * 100 + (s[i+1] - '0') * 10 + (s[i+2] - '0');  
    }
  	cout << max(arr,arr+(n-2)) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: no matching function for call to 'max(int [(n + -2)], int*)'
   11 |         cout << max(arr,arr+(n-2)) << endl;
      |                 ~~~^~~~~~~~~~~~~~~
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:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:11:20: note:   variable-sized array type 'int [(n + -2)]' is not a valid template argument
   11 |         cout << max(arr,arr+(n-2)) << endl;
      |                 ~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303: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:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:11:20: note:   mismatched types 'std::initializer_list<_Tp>' and 'int*'
   11 |         cout << max(arr,arr+(n-2)) << endl;
      |                 ~~~^~~~~~~~~~~~~~~
Language: C++

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

int main() {
	string s; cin >> s;
    int n = strlen(s);
  	int arr[n-2];
    for (int i = 0; i < n - 2; ++i) {
    	arr[i] = (s[i] - '0') * 100 + (s[i+1] - '0') * 10 + (s[i+2] - '0');  
    }
  	cout << max(arr,arr+n-2) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    6 |     int n = strlen(s);
      |                    ^
      |                    |
      |                    std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:11:20: error: no matching function for call to 'max(int [(n + -2)], int*)'
   11 |         cout << max(arr,arr+n-2) << endl;
      |                 ~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:11:20: note:   variable-sized array type 'int [(n + -2)]' is not a valid template argument
   11 |         cout << max(arr,arr+n-2) << endl;
      |                 ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303: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:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:11:20: note:   mismatched types 'std::initializer_list<_Tp>' and 'int*'
   11 |         cout << max(arr,arr+n-2) << endl;
      |                 ~~~^~~~~~~~~~~~~
Language: C++

import math
S = input()
like = 753
diff = 753
for i in range(len(S)-2):
#     print(i)
#     print(S[i:i+3])
    T = int(S[i:i+3])
    if math.fabs(like - T) < diff:
        diff = math.fabs(like - T)
print(int(diff))

Compiler output:
a.cc:6:7: error: invalid preprocessing directive #print
    6 | #     print(i)
      |       ^~~~~
a.cc:7:7: error: invalid preprocessing directive #print
    7 | #     print(S[i:i+3])
      |       ^~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  int ans=1000;
  for(int j=0;j<s.size()-3;j++){
    int k=100*(int)(s.at(i)-'0')+10*(int)(s.at(i+1)-'0')+(int)(s.at(i+2)-'0');
    ans=min(ans,abs(753-k));
  }
  cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: 'i' was not declared in this scope
    8 |     int k=100*(int)(s.at(i)-'0')+10*(int)(s.at(i+1)-'0')+(int)(s.at(i+2)-'0');
      |                          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int s;
  cin>>s;
  int i=0;
  int ans=1000;
  while((s/pow(10,i))/100){
    int k=(s/pow(10,i))%1000;
    ans=min(ans,abs(753-k));
    i++;
  }
  cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
    9 |     int k=(s/pow(10,i))%1000;
      |           ~~~~~~~~~~~~~^~~~~
      |             |           |
      |             |           int
      |             __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

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

int main(){
  string s; cin>>s;
  int mini = 650;
  for(int i=0;i<s.length()-2;i++){
    int runrun;
    runrun = atoi(s.substr(i,3));
    mini = min(mini,abs(runrun));
  }
  cout<<mini<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: cannot convert 'std::__cxx11::basic_string<char>' to 'const char*'
    9 |     runrun = atoi(s.substr(i,3));
      |                   ~~~~~~~~^~~~~
      |                           |
      |                           std::__cxx11::basic_string<char>
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C++

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

int main(){
  string s; cin>>s;
  int mini = 650;
  for(int i=0;i<s.length()-2;i++){
    int runrun;
    runrun = s.substr(i,3);
    mini = min(mini,abs(runrun));
  }
  cout<<mini<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: cannot convert 'std::__cxx11::basic_string<char>' to 'int' in assignment
    9 |     runrun = s.substr(i,3);
      |              ~~~~~~~~^~~~~
      |                      |
      |                      std::__cxx11::basic_string<char>
Language: C++

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

int main(){
  string s; cin>>s;
  int mini = 650;
  for(int i=0;i<s.length()-2;i++){
    int runrun = (int)s.substr(i,3);
    mini = min(mini,abs(runrun));
  }
  cout<<mini<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: invalid cast from type 'std::__cxx11::basic_string<char>' to type 'int'
    8 |     int runrun = (int)s.substr(i,3);
      |                  ^~~~~~~~~~~~~~~~~~
Language: C++

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

int main(){
  string s; cin>>s;
  int mini = 650;
  for(int i=0;i<s.length-2;i++){
    int runrun = (int)s.substr(i,3);
    mini = min(mini,abs(runrun));
  }
  cout<<mini<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    7 |   for(int i=0;i<s.length-2;i++){
      |                 ~~^~~~~~
      |                         ()
a.cc:8:18: error: invalid cast from type 'std::__cxx11::basic_string<char>' to type 'int'
    8 |     int runrun = (int)s.substr(i,3);
      |                  ^~~~~~~~~~~~~~~~~~
Language: Java

import java.util.*;
class Main{
  public static void main(String[] a ){
    Scanner sc=new Scanner(System.in);
long x=sc.nextLong();
int ans=1000;
for(int i=0;i<10;i++){
ans=Math.min(ans,Math.abs(753-x%Math.pow(10,i+3)-x%Math.pow(10,i)));
}
System.out.println(ans);
}}

Compiler output:
Main.java:8: error: incompatible types: possible lossy conversion from double to int
ans=Math.min(ans,Math.abs(753-x%Math.pow(10,i+3)-x%Math.pow(10,i)));
            ^
1 error
Language: Java

import java.util.*;
class Main{
  public static void main(String[] a ){
    Scanner sc=new Scanner(System.in);
long x=sc.nextLong();
int ans=1000;
for(int i=0;i<10;i++){
ans=Math.min(ans,Math.abs(753ｰx%Math.pow(10,i+3)+x%Math.pow(10,i)));
}
System.out.println(ans);
}}

Compiler output:
Main.java:8: error: ')' or ',' expected
ans=Math.min(ans,Math.abs(753?x%Math.pow(10,i+3)+x%Math.pow(10,i)));
                             ^
Main.java:8: error: not a statement
ans=Math.min(ans,Math.abs(753?x%Math.pow(10,i+3)+x%Math.pow(10,i)));
                                                ^
Main.java:8: error: ';' expected
ans=Math.min(ans,Math.abs(753?x%Math.pow(10,i+3)+x%Math.pow(10,i)));
                                                                 ^
3 errors
Language: Java

import java.util.*;
class Main{
  public static void main(String[] a ){
    Scanner sc=new Scanner(System.in);
long x=sc.nextLong();
int ans=1000;
for(int i=0;i<10;i++){
ans=Math.min(ans,Math.abs(x%Math.pow(10,i+3)-x%Math.pow(10,i)));
}
System.out.println(ans);
}}

Compiler output:
Main.java:8: error: incompatible types: possible lossy conversion from double to int
ans=Math.min(ans,Math.abs(x%Math.pow(10,i+3)-x%Math.pow(10,i)));
            ^
1 error
Language: C++

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


int main(){
  string S;
  cin >> S;
  int len = S.size();
  int ans = 1000;
  for(int ii=0; ii<len-2; ii++){
    int cur = stoi(S.substr(ii, 3));
    if(abs(cur-753) < ans){
      ans = abs(cur-753);
    }
  }
  cout << min_abs << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: 'min_abs' was not declared in this scope
   16 |   cout << min_abs << endl;
      |           ^~~~~~~
Language: C++

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

int main(){
  string s;
  int ans=646;　//753との差が大きいのは149だから、差の最大値は646
  cin >>s;
  vector<int> n;
  for<int i=0;i<s.size();i++){
    n.at(i) = s[i];
  }
  for(int i=0;i<n.size()-2;i++){
    if(100*n.at(i)+10*n.at(i+1)+n.at(i+2) < 753){
      ans = min(753 - 100*n.at(i)+10*n.at(i+1)+n.at(i+2),ans);
    }else if(100*n.at(i)+10*n.at(i+1)+n.at(i+2) > 753){
      ans = min(100*n.at(i)+10*n.at(i+1)+n.at(i+2) - 753,ans);
    }else{
      ans = 0;
      break;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc:6:15: error: extended character 　 is not valid in an identifier
    6 |   int ans=646;　//753との差が大きいのは149だから、差の最大値は646
      |               ^
a.cc: In function 'int main()':
a.cc:6:15: error: '\U00003000' was not declared in this scope
    6 |   int ans=646;　//753との差が大きいのは149だから、差の最大値は646
      |               ^~
a.cc:9:6: error: expected '(' before '<' token
    9 |   for<int i=0;i<s.size();i++){
      |      ^
      |      (
a.cc:9:6: error: expected primary-expression before '<' token
a.cc:9:7: error: expected primary-expression before 'int'
    9 |   for<int i=0;i<s.size();i++){
      |       ^~~
a.cc:9:15: error: 'i' was not declared in this scope
    9 |   for<int i=0;i<s.size();i++){
      |               ^
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
  int s,ans=646;　//753との差が大きいのは149だから、差の最大値は646
  cin >>s;
  vector<int> n;
  for<int i=0;i<s.length();i++){
    n.at(i) = s[i];
  }
  for(int i=0;i<n.size()-2;i++){
    if(100*n.at(i)+10*n.at(i+1)+n.at(i+2) < 753){
      ans = min(753 - 100*n.at(i)+10*n.at(i+1)+n.at(i+2),ans);
    }else if(100*n.at(i)+10*n.at(i+1)+n.at(i+2) > 753){
      ans = min(100*n.at(i)+10*n.at(i+1)+n.at(i+2) - 753,ans);
    }else{
      ans = 0;
      break;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc:5:17: error: extended character 　 is not valid in an identifier
    5 |   int s,ans=646;　//753との差が大きいのは149だから、差の最大値は646
      |                 ^
a.cc: In function 'int main()':
a.cc:5:17: error: '\U00003000' was not declared in this scope
    5 |   int s,ans=646;　//753との差が大きいのは149だから、差の最大値は646
      |                 ^~
a.cc:8:6: error: expected '(' before '<' token
    8 |   for<int i=0;i<s.length();i++){
      |      ^
      |      (
a.cc:8:6: error: expected primary-expression before '<' token
a.cc:8:7: error: expected primary-expression before 'int'
    8 |   for<int i=0;i<s.length();i++){
      |       ^~~
a.cc:8:15: error: 'i' was not declared in this scope
    8 |   for<int i=0;i<s.length();i++){
      |               ^
a.cc:8:19: error: request for member 'length' in 's', which is of non-class type 'int'
    8 |   for<int i=0;i<s.length();i++){
      |                   ^~~~~~
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
  int s,ans=646;　//753との差が大きいのは149だから、差の最大値は646
  cin >>s;
  vector<int> n;
  for<int i=0;i<s.length();i++){
    n.at(i) = s[i];
  }
  for(int i=0;i<n.size()-2;i++){
    ans = min(100*n.at(i)+10*n.at(i+1)+n.at(i+2),ans);
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc:5:17: error: extended character 　 is not valid in an identifier
    5 |   int s,ans=646;　//753との差が大きいのは149だから、差の最大値は646
      |                 ^
a.cc: In function 'int main()':
a.cc:5:17: error: '\U00003000' was not declared in this scope
    5 |   int s,ans=646;　//753との差が大きいのは149だから、差の最大値は646
      |                 ^~
a.cc:8:6: error: expected '(' before '<' token
    8 |   for<int i=0;i<s.length();i++){
      |      ^
      |      (
a.cc:8:6: error: expected primary-expression before '<' token
a.cc:8:7: error: expected primary-expression before 'int'
    8 |   for<int i=0;i<s.length();i++){
      |       ^~~
a.cc:8:15: error: 'i' was not declared in this scope
    8 |   for<int i=0;i<s.length();i++){
      |               ^
a.cc:8:19: error: request for member 'length' in 's', which is of non-class type 'int'
    8 |   for<int i=0;i<s.length();i++){
      |                   ^~~~~~
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
#define forsn(i, s, n) for(int i=s;i<int(n);i++)
#define forn(i, n) forsn(i, 0, n)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
 
typedef long long tint;

const int INF = 1e6;
const long double PI = acos(-1);
 
int main() {
	string s; cin >> s;
	int mini = 10000;
	forn(i, n){
		string a = s.substr(i, 3);
		int n = atoi(a.c_str());
		mini = min(mini, abs(754-n));
	}
	cout << mini << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: 'n' was not declared in this scope
   18 |         forn(i, n){
      |                 ^
a.cc:5:42: note: in definition of macro 'forsn'
    5 | #define forsn(i, s, n) for(int i=s;i<int(n);i++)
      |                                          ^
a.cc:18:9: note: in expansion of macro 'forn'
   18 |         forn(i, n){
      |         ^~~~
Language: C++

#include <iostream>
#include <cstdlib>

using namespace std;

int main()
{
  string S;
  cin >> S;
  int len = S.size();
  int ans = INT_MAX;

  for(int i = 0; i < len-2; i++){
    int num = stoi(S.substr(i, 3));
    ans = min(ans, abs(num-753));
  }

  cout << ans << "\n";

  return 0;
}


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

#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<numeric>
#include<string>
#include<vector>
using namespace std;
int main(){
    string s;
    cin>>s;
    int ans=1000;
    int N=s.length();
    for(int i=0;i<n-3;i++){
        int num=stoi(s.substr(i,3));
        ans=min(ans,abs(num-753));
    }
    cout<<ans<<endl;
    return 0;
}

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

#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<numeric>
#include<string>
#include<vector>
using namespace std;
int main(){
    string s;
    cin>>s;
    int N=s.length();
    int ans=1000;
    for(int i=0;i<=N-3;i++){
        int a=s[i]-"0";
        int b=s[i+1]-"0";
        int c=s[i+2]-"0";
        int x=100*a+10*b+c;
        ans=min(ans,abs(753-x));
    }
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'const char [2]' to binary 'operator-'
   14 |         int a=s[i]-"0";
a.cc:15:21: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'const char [2]' to binary 'operator-'
   15 |         int b=s[i+1]-"0";
a.cc:16:21: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'const char [2]' to binary 'operator-'
   16 |         int c=s[i+2]-"0";
Language: C++

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

int main() {
  string S;
  cin >> S;
  int deka=10000;
  int zettai=0;
  for (int i=0; i<S.size()-2;i++){
    zettai=abs(S[i]*100+S[i+1]*10+S[i+2]-753)-'0'
    if (zettai<deka){
      deka==zettai;
    }
  }
  cout << deka << endl;
  

}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:50: error: expected ';' before 'if'
   12 |     zettai=abs(S[i]*100+S[i+1]*10+S[i+2]-753)-'0'
      |                                                  ^
      |                                                  ;
   13 |     if (zettai<deka){
      |     ~~
Language: C++

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

int main() {
  string S;
  cin >> S;
  int deka=10000;
  for (int i=0; i<S.size()-2;i++){
    if (abs(S[i]*100+S[i+1]*10+S[i+2]-753)<deka){
      deka==(abs(S[i]*100+S[i+1]*10+S[i+2]-753);
    }
  }
  cout << deka << endl;
  

}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:48: error: expected ')' before ';' token
   12 |       deka==(abs(S[i]*100+S[i+1]*10+S[i+2]-753);
      |             ~                                  ^
      |                                                )
Language: C++

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

int main() {
  string S;
  cin >> S;
  vector<int> vec(S.size());
  for (int i=0; i<S.size();i++){
    vec.at(i)=stoi(S.at(i));
  }
  int deka=10000;
  for (int i=0; i<S.size()-2;i++){
    if (abs(vec.at(i)*100+vec.at(i+1)*10+vec.at(i+2)-753)<deka){
      deka==abs(vec.at(i)*100+vec.at(i+1)*10+vec.at(i+2)-753);
    }
  }
  cout << deka << endl;
  

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   11 |     vec.at(i)=stoi(S.at(i));
      |               ~~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:22: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~
Language: C++

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

int main() {
  string S;
  cin >> S;
  vector<int> vec(S.size());
  for (int i=0; i<S.size();i++){
    vec.at(i)=stoi(S.at(i));
  }
  int deka=10000;
  for (int i=0; i<S.size()-2;i++){
    if (abs(vec.at(i)*100+vec.at(i+1)*10+vec.at(i+2)-753)<deka){
      deka==abs(vec.at(i)*100+vec.at(i+1)*10+vec.at(i+2)-753);
    }
  }
  cout << deka << endl;
  

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
    9 |     vec.at(i)=stoi(S.at(i));
      |               ~~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:22: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~
Language: C++

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

int main() {
  string s;
  cin >> s;
  int ans = 999999;
  for(int i = 0; i < s.size() - 3; i++) {
    int n = (c[i] - '0') * 100 + (c[i+1] - '0') * 10 + (c[i+2] - '0');
    //int n = stoi(s.substr(i, 3));
    ans = min(ans, abs(753 - n));
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'c' was not declared in this scope
    9 |     int n = (c[i] - '0') * 100 + (c[i+1] - '0') * 10 + (c[i+2] - '0');
      |              ^
Language: C++

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

int main() {
  string s;
  int ans = 999;
  for(int i = 0; i < s.size() - 3; i++) {
    int n = stoi(s.substr(i, 3));
    ans = min(ans, abs(753 - n));
  }
  puts(ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   11 |   puts(ans);
      |        ^~~
      |        |
      |        int
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

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

int main() {
  string s;
  int ans = 999;
  for(int i = 0; i < s.size() - 3; i++) {
    int n = stoi(s.substr(i, 3));
    ans = min(ans, abs(753 - n));
  }
  puts(n);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: 'n' was not declared in this scope
   11 |   puts(n);
      |        ^
Language: C++

#include <algorithm> // min
#include <cmath> // abs
#include <iostream>
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 = (c[i]-'0')*100 + (c[i+1]-'0')*10 + c[i+2]-'0';
		ans = min(ans, abs(num-753));
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: 'c' was not declared in this scope
   11 |                 int num = (c[i]-'0')*100 + (c[i+1]-'0')*10 + c[i+2]-'0';
      |                            ^
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
  string S;
  cin >> S;
  
  int mind = 10000;
  for(int i = 2; i < S.length(); i++){
    int h = S.At(i-2) - '0';
    int t = S.At(i -1) - '0';
    int o = S.At(i) - '0';
    int sum = h * 100 + t * 10 + 0;
    mind = min(abs(sum - 753),mind);
  }
  cout << mind;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'At'; did you mean 'at'?
   12 |     int h = S.At(i-2) - '0';
      |               ^~
      |               at
a.cc:13:15: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'At'; did you mean 'at'?
   13 |     int t = S.At(i -1) - '0';
      |               ^~
      |               at
a.cc:14:15: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'At'; did you mean 'at'?
   14 |     int o = S.At(i) - '0';
      |               ^~
      |               at
Language: C++

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

int main(){
    string s; cin >> s;
    int ans = 642;　//差の最大値
    for(int i=0;i<s.size();i++){
        int num = atoi(s.substr(i, 3).c_str());
        ans = min(ans, abs(num - 753));
    }
    cout << ans << endl;
}

Compiler output:
a.cc:6:19: error: extended character 　 is not valid in an identifier
    6 |     int ans = 642;　//差の最大値
      |                   ^
a.cc: In function 'int main()':
a.cc:6:19: error: '\U00003000' was not declared in this scope
    6 |     int ans = 642;　//差の最大値
      |                   ^~
a.cc:7:17: error: 'i' was not declared in this scope
    7 |     for(int i=0;i<s.size();i++){
      |                 ^
Language: C++

#include <iostream>
#include <string.h>
#include <math.h>
using namespace std;

int main(){
    string s;
    cin>>s;
    int n = s.size();
    int min = 700;
    int num = 0;
    for(int i=0; i<n-2; i++){
        /*
        if(abs((int)s[i]*100+(int)s[i+1]*10+(int)s[i+2]-753)<min){
            min = abs((int)s[i]*100+(int)s[i+1]*10+(int)s[i+2]-753);
        }
        */
       if(abs(atoi(s[i:i+2])-753)<min){
           min = abs(atoi(s[i:i+2])-753);
       }
    }
    cout<<min<<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:23: error: found ':' in nested-name-specifier, expected '::'
   18 |        if(abs(atoi(s[i:i+2])-753)<min){
      |                       ^
      |                       ::
a.cc:18:22: error: 'i' is not a class, namespace, or enumeration
   18 |        if(abs(atoi(s[i:i+2])-753)<min){
      |                      ^
a.cc:19:30: error: found ':' in nested-name-specifier, expected '::'
   19 |            min = abs(atoi(s[i:i+2])-753);
      |                              ^
      |                              ::
a.cc:19:29: error: 'i' is not a class, namespace, or enumeration
   19 |            min = abs(atoi(s[i:i+2])-753);
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  ll s,mi=753;
  cin>>s;
  for(int i=0;i<8;i++){
    mi=min(mi,abs(s%1000-753));
    s/=10;
  }
  cout<<mi<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'll' was not declared in this scope
    4 |   ll s,mi=753;
      |   ^~
a.cc:5:8: error: 's' was not declared in this scope
    5 |   cin>>s;
      |        ^
a.cc:7:5: error: 'mi' was not declared in this scope; did you mean 'i'?
    7 |     mi=min(mi,abs(s%1000-753));
      |     ^~
      |     i
a.cc:10:9: error: 'mi' was not declared in this scope
   10 |   cout<<mi<<endl;
      |         ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; }
int ans=1000000000;
int main(){
   string s;
   string t;
   cin>>s;
   for(int i=0;i<8;i++){
       t=“”;
       for(int j=i;j<i+3;j++){
           t+=s[j];
       }
       int p=toInt(t);
       ans=min(ans,abs(p-753));
   }
   cout<<ans<<endl;
}


Compiler output:
a.cc:10:10: error: extended character “ is not valid in an identifier
   10 |        t=“”;
      |          ^
a.cc:10:10: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:10:10: error: '\U0000201c\U0000201d' was not declared in this scope
   10 |        t=“”;
      |          ^~
Language: C++

// Last Change: 04/25/2019 18:39:27.
#include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

using namespace std;
using ll = long long;

namespace NS {
void LoopUntilZeroInpput() {
  int hogegegege = 0;
  while (cin >> hogegegege && hogegegege != 0) {
  }
}
} // namespace NS

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

  int64_t ans = INT64_MAX;
  for (int i = 0; i < S.size() - 2; ++i) {
    string sub = S.substr(i, 3);
    int num = stoi(sub);
    ans = min(ans, (ll)abs(num - 753));
  }

  cout << ans << endl;

  //NS::LoopUntilZeroInpput();
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:14: error: no matching function for call to 'min(int64_t&, ll)'
   38 |     ans = min(ans, (ll)abs(num - 753));
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from a.cc:2:
/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:38:14: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'll' {aka 'long long int'})
   38 |     ans = min(ans, (ll)abs(num - 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:38:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   38 |     ans = min(ans, (ll)abs(num - 753));
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string S;
  cin>>S;
  vector<int>list(S.size());
  for(int i=0;i<S.size();i++){
    list.at(i)=S.at(i)-'0';
  }
  int min=700;
  for(int i=0;i<S.size()-2){
    int k;
    int t;
    k=S.at(i)*100+S.at(i+1)*10+S.at(i+2);
    t=max(k,753)-min(k,753);
    if(t<min){
      min=t;
    }
    else{
    }
  }
  cout<<min<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: expected ';' before ')' token
   11 |   for(int i=0;i<S.size()-2){
      |                           ^
      |                           ;
a.cc:15:21: error: 'min' cannot be used as a function
   15 |     t=max(k,753)-min(k,753);
      |                  ~~~^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string S;
  cin>>S;
  vector<int>list(S.size());
  for(int i=0;i<S.size;i++){
    list.at(i)=S.at(i)-'0';
  }
  int min=700;
  for(int i=0;i<S.size()-2){
    int k;
    int t;
    k=S.at(i)*100+S.at(i+1)*10+S.at(i+2);
    t=max(k,753)-min(k,753);
    if(t<min){
      min=t;
    }
    else{
    }
  }
  cout<<min<<endl;
}
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    7 |   for(int i=0;i<S.size;i++){
      |                 ~~^~~~
      |                       ()
a.cc:11:27: error: expected ';' before ')' token
   11 |   for(int i=0;i<S.size()-2){
      |                           ^
      |                           ;
a.cc:15:21: error: 'min' cannot be used as a function
   15 |     t=max(k,753)-min(k,753);
      |                  ~~~^~~~~~~
Language: C++

#include<bits/stdc+.h>
using namespace std;
int main(){
  string S;
  cin>>S;
  vector<int>list(S.size());
  for(int i=0;i<S.size;i++){
    list.at(i)=S.at(i)-'0';
  }
  int min=700;
  for(int i=0;i<S.size()-2){
    int k;
    int t;
    k=S.at(i)*100+S.at(i+1)*10+S.at(i+2);
    t=max(k,753)-min(k,753);
    if(t<min){
      min=t;
    }
    else{
    }
  }
  cout<<min<<endl;
}
    
  

Compiler output:
a.cc:1:9: fatal error: bits/stdc+.h: No such file or directory
    1 | #include<bits/stdc+.h>
      |         ^~~~~~~~~~~~~~
compilation terminated.