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

#include<map>
#include<cstdio>
#include<cstring>
#include<utility>
#include<algorithm>
#define r first
#define l second.first
#define id second.second
typedef std::pair<int,std::pair<int,int> > Q;
const int N=50001;
int n;
class FenwickTree {
	   int val[N];
        int lowbit(const int x) {
            return x&-x;
        }
         FenwickTree() {
            memset(val,0,sizeof val);
        }
        void modify(int p,const int x) {
            while(p<=n) {
                val[p]+=x;
                p+=lowbit(p);
            }
        }
        int query(int p) {
            int ans=0;
            while(p) {
                ans+=val[p];
                p-=lowbit(p);
            }
            return ans;
        }
};
FenwickTree tree;
int main() {
    scanf("%d",&n);
    int a[n+1];
    for(int i=1;i<=n;i++) {
        scanf("%d",&a[i]);
    }
    int m;
    scanf("%d",&m);
    Q q[m];
    for(int i=0;i<m;i++) {
        scanf("%d%d",&q[i].l,&q[i].r);
        q[i].id=i;
    }
    std::sort(&q[0],&q[m]);
    int p=1;
    std::map<int,int> last;
    int ans[m];
    for(int i=0;i<m;i++) {
        while(p<=q[i].r) {
            if(last[a[p]]) tree.modify(last[a[p]],-1);
            tree.modify(last[a[p]]=p,1);
            p++;
        }
        ans[q[i].id]=tree.query(q[i].r)-tree.query(q[i].l-1);
    }
    for(int i=0;i<m;i++) printf("%d\n",ans[i]);
    return 0;
}

Compiler output:
a.cc:35:13: error: 'FenwickTree::FenwickTree()' is private within this context
   35 | FenwickTree tree;
      |             ^~~~
