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

#include <bits/stdc++.h>
#define int long long
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
#define INF LLONG_MAX
#define eps LDBL_EPSILON
#define moder 1000000007
#define pie 3.141592653589793238462643383279
#define P std::pair<int,int>
#define prique priority_queue
using namespace std;
int n,a;
set<int> st;
signed main(){
	cin>>n;
	int ans=0;
	rep(i,n){
		cin>>a;
		if(a>=3200)ans++;
		else st.insert(a/400);
	}
	cout<<max(1,st.size())<<" "<<st.size()+ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:18: error: no matching function for call to 'max(int, std::set<long long int>::size_type)'
   22 |         cout<<max(1,st.size())<<" "<<st.size()+ans<<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:22:18: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::set<long long int>::size_type' {aka 'long unsigned int'})
   22 |         cout<<max(1,st.size())<<" "<<st.size()+ans<<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:22:18: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   22 |         cout<<max(1,st.size())<<" "<<st.size()+ans<<endl;
      |               ~~~^~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <cmath>
#include <cstdlib>
#include <queue>
#include <stack>
#include <iomanip>


using namespace std;

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define REPO(i, n) for(int i = 1;i <= n;i++)
#define ll long long
#define INF 1999999999
#define MINF -1999999999
#define INF64 1999999999999999999
#define ALL(n) n.begin(),n.end()
#define MOD 1000000007

ll n, s[8], ya = 0, ans = 0;
int main() {
	cin >> n;
	REP(i, n) {
		ll a; cin >> a;
		if (a >= 3200)ya++;
		else s[a / 400]++;
	}
	REP(i, 8) if (s[i] > 0)ans++;
	cout << max(ans,1) << " " << ans + ya<< endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:20: error: no matching function for call to 'max(long long int&, int)'
   38 |         cout << max(ans,1) << " " << ans + ya<< endl;
      |                 ~~~^~~~~~~
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:38:20: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   38 |         cout << max(ans,1) << " " << ans + ya<< 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,
                 from a.cc:4:
/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:38:20: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   38 |         cout << max(ans,1) << " " << ans + ya<< endl;
      |                 ~~~^~~~~~~
Language: C++

// https://atcoder.jp/contests/

#include <bits/stdc++.h>
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define REPR(i, n) for (int(i) = (n); (i) >= 0; (i)--)
#define FOR(i, m, n) for (int(i) = (m); (i) < (n); i++)
#define INF 1e9
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;

ll N, a, mc;
set<ll> c;

int main()
{
  cin >> N;
  REP(i, N)
  {
    cin >> a;
    if (3200 <= a)
      mc++;
    else
      c.insert((ll)(a / 400));
  }

  cout << c.size() << " " << min(8ll, c.size() + mc) << '\n';

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:33: error: no matching function for call to 'min(long long int, long long unsigned int)'
   28 |   cout << c.size() << " " << min(8ll, c.size() + mc) << '\n';
      |                              ~~~^~~~~~~~~~~~~~~~~~~~
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:3:
/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:28:33: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'long long unsigned int')
   28 |   cout << c.size() << " " << min(8ll, c.size() + mc) << '\n';
      |                              ~~~^~~~~~~~~~~~~~~~~~~~
/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:28:33: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   28 |   cout << c.size() << " " << min(8ll, c.size() + mc) << '\n';
      |                              ~~~^~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;
void f(int c[],int r) {
	if (r < 400) c[0]++;
	else if (r < 800) c[1]++;
	else if (r < 1200) c[2]++;
	else if (r < 1600) c[3]++;
	else if (r < 2000) c[4]++;
	else if (r < 2400) c[5]++;
	else if (r < 2800) c[6]++;
	else if (r < 3200) c[7]++;
	else c[8]++;
}
int main() {
	int n, c[9],r[101];
	cin >> n;
	for (int i = 0; i < 9; i++) {
		c[i] = 0;
	}
	for (int i = 0; i < n; i++) {
		cin >> r[i];
		f(c, r[i]);
	}
	int min, max;
	min = 0; max = 0;
	for (int i = 0; i < 8; i++) {
		if (c[i] != 0) min++;
	}
	max = min + c[8];
	cout << min << ' ' << max << endl;
	return 0;
}​

Compiler output:
a.cc:32:2: error: '\U0000200b' does not name a type
   32 | }​
      |
Language: C++

#include <iostream>
using namespace std;
void f(int c[],int r) {
	if (r < 400) c[0]++;
	else if (r < 800) c[1]++;
	else if (r < 1200) c[2]++;
	else if (r < 1600) c[3]++;
	else if (r < 2000) c[4]++;
	else if (r < 2400) c[5]++;
	else if (r < 2800) c[6]++;
	else if (r < 3200) c[7]++;
	else c[8]++;
}
int main() {
	int n, c[9],r[101];
	cin >> n;
	for (int i = 0; i < 9; i++) {
		c[i] = 0;
	}
	for (int i = 0; i < n; i++) {
		cin >> r[i];
		f(c, r[i]);
	}
	int min, max;
	min = 0; max = 0;
	for (int i = 0; i < 8; i++) {
		if (c[i] != 0) min++;
	}
	max = min + c[8];
	cout << min << ' ' << max << endl;
	return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:31:18: error: expected '}' at end of input
   31 |         return 0;
      |                  ^
a.cc:14:12: note: to match this '{'
   14 | int main() {
      |            ^
Language: C++

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

   typedef long long ll;
   typedef pair<ll, ll> Pii;
   typedef vector<ll> Vi;
   typedef vector<Vi> VVi;

   const double EPS = (1e-7);
   const ll INF =(1e13);
   const double PI = (acos(-1));
   const ll MOD = ll(1e9) + 7;

   #define REP(i, n) for(ll i = 0; i < (ll)(n); i++)
   #define REPR(i, n) for(ll i = n; i > -1; i--)
   #define FOR(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
   #define ALL(x) (x).begin(),(x).end()
   #define SORT(x) sort((x).begin(), (x).end())
   #define RSORT(x) sort((x).rbegin(), (x).rend())
   #define REVERSE(x) reverse((x).begin(), (x).end())
   #define SZ(x) ((ll)(x).size())
   #define pb push_back
   #define mp make_pair

   //chmax(a, b): a>bならaをbで更新　更新したときにtrueを返す
   //chmin(a, b): a<bならaをbで更新　更新したときにtrueを返す
   template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
   template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

   #define dump(x) cerr<< #x << "= " << (x) << endl;

   ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
   ll pow(ll a, ll b){if (b == 0) return 1; else if (b % 2 == 0) return pow(a * a, b / 2); else return pow(a * a, b / 2) * a;}
   ll pow(ll a, ll b, ll m){if (b == 0) return 1; else if (b % 2 == 0) return (pow(a * a, b / 2, m) % m); else return (pow(a * a, b / 2) * a) % m;}
   ll residue(ll a, ll m){return ((a % m) + m) % m;};

   ll dx[4]={1,0,-1,0};
   ll dy[4]={0,1,0,-1};

ll N;
set<ll> s;
int main(){
  cin >> N;
  ll temp = 0;
  REP(i, N){
    ll a; cin >> a;
    if(a < 3200) s.insert(a / 400);
    else temp++;
  }
  printf("%lld %lld\n", s.size(), min(8ll, (ll)(s.size()) + temp);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:50:66: error: expected ')' before ';' token
   50 |   printf("%lld %lld\n", s.size(), min(8ll, (ll)(s.size()) + temp);
      |         ~                                                        ^
      |                                                                  )
Language: C++

#include <bits/stdc++.h> 
 
#define INF (1<<31) - 1 //INT_MAX/2
#define MOD 1000000007
#define PI  acos(-1)

using ll  = long long;
using ull = unsigned long long;
using P = std::pair<int, int>;

int main(int argc, char *argv[])
{
    int N;
    std::cin >> N;

    std::vector<int> a(N);
    for (int i = 0; i < N; i++) {
        std::cin >> a[i];
    }

    int max = 0;
    int min = 0;

    std::set<int> s;

    int cnt = 0;
    for (int i = 0; i < N; i++) {
        int temp = 0;
        if (a[i] < 400) {
            temp = 1;
        } else if (a[i] < 800) {
            temp = 2;
        } else if (a[i] < 1200) {
            temp = 3;
        } else if (a[i] < 1600) {
            temp = 4;
        } else if (a[i] < 2000) {
            temp = 5;
        } else if (a[i] < 2400) {
            temp = 6;
        } else if (a[i] < 2800) {
            temp = 7;
        } else if (a[i] < 3200) {
            temp = 8;
        } else {
            cnt++;
            continue;
        }
        s.insert(temp);
    }

    flag = true;
    for (int i = 0; i < N; i++) {
        if (a[i] < 3200) {
            break;
        }
        if (i == N-1) {
            flag = false;
        }
    }

    if (flag) {
        min = s.size();
        max = s.size() + cnt;
    } else {
        min = 1;
        max = cnt;
    }

    std::cout << min << " " << max << std::endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:52:5: error: 'flag' was not declared in this scope
   52 |     flag = true;
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
const int INF = 1e9;
const ll LINF = 1e18;
const int MOD = 1e9 + 7;
using namespace std;

int main() {
  int n;
  cin >> n;
  vector<bool> color(8, );
  int pro = 0;
  for (int i = 0; i < n; i++) {
    int a = 0;
    cin >> a;
    if (a >= 3200)
      pro++;
    else {
      for (int j = 0; j < 8; j++) {
        if (400 * j <= a && a < 400 * (j + 1)) color[j] = true;
      }
    }
  }
  int rateColor = 0;
  for (int i = 0; i < 8; i++)
    if (color[i] == true) rateColor++;
  cout << (pro == n ? 1 : rateColor) << " " << rateColor + pro << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: expected primary-expression before ')' token
   11 |   vector<bool> color(8, );
      |                         ^
Language: C

#include <stdio.h>
int main (){
int k=0,o=0,sum=0,a[8]=0,yo=0,max=0,min=10;
  scanf ("%d",&k);
  for (int i=0;i<k;i++){
    scanf ("%d",&o);
    for (int j=0;j<8;j++){
  if (400*j<=o<400*(j+1)){
    if(a[j]==0){
    a[j]=1;
    }
    }
  else{
  yo=yo+1;
  }
    }
  }
 for (int l=0;l<k;l++){
 sum=sum+a[l];
 }
 max=sum+yo;
  min=sum;
  if(max>8){
 max=8; 
 }
  printf ("%d%d",min,max);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:3:24: error: invalid initializer
    3 | int k=0,o=0,sum=0,a[8]=0,yo=0,max=0,min=10;
      |                        ^
Language: C

#include <stdio.h>
int main (){
int k,o,sum=0,a[8],yo=0,max=0,min=10;
  scanf ("%d",&k);
  for (int i=0;i<k;i++){
    scanf ("%d",&o);
    for (int j=0;j<8;j++){
  if (400*j<=o<400*(j+1)){
    if(a[j]==0){
    a[j]=1;
    }
    }
  else{
  yo=yo+1;
  }
    }
  }
 for (int l=0;l<k;l++){
 sum=sum+a[l];
 }
 max=sum+yo;
  min=sum;
  if(max>8){
 max=8; 
 }
  printf ("%d%d",min,max)
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:26:26: error: expected ';' before 'return'
   26 |   printf ("%d%d",min,max)
      |                          ^
      |                          ;
   27 | return 0;
      | ~~~~~~
Language: C

#include <stdio.h>
int main (){
int k,o,sum=0,a[8],yo=0,max=0,min=10;
  scanf ("%d",&k);
  for (int i=0;i<k;i++){
    scanf ("%d",&o);
    for (int j=0;j<8;j++){
  if (400*j=<o<400*(j+1)){
    if(a[j]==0){
    a[j]=1;
    }
    }
  else{
  yo=yo+1;
  }
    }
  }
 for (int l=0;l<k;l++){
 sum=sum+a[l];
 }
 max=sum+yo;
  min=sum;
  if(max>8){
 max=8; 
 }
  printf ("%d%d",min,max)
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:13: error: expected expression before '<' token
    8 |   if (400*j=<o<400*(j+1)){
      |             ^
main.c:26:26: error: expected ';' before 'return'
   26 |   printf ("%d%d",min,max)
      |                          ^
      |                          ;
   27 | return 0;
      | ~~~~~~
Language: C++

#ifdef LOCAL
#include <cstdio>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cstring>
#else
#include <bits/stdc++.h>
#endif
using namespace std ;

typedef long long ll ;
#define rep(i , n ) for ( int i =0; i < n ; i++)
#define _sort(arg) sort(begin(arg), end(arg))
#define MOD 1000000007
#define pb push_back
#define DEBUG(x) cout << #x << ": " << x << endl;

/*
__attribute__((constructor))
void initial()
{
	cin.tie(NULL);
	ios::sync_with_stdio(false);
}
*/
int check(int x)
{
	if ((x >= 1) && (x <= 399))
	{
		return 0;
	}
	if ((x >= 400) && (x <= 799))
	{
		return 1;
	}
	if ((x >= 800) && (x <= 1199))
	{
		return 2;
	}
	if ((x >= 1200) && (x <= 1599))
	{
		return 3;
	}
	if ((x >= 1600) && (x <= 1999))
	{
		return 4;
	}
	if ((x >= 2000) && (x <= 2399))
	{
		return 5;
	}
	if ((x >= 2400) && (x <= 2799))
	{
		return 6;
	}
	if ((x >= 2800) && (x <= 3199))
	{
		return 7;
	}

	return 8;

}

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

	int N;
	
	cin >> N;

	int a[9];
	memset(a, 0, sizeof(a));

	rep(i, N)
	{
		int tmp;
		cin >> tmp;
		//int ret = check(tmp);
		a[check(tmp)]++;
	}

	int min = 0; int max = 0;

	rep(i, 9)
	{
		if ((a[i] > 0) && (i < 8))
		{
			min++;
			max++;
		}
		if (i == 8)
		{
			max += a[8];
		}
	}
	min = max(1, min);

	cout << min << " " << max << endl;
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:100:18: error: 'max' cannot be used as a function
  100 |         min = max(1, min);
      |               ~~~^~~~~~~~
Language: C++

#include "bits/stdc++.h"

using namespace std;

void solve()
{
	bitset<8> distribution;
	int N;
	cin >> N;
	int a = 0;
	while (N--)
	{
		int d;
		cin >> d;
		if (d >= 3200)
		{
			a++;
		}
		else distribution[d/400] = 1;
	}

	int ans = distribution.count;

	cout << ans << ' ' << ans+a << endl;

}

int main()
{
	solve();
	//cout << "yui(*-v・)yui" << endl;
	return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:22:32: error: cannot convert 'std::bitset<8>::count' from type 'std::size_t (std::bitset<8>::)() const noexcept' {aka 'long unsigned int (std::bitset<8>::)() const noexcept'} to type 'int'
   22 |         int ans = distribution.count;
      |                                ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
const int INF=1<<30,MOD=1000000007;
const ll LINF=1ll<<60;
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) _repi(i,0,n)
#define _repi(i,a,b) for(int i=a,i##_l=(b);i<i##_l;++i)
#define REP(...) _overload3(__VA_ARGS__,_repi,_rep,)(__VA_ARGS__)
#define REPR(i,n) for(int i=n-1;i>=0;--i)
#define REPARR(i,v) for(int i=0;i<v.size();++i)
#define all(v) (v).begin(),(v).end()
#define uniq(v) sort(all(v));v.erase(unique(all(v)),v.end())
#define bit(n) (1ll<<(n))
template<class T>bool chmax(T&a,const T&b){if(a<b){a=b;return true;}return false;}
template<class T>bool chmin(T&a,const T&b){if(a>b){a=b;return true;}return false;}
#define YES(n) cout<<((n)?"YES":"NO")<<endl
#define Yes(n) cout<<((n)?"Yes":"No")<<endl
#define yes(n) cout<<((n)?"yes":"no")<<endl
#define poss(n) cout<<((n)?"":"im")<<"possible"<<endl
#define Poss(n) cout<<((n)?"P":"Imp")<<"ossible"<<endl
template<typename T>ostream&operator<<(ostream&o,const vector<T>&v){for(T i:v)o<<i<<' ';return o;}
template<typename T>istream&operator>>(istream&i,vector<T>&v){for(T&j:v)i>>j;return i;}
template<typename T>ostream&operator<<(ostream&o,const set<T>&v){for(T i:v)o<<i<<' ';return o;}
template<typename T,typename U>ostream&operator<<(ostream&o,const pair<T,U>&v){o<<v.first<<' '<<v.second;return o;}

int main(){
        vi c(9);
    cin>>n;
    REP(i,n){
        int a;
        cin>>a;
        c[min(8,a/400)]++;
    }
    int ans=0;
    REP(i,7)ans+=!!c[i];
    cout<<ans+!!c[8]<<endl;
    cout<<ans+c[8]<<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:10: error: 'n' was not declared in this scope
   35 |     cin>>n;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    vi c(9);
    cin>>n;
    REP(i,n){
        int a;
        cin>>a;
        c[min(8,a/400)]++;
    }
    int ans=0;
    REP(i,7)ans+=!!c[i];
    cout<<ans+!!c[8]<<endl;
    cout<<ans+c[8]<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'vi' was not declared in this scope
    4 |     vi c(9);
      |     ^~
a.cc:5:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 |     cin>>n;
      |          ^
      |          yn
a.cc:6:9: error: 'i' was not declared in this scope
    6 |     REP(i,n){
      |         ^
a.cc:6:5: error: 'REP' was not declared in this scope
    6 |     REP(i,n){
      |     ^~~
a.cc:13:17: error: 'c' was not declared in this scope
   13 |     cout<<ans+!!c[8]<<endl;
      |                 ^
Language: C++

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

int main(){
    int_fast64_t N;
    scanf("%lld", &N);
    set<int_fast64_t> s;
    int_fast64_t ans(0);
    for(int_fast64_t i = 0, a; i < N; ++i){
        scanf("%lld", &a);
        if(a > 3199){
            ++ans;
        }else{
            s.insert(a / 400);
        }
    }
    cout << max(1LL, s.size()) << " " << ans + s.size() << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: no matching function for call to 'max(long long int, std::set<long int>::size_type)'
   17 |     cout << max(1LL, s.size()) << " " << ans + s.size() << 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:17:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'std::set<long int>::size_type' {aka 'long unsigned int'})
   17 |     cout << max(1LL, s.size()) << " " << ans + s.size() << 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:17:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   17 |     cout << max(1LL, s.size()) << " " << ans + s.size() << endl;
      |             ~~~^~~~~~~~~~~~~~~
Language: C++

//#include <bits/stdc++.h>
//#include <stdio.h>
#include<iostream>
#include<cstdio>
#include<bitset>
#include<algorithm>
#include<vector>
#include<list>
#include<queue>
#include<stack>
//#include <bits/stdc++.h>
#include<string>
#include<string.h>
#include<cmath>
#include<utility>
#include<functional>
#include<map>
#include<set>
#include<cctype>
#include<fstream>
#include <numeric>
#include <iomanip>
#include <cstring> 
using namespace std;
using ll=long long;

#define FOR(i, a, b) for( int i=(a);i<=(b);i++)
#define RFOR(i, a, b) for( int i=(a);i>=(b);i--)
#define LFOR(i, a, b) for( long long int i=(a);i<=(b);i++)
#define LRFOR(i, a, b) for(long long int i=(a);i>=(b);i--)
#define MOD 1000000007


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

 
bool isPrimeNum( ll x ){ // 素数である場合 true を返す
  if( x <= 1 ){ // 1以下である場合は素数でないことがすぐにわかる
    return false;
  }
  // sqrt( double型 ) は引数の平方根を double型で返すので、int型でキャスト
  int n = (int)sqrt( (double)x );
  for( int i = 2; i <= n; i++ ){
    if( x % i == 0 ){ // 割り切る整数がある場合、即判定終了
      return false;
    }
  }
  return true; // 割り切る整数がない場合、素数である
}

constexpr ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
constexpr ll lcm(int a,int b){return a*b/gcd(a,b);}
constexpr ll abs(ll a,ll b){
if(a>=b)return a-b;
if(a<b)return b-a;
}
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
 

 
int main() {
    ll N,K;
    cin >> N;
    ll a[N];
    ll ans=0;
    ll sum=0;
    FOR(i,0,N-1){
      cin>>a[i];
    }
    ll c1=0;
    ll c2=0;
    ll c3=0;
    ll c4=0;
    ll c5=0;
    ll c6=0;
    ll c7=0;
    ll c8=0;
    ll c9=0;
    FOR(i,0,N-1){
      if(a[i]<400){
        c1=1;
      }else if(a[i]<=800){
        c2=1;
      }else if(a[i]<=1200){
        c3=1;
      }else if(a[i]<=1600){
        c4=1;
      }else if(a[i]<=2000){
        c5=1;
      }else if(a[i]<=2400){
        c6=1;
      }else if(a[i]<=2800){
        c7=1;
      }else if(a[i]<=3200){
        c9=1;
      }else{
        c8++;
      }
    }



    ans=c1+c2+c3+c4+c5+c6+c7+c8+c9S;



  cout<<ans<<endl;

  return 0;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:107:33: error: 'c9S' was not declared in this scope; did you mean 'c9'?
  107 |     ans=c1+c2+c3+c4+c5+c6+c7+c8+c9S;
      |                                 ^~~
      |                                 c9
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,c=0;
  cin>>n;
  int a[9]={};
  for(int i=0;i<n;i++){
    int b;
    cin>>b;
    if(b<400)
      a[0]++;
    else if(b<800)
      a[1]++;
    else if(b<1200)
      a[2]++;
    else if(b<1600)
      a[3]++;
    else if(b<2000)
      a[4]++;
    else if(b<2400)
      a[5]++;
    else if(b<2800)
      a[6]++;
    else if(b<3200)
      a[7]++;
    else
      a[8]++;
    if(b<3200)
      c++;
  }
  if(c==0){
    cout<<"1 "<<b;
  }else{
    c=0;
    for(int i=0;i<8;i++){
      if(a[i]>0)
        c++;
    }
    cout<<c<<" "<<c+a[8];
  }
}

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

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

int main(){
  int n,fr = 0;
  cin >> n;
  int a[n];
  for(int i = 0;i < n;i++){
    cin >> a[i];
    if(a[i] >= 3200){
      fr++;
    }
  }
  int color = 0;
  for(int i = 0;i < 2801;i += 400){
    for(int j = 0;j < n;j++){
      if(a[j] < i + 400 && i <= a[j]){
        color++;
        break;
      }
    }
  }
  int mi = color,fr,ma = color+fr;
  if(color != 0){
    cout << mi << " " << ma << endl;
  }
  else{
    cout << 1 << " " << ma << endl;
  }
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:18: error: redeclaration of 'int fr'
   23 |   int mi = color,fr,ma = color+fr;
      |                  ^~
a.cc:5:9: note: 'int fr' previously declared here
    5 |   int n,fr = 0;
      |         ^~
a.cc: At global scope:
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include <vector>
#include <algorithm>
#include <map>
using namespace std;
int main(void){
    int N;
    cin>>N;
    int a[N],b[9];
    for(int i=0;i<N;i++){
        cin>>a[i];
    }
    for(int i=0;i<10;i++){
        b[i]=0;
    }
    for(int i=0;i<N;i++){
        if(a[i]<400) b[0]++;
        if(400<=a[i]&&a[i]<800) b[1]++;
        if(800<=a[i]&&a[i]<1200) b[2]++;
        if(1200<=a[i]&&a[i]<1600) b[3]++;
        if(1600<=a[i]&&a[i]<2000) b[4]++;
        if(2000<=a[i]&&a[i]<2400) b[5]++;
        if(2400<=a[i]&&a[i]<2800) b[6]++;
        if(2800<=a[i]&&a[i]<3200) b[7]++;
        if(3200<=a[i]) b[8]++;
    }
    int sum=0;
    for(int i=0;i<=7;i++){
        if(b[i]!=0) sum++;
    }
    if(sum!=0) {cout<<sum<<' '<<sum+b[8];}
    else {cout<<1<<' '<<b[8];}
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin>>N;
      |     ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include <map>
  +++ |+#include <iostream>
    4 | using namespace std;
a.cc:30:17: error: 'cout' was not declared in this scope
   30 |     if(sum!=0) {cout<<sum<<' '<<sum+b[8];}
      |                 ^~~~
a.cc:30:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:31:11: error: 'cout' was not declared in this scope
   31 |     else {cout<<1<<' '<<b[8];}
      |           ^~~~
a.cc:31:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <bits/stdc++.h>

using namespace std;

signed main()
{
    long long i = 0, j = 0, k = 0, ans = 0;
    long long n, a[200], color[9]={0};
    cin >> n;
    for (i=0; i < n;i++){
        cin >> a[i];
        if(a[i]<3200)
            color[a[i] / 400]++;
        else
            color[8]++;
    }

    for (i = 0; i < 8;i++){
        if(color[i]>0)
            ans++;
    }
    cout << max(1,ans) << " ";
    ans += color[8];
    if(ans>=8)
        ans = 8;

    cout << ans << endl;

    return 0;
}  


Compiler output:
a.cc: In function 'int main()':
a.cc:22:16: error: no matching function for call to 'max(int, long long int&)'
   22 |     cout << max(1,ans) << " ";
      |             ~~~^~~~~~~
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:22:16: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   22 |     cout << max(1,ans) << " ";
      |             ~~~^~~~~~~
/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:22:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   22 |     cout << max(1,ans) << " ";
      |             ~~~^~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<map>
#include<numeric>
#include<set>
#include<string>
#include<utility>
#include<vector>

#define rep(i, a, n)  for(int i=a; i<n; i++)
#define per(i, a, n)  for(int i=n-1; i>=a; i--)
#define all(x)  (x).begin(), (x).end()
#define MAX 10000
using namespace std;
typedef long long int ll;

int main(){
  int n;  cin >> n;
  map<string, int> mp;
  int other = 0;
  int minAns, maxAns;
  vector<int> rate(100);
  rep(i, 0, n){
    cin >> rate[i];
    if(1 <= rate[i] and rate[i] <= 399){
      mp["灰色"]++;
    }
    else if(400 <= rate[i] and rate[i] <= 799){
      mp["茶色"]++;
    }
    else if(800 <= rate[i] and rate[i] <= 1199){
      mp["緑色"]++;
    }
    else if(1200 <= rate[i] and rate[i] <= 1599){
      mp["水色"]++;
    }
    else if(1600 <= rate[i] and rate[i] <= 1999){
      mp["青色"]++;
    }
    else if(2000 <= rate[i] and rate[i] <= 2399){
      mp["黄色"]++;
    }
    else if(2400 <= rate[i] and rate[i] <= 2799){
      mp["橙色"]++;
    }
    else if(2800 <= rate[i] and rate[i] <= 3199){
      mp["赤色"]++;
    }
    else{
      other++;
    }
  }
  if(mp.size() == 0) {
    minAns = 1;
    maxAns = other;
  else {
    minAns = mp.size();
    maxAns = minAns + other;
  }
  
  cout << minAns << " " << maxAns << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:57:3: error: expected '}' before 'else'
   57 |   else {
      |   ^~~~
a.cc:54:22: note: to match this '{'
   54 |   if(mp.size() == 0) {
      |                      ^
Language: Java

import java.util.*;
class Main
{
    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[9];
        for(int i = 0; i < n; i++){
            int k = sc.nextInt() / 400;
            if(k > 8) k = 8;
            a[k]++;
        }
        int ans1 = 0;
        for(int i = 0; i < 8; i++)
            if(a[i] > 0) ans1++;
        int ans2;
        if(ans1 == 0){
            ans1 = 1;
            ans2 = Math.min(9, a[8]);
        }else
            ans2 = Math.min(9, ans1 + a[8]);
        System.out.print(ans1 + " " + ans2);
    }
}  }
}

Compiler output:
Main.java:25: error: class, interface, enum, or record expected
}  }
   ^
1 error
Language: C++

#include<iostream>
using namespace std;
int main() {
	int N;
	int a[110];
	int b[9];
	for (int i = 0; i < 9; ++i) {
		b[i] = 0;
	}
	cin >> N;
	for (int i = 0; i < N; ++i) {
		cin >> a[i];
		for (int j = 0; j < 8; ++j) {
			if (j * 400 <= a[i] && a[i] < (j + 1) * 400)
				b[j]++;
		}
		if (3200 <= a[i])
			b[8]++;
	}
	int mn = 0, int mx = 0;
	for (int j = 0; j < 8; ++j) {
		if (b[j] > 0) {
			mn++;
			mx++;
		}
	}
	if (mn == 0)mn++;
	if (b[8] > 0)mx += b[8];
	cout << mn << " " << mx;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:21: error: expected unqualified-id before 'int'
   20 |         int mn = 0, int mx = 0;
      |                     ^~~
a.cc:24:25: error: 'mx' was not declared in this scope; did you mean 'mn'?
   24 |                         mx++;
      |                         ^~
      |                         mn
a.cc:28:22: error: 'mx' was not declared in this scope; did you mean 'mn'?
   28 |         if (b[8] > 0)mx += b[8];
      |                      ^~
      |                      mn
a.cc:29:30: error: 'mx' was not declared in this scope; did you mean 'mn'?
   29 |         cout << mn << " " << mx;
      |                              ^~
      |                              mn
Language: C++

#include<bits/stdc++.h>

using namespace std;

typedef long long int llint;
typedef pair<int, int> pii;
typedef pair<llint, llint> pll;
typedef vector<int> vi;
typedef vector<llint> vli;
typedef vector<pii> vpii;
typedef vector<pll> vpll;

#define I cin
#define O cout
#define EN endl
#define ln cout<<endl
#define pb(a) push_back(a)
#define x first
#define y second
#define MOD 1000000007

template<typename Tn> Tn gcd(Tn a, Tn b)
{
  return (b ? gcd(b, a % b) : a);
}

template<typename Tn> Tn lcm(Tn a, Tn b)
{
  return a / gcd(a, b) * b;
}

llint cnt = 0;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};

int main()
{
  int n;
  I >> n;

  int a[10] = {};
  for(int i = 0; i < n; i++) {
    int m;
    I >> m;
    a[min(m / 400, 8)]++;
  }

  for(int i = 0; i < 8; i++) if(a[i]) cnt++;

  O << max(cnt, 1) << ' ' << min((int)cnt + a[8], 8) << EN;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:50:11: error: no matching function for call to 'max(llint&, int)'
   50 |   O << max(cnt, 1) << ' ' << min((int)cnt + a[8], 8) << EN;
      |        ~~~^~~~~~~~
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:50:11: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   50 |   O << max(cnt, 1) << ' ' << min((int)cnt + a[8], 8) << EN;
      |        ~~~^~~~~~~~
/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:50:11: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   50 |   O << max(cnt, 1) << ' ' << min((int)cnt + a[8], 8) << EN;
      |        ~~~^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  int pro = 0;
  int num[N];
  int p[8] = {0,0,0,0,0,0,0,0}
  for(int i = 0;i<N;i++){
    cin >> num[i];
    for(int k = 0;k<8;k++){
      if(k*400 <= num[i] < (k+1)*400){
        p[k]++;
      }
      if(p[i]>=3200){
        pro++;
      }
    }
  }
  int ans = 0;
  for(int i = 0;i<8;i++){
    if(p[k] != 0){
      ans++;
    }
  }
  int ansmax = 0;
  ansmax = max(8,ans+pro);
  cout << ans << " " << ansmax << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'for'
    9 |   for(int i = 0;i<N;i++){
      |   ^~~
a.cc:9:17: error: 'i' was not declared in this scope
    9 |   for(int i = 0;i<N;i++){
      |                 ^
a.cc:22:10: error: 'k' was not declared in this scope
   22 |     if(p[k] != 0){
      |          ^
Language: C++

#include <bits.stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  int pro = 0;
  int num[N];
  int p[8] = {0,0,0,0,0,0,0,0}
  for(int i = 0;i<N;i++){
    cin >> num[i];
    for(int k = 0;k<8;k++){
      if(k*400 <= num[i] < (k+1)*400){
        p[k]++;
      }
      if(p[i]>=3200){
        pro++;
      }
    }
  }
  int ans = 0;
  for(int i = 0;i<8;i++){
    if(p[k] != 0){
      ans++;
    }
  }
  int ansmax = 0;
  ansmax = max(8,ans+pro);
  cout << ans << " " << ansmax << endl;
}

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

//15:32
#include <stdio.h>
#include <string.h>
#include <algorithm>

typedef long long ll;
ll max(ll a, ll b){return(a>b)?a:b;}
ll min(ll a, ll b){return(a<b)?a:b;}
ll abs(ll a){return(a<0)?-a:a;}

ll gcd(ll a, ll b){
        if(b > a){
                ll tmp = b;
                b = a;
                a = tmp;
        }
        if(b == 0) return a;
        else return gcd(b, a%b);
}
ll lcm(ll a, ll b){
        ll gcdi = gcd(a,b);
        return a/gcdi*(b);
}

#define MOD (1000000000+7)
int main(){
        int N;
        scanf("%d",&N);

        char cnt[8];
        memset(cnt,0,sizeof(cnt));
        int score;
        int cnt32 = 0;

        for(int i = 0; i < N; i++){
                scanf("%d",&score);
                if(score >= 3200) cnt32++;
                else cnt[score/400] = 1;
        }
        int total = 0;
        for(int i = 0; i < 8; i++){
                total += cnt[i];
        }
        if(total == 0){
                printf("%d %d\n", 1, cnt32);
        }else{
                printf("%d %d\n", total, total+cnt32);
        }
}
~

Compiler output:
a.cc:50:2: error: expected class-name at end of input
   50 | ~
      |  ^
Language: C++

#include<bits/stdc++.h>

int res;
int a[10];

int main()
{
    int n;
    scanf("%d",&n);
    for(int i=1;i<=n;i++)
    {
        int t;
        scanf("%d",&t);
        a[min(t/400,8)]++;
    }
    for(int i=0;i<8;i++) res+=(bool)a[i];
    if(!res&&a[9])
    {
        printf("1 %d\n",a[9]);
    }
    else
    {
        printf("%d %d\n",res,min(res+a[9],8));
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: 'min' was not declared in this scope; did you mean 'std::min'?
   14 |         a[min(t/400,8)]++;
      |           ^~~
      |           std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:23:30: error: 'min' was not declared in this scope; did you mean 'std::min'?
   23 |         printf("%d %d\n",res,min(res+a[9],8));
      |                              ^~~
      |                              std::min
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: Java

import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] a = new int[N];
        for(int i=0;i<N;i++) a[i]=sc.nextInt();
        int[] rec = new int[9];
        for(int i=0;i<N;i++){
            if(a[i]>=3200) rec[8]++;
            else rec[a[i]/400]++;
        }
        int ans1 = 0;
        for(int i=0;i<=7;i++){
            if(rec[i]>0) ans1++;
        }
        int ans2 = ans1+rec[8];
        system.out.print(ans1);
        System.out.print(" ");
        System.out.print(ans2);
    }
}
 

Compiler output:
Main.java:19: error: package system does not exist
        system.out.print(ans1);
              ^
1 error
Language: C++

#include <stdio.h>
int main(void)
{
	int n,a[101],i,b[10]={0,0,0,0,0,0,0,0,0},c=0;
	scanf("%d",&n);
	for(i=0; i<n; i++){
		scanf("%d",&a[i]);
		if(a[i]<=399){
			b[0]=b[0]+1;
		}else if(a[i]>=400 && a[i]<=799){
			b[1]=b[1]+1;
		}else if(a[i]>=800 && a[i]<=1199){
			b[2]=b[2]+1;
		}else if(a[i]>=1200 && a[i]<=1599){
			b[3]=b[3]+1;
		}else if(a[i]>=1600 && a[i]<=1999){
			b[4]=b[4]+1;
		}else if(a[i]>=2000 && a[i]<=2399){
			b[5]=b[5]+1;
		}else if(a[i]>=2400 && a[i]<=2799){
			b[6]=b[6]+1;
		}else if(a[i]>=2800 && a[i]<=3199){
			b[7]=b[7]+1;
		else if(a[i]>=3200){
			b[8]=b[8]+1;
		}
	}
	if(b[0]!=0){
		c=c+1;
	}else if(b[1]!=0){
		c=c+1;
	}else if(b[2]!=0){
		c=c+1;
	}else if(b[3]!=0){
		c=c+1;
	}else if(b[4]!=0){
		c=c+1;
	}else if(b[5]!=0){
		c=c+1;
	}else if(b[6]!=0){
		c=c+1;
	}else if(b[7]!=0){
		c=c+1;
	}
	printf("%d %d\n",c,c+b[8]);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:17: error: expected '}' before 'else'
   24 |                 else if(a[i]>=3200){
      |                 ^~~~
a.cc:22:51: note: to match this '{'
   22 |                 }else if(a[i]>=2800 && a[i]<=3199){
      |                                                   ^
Language: C++

#include <stdio.h>
int main(void)
{
	int n,a[101],i,b[10]={0,0,0,0,0,0,0,0,0},c=0;
	scanf("%d",&n);
	for(i=0; i<n; i++){
		scanf("%d",&a[i]);
		if(a[i]<=399){
			b[0]=b[0]+1;
		}else if(a[i]>=400 && a[i]<=799){
			b[1]=b[1]+1;
		}elseif(a[i]>=800 && a[i]<=1199){
			b[2]=b[2]+1;
		}else if(a[i]>=1200 && a[i]<=1599){
			b[3]=b[3]+1;
		}else if(a[i]>=1600 && a[i]<=1999){
			b[4]=b[4]+1;
		}else if(a[i]>=2000 && a[i]<=2399){
			b[5]=b[5]+1;
		}else if(a[i]>=2400 && a[i]<=2799){
			b[6]=b[6]+1;
		}else if(a[i]>=2800 && a[i]<=3199){
			b[7]=b[7]+1;
		else if(a[i]>=3200){
			b[8]=b[8]+1;
		}
	}
	if(b[0]!=0){
		c=c+1;
	}else if(b[1]!=0){
		c=c+1;
	}else if(b[2]!=0){
		c=c+1;
	}else if(b[3]!=0){
		c=c+1;
	}else if(b[4]!=0){
		c=c+1;
	}else if(b[5]!=0){
		c=c+1;
	}else if(b[6]!=0){
		c=c+1;
	}else if(b[7]!=0){
		c=c+1;
	}
	printf("%d %d\n",c,c+b[8]);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: 'elseif' was not declared in this scope
   12 |                 }elseif(a[i]>=800 && a[i]<=1199){
      |                  ^~~~~~
a.cc:14:18: error: 'else' without a previous 'if'
   14 |                 }else if(a[i]>=1200 && a[i]<=1599){
      |                  ^~~~
a.cc:24:17: error: expected '}' before 'else'
   24 |                 else if(a[i]>=3200){
      |                 ^~~~
a.cc:22:51: note: to match this '{'
   22 |                 }else if(a[i]>=2800 && a[i]<=3199){
      |                                                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  vector<int> a(N);
  for(int i=0;i<N;i++){
    cin >> a.at(i);
  }
  int k,b,c,d,e,f,g,h,j;
  k=0; b=0; c=0; d=0; e=0; f=0; g=0; h=0; j=0;
  for(int i=0;i<N;i++){
    if(a.at(i)<=399){k++;}
    if(400<=a.at(i) && a.at(i)<=799){b++}
    if(800<=a.at(i) && a.at(i)<=1199){c++}
    if(1200<=a.at(i) && a.at(i)<=1599){d++}
    if(1600<=a.at(i) && a.at(i)<=1999){e++}
    if(2000<=a.at(i) && a.at(i)<=2399){f++}
    if(2400<=a.at(i) && a.at(i)<=2799){g++}
    if(2800<=a.at(i) && a.at(i)<=3199){h++}
    if(3200<=a.at(i)){j++}
  }
  int A=0;
  if(k!=0){A++;}
  if(b!=0){A++;}
  if(c!=0){A++;}
  if(d!=0){A++;}
  if(e!=0){A++;}
  if(f!=0){A++;}
  if(g!=0){A++;}
  if(h!=0){A++;}
  cout << A << " ";
  if(j+A<=8){cout << j+A << endl;}
  else{cout << 8 << endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:41: error: expected ';' before '}' token
   15 |     if(400<=a.at(i) && a.at(i)<=799){b++}
      |                                         ^
      |                                         ;
a.cc:16:42: error: expected ';' before '}' token
   16 |     if(800<=a.at(i) && a.at(i)<=1199){c++}
      |                                          ^
      |                                          ;
a.cc:17:43: error: expected ';' before '}' token
   17 |     if(1200<=a.at(i) && a.at(i)<=1599){d++}
      |                                           ^
      |                                           ;
a.cc:18:43: error: expected ';' before '}' token
   18 |     if(1600<=a.at(i) && a.at(i)<=1999){e++}
      |                                           ^
      |                                           ;
a.cc:19:43: error: expected ';' before '}' token
   19 |     if(2000<=a.at(i) && a.at(i)<=2399){f++}
      |                                           ^
      |                                           ;
a.cc:20:43: error: expected ';' before '}' token
   20 |     if(2400<=a.at(i) && a.at(i)<=2799){g++}
      |                                           ^
      |                                           ;
a.cc:21:43: error: expected ';' before '}' token
   21 |     if(2800<=a.at(i) && a.at(i)<=3199){h++}
      |                                           ^
      |                                           ;
a.cc:22:26: error: expected ';' before '}' token
   22 |     if(3200<=a.at(i)){j++}
      |                          ^
      |                          ;