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

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <iomanip>

using namespace std;

#define int long long
#define rep(i,n) for(int i = 0;i < n;i++)
#define all(n)	n.begin(),n.end()
#define each(i,n) for(auto &i : n)

const int INF = 1e9;

signed main() {
	long double d;
	cin >> d;

	long double ld = int(d);
	auto ans = max(d * sqrt(2.0l), ld + 1.0l);
	cout << fixed << setprecision(20) << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: expected primary-expression before 'long'
   11 | #define int long long
      |             ^~~~
a.cc:22:26: note: in expansion of macro 'int'
   22 |         long double ld = int(d);
      |                          ^~~
a.cc:23:28: error: 'sqrt' was not declared in this scope
   23 |         auto ans = max(d * sqrt(2.0l), ld + 1.0l);
      |                            ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <iomanip>

using namespace std;

#define int long long
#define rep(i,n) for(int i = 0;i < n;i++)
#define all(n)	n.begin(),n.end()
#define each(i,n) for(auto &i : n)

const int INF = 1e9;

signed main() {
	double d;
	cin >> d;

	double ld = int(d);
	auto ans = max(d * sqrt(2.0l), ld + 1.0l);
	cout << fixed << setprecision(20) << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: expected primary-expression before 'long'
   11 | #define int long long
      |             ^~~~
a.cc:22:21: note: in expansion of macro 'int'
   22 |         double ld = int(d);
      |                     ^~~
a.cc:23:28: error: 'sqrt' was not declared in this scope
   23 |         auto ans = max(d * sqrt(2.0l), ld + 1.0l);
      |                            ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <iomanip>

using namespace std;

#define rep(i,n) for(int i = 0;i < n;i++)
#define all(n)	n.begin(),n.end()
#define each(i,n) for(auto &i : n)

const int INF = 1e9;

signed main() {
	double d;
	cin >> d;

	double ld = int(d);
	auto ans = max(d * sqrt(2.0l), ld + 1.0l);
	cout << fixed << setprecision(20) << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:28: error: 'sqrt' was not declared in this scope
   22 |         auto ans = max(d * sqrt(2.0l), ld + 1.0l);
      |                            ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <iomanip>

using namespace std;

#define rep(i,n) for(int i = 0;i < n;i++)
#define all(n)	n.begin(),n.end()
#define each(i,n) for(auto &i : n)

const int INF = 1e9;

signed main() {
	double d;
	cin >> d;

	double ld = int(d);
	double ans = max(d * sqrt(2.0l), ld + 1.0l);
	cout << fixed << setprecision(20) << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:30: error: 'sqrt' was not declared in this scope
   22 |         double ans = max(d * sqrt(2.0l), ld + 1.0l);
      |                              ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <iomanip>
#include <cmath>

using namespace std;

#define int long long
#define rep(i,n) for(int i = 0;i < n;i++)
#define all(n)	n.begin(),n.end()
#define each(i,n) for(auto &i : n)

const int INF = 1e9;

signed main() {
	long double d;
	cin >> d;

	long double ld = int(d);
	auto ans = max(d * sqrt(2.0l), ld + 1.0l);
	cout << fixed << setprecision(20) << ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: expected primary-expression before 'long'
   12 | #define int long long
      |             ^~~~
a.cc:23:26: note: in expansion of macro 'int'
   23 |         long double ld = int(d);
      |                          ^~~
Language: C++

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

typedef long long ll;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define each(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); ++itr)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define fi first
#define se second

int main()
{
    double d;
    cin >>d;

    double ans=sqrt(2)*d;
    for(int y=1; y<=(int)d; ++y)
    {
        double x=sqrt(d*d-y*y);
        if(x<1) ans=max(ans,(double)y+1);
    }

    printf("%.15lf\n", ans);
    return 0;
}
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define each(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); ++itr)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define fi first
#define se second

int main()
{
    double d;
    cin >>d;

    double ans=sqrt(2)*d;
    for(int y=1; y<=(int)d; ++y)
    {
        double x=sqrt(d*d-y*y);
        if(x<1) ans=max(ans,(double)y+1);
    }

    printf("%.15lf\n", ans);
    return 0;
}

Compiler output:
a.cc:38:5: error: redefinition of 'int main()'
   38 | int main()
      |     ^~~~
a.cc:12:5: note: 'int main()' previously defined here
   12 | int main()
      |     ^~~~
Language: C++

#include <stdio.h>
#include <math.h>
main(){float f;scanf("%f", &f);printf("%.11f", max(f*sqrt(2),(int)(f+1));}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){float f;scanf("%f", &f);printf("%.11f", max(f*sqrt(2),(int)(f+1));}
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:48: error: 'max' was not declared in this scope; did you mean 'std::max'?
    3 | main(){float f;scanf("%f", &f);printf("%.11f", max(f*sqrt(2),(int)(f+1));}
      |                                                ^~~
      |                                                std::max
In file included from /usr/include/c++/14/bits/specfun.h:43,
                 from /usr/include/c++/14/cmath:3906,
                 from /usr/include/c++/14/math.h:36,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Language: C++

#include <stdio.h>
#include <math.h>
#include <algorithm>
main(){float f;scanf("%f", &f);printf("%.11f", std::max(f*sqrt(2),(int)(f+1));} 

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){float f;scanf("%f", &f);printf("%.11f", std::max(f*sqrt(2),(int)(f+1));}
      | ^~~~
a.cc: In function 'int main()':
a.cc:4:56: error: no matching function for call to 'max(__gnu_cxx::__enable_if<true, double>::__type, int)'
    4 | main(){float f;scanf("%f", &f);printf("%.11f", std::max(f*sqrt(2),(int)(f+1));}
      |                                                ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/specfun.h:43,
                 from /usr/include/c++/14/cmath:3906,
                 from /usr/include/c++/14/math.h:36,
                 from a.cc:2:
/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:4:56: note:   deduced conflicting types for parameter 'const _Tp' ('double' and 'int')
    4 | main(){float f;scanf("%f", &f);printf("%.11f", std::max(f*sqrt(2),(int)(f+1));}
      |                                                ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/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,
                 from a.cc:3:
/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:4:56: note:   mismatched types 'std::initializer_list<_Tp>' and 'double'
    4 | main(){float f;scanf("%f", &f);printf("%.11f", std::max(f*sqrt(2),(int)(f+1));}
      |                                                ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <stdio.h>
#include <math.h>
#include <algorithm>
main(){float f;scanf("%f", &f);printf("%.11f", std::max(f*sqrt(2),ceil(f));} 

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){float f;scanf("%f", &f);printf("%.11f", std::max(f*sqrt(2),ceil(f));}
      | ^~~~
a.cc: In function 'int main()':
a.cc:4:56: error: no matching function for call to 'max(__gnu_cxx::__enable_if<true, double>::__type, float)'
    4 | main(){float f;scanf("%f", &f);printf("%.11f", std::max(f*sqrt(2),ceil(f));}
      |                                                ~~~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/specfun.h:43,
                 from /usr/include/c++/14/cmath:3906,
                 from /usr/include/c++/14/math.h:36,
                 from a.cc:2:
/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:4:56: note:   deduced conflicting types for parameter 'const _Tp' ('double' and 'float')
    4 | main(){float f;scanf("%f", &f);printf("%.11f", std::max(f*sqrt(2),ceil(f));}
      |                                                ~~~~~~~~^~~~~~~~~~~~~~~~~~~
/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,
                 from a.cc:3:
/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:4:56: note:   mismatched types 'std::initializer_list<_Tp>' and 'double'
    4 | main(){float f;scanf("%f", &f);printf("%.11f", std::max(f*sqrt(2),ceil(f));}
      |                                                ~~~~~~~~^~~~~~~~~~~~~~~~~~~
Language: C++

#include<stdio.h>
#include<math.h>
main(){double d;scanf("%lf",&d);printf("%.11f\n",d>=1?d=std::max(1+(int)d,sqrt(2)*d):sqrt(2)*d);}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){double d;scanf("%lf",&d);printf("%.11f\n",d>=1?d=std::max(1+(int)d,sqrt(2)*d):sqrt(2)*d);}
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:65: error: no matching function for call to 'max(int, __gnu_cxx::__enable_if<true, double>::__type)'
    3 | main(){double d;scanf("%lf",&d);printf("%.11f\n",d>=1?d=std::max(1+(int)d,sqrt(2)*d):sqrt(2)*d);}
      |                                                         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/specfun.h:43,
                 from /usr/include/c++/14/cmath:3906,
                 from /usr/include/c++/14/math.h:36,
                 from a.cc:2:
/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:3:65: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__enable_if<true, double>::__type' {aka 'double'})
    3 | main(){double d;scanf("%lf",&d);printf("%.11f\n",d>=1?d=std::max(1+(int)d,sqrt(2)*d):sqrt(2)*d);}
      |                                                         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/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
Language: C++

#include<stdio.h>
#include<math.h>
#include<algorithm>
main(){double d;scanf("%lf",&d);printf("%.11f\n",d>=1?d=std::max(1+(int)d,sqrt(2)*d):sqrt(2)*d);}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){double d;scanf("%lf",&d);printf("%.11f\n",d>=1?d=std::max(1+(int)d,sqrt(2)*d):sqrt(2)*d);}
      | ^~~~
a.cc: In function 'int main()':
a.cc:4:65: error: no matching function for call to 'max(int, __gnu_cxx::__enable_if<true, double>::__type)'
    4 | main(){double d;scanf("%lf",&d);printf("%.11f\n",d>=1?d=std::max(1+(int)d,sqrt(2)*d):sqrt(2)*d);}
      |                                                         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/specfun.h:43,
                 from /usr/include/c++/14/cmath:3906,
                 from /usr/include/c++/14/math.h:36,
                 from a.cc:2:
/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:4:65: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__enable_if<true, double>::__type' {aka 'double'})
    4 | main(){double d;scanf("%lf",&d);printf("%.11f\n",d>=1?d=std::max(1+(int)d,sqrt(2)*d):sqrt(2)*d);}
      |                                                         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/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,
                 from a.cc:3:
/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:4:65: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    4 | main(){double d;scanf("%lf",&d);printf("%.11f\n",d>=1?d=std::max(1+(int)d,sqrt(2)*d):sqrt(2)*d);}
      |                                                         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
Language: C++

#include <stdio.h>
#include <cmath>
int main()
{
    double d;
    scanf("%lf", &d);
    printf("%.12lf", max((int)d + 1 , d * sqrt(2.0)));
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'max' was not declared in this scope; did you mean 'std::max'?
    7 |     printf("%.12lf", max((int)d + 1 , d * sqrt(2.0)));
      |                      ^~~
      |                      std::max
In file included from /usr/include/c++/14/bits/specfun.h:43,
                 from /usr/include/c++/14/cmath:3906,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Language: C++

#include<iostream>
#include<cmath>
#include<cstdio>

using namespace std;

int main() {
    double d;
    double r = 2 / sqrt(2);
    cin >> d;
    
    int n = int(floor(d));

    double ans;

    cout << n << endl;
    if (n == 0) {
        ans = r * d;
    } else if (d < sqrt(1 + n * n)){
        ans = max(n + 1, r * d);
    } else {
        ans = r * d;
    }

    printf("%.12f\n", ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:18: error: no matching function for call to 'max(int, double)'
   20 |         ans = max(n + 1, r * d);
      |               ~~~^~~~~~~~~~~~~~
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: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:20:18: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'double')
   20 |         ans = max(n + 1, r * d);
      |               ~~~^~~~~~~~~~~~~~
/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
Language: C++

    if( d >= 1.0 && d<=sqrt(2)){
        d = 2.0;
    } else if ( d>=2.0&& d<=2.0*sprt(2)){
        d = 4.0;
    }else{
        d *= sqrt(2);
    }
    cout << setprecision(10) << d << endl;
    return 0;
}



Compiler output:
a.cc:1:5: error: expected unqualified-id before 'if'
    1 |     if( d >= 1.0 && d<=sqrt(2)){
      |     ^~
a.cc:3:7: error: expected unqualified-id before 'else'
    3 |     } else if ( d>=2.0&& d<=2.0*sprt(2)){
      |       ^~~~
a.cc:5:6: error: expected unqualified-id before 'else'
    5 |     }else{
      |      ^~~~
a.cc:8:5: error: 'cout' does not name a type
    8 |     cout << setprecision(10) << d << endl;
      |     ^~~~
a.cc:9:5: error: expected unqualified-id before 'return'
    9 |     return 0;
      |     ^~~~~~
a.cc:10:1: error: expected declaration before '}' token
   10 | }
      | ^
Language: C++

#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <typeinfo>
#include <numeric>
#include <functional>
#include <unordered_map>
#include <bitset>


using namespace std;
using ll = long long;
using ull = unsigned long long;

const ll INF = 1e16;
const ll MOD = 1e9 + 7;

#define REP(i, n) for(int i = 0; i < n; i++)



int main() {
    double d;
    
    scanf("%lf", &d);
    
    int t = d;
    if(d == (double)t){
        printf("%.11lf\n", (double)t + 1.0);
        return 0;
    }
    
    printf("%.11lf\n", max(((double)((int)d + 1)), d * 2.0 / sqrt(2.0));
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:72: error: expected ')' before ';' token
   42 |     printf("%.11lf\n", max(((double)((int)d + 1)), d * 2.0 / sqrt(2.0));
      |           ~                                                            ^
      |                                                                        )
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
    double d;
    cin >> d;
    double ans = max(d * sqrt(2), (int)d + 1.0);
 
    printf("%.12f\n", ans);
}


Compiler output:
a.cc:3:1: error: extended character   is not valid in an identifier
    3 |  
      | ^
a.cc:6:1: error: extended character   is not valid in an identifier
    6 |     double d;
      | ^
a.cc:6:1: error: extended character   is not valid in an identifier
a.cc:6:1: error: extended character   is not valid in an identifier
a.cc:6:1: error: extended character   is not valid in an identifier
a.cc:8:1: error: extended character   is not valid in an identifier
    8 |     double ans = max(d * sqrt(2), (int)d + 1.0);
      | ^
a.cc:8:1: error: extended character   is not valid in an identifier
a.cc:8:1: error: extended character   is not valid in an identifier
a.cc:8:1: error: extended character   is not valid in an identifier
a.cc:9:1: error: extended character   is not valid in an identifier
    9 |  
      | ^
a.cc:10:1: error: extended character   is not valid in an identifier
   10 |     printf("%.12f\n", ans);
      | ^
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:10:1: error: extended character   is not valid in an identifier
a.cc:3:1: error: '\U000000a0' does not name a type
    3 |  
      | ^
Language: C++

#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"

using namespace std;

const long long int MOD = 1000000007;
const long double EPS = 1e-8;

long long int N, M, K, H, W, L, R;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	cout << setprecision(15);
	long double ans = 0;
	long double d;
	cin >> d;
	if (abs(d - round(d)) < EPS) {
		cout << max(d + 1, d*sqrt(long double(2))) << endl;
	}
	else {
		cout << d * sqrt(long double(2)) << endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:43: error: expected primary-expression before 'long'
   35 |                 cout << max(d + 1, d*sqrt(long double(2))) << endl;
      |                                           ^~~~
a.cc:38:34: error: expected primary-expression before 'long'
   38 |                 cout << d * sqrt(long double(2)) << endl;
      |                                  ^~~~
Language: C++

#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"

using namespace std;

const long long int MOD = 1000000007;
const long double EPS = 1e-8;

long long int N, M, K, H, W, L, R;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	cout << setprecision(15);
	long double ans = 0;
	long double d;
	cin >> d;
	cout << max((long double)(int)d + 1, d*sqrt(long double(2))) << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:53: error: expected primary-expression before 'long'
   34 |         cout << max((long double)(int)d + 1, d*sqrt(long double(2))) << endl;
      |                                                     ^~~~
Language: C++

#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"

using namespace std;

const long long int MOD = 1000000007;
const long double EPS = 1e-8;

long long int N, M, K, H, W, L, R;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	cout << setprecision(15);
	long double ans = 0;
	long double d;
	cin >> d;
	cout << max((long double)((int)d + 1), d*sqrt(long double(2))) << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:55: error: expected primary-expression before 'long'
   34 |         cout << max((long double)((int)d + 1), d*sqrt(long double(2))) << endl;
      |                                                       ^~~~
Language: C++

#include <string>
#include <iostream>
#define mod 1000000007
using namespace std;
int n, p[21], c[50][21], dp[50][51][21]; string s[50];
int solve(int l, int r, int k) {
	if(r - l == 1) return p[c[l][k]];
	if(dp[l][r][k]) return dp[l][r][k] - 1;
	int dp2[51][27] = {0}; dp2[l][0] = 1;
	for(int a = l + 1; a <= r; a++) {
		for(int b = 1; b <= 26; b++) {
			for(int c = a - 1; c >= l; c--) {
				if((s[c][k] != '?' && s[c][k] != b + 96) || (c + 1 != a && s[c].size() == k + 1)) break;
				int res = solve(c, a, k + 1), r = 1;
				for(int d = b - 1; d >= 0; d--) r = (r + dp2[c][d]) % mod;
				dp2[a][b] += (dp[a][b] + 1LL * res * r) % mod;
			}
		}
	}
	int ret = 0;
	for(int i = 1; i <= 26; i++) ret += dp2[r][i];
	dp[l][r][k] = ret + 1;
	return ret;
}
int main() {
	cin >> n; p[0] = 1;
	for(int i = 1; i <= 20; i++) p[i] = 1LL * p[i - 1] * 26 % mod;
	for(int i = 0; i < n; i++) {
		cin >> s[i];
		for(int j = s[i].size() - 1; j >= 0; j--) c[i][j] = c[i][j + 1] + (s[i][j] == '?' ? 1 : 0);
	}
	printf("%d\n", solve(0, n, 0));
}

Compiler output:
a.cc: In function 'int solve(int, int, int)':
a.cc:16:73: error: invalid operands of types 'int*' and 'int' to binary 'operator%'
   16 |                                 dp2[a][b] += (dp[a][b] + 1LL * res * r) % mod;
      |                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      |                                                        |
      |                                                        int*
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007LL
typedef long long ll;

int n;
ll dp[21][51][51][28];
string str[51];

ll solve(int v,int f,int t,int lb){
	if(dp[v][f][t][lb]!=-1)return dp[v][f][t][lb];
	if(f==t)return 1;
	if(str[f].size()==v){
		if(lb==0){
			return solve(v,f+1,t,lb+1);
		}
		else return 0;
	}
	for(int i=f+1;i<t;i++){
		if(str[i].size()==v)return 0;
	}
	ll ans=0;
	for(int i=max(lb,1);i<27;i++){
		for(int j=f;j<t;j++){
			if(str[k][v]!='?' && (str[k][v]-'a')!=(i-1))break;
			ans+=solve(v+1,f,j+1,0)*solve(v,j+1,t,i+1)%MOD;
			ans%=MOD;
		}
	}
	dp[v][f][t][lb]=ans;
	return ans;
}

int main(void){
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		cin >> str[i];
	}
	memset(dp,-1,sizeof(dp));
	printf("%lld\n",solve(0,0,n,0));
	return 0;
}

Compiler output:
a.cc: In function 'll solve(int, int, int, int)':
a.cc:25:32: error: 'k' was not declared in this scope
   25 |                         if(str[k][v]!='?' && (str[k][v]-'a')!=(i-1))break;
      |                                ^
Language: C++

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

ll n,a;
ll sum=0;
vector<int> t;

ll calc(ll a){
  return a*(a-1)/2;
}

int main(){
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>a;
    sum+=calc(a);
    if(a>2)t.push_back(a);
  }
  sort(t.begin(),t.end());
  priority_queue<ll> Q;
  ll ans=0;
  for(int i=0;i<(int)t.size();i++){
    ll cnt=max(0LL,(ll)t[i]-Q.size());
    ans+=cnt;
    vector<ll> u;
    for(int j=0;j<t[i]-cnt;j++){
      u.push_back(Q.top());
      Q.pop();
    }
    for(int j=0;j<t[i]-cnt;j++){
      u[j]--;
      if(u[j]>0)Q.push(u[j]);
    }
    Q.push(cnt);
  }

  while(calc(ans)<sum)ans++;
  cout<<max(1LL,ans)<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:15: error: no matching function for call to 'max(long long int, long long unsigned int)'
   24 |     ll cnt=max(0LL,(ll)t[i]-Q.size());
      |            ~~~^~~~~~~~~~~~~~~~~~~~~~~
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:24:15: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'long long unsigned int')
   24 |     ll cnt=max(0LL,(ll)t[i]-Q.size());
      |            ~~~^~~~~~~~~~~~~~~~~~~~~~~
/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:24:15: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   24 |     ll cnt=max(0LL,(ll)t[i]-Q.size());
      |            ~~~^~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
long long a[5],sum,n,p,i,b[4]={0,0,1,3};main(){std::cin>>n;for(i=0;i<n;i++){cin>>a[i];sum+=a[i];}sort(a,a+n);if(n<4){p=b[n];}if(n==4){if(sum<9){p=4;}else if(a[0]<3){p=5;}else{p=6;}}if(n==5){if(sum<12){p=6;}else if(a[1]<3){p=7;}else if(a[0]<3||a[3]<4){p=8;}else if(a[0]<4){p=9;}else{p=10;}}printf("%d\n",sum-p);}

Compiler output:
a.cc:2:41: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | long long a[5],sum,n,p,i,b[4]={0,0,1,3};main(){std::cin>>n;for(i=0;i<n;i++){cin>>a[i];sum+=a[i];}sort(a,a+n);if(n<4){p=b[n];}if(n==4){if(sum<9){p=4;}else if(a[0]<3){p=5;}else{p=6;}}if(n==5){if(sum<12){p=6;}else if(a[1]<3){p=7;}else if(a[0]<3||a[3]<4){p=8;}else if(a[0]<4){p=9;}else{p=10;}}printf("%d\n",sum-p);}
      |                                         ^~~~
a.cc: In function 'int main()':
a.cc:2:77: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    2 | long long a[5],sum,n,p,i,b[4]={0,0,1,3};main(){std::cin>>n;for(i=0;i<n;i++){cin>>a[i];sum+=a[i];}sort(a,a+n);if(n<4){p=b[n];}if(n==4){if(sum<9){p=4;}else if(a[0]<3){p=5;}else{p=6;}}if(n==5){if(sum<12){p=6;}else if(a[1]<3){p=7;}else if(a[0]<3||a[3]<4){p=8;}else if(a[0]<4){p=9;}else{p=10;}}printf("%d\n",sum-p);}
      |                                                                             ^~~
      |                                                                             std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:2:98: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
    2 | long long a[5],sum,n,p,i,b[4]={0,0,1,3};main(){std::cin>>n;for(i=0;i<n;i++){cin>>a[i];sum+=a[i];}sort(a,a+n);if(n<4){p=b[n];}if(n==4){if(sum<9){p=4;}else if(a[0]<3){p=5;}else{p=6;}}if(n==5){if(sum<12){p=6;}else if(a[1]<3){p=7;}else if(a[0]<3||a[3]<4){p=8;}else if(a[0]<4){p=9;}else{p=10;}}printf("%d\n",sum-p);}
      |                                                                                                  ^~~~
      |                                                                                                  std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
int n,a[5],ans,p;
main(){
  cin>>n;
  for(int i=0;i<n;i++)cin>>a[i],ans+=a[i];
  sort(a,a+n,greater<int>());
  if(n==1)cout<<ans<<endl;
  else if(n==2)cout<<ans-1<<endl;
  else if(n==3)cout<<ans-3<<endl;
  else if(n==4){
    if(a[0]==2)cout<<ans-4<<endl;
    else if(a[3]==2)cout<<ans-5<<endl;
    else cout<<ans-6<<endl;
  }
  else{
    if(a[0]<=3){
      if(ans<12)cout<<ans-6<<endl;
      else if(ans<14)cout<<ans-7<<endl;
      else cout<<ans-8<<endl;
    }
    else{
      if(a[3]==2)cout<<ans-7<<endl;
      else if(ans<=20)cout<<ans-8<<endl;
      else cout<<ans-6-min(a[4],4)<<endl;
    }
  }
}

Compiler output:
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:26:27: error: no matching function for call to 'min(long long int&, int)'
   26 |       else cout<<ans-6-min(a[4],4)<<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: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:26:27: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   26 |       else cout<<ans-6-min(a[4],4)<<endl;
      |                        ~~~^~~~~~~~
/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:26:27: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   26 |       else cout<<ans-6-min(a[4],4)<<endl;
      |                        ~~~^~~~~~~~
Language: C++

//2632.Dense Amidakuji.
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

#define MAX_N 300000
#define INF 1145141919

int h, w, k, x, y;

vector<int>pos[MAX_N * 2], neg[MAX_N * 2];//-_,/

int amidakuji(int p) {
	int H = 1, W = p;
	while (H <= h) {
		//(H+W)%2==0-->pos.
		if ((H + W) % 2 == 0) {
			if (W == w) {
				H++;
				goto F;
			}
			int q = INF;
			for (int j = 0; j < pos[MAX_N + H - W].size(); j++) {
				if (pos[MAX_N + H - W][j] >= H) {
					q = min(q, pos[MAX_N + H - W][j]);
				}
			}
			if (q == INF) {
				H += (w - W) + 1;
				W = w;
			}
			else {
				W += (q - H);
				H = q + 1;
			}
			if (H > h + 1) {
				W -= (H - h) - 2;
			}
		F:;
		}
		//(H+W)%2==1-->neg.
		else {
			if (W == 1) {
				H++;
				goto G;
			}
			int q = INF;
			for (int j = 0; j < neg[H + W].size(); j++) {
				if (neg[H + W][j] >= H) {
					q = min(q, neg[H + W][j]);
				}
			}
			if (q == INF) {
				H += (W - 1) + 1;
				W = 1;
			}
			else {
				W -= (q - H);
				H = q + 1;
			}
			if (H > h + 1) {
				W += (H - h) - 2;
			}
		G:;
		}
	}
	return W;
}

int main() {
	cin >> h >> w >> k;
	for (int i = 0; i < k; i++) {
		cin >> x >> y;
		pos[MAX_N + x - y].push_back(x);
		neg[x + y + 1].push_back(x);
	}
	for (int i = 1; i <= w; i++) {
		cout << amidakuji(i) << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int amidakuji(int)':
a.cc:40:17: error: jump to label 'F'
   40 |                 F:;
      |                 ^
a.cc:21:38: note:   from here
   21 |                                 goto F;
      |                                      ^
a.cc:23:29: note:   crosses initialization of 'int q'
   23 |                         int q = INF;
      |                             ^
a.cc:65:17: error: jump to label 'G'
   65 |                 G:;
      |                 ^
a.cc:46:38: note:   from here
   46 |                                 goto G;
      |                                      ^
a.cc:48:29: note:   crosses initialization of 'int q'
   48 |                         int q = INF;
      |                             ^
Language: C++

#include <cmath>
#include <vector>
#include <iostream>
#include <algorithm>

#pragma warning(disable : 4996)

#define PI 3.1415926535897932384626433832795L

using namespace std;

int N, X, Y;

bool check(vector<long double> x, vector<long double> y)
{
	// Translation.

	for (int i = 1; i < N; i++)
	{
		x[i] -= x[0];
		y[i] -= y[0];
	}

	x[0] = 0.0L;
	y[0] = 0.0L;

	
	// Query.

	for (int i = 0; i < N - 1; i++)
	{
		// Rotate.

		long double ang = PI / 2.0L - atan2l(y[i + 1], x[i + 1);

		for (int j = 0; j < N; j++)
		{
			if (i != j)
			{
				long double angl = atan2l(y[j], x[j]) + ang;
				long double radi = sqrtl(x[j] * x[j] + y[j] * y[j]);

				x[j] = radi * cosl(angl);
				y[j] = radi * sinl(angl);
			}
		}


		// Translation.

		for (int j = 0; j < N; j++)
		{
			if (i + 1 != j)
			{
				x[j] -= x[i + 1];
				y[j] -= y[i + 1];
			}

			x[i + 1] = 0;
			y[i + 1] = 0;
		}


		// Check.

		for (int j = i + 2; j < N; j++)
		{
			if (y[j] < 0)
			{
				return false;
			}
		}
	}

	return true;
}

int main()
{
	scanf("%d", &N);

	vector<long double> x;
	vector<long double> y;

	for (int i = 0; i < N; i++)
	{
		scanf("%d", &X);
		scanf("%d", &Y);

		x.push_back(X);
		y.push_back(Y);
	}

	if (check(x, y))
	{
		printf("Possible\n");
	}
	else
	{
		reverse(x.begin(), x.end());
		reverse(y.begin(), y.end());

		if (check(x, y))
		{
			printf("Possible\n");
		}
		else
		{
			printf("Impossible\n");
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'bool check(std::vector<long double>, std::vector<long double>)':
a.cc:34:71: error: expected ']' before ')' token
   34 |                 long double ang = PI / 2.0L - atan2l(y[i + 1], x[i + 1);
      |                                                                       ^
      |                                                                       ]
Language: C++

#include <cmath>
#include <vector>
#include <iostream>
#include <algorithm>
 
#define PI 3.1415926535897932384626433832795L
 
using namespace std;
 
int N, X, Y;
 
vector<long double> x;
vector<long double> y;
 
int main()
{
    scanf("%d", &N);
 
    for (int i = 0; i < N; i++)
    {
        scanf("%d", &X);
        scanf("%d", &Y);
 
        x.push_back(X);
        y.push_back(Y);
    }
 
    bool ok = true;
 
    for (int i = 0; i < N - 1; i++)
    {
        // Translation.
 
        for (int j = 0; j < N; j++)
        {
            if (i != j)
            {
                x[j] -= x[i];
                y[j] -= y[i];
            }
        }
 
        x[i] = 0;
        y[i] = 0;
 
        // Rotate.
 
        long double ang = PI - atan2l(y[i + 1], x[i + 1]);
 
        for (int j = 0; j < N; j++)
        {
            if (i != j)
            {
                long double ang2 = atan2l(y[j], x[j]) + ang;
                long double radi = sqrtl(x[j] * x[j] + y[j] * y[j]);
 
                x[j] = radi * cosl(ang2);
                y[j] = radi * sinl(ang2);
            }
        }
        
        long double maxc = -999.0L, minc = 999.0;
 
        for(int j = i + 1; j < n; j++)
        {
            long double ang2 = atan2l(y[j], x[j]);
            
            maxc = max(maxc, ang2);
            minc = min(minc, ang2);
        }
        
        long double ang = -atan2l(y[i + 1], x[i + 1]);
 
        for (int j = 0; j < N; j++)
        {
            if (i != j)
            {
                long double ang2 = atan2l(y[j], x[j]) + ang;
                long double radi = sqrtl(x[j] * x[j] + y[j] * y[j]);
 
                x[j] = radi * cosl(ang2);
                y[j] = radi * sinl(ang2);
            }
        }
        
        long double maxd = -999.0L, mind = 999.0;
 
        for(int j = 0; j < i; j++)
        {
            long double ang2 = atan2l(y[j], x[j]);
            
            maxd = max(maxc, ang2);
            mind = min(minc, ang2);
        }
        
        mind += PI;
        maxd += PI;
        
        if(maxc - minc > PI || maxd - mind > PI) ok = false;
    }
 
    printf("%s\n", ok ? "Possible" : "Impossible");
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:64:32: error: 'n' was not declared in this scope
   64 |         for(int j = i + 1; j < n; j++)
      |                                ^
a.cc:72:21: error: redeclaration of 'long double ang'
   72 |         long double ang = -atan2l(y[i + 1], x[i + 1]);
      |                     ^~~
a.cc:48:21: note: 'long double ang' previously declared here
   48 |         long double ang = PI - atan2l(y[i + 1], x[i + 1]);
      |                     ^~~
Language: C++

#include <cmath>
#include <vector>
#include <iostream>
#include <algorithm>
 
#define PI 3.1415926535897932384626433832795L
 
using namespace std;
 
int N, X, Y;
 
vector<long double> x;
vector<long double> y;
 
int main()
{
    scanf("%d", &N);
 
    for (int i = 0; i < N; i++)
    {
        scanf("%d", &X);
        scanf("%d", &Y);
 
        x.push_back(X);
        y.push_back(Y);
    }
 
    bool ok = true;
 
    for (int i = 0; i < N - 1; i++)
    {
        // Translation.
 
        for (int j = 0; j < N; j++)
        {
            if (i != j)
            {
                x[j] -= x[i];
                y[j] -= y[i];
            }
        }
 
        x[i] = 0;
        y[i] = 0;
 
        // Rotate.
 
        long double ang = PI - atan2l(y[i + 1], x[i + 1]);
 
        for (int j = 0; j < N; j++)
        {
            if (i != j)
            {
                long double ang2 = atan2l(y[j], x[j]) + ang;
                long double radi = sqrtl(x[j] * x[j] + y[j] * y[j]);
 
                x[j] = radi * cosl(ang2);
                y[j] = radi * sinl(ang2);
            }
        }
        
        long double maxc = -999.0L, minc = 999.0;
 
        for(int j = i + 1; j < n; j++)
        {
            long double ang2 = atan2l(y[j], x[j]);
            
            maxc = max(maxc, ang2);
            minc = min(minc, ang2);
        }
        
        ang = -atan2l(y[i + 1], x[i + 1]);
 
        for (int j = 0; j < N; j++)
        {
            if (i != j)
            {
                long double ang2 = atan2l(y[j], x[j]) + ang;
                long double radi = sqrtl(x[j] * x[j] + y[j] * y[j]);
 
                x[j] = radi * cosl(ang2);
                y[j] = radi * sinl(ang2);
            }
        }
        
        long double maxd = -999.0L, mind = 999.0;
 
        for(int j = 0; j < i; j++)
        {
            long double ang2 = atan2l(y[j], x[j]);
            
            maxd = max(maxc, ang2);
            mind = min(minc, ang2);
        }
        
        mind += PI;
        maxd += PI;
        
        if(maxc - minc > PI || maxd - mind > PI) ok = false;
    }
 
    printf("%s\n", ok ? "Possible" : "Impossible");
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:64:32: error: 'n' was not declared in this scope
   64 |         for(int j = i + 1; j < n; j++)
      |                                ^
Language: C++

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

const double EPS = 1e-12;

bool lt(double a, double b){
  return a < b - EPS;
}
bool mdeq(double a, double b){
  return abs(a - b) < EPS;
}

void moveToO(int target, vector<complex<double>>& pts){
  complex<double> amount = pts[target];
  for(complex<double>& p: pts){
    p = p - amount;
  }
}

void rotate(int target, vector<complex<double>>& pts){
  double amount;
  {
    //complex<double> right(1.0, 0.0);
    assert(mdeq(0, pts.at(target).real()));
    assert(mdeq(0, pts.at(target).imag()));

    complex<double> b(pts.at(target+1) - pts.at(target));
    amount = M_PI/2.0 - atan2(b.imag(), b.real());
  }
  
  for(complex<double>& p: pts){
    p = complex<double>(p.real()*cos(amount) - p.imag()*sin(amount),
			p.real()*sin(amount) + p.imag()*cos(amount));
  }
}

bool check(int target, vector<complex<double>>& pts){
  
  for(int i = 0; i < target; i++){
    complex<double> p = pts[i];
    //if(!(p.imag() <= 0)){
    if(lt(0.0, p.imag())){
      return false;
    }
  }

  for(size_t i = target + 1; i < pts.size(); i++){
    complex<double> p = pts[i];
    //if(!(p.imag() >= 0)){
    if(lt(p.imag(), 0.0)){
      //      cout << 0.0 << " " << p.imag() << "JJJ" << endl;
      return false;
    }
  }
  return true;
}

void print(const vector<complex<double>>& pts){
  for(complex<double> p: pts){
    cout << p.real() << " " << p.imag() << endl;
  }
  cout << "===";
  cout << endl;
}

int main(void){
  int n; cin >> n;
  vector<complex<double>> pts(n);
  for(int i = 0; i < n; i++){
    int x, y; cin >> x >> y;
    //pts[i].real(x);
    //pts[i].imag(y);
    pts[i] = complex<double>(x, y);
  }
  
  moveToO(0, pts);


  for(int i = 0; i < n-1; i++){
    rotate(i, pts);
    if(check(i, pts) == false){
      cout << "Impossible" << endl;
      return 0;
    }

    print(pts);

    moveToO(i+1, pts);
    print(pts);
    if(check(i+1, pts) == false){
      cout << "Impossible" << endl;
      return 0;
    }
  }
  cout << "Possible" << endl;
  return 0;
}
C++


Compiler output:
a.cc:98:1: error: 'C' does not name a type
   98 | C++
      | ^
Language: Java

import java.util.Scanner;

public class Problem2639 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);		
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int t = 0;

		if (a + b == 60) {
			System.out.println(-1);
			return;
		}
		
		for (;;) {
			int w1 = t;
			int w2 = t + a;
			int r = t / 60;
			int arrive = 60 * r + c;
			
			if (w1 <= arrive && arrive <= w2) {
				System.out.println(arrive);
				break;
			}

			t += a + b;
		}
	}
}

Compiler output:
Main.java:3: error: class Problem2639 is public, should be declared in a file named Problem2639.java
public class Problem2639 {
       ^
1 error