a.cc:17:10: note: declared private here
   17 |          FenwickTree() {
      |          ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:55:39: error: 'void FenwickTree::modify(int, int)' is private within this context
   55 |             if(last[a[p]]) tree.modify(last[a[p]],-1);
      |                            ~~~~~~~~~~~^~~~~~~~~~~~~~~
a.cc:20:14: note: declared private here
   20 |         void modify(int p,const int x) {
      |              ^~~~~~
a.cc:56:24: error: 'void FenwickTree::modify(int, int)' is private within this context
   56 |             tree.modify(last[a[p]]=p,1);
      |             ~~~~~~~~~~~^~~~~~~~~~~~~~~~
a.cc:20:14: note: declared private here
   20 |         void modify(int p,const int x) {
      |              ^~~~~~
a.cc:59:32: error: 'int FenwickTree::query(int)' is private within this context
   59 |         ans[q[i].id]=tree.query(q[i].r)-tree.query(q[i].l-1);
      |                      ~~~~~~~~~~^~~~~~~~
a.cc:26:13: note: declared private here
   26 |         int query(int p) {
      |             ^~~~~
a.cc:59:51: error: 'int FenwickTree::query(int)' is private within this context
   59 |         ans[q[i].id]=tree.query(q[i].r)-tree.query(q[i].l-1);
      |                                         ~~~~~~~~~~^~~~~~~~~~
a.cc:26:13: note: declared private here
   26 |         int query(int p) {
      |             ^~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
    int n;
    int q;
    cin>>n; cin>>q;
    int arr[n];
    for(int i=0;i<n;i++){
        int a; cin>>a;
        arr[i]=a;
    }
    while(q--){
        pair<int int> p;
        int l,r;
        cin>>l; cin>>r;
        if(l==r){cout<<1<<endl;}
        
        unordered_set<int> s; 
        int res = 0;
        for(int i=l-1; i<r;i++){
            if (s.find(arr[i]) == s.end()) { 
            s.insert(arr[i]); 
            res++; 
            } 
            
        }
        cout<<res<<endl;
        
        
        
    }
    
	// your code goes here
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: two or more data types in declaration of 'type name'
   14 |         pair<int int> p;
      |              ^~~
a.cc:14:21: error: wrong number of template arguments (1, should be 2)
   14 |         pair<int int> p;
      |                     ^
In file included from /usr/include/c++/14/string:48,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:3013:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
 3013 |     struct pair;
      |            ^~~~
a.cc:19:9: error: 'unordered_set' was not declared in this scope
   19 |         unordered_set<int> s;
      |         ^~~~~~~~~~~~~
a.cc:2:1: note: 'std::unordered_set' is defined in header '<unordered_set>'; this is probably fixable by adding '#include <unordered_set>'
    1 | #include <iostream>
  +++ |+#include <unordered_set>
    2 | using namespace std;
a.cc:19:23: error: expected primary-expression before 'int'
   19 |         unordered_set<int> s;
      |                       ^~~
a.cc:22:17: error: 's' was not declared in this scope
   22 |             if (s.find(arr[i]) == s.end()) {
      |                 ^
Language: C++

/*
--------------              |   /
      |                     |  /
      |                     | /
      |             *       |/          |    |         ------            *
      |                     |           |    |        /      \
      |             |       |\          |    |       |       |\          |
   \  |             |       | \         |    |       |       | \         |
    \ |             |       |  \        |    |        \     /   \        |
     V              |       |   \        \__/|         -----     \       |
*/
#include <bits/stdc++.h>
using namespace std;

#define EmiliaMyWife ios::sync_with_stdio(0); cin.tie(NULL);
#define mem(i,j) memset(i,j,sizeof (i));
#define F first
#define S second
#define lowbit(x) ((x)&(-(x)))
#define siz(v) (int)(v).size()
typedef int64_t ll;
typedef uint64_t ull;
typedef long double ld;
const double EPS  = 1e-8;
const int INF     = 0x3F3F3F3F;
const ll LINF     = 4611686018427387903;
const int MOD     = 1e9+7;
/*-----------------------------------------------------------------------------------------------------*/

const int N = 5e5+5;
int arr[N], cnt[N];
int ans;
struct query {
	int i, l, r, b;
};
query que[N];

void add(int p) {
	cnt[arr[p]]++;
	if(cnt[arr[p]] == 1)
		ans++;
}
void rem(int p) {
	cnt[arr[p]]--;
	if(!cnt[arr[p]])
		ans--;
}

signed main() {
	EmiliaMyWife

	int n, q;
	cin >> n >> q;
	for(int i = 0; i < n; i++)
		cin >> arr[i];
	int w = sqrt(n)+1;
	for(int i = 0; i < q; i++)
		cin >> que[i].l >> que[i].r, que[i].l--, que[i].i = i, que[i].b = que[i].l/w;
	sort(que.begin(), que.end(), [](query a, query b) {
		return (a.b==b.b?a.r<b.r:a.b<b.b);
	});
	vector<int> vans(q);
	for(int i = 0, l = 0, r = 0; i < q; i++) {
		while(r < que[i].r)
			add(r++);
		while(l > que[i].l)
			add(--l);
		while(r > que[i].r)
			rem(--r);
		while(l < que[i].l)
			rem(l++);
		//cerr << l << ' ' <<r << '\n';
		vans[que[i].i] = ans;
	}
	for(auto &a : vans)
		cout << a << '\n';

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:59:18: error: request for member 'begin' in 'que', which is of non-class type 'query [500005]'
   59 |         sort(que.begin(), que.end(), [](query a, query b) {
      |                  ^~~~~
a.cc:59:31: error: request for member 'end' in 'que', which is of non-class type 'query [500005]'
   59 |         sort(que.begin(), que.end(), [](query a, query b) {
      |                               ^~~
Language: C++

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

typedef long long i64;
typedef pair<int, int> ii;
typedef pair<i64, i64> ll;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
typedef vector<vi> vvi;

#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ms(a, x) memset(a, x, sizeof(a))
#define len(x) (x).size()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

const double eps = 1e-9;
const double pi = acos(-1.0);
const int inf = 1e9;
const int mod = 1e9+7;

const int maxn = 5e5+10;

vi m(vi &a, vi &b) {
	vi ans;
	a.eb(inf); b.eb(inf);
	int i1 = 0, i2 = 0;
	while (i1 < a.size() or i2 < b.size()) {
		if (a[i1] == inf and b[i2] == inf) break;
		else if (a[i1] == inf and b[i2] != inf) {
			ans.eb(b[i2++]);
		} else if (a[i1] != inf and b[i2] == inf) {
			ans.eb(a[i1++]);
		} else {
			if (ans.empty()) {
				if (a[i1] <= b[i2]) {
					ans.eb(a[i1++]);
				} else {
					ans.eb(b[i2++]);
				}
			} else {
				if (a[i1] == ans.back() and b[i2] == ans.back()) {
					i1++; i2++;
				} else if (a[i1] == ans.back() and b[i2] != ans.back()) {
					ans.eb(b[i2++]); i1++;
				} else if (a[i1] != ans.back() and b[i2] == ans.back()) {
					ans.eb(a[i1++]); i2++;
				} else {
					if (a[i1] <= b[i2]) {
						ans.eb(a[i1++]);
					} else {
						ans.eb(b[i2++]);
					}
				}
			}
		}
	}
	return ans;
}

struct Seg3{

	struct Node {
		vi vec;
		Node(int val) {
			vec.eb(val);
		}
		Node () {}
	};

	#define L(x) (x<<1)	
	#define R(x) (L(x)+1)

	Node join(const Node& a, const Node& b) {
		Node ans;
		ans.vec = m(a.vec, b.vec);
		return ans;
	}

	Node tree[4*maxn];
	Node neutral;

	void build(int node, int l, int r, vector<int> &v) {
		if (l == r) {
			tree[node] = Node(v[l]);
			return;
		}
		int mid = (l+r)/2;
		build(L(node), l, mid, v);
		build(R(node), mid+1, r, v);
		tree[node] = join(tree[L(node)], tree[R(node)]);
	}

	Node query(int node, int l, int r, int ql, int qr) {
		if (r < l or qr < l or r < ql) return neutral;
		if (ql <= l and r <= qr) return tree[node];
		int mid = (l+r)/2;
		return join(query(L(node), l, mid, ql, qr), 
					query(R(node), mid+1, r, ql, qr));
	}

};

int n, q, l, r;
vector<int> v;
Seg3 st;

int main() {
    fastIO();
    cin >> n >> q;
    v.resize(n+1);
    for (int i = 1; i <= n; ++i) {
    	cin >> v[i];
    }
    st.build(1, 1, n, v);
    while (q--) {
    	cin >> l >> r;
    	cout << st.query(1, 1, n, l, r).vec.size() << '\n';
    }
    return 0;
}



Compiler output:
a.cc: In member function 'Seg3::Node Seg3::join(const Node&, const Node&)':
a.cc:81:31: error: binding reference of type 'vi&' {aka 'std::vector<int>&'} to 'const vi' {aka 'const std::vector<int>'} discards qualifiers
   81 |                 ans.vec = m(a.vec, b.vec);
      |                             ~~^~~
a.cc:29:10: note:   initializing argument 1 of 'vi m(vi&, vi&)'
   29 | vi m(vi &a, vi &b) {
      |      ~~~~^
Language: C++

#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define baap_coder17 ios_base::sync_with_stdio(false); cin.tie(NULL);
#define   lli long long int
using namespace std;
set<lli> seg[5000000];
void build(int l,int r,int ind,lli arr[])
{
    if(l==r)
    {
        seg[ind].insert(arr[l]);
        return;
    }
    int mid=(l+r)/2;
    build(l, mid, 2*ind+1, arr);
    build(mid+1, r, 2*ind+2, arr);
    seg[ind].insert(all(seg[2*ind+1]));
    seg[ind].insert(all(seg[2*ind+2]));
}
set<lli> qry(int l,int r,int ql,int qr,int ind)
{
    set<lli> left,right,result;
    if(r<ql || l>qr)
        return result;
    if(l>=ql and r<=qr)
        return seg[ind];
    int mid=(l+r)/2;
    left=qry(l, mid, ql, qr, 2*ind+1);
    result.insert(all(left));
    right=qry(mid+1, r, ql, qr, 2*ind+2);
    result.insert(all(right));
    return result;
}
void qry(int ql,int qr,int n)
{
    set<lli> st=qry(0, n-1, ql, qr, 0);
    cout<<st.size()<<endl;
}


int main()
{
    int n,q;cin>>n>>q;
    lli arr[n];
    for(int i=0;i<n;i++) cin>>arr[i];
    build(0, n-1, 0, arr);
    while(q--)
    {
        int x,y;
        cin>>x>>y;
        qry(x-1, y-1,n);
    }
    return 0;
}


Compiler output:
a.cc: In function 'void build(int, int, int, long long int*)':
a.cc:17:21: error: 'all' was not declared in this scope; did you mean 'std::filesystem::perms::all'?
   17 |     seg[ind].insert(all(seg[2*ind+1]));
      |                     ^~~
      |                     std::filesystem::perms::all
In file included from /usr/include/c++/14/filesystem:51,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200,
                 from a.cc:2:
/usr/include/c++/14/bits/fs_fwd.h:158:7: note: 'std::filesystem::perms::all' declared here
  158 |       all               =  0777,
      |       ^~~
a.cc: In function 'std::set<long long int> qry(int, int, int, int, int)':
a.cc:29:19: error: 'all' was not declared in this scope; did you mean 'std::filesystem::perms::all'?
   29 |     result.insert(all(left));
      |                   ^~~
      |                   std::filesystem::perms::all
/usr/include/c++/14/bits/fs_fwd.h:158:7: note: 'std::filesystem::perms::all' declared here
  158 |       all               =  0777,
      |       ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <string>
using namespace std;

typedef long long ll;
int a[500001];
int q;
vector<pair<int, int>> v;
struct A {
	int x, y, idx;
	bool operator<(A obj) {
		int X = y / q;
		int Y = obj.y / q;
		if (X == Y) {
			return x < obj.x;
		}
		else {
			return X < Y;
		}
	}
}b[500001];
int c[500001];
int ans[500001];
int main() {
	ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(NULL);
	int n, qe; cin >> n >> qe;
	q = sqrt(n);
	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}
	for (int i = 0; i < qe; i++) {
		cin >> b[i].x >> b[i].y;
		b[i].idx = i;
		b[i].x -= 1; b[i].y -= 1;
	}
	sort(b, b + qe);

	c[a[0]] += 1;
	int cnt = 1;
	int x = 0;
	int y = 1;

	for (int i = 0; i < qe; i++) {
		while (x < b[i].x) {
			c[a[x]] -= 1;
			if (c[a[x]] == 0)cnt -= 1;
			x += 1;
		}
		while (x > b[i].x) {
			x -= 1;
			if (c[a[x]] == 0)cnt += 1;
			c[a[x]] += 1;
		}
		while (y <= b[i].y) {
			if (c[a[y]] == 0)cnt += 1;
			c[a[y]] += 1;
			y += 1;
		}
		while (y > b[i].y + 1) {
			y -= 1;
			c[a[y]] -= 1;
			if (c[a[y]] == 0)cnt -= 1;
		}
		ans[b[i].idx] = cnt;
	}//0 2       

	for (int i = 0; i < qe; i++) {
		cout << ans[i] << '\n';
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:13: error: 'sqrt' was not declared in this scope
   31 |         q = sqrt(n);
      |             ^~~~
Language: C++

#include "../../../library/other/template.hpp"
int n,q,c[500010];
int m;
int count[500010],ans[500010];
std::pair<P,int> p[500010];
int main(){
	scanf("%d%d",&n,&q);
	rep(i,n)scanf("%d",c+i);
	rep(i,q){
		scanf("%d%d",&p[i].first.first,&p[i].first.second);
		p[i].second=i;
		p[i].first.first--;
	}
	m=sqrt(q);
	std::sort(p,p+q,[&](const auto& lhs,const auto& rhs){
		if(lhs.first.first/m<rhs.first.first/m)return true;
		if(lhs.first.first/m==rhs.first.first/m&&lhs.first.second<rhs.first.second)return true;
		return false;
	});
	int l=0,r=0,cnt=0;
	rep(i,q){
		while(r<p[i].first.second){
			if(count[c[r++]]++==0)cnt++;
		}
		while(p[i].first.second<r){
			if((--count[c[--r]])==0)cnt--;
		}
		while(l<p[i].first.first){
			if((--count[c[l++]])==0)cnt--;
		}
		while(p[i].first.first<l){
			if(count[c[--l]]++==0)cnt++;
		}
		ans[p[i].second]=cnt;
	}
	rep(i,q)printf("%d\n",ans[i]);
	return 0;
}

Compiler output:
a.cc:1:10: fatal error: ../../../library/other/template.hpp: No such file or directory
    1 | #include "../../../library/other/template.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
 
#include<bits/stdc++.h>
using namespace std;
 
#define ll int
#define pb push_back
#define mp make_pair
#define sz(a) (ll)(a).size()
#define endl "\n"
 
const int MAXN = 500005;
 
ll n, m, a[MAXN], BLOCK_SIZE, ans[MAXN], curr, cc[MAXN];
vector<pair<pair<ll,ll>, ll> >q;
 
inline bool mo_cmp(const pair< pair<ll, ll>, ll> &x, const pair< pair<ll, ll>, ll> &y)
{
    ll block_x = x.first.first / BLOCK_SIZE;
    ll block_y = y.first.first / BLOCK_SIZE;
    if(block_x != block_y) return block_x < block_y;
    return x.first.second < y.first.second;
}
 
inline void add(ll x)
{
	cc[x]++;
	if(cc[x] == 1) curr++;
}
 
inline void remove(ll x)
{
	if(cc[x] == 1) curr--;
	cc[x]--;
}
 
int main()
{
	std::ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
 
    cin >> n >> m;
    BLOCK_SIZE = sqrt(n);
    for(int i=0;i<n;i++) cin >> a[i];
    for(int i=0;i<m;i++)
    {
    	ll l, r;
    	cin >> l >> r;
    	q.pb(mp(mp(l - 1, r - 1), i));
    }
    sort(q.begin(), q.end(), mo_cmp);
    ll mo_left = 0, mo_right = -1;
    for(int i=0;i<m;i++)
    {
    	ll left = q[i].first.first;
    	ll right = q[i].first.second;
    	while(mo_right < right) add(a[++mo_right]);
    	while(mo_right > right) remove(a[mo_right--]);
    	while(mo_left < left) remove(a[mo_left++]);
    	while(mo_left > left) add(a[--mo_left]);
    	ans[q[i].second] = curr;
    }
    for(int i=0;i<m;i++) cout << ans[i] << endl;
    return 0;
}

Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:5:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::_Vector_base<std::pair<std::pair<int, int>, int>, std::allocator<std::pair<std::pair<int, int>, int> > >::_Vector_impl::~_Vector_impl()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = std::pair<std::pair<int, int>, int>]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/usr/include/c++/14/bits/stl_vector.h:132:14: note: called from here
  132 |       struct _Vector_impl
      |              ^~~~~~~~~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
#define maxn 1000119
int num[maxn],tree[maxn],booll[maxn],nnn[maxn],N,ww;;
struct tt
{
    int l,r;
    int pos;
};
tt ask[maxn];
bool cmp(tt x,tt y)
{ 
    return x.r<y.r;
}
int lowbit(int n) 
{
    return n&(-n);
}
void add(int n,int now)
{
    while(n<=N)
    {
        tree[n]+=now;
        n+=lowbit(n);
    }
}
int sum(int n)
{
    int ans=0;
    while(n!=0)
    {
        ans+=tree[n];
        n-=lowbit(n);
    }
    return ans;
}
int main()
{
        scanf("%d",&N);
        for(int i=1;i<=N;i++)
            scanf("%d",&num[i]);
        scanf("%d",&ww);
        for(int i=1;i<=ww;i++)
        {
            scanf("%d%d",&ask[i].l,&ask[i].r);
            ask[i].pos=i;
        }
        sort(ask+1,ask+1+ww,cmp);/
        int next=1;
        for(int i=1;i<=ww;i++)
        {
            for(int j=next;j<=ask[i].r;j++)
            {
                if(booll[num[j]]) 
                    add(booll[num[j]],-1);
                add(j,1);
                booll[num[j]]=j;
            }
            next=ask[i].r+1;
            nnn[ask[i].pos]=sum(ask[i].r)-sum(ask[i].l-1);
        }
    for(int i=1;i<=ww;i++)
      cout<<nnn[i]<<endl;
    return  0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:34: error: expected primary-expression before '/' token
   51 |         sort(ask+1,ask+1+ww,cmp);/
      |                                  ^
a.cc:52:9: error: expected primary-expression before 'int'
   52 |         int next=1;
      |         ^~~
a.cc:55:23: error: cannot resolve overloaded function 'next' based on conversion to type 'int'
   55 |             for(int j=next;j<=ask[i].r;j++)
      |                       ^~~~
a.cc:62:27: error: overloaded function with no contextual type information
   62 |             next=ask[i].r+1;
      |                           ^
Language: C++

#include <stdio.h>
#include <string>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string.h>
#include <algorithm>
#include <map>
using namespace std;
const int maxn = 1e6+7;
int n = 0, q = 0;

struct Query{
	int id, l, r;
	bool operator< (Query a) const{
		return r < a.r;
	}
}query[maxn];



int v[maxn], sum[maxn], ans[maxn];

int lowbit(int x){
	return x & (-x);
}

void change(int i, int a){
	while(i <= n){
		sum[i] += a;
		i += lowbit(i);
	}
}

int getsum(int i){
	int sum_t = 0;
	while(i > 0){
		sum_t += sum[i];
		i -= lowbit(i);
	}
	return sum_t;
}

int main() {
	
	scanf("%d", &n)；
		memset(v, 0, sizeof(v));
		memset(sum, 0, sizeof(sum));
		memset(ans, 0, sizeof(ans));
      scanf("%d", &q);
		
		int t = 0;
		for(int i = 1; i <= n; i++){
			scanf("%d", &v[i]);
		}
		
		for(int i = 1; i <= q; i++){
			scanf("%d%d", &query[i].l, &query[i].r);
			query[i].id = i;
		}
		sort(query + 1, query + q + 1);
		
		int pre = 1;
		map<int, int> mymap;
		for(int i = 1; i <= q; i++){
			for(int j = pre; j <= query[i].r; j++){
				//已存在 
				if(mymap[v[j]]){
					change(mymap[v[j]], -1);
				}
				mymap[v[j]] = j;
				change(j, 1);
			}
			pre = query[i].r + 1;
			ans[query[i].id] = getsum(query[i].r) - getsum(query[i].l - 1);
		}
		
		for(int i = 1; i <= q; i++){
			cout << ans[i] << endl;
		}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:24: error: expected ';' before '\U0000ff1b'
   46 |         scanf("%d", &n)；
      |                        ^~
      |                        ;
Language: C

#include<stdio.h>
#include<string.h>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;

#define ARRAY_SIZE(arr) sizeof(arr)/sizeof(arr[0])
#define INT_MIN -2147483647
#define INT_MAX 2147483647
#define INF 2000000000
#define INF_LL 9223372036854775807LL
#define PI acos(-1.0)
#define llu long long unsigned
#define ll long long int
#define ld long int
#define iter(i,a) for( typeof(a.begin()) i=a.begin();i!=a.end();i++)
#define REP(p,a,b) for(int p=a;p<b;p++)
#define mod 1000000007
#define getchar_unlocked getchar
#define pb(f) push_back(f)
#define pob(f) pop_back(f)
#define pf(f) push_front(f)
#define pof(f) pop_front(f)
#define mkp(a,b) make_pair(a,b)
#define fst first
#define snd second
#define pii pair<int,int>
#define ins(a) insert(a)
#define N 30010
#define A 1000010
#define BLOCK 174
#define M 200010

int answer;
struct query
{
    int l,r,ind;
}Q[M];
int ans[M];
int a[N];
int cnt[A];

void add(int index)
{
    cnt[a[index]]++;
    if(cnt[a[index]]==1) answer++;
}

void remove(int index)
{
    cnt[a[index]]--;
    if(cnt[a[index]]==0) answer--;
}

bool cmp(query f,query s)
{
    if((f.l/BLOCK)!=(s.l/BLOCK))
        return (f.l/BLOCK)<(s.l/BLOCK);
    else
        return f.r<s.r;
}

int main() {
    ios_base::sync_with_stdio(false);
    int n,q;
    scanf("%d",&n);
  scanf("%d",&q);
    REP(i,0,n)
    {
        scanf("%d",&a[i]);
    }
    
    REP(i,0,q)
    {
        scanf("%d%d",&Q[i].l,&Q[i].r);
        Q[i].ind=i;
        Q[i].l--;
        Q[i].r--;
    }
    sort(Q,Q+q,cmp);
    int cl=0,cr=0;
    REP(i,0,q)
    {
        int left=Q[i].l,right=Q[i].r;
        while(cl<left)
            remove(cl),cl++;
        while(cl>left)
            add(cl-1),cl--;
        while(cr<=right)
            add(cr),cr++;
        while(cr>(right+1))
            remove(cr-1),cr--;
        ans[Q[i].ind]=answer;
    }
    REP(i,0,q)
        printf("%d\n",ans[i]);
    return 0;
}


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

#include <stdio.h>
#include <stdlib.h>
int main()
{
  int n;
  cin>>n;
  if(n>=400 && n<=599)
  {
    cout<<8;
  }
  if(n>=600 && n<=799)
  {
    cout<<7;
  }
  if(n>=800 && n<=999)
  {
    cout<<6;
  }
  if(n>=1000 && n<=1199)
  {
    cout<<5;
  }
  if(n>=1200 && n<=1399)
  {
    cout<<4;
  }
  if(n>1400 && n<1599)
  {
    cout<<3;
  }
  if(n>1600 && n<1799)
  {
    cout<<2;
  }
  if(n>1800 && n<1999)
  {
    cout<<1;
  }
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>n;
      |   ^~~
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout<<8;
      |     ^~~~
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout<<7;
      |     ^~~~
a.cc:17:5: error: 'cout' was not declared in this scope
   17 |     cout<<6;
      |     ^~~~
a.cc:21:5: error: 'cout' was not declared in this scope
   21 |     cout<<5;
      |     ^~~~
a.cc:25:5: error: 'cout' was not declared in this scope
   25 |     cout<<4;
      |     ^~~~
a.cc:29:5: error: 'cout' was not declared in this scope
   29 |     cout<<3;
      |     ^~~~
a.cc:33:5: error: 'cout' was not declared in this scope
   33 |     cout<<2;
      |     ^~~~
a.cc:37:5: error: 'cout' was not declared in this scope
   37 |     cout<<1;
      |     ^~~~
Language: C++

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

int main() {
  int X;
  cin>>X;
  for(int i=0;i<7;i++){
    if(400+i*200 =< X =< 599+i*200){
      cout<<8-i<<endl;
    }
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: expected primary-expression before '<' token
    8 |     if(400+i*200 =< X =< 599+i*200){
      |                   ^
a.cc:8:24: error: expected primary-expression before '<' token
    8 |     if(400+i*200 =< X =< 599+i*200){
      |                        ^
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <numeric>
#include <bits/stdc++.h>
#include <math.h>
#include <sstream>
#include <iterator>

using namespace std;

#define fast ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);

int32_t main()
{
    fast 
    int t;
    cin >> t;
    if (t >= 400 && t < 600) cout << 8;
    else if (t >= 600 && t < 800) cout << 7;
    else if (t >= 800 && t < 1000) cout << 6;
    else if (t >= 1000 && t < 1200) cout << 5;
    else if (t >= 1200 && t < 1400) cout << 4;
    else if (t >= 1400 && t < 1600) cout << 3;
    else if (t >= 1600 && t < 1800) cout << 2;
    else if (t >= 1800 && t < 2000) cout << 1;
    return 0;
}#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <numeric>
#include <bits/stdc++.h>
#include <math.h>
#include <sstream>
#include <iterator>

using namespace std;

#define fast ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);

int32_t main()
{
    fast 
    int t;
    cin >> t;
    if (t >= 400 && t < 600) cout << 8;
    else if (t >= 600 && t < 800) cout << 7;
    else if (t >= 800 && t < 1000) cout << 6;
    else if (t >= 1000 && t < 1200) cout << 5;
    else if (t >= 1200 && t < 1400) cout << 4;
    else if (t >= 1400 && t < 1600) cout << 3;
    else if (t >= 1600 && t < 1800) cout << 2;
    else if (t >= 1800 && t < 2000) cout << 1;
    return 0;
}

Compiler output:
a.cc:29:2: error: stray '#' in program
   29 | }#include <iostream>
      |  ^
a.cc:29:3: error: 'include' does not name a type
   29 | }#include <iostream>
      |   ^~~~~~~
a.cc:43:9: error: redefinition of 'int32_t main()'
   43 | int32_t main()
      |         ^~~~
a.cc:15:9: note: 'int32_t main()' previously defined here
   15 | int32_t main()
      |         ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
	int X;
	cin>>X;
	if(400<=X and X<=599){
		cout<<8<<endl;
	}else if(600<=X and x<=799){
		cout<<7<<endl;
	}else if(800<=X and x<=999){
		cout<<6<<endl;
	}else if(1000<=X and x<=1199){
		cout<<5<<endl;
	}else if(1200<=X and x<=1399){
		cout<<4<<endl;
	}else if(1400<=X and x<=1599){
		cout<<3<<endl;
	}else if(1600<=X and x<=1799){
		cout<<2<<endl;
	}else if(1800<=X and x<=1999){
		cout<<1<<endl;
	}	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: 'x' was not declared in this scope
    9 |         }else if(600<=X and x<=799){
      |                             ^
Language: Java

import java.io.*;
class Main()
{
  static void main(String args[])throws IOException
  {
    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    int x=Integer.parseInt(br.readLine());
    if(x>=400 && x<600)
      System.out.println("8");
    else if(x>=600 && x<800)
      System.out.println("7"); 
      else if(x>=800 && x<1000)
      System.out.println("6") ;
        else if(x>=1000 && x<1200)
      System.out.println("5");
      else if(x>=1200 && x<1400)
      System.out.println("4"); 
     else if(x>=1400 && x<1600)
      System.out.println("3"); 
      else if(x>=1600 && x<1800)
      System.out.println("2") ;
        else if(x>=1800 && x<2000)
      System.out.println("1");
  }
}

Compiler output:
Main.java:2: error: '{' expected
class Main()
          ^
1 error
Language: C++

    #include <iostream>
    using namepspace std;
    
      int get_ranking(int y){
      if(y>=400&&y<=599)
        cout<<"'7'";
      if(y>=600&&y<=799)
        cout<<"'6'";
      if(y>=800&&y<=999)
        cout<<" '5' ";
      if(y>=1000&&y<=1199)
        cout<<"'4'";
      if(y>=1200&&y<=1399)
        cout<<"'3'"
      if(y>=1400&&y<=1599)
        cout<<"'2'";
        if(y>=1800&&y<=1999)
        cout<<"'1'";
         return 0;
         }
   int main()   
    {
      int x;
      cin>>x;
      get_ranking(x);
      return 0;
    }

Compiler output:
a.cc:2:11: error: expected nested-name-specifier before 'namepspace'
    2 |     using namepspace std;
      |           ^~~~~~~~~~
a.cc: In function 'int get_ranking(int)':
a.cc:6:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |         cout<<"'7'";
      |         ^~~~
      |         std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         cout<<"'6'";
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |         cout<<" '5' ";
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |         cout<<"'4'";
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |         cout<<"'3'"
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:18:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |         cout<<"'1'";
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc: In function 'int main()':
a.cc:24:7: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   24 |       cin>>x;
      |       ^~~
      |       std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include <iostream>
using namepspace std;
int main()
  int get_ranking(int y){
  if(y>=400&&y<=599)
    cout<<"7";
  if(y>=600&&y<=799)
    cout<<"6";
  if(y>=800&&y<=999)
    cout<<"5";
  if(y>=1000&&y<=1199)
    cout<<"4";
  if(y>=1200&&y<=1399)
    cout<<"3";
  if(y>=1400&&y<=1599)
    cout<<"2";
  if(y>=160"0&&y<=1799)
    if(y>=1800&&y<=1999)
    cout<<"1";
     return 0;
     }
  
{
  int x;
  cin>>x;
  get_ranking(x);
  return 0;
}

Compiler output:
a.cc:17:12: warning: missing terminating " character
   17 |   if(y>=160"0&&y<=1799)
      |            ^
a.cc:17:12: error: missing terminating " character
   17 |   if(y>=160"0&&y<=1799)
      |            ^~~~~~~~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'namepspace'
    2 | using namepspace std;
      |       ^~~~~~~~~~
a.cc:4:3: error: expected initializer before 'int'
    4 |   int get_ranking(int y){
      |   ^~~
a.cc:23:1: error: expected unqualified-id before '{' token
   23 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int x;
  cin >> x;
  if(x > = 400 && x < 600){
    cout << "8" <<endl;
  }
    else if(x >= 600 && x < 800){
      cout << "7" << endl;
    }
  else if(x >= 800 && x < 1000){
      cout << "6" << endl;
    }
  else if(x >= 1000 && x < 1200){
      cout << "5" << endl;
    }
  else if(x >= 1200 && x < 1400){
      cout << "4" << endl;
    }
  else if(x >= 1400 && x < 1600){
      cout << "3" << endl;
    }
  else if(x >= 1600 && x < 1800){
      cout << "2" << endl;
    }
  else if(x >= 1800 && x < 2000){
      cout << "1" << endl;
    }
  else{
    cout << "invalid";
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: expected primary-expression before '=' token
    6 |   if(x > = 400 && x < 600){
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int x;
  cin >> x;
  if(x > = 400 && x < 600){
    cout << "8" <<endl;
  }
    else if(x > = 600 && x < 800){
      cout << "7" << endl;
    }
  else if(x > = 800 && x < 1000){
      cout << "6" << endl;
    }
  else if(x > = 1000 && x < 1200){
      cout << "5" << endl;
    }
  else if(x > = 1200 && x < 1400){
      cout << "4" << endl;
    }
  else if(x > = 1400 && x < 1600){
      cout << "3" << endl;
    }
  else if(x > = 1600 && x < 1800){
      cout << "2" << endl;
    }
  else if(x > = 1800 && x < 2000){
      cout << "1" << endl;
    }
  else{
    cout << "invalid";
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: expected primary-expression before '=' token
    6 |   if(x > = 400 && x < 600){
      |          ^
a.cc:9:17: error: expected primary-expression before '=' token
    9 |     else if(x > = 600 && x < 800){
      |                 ^
a.cc:12:15: error: expected primary-expression before '=' token
   12 |   else if(x > = 800 && x < 1000){
      |               ^
a.cc:15:15: error: expected primary-expression before '=' token
   15 |   else if(x > = 1000 && x < 1200){
      |               ^
a.cc:18:15: error: expected primary-expression before '=' token
   18 |   else if(x > = 1200 && x < 1400){
      |               ^
a.cc:21:15: error: expected primary-expression before '=' token
   21 |   else if(x > = 1400 && x < 1600){
      |               ^
a.cc:24:15: error: expected primary-expression before '=' token
   24 |   else if(x > = 1600 && x < 1800){
      |               ^
a.cc:27:15: error: expected primary-expression before '=' token
   27 |   else if(x > = 1800 && x < 2000){
      |               ^
Language: C

#include <iostream>
using namespace std;

int main() {
	int x;
  cin >> x;
  if (x >= 400 && x <= 599){
    cout << '8';
  }
  if (x >= 600 && x <= 799){
    cout << '7';
  }
  if (x >= 800 && x <= 999){
    cout << '6';
  }
  if (x >= 1000 && x <= 1199){
    cout << '5';
  }
  if (x >= 1200 && x <= 1399){
    cout << '4';
    
  }
  if (x >= 1400 && x <= 1599){
    cout << '3';
    
  }
  if (x >= 1600 && x <= 1799){
    cout << '2';
    
  }
  if (x >= 1800 && x <= 1999){
    cout << '1';
    
  }
	return 0;
}


Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int x;
  cin>>x;
  if(x>399 && x<600)
    cout<<8<<endl;
  else if(x>599 && x<800)
    cout<<7<<endl;
  else if(x>799 && x<1000)
    cout<<6<<endl;
  else if(x>999 && x<1200)
    cout<<5<<endl;
  else if(x>1199 && x<1400)
    cout<<4<<endl;
  else if(x>1399 && x<1600)
    cout<<3<<endl;
  else if(x>1599 && x<1800)
    cout<<2<<endl;
  else if(x>1799 && x<2000)
    cout<<1<<endl;
  return 0
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:23:11: error: expected ';' before '}' token
   23 |   return 0
      |           ^
      |           ;
   24 | }
      | ~
Language: C++

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

int main() {
    int X;
    cin >> X;
    if(x < 600) {
        cout << 1;
    } else if(X < 800) {
        cout << 7;
    } else if(X < 1000) {
        cout << 6;
    } else if(X < 1200) {
        cout << 5;
    } else if(X < 1400) {
        cout << 4;
    } else if(X < 1600) {
        cout << 3;
    } else if(X < 1800) {
        cout << 2;
    }else {
        cout << 1;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'x' was not declared in this scope
    7 |     if(x < 600) {
      |        ^
Language: C++

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

int main() {
  int n;
  cin >> n;
  if (n >= 1800) cout << 1 << endl, return 0;
  if (n >= 1600) cout << 2 << endl, return 0;
  if (n >= 1400) cout << 3 << endl, return 0;
  if (n >= 1200) cout << 4 << endl, return 0;
  if (n >= 1000) cout << 5 << endl, return 0;
  if (n >= 800) cout << 6 << endl, return 0;
  if (n >= 600) cout << 7 << endl, return 0;
  if (n >= 400) cout << 8 << endl, return 0;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:37: error: expected primary-expression before 'return'
    7 |   if (n >= 1800) cout << 1 << endl, return 0;
      |                                     ^~~~~~
a.cc:8:37: error: expected primary-expression before 'return'
    8 |   if (n >= 1600) cout << 2 << endl, return 0;
      |                                     ^~~~~~
a.cc:9:37: error: expected primary-expression before 'return'
    9 |   if (n >= 1400) cout << 3 << endl, return 0;
      |                                     ^~~~~~
a.cc:10:37: error: expected primary-expression before 'return'
   10 |   if (n >= 1200) cout << 4 << endl, return 0;
      |                                     ^~~~~~
a.cc:11:37: error: expected primary-expression before 'return'
   11 |   if (n >= 1000) cout << 5 << endl, return 0;
      |                                     ^~~~~~
a.cc:12:36: error: expected primary-expression before 'return'
   12 |   if (n >= 800) cout << 6 << endl, return 0;
      |                                    ^~~~~~
a.cc:13:36: error: expected primary-expression before 'return'
   13 |   if (n >= 600) cout << 7 << endl, return 0;
      |                                    ^~~~~~
a.cc:14:36: error: expected primary-expression before 'return'
   14 |   if (n >= 400) cout << 8 << endl, return 0;
      |                                    ^~~~~~
Language: Java

import java.io.*;
import java.util.*;
public class cp1 {        
    public static void main(String args[]) {
        int x=II();
        int ans=0;
        if(x<=599)
            ans=8;
        else if(x<=799)
            ans=7;
        else if(x<=999)
            ans=6;
        else if(x<=1199)
            ans=5;
        else if(x<=1399)
            ans=4;
        else if(x<=1599)
            ans=3;
        else if(x<=1799)
            ans=2;
        else
            ans=1;

        System.out.println(ans);
    }
    
    ////////////////////////////////////
    static scan in=new scan(System.in);
    static int II() {
        return in.nextInt();
    }
    static long IL() {
        return in.nextLong();
    }
    static int[] IIA(int n) {
        int a[]=new int[n];
        for(int i=0;i<n;i++) {
            a[i]=II();
        }
        return a;
    }
    static String IS() {
        return in.next();
    }
    static char IC(){
        return in.next().charAt(0);
    }
    static String[] ISA(int n) {
        String a[]=new String[n];
        for(int i=0;i<n;i++) {
            a[i]=IS();
        }
        return a;
    }
    static char[] ICA(int n) {
        char a[]=new char[n];
        for(int i=0;i<n;i++) {
            a[i]=IC();
        }
        return a;
    }
}
class scan
{
    public static BufferedReader reader;
    public static StringTokenizer token;

    scan(InputStream str)
    {
        reader=new BufferedReader(new InputStreamReader(str));
        token=null;
    }

    static int nextInt()
    {
        while(token==null||!token.hasMoreTokens())
        {
            try { token=new StringTokenizer(reader.readLine());   }
            catch(IOException e){  throw new RuntimeException(e); }
        }
        return Integer.parseInt(token.nextToken());
    }

    static long nextLong()
    {
        while(token==null||!token.hasMoreTokens())
        {
            try { token=new StringTokenizer(reader.readLine());   }
            catch(IOException e){  throw new RuntimeException(e); }
        }
        return Long.parseLong(token.nextToken());
    }

    static String next()
    {
        while(token==null||!token.hasMoreTokens())
        {
            try { token=new StringTokenizer(reader.readLine());   }
            catch(IOException e){  throw new RuntimeException(e); }
        }
        return token.nextToken();
    }

}

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

#include<bist/stdc++.h>
using namespace std;
int main(){
  int x;
  cin>>x;
  x-=400;
  cout<<8-x/200<<"\n";
  return 0;
}

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

#include <iostream>
using namespacd std;

int main(){
  int N;
  cin >> N;
  cout << 10-(N/100)/2 << endl;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespacd'
    2 | using namespacd std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> N;
      |   ^~~
      |   std::cin
In file included 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:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout << 10-(N/100)/2 << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout << 10-(N/100)/2 << endl;
      |                           ^~~~
      |                           std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int x,s=400,t=599,m=8;
  cin>>x;
  for(int i=0;i<9;i++)
  {
    if(x>=s && x<=t)
    {
      r=m;
      break;
    }
    else
    {
      s=t+1;t=t+200;
      m--;
    }
  }
  cout<<r;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: 'r' was not declared in this scope
   11 |       r=m;
      |       ^
a.cc:20:9: error: 'r' was not declared in this scope
   20 |   cout<<r;
      |         ^
Language: Java


import java.util.*;

public class App {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int number = Integer.parseInt(sc.nextLine());

        if (number >= 400 && number < 600) {
            System.out.println("8");
        } else if (number >= 600 && number < 800) {
            System.out.println("7");
        } else if (number >= 800 && number < 1000) {
            System.out.println("6");
        } else if (number >= 1000 && number < 1200) {
            System.out.println("5");
        } else if (number >= 1200 && number < 1400) {
            System.out.println("4");
        } else if (number >= 1400 && number < 1600) {
            System.out.println("3");
        } else if (number >= 1600 && number < 1800) {
            System.out.println("2");
        } else if (number >= 1800 && number < 2000) {
            System.out.println("1");
        }

    }
}

Compiler output:
Main.java:4: error: class App is public, should be declared in a file named App.java
public class App {
       ^
1 error
Language: C

#include〈stdio.h〉
　int main(void){
   int a;
   scanf("%d",&a);
 switch(
   case 400＜=a＜=599:
    printf("8¥n");
   break;
   case 600＜=a＜=799:
    printf("7¥n");
   break;
   case 800＜=a＜=999:
    printf("6¥n");
   break;
   case 1000＜=a＜=1199:
    printf("5¥n");
   break;
   case 1200＜=a＜=1399:
    printf("4¥n");
   break;
   case 1400＜=a＜=1599:
    printf("3¥n");
   break;
   case 1600＜=a＜=1799:
    printf("2¥n");
   break;
   case 1800＜=a＜=1999:
    printf("1¥n");
   break;
 )
   return 0;
 }
   
   

Compiler output:
main.c:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include〈stdio.h〉
      |         ^~
main.c:2:1: error: stray '\343' in program
    2 | <U+3000>int main(void){
      | ^~~~~~~~
main.c: In function 'main':
main.c:4:4: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |    scanf("%d",&a);
      |    ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #include〈stdio.h〉
main.c:4:4: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |    scanf("%d",&a);
      |    ^~~~~
main.c:4:4: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:4: error: expected expression before 'case'
    6 |    case 400＜=a＜=599:
      |    ^~~~
main.c:6:9: error: invalid suffix "＜" on integer constant
    6 |    case 400＜=a＜=599:
      |         ^~~~~
main.c:9:9: error: invalid suffix "＜" on integer constant
    9 |    case 600＜=a＜=799:
      |         ^~~~~
main.c:12:9: error: invalid suffix "＜" on integer constant
   12 |    case 800＜=a＜=999:
      |         ^~~~~
main.c:15:9: error: invalid suffix "＜" on integer constant
   15 |    case 1000＜=a＜=1199:
      |         ^~~~~~
main.c:18:9: error: invalid suffix "＜" on integer constant
   18 |    case 1200＜=a＜=1399:
      |         ^~~~~~
main.c:21:9: error: invalid suffix "＜" on integer constant
   21 |    case 1400＜=a＜=1599:
      |         ^~~~~~
main.c:24:9: error: invalid suffix "＜" on integer constant
   24 |    case 1600＜=a＜=1799:
      |         ^~~~~~
main.c:27:9: error: invalid suffix "＜" on integer constant
   27 |    case 1800＜=a＜=1999:
      |         ^~~~~~
Language: C

#include<stdio.h>

int main(void){
  int late;
  scanf("%d",&late);
  if(late < 400 && late > 1999){
    return ;
  }else{
    if(late > 400 && late < 599){
      printf("8\n");
    }else if(late > 600 && late < 799){
      printf("7\n");
    }else if(late > 800 && late < 999){
      printf("6\n");
    }else if(late > 1000 && late < 1199){
      printf("5\n");
    }else if(late > 1200 && late < 1399){
      prinf("4\n");
    }else if(late > 1400 && late < 1599){
      printf("3\n");
    }else if(late > 1600 && late < 1799){
      printf("2\n");
    }else if(late > 1800 && late < 1999){
      printf("1\n");
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:5: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
    7 |     return ;
      |     ^~~~~~
main.c:3:5: note: declared here
    3 | int main(void){
      |     ^~~~
main.c:18:7: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   18 |       prinf("4\n");
      |       ^~~~~
      |       printf
Language: Java

import java.util.*;
import java.io.*;

public class A1 {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int x = in.nextInt();
		System.out.println((2199-x)/200);
	}
}

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