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

#include<bits/stdc++.h>
#define U [1<<17]={}
#define G((c=A[a]+A[P[a]]+C[a])%k?c:0)
typedef long long L;using namespace std;
map<L,L>T U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U;
L D(L a){L d;Z[a]=1;for(map<L,L>::iterator I=T[a].begin();I!=T[a].end();I++)
	d=I->first,d-P[a]?P[d]=a,E[d]=E[a]+1,C[d]=I->second,D(d),Z[a]+=Z[d],!H[a]|Z[H[a]]<Z[d]?H[a]=d:0:0;}
L M(L i){return i?B[i]+M(i^i&-i):0;}
L S(L a,L i){for(a=M(i++)+G-M(i);i<1e5;i+=i&-i)B[i]+=a;}
L K(L f){a=X[f];n=X[b];return a-n?M(O[E[a]<E[n]?a=n,n=b,b=f,n:f])-M(O[a])+G+K(P[a]):abs(M(O[f])-M(O[b]));}
main(){for(cin>>n>>k;--n;T[a][b]=T[b][a]=c)cin>>a>>b>>c;
	for(D(a=b=0);n<*Z;a=H[P[++n]]-n?n:0)for(;!b|a;S(a=H[a],O[a]=b++))X[a]=n;
	for(cin>>a;cin>>s>>a>>b;*s&2?cout<<K(a)<<endl,0:A[a]+=b,S(H[a],O[a]),a&&S(a,O[a]-1));}

Compiler output:
a.cc:3:11: error: expected parameter name, found "("
    3 | #define G((c=A[a]+A[P[a]]+C[a])%k?c:0)
      |           ^
a.cc: In function 'L D(L)':
a.cc:7:107: warning: no return statement in function returning non-void [-Wreturn-type]
    7 |         d=I->first,d-P[a]?P[d]=a,E[d]=E[a]+1,C[d]=I->second,D(d),Z[a]+=Z[d],!H[a]|Z[H[a]]<Z[d]?H[a]=d:0:0;}
      |                                                                                                           ^
a.cc: In function 'L S(L, L)':
a.cc:9:27: error: 'G' was not declared in this scope
    9 | L S(L a,L i){for(a=M(i++)+G-M(i);i<1e5;i+=i&-i)B[i]+=a;}
      |                           ^
a.cc:9:56: warning: no return statement in function returning non-void [-Wreturn-type]
    9 | L S(L a,L i){for(a=M(i++)+G-M(i);i<1e5;i+=i&-i)B[i]+=a;}
      |                                                        ^
a.cc: In function 'L K(L)':
a.cc:10:75: error: 'G' was not declared in this scope
   10 | L K(L f){a=X[f];n=X[b];return a-n?M(O[E[a]<E[n]?a=n,n=b,b=f,n:f])-M(O[a])+G+K(P[a]):abs(M(O[f])-M(O[b]));}
      |                                                                           ^
a.cc: At global scope:
a.cc:11:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   11 | main(){for(cin>>n>>k;--n;T[a][b]=T[b][a]=c)cin>>a>>b>>c;
      | ^~~~
Language: C++

#include<bits/stdc++.h>
#define U [7<<15]={}
#define G )+((c=A[a]+A[P[a]]+C[a])%k?c:0)-M(
typedef long long L;using namespace std;map<L,L>T U;L P U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U;
L M(L f){return f?B[f]+M(f^f&-f):0;}
L S(L a,L i){for(a=M(i++G i);i<2e5;i+=i&-i)B[i]+=a;}
L D(L f){for(map<L,L>::iterator I=T[f].begin();I!=T[f].end();I++)
    L d=I->first,d-P[f]?P[d]=f,C[d]=I->second,D(d),Z[f]+=++Z[d],Z[H[f]]<Z[d]?H[f]=d:0:0;}
L K(L f){a=X[f];n=X[b];return a-n?M(O[Z[a]>Z[n]?a=n,n=b,b=f,n:f]G O[a])+K(P[a]):abs(M(O[f])-M(O[b]));}
main(){for(cin>>n>>k;--*Z+n;T[a][b]=T[b][a]=c)cin>>a>>b>>c;
       for(D(n=0);Z[a=H[P[n]]-n?n:0];*Z=++n)for(;!O[a];S(a=H[a],O[a]=++b))X[a]=n;
       for(cin>>a;cin>>s>>a>>b;S(H[a],O[a]),S(a,O[a]-1))*s&2?cout<<K(a)<<endl,0:A[a]+=b;}

Compiler output:
a.cc: In function 'L S(L, L)':
a.cc:6:52: warning: no return statement in function returning non-void [-Wreturn-type]
    6 | L S(L a,L i){for(a=M(i++G i);i<2e5;i+=i&-i)B[i]+=a;}
      |                                                    ^
a.cc: In function 'L D(L)':
a.cc:8:19: error: expected initializer before '-' token
    8 |     L d=I->first,d-P[f]?P[d]=f,C[d]=I->second,D(d),Z[f]+=++Z[d],Z[H[f]]<Z[d]?H[f]=d:0:0;}
      |                   ^
a.cc:8:89: warning: no return statement in function returning non-void [-Wreturn-type]
    8 |     L d=I->first,d-P[f]?P[d]=f,C[d]=I->second,D(d),Z[f]+=++Z[d],Z[H[f]]<Z[d]?H[f]=d:0:0;}
      |                                                                                         ^
a.cc: At global scope:
a.cc:10:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   10 | main(){for(cin>>n>>k;--*Z+n;T[a][b]=T[b][a]=c)cin>>a>>b>>c;
      | ^~~~
Language: C++

#include<bits/stdc++.h>#define U [7<<15]={}#define G )+((c=A[a]+A[P[a]]+C[a])%k?c:0)-M(typedef long long L;using namespace std;map<L,L>T U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U;L M(L f){return f?B[f]+M(f^f&-f):0;}L S(L a,L i){for(a=M(i++G i);i<2e5;i+=i&-i)B[i]+=a;}L D(L f){L d;for(map<L,L>::iterator I=T[f].begin();I!=T[f].end();I++)d=I->first,d-P[f]?P[d]=f,E[d]=E[f]+1,C[d]=I->second,D(d),Z[f]+=++Z[d],Z[H[f]]<Z[d]?H[f]=d:0:0;}L K(L f){a=X[f];n=X[b];return a-n?M(O[E[a]<E[n]?a=n,n=b,b=f,n:f]G O[a])+K(P[a]):abs(M(O[f])-M(O[b]));}main(){for(cin>>n>>k;--*Z+n;T[a][b]=T[b][a]=c)cin>>a>>b>>c;for(n=D(0);Z[a=H[P[n]]-n?n:0];n++)for(;!O[a];S(a=H[a],O[a]=++b))X[a]=n;for(cin>>a;cin>>s>>a>>b;S(H[a],O[a]),S(a,O[a]-1))*s&2?cout<<K(a)<<endl,0:A[a]+=b;}

Compiler output:
a.cc:1:24: warning: extra tokens at end of #include directive
    1 | #include<bits/stdc++.h>#define U [7<<15]={}#define G )+((c=A[a]+A[P[a]]+C[a])%k?c:0)-M(typedef long long L;using namespace std;map<L,L>T U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U;L M(L f){return f?B[f]+M(f^f&-f):0;}L S(L a,L i){for(a=M(i++G i);i<2e5;i+=i&-i)B[i]+=a;}L D(L f){L d;for(map<L,L>::iterator I=T[f].begin();I!=T[f].end();I++)d=I->first,d-P[f]?P[d]=f,E[d]=E[f]+1,C[d]=I->second,D(d),Z[f]+=++Z[d],Z[H[f]]<Z[d]?H[f]=d:0:0;}L K(L f){a=X[f];n=X[b];return a-n?M(O[E[a]<E[n]?a=n,n=b,b=f,n:f]G O[a])+K(P[a]):abs(M(O[f])-M(O[b]));}main(){for(cin>>n>>k;--*Z+n;T[a][b]=T[b][a]=c)cin>>a>>b>>c;for(n=D(0);Z[a=H[P[n]]-n?n:0];n++)for(;!O[a];S(a=H[a],O[a]=++b))X[a]=n;for(cin>>a;cin>>s>>a>>b;S(H[a],O[a]),S(a,O[a]-1))*s&2?cout<<K(a)<<endl,0:A[a]+=b;}
      |                        ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: Java

import java.util.Scanner;

/**
 * Flag
 */
public class P0368 {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int W, H;
		char c;

		W = sc.nextInt();
		H = sc.nextInt();
		c = sc.next().charAt(0);

		for (int i = 0; i < H; i++) {
			for (int j = 0; j < W; j++) {
				if ((i == 0 || i == H - 1) && (j == 0 || j == W - 1)) {
					System.out.print('+');
				} else if (i == 0 || i == H - 1) {
					System.out.print('-');
				} else if (j == 0 || j == W - 1) {
					System.out.print('|');
				} else if (i == H / 2 && j == W / 2) {
					System.out.print(c);
				} else {
					System.out.print('.');
				}
			}
			System.out.println();
		}
	}
}

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

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

int main(){

  int n, q,b,c,d,e;

 int  a[1001] = { };
  
  while(1){

    cin >> n >> q;

    if(n==0 && q==0)break;

    for(int i=0;i<1001;i++){
      a[i] = 0;
    }

    for(int j=0;j<n;j++){
    cin >> c;
      
    for(int i=0;i<c;i++){
      cin >> d;
      a[d]++;
    }
    }
    e=-1;

    for(int i=1;i<1001;i++){
      if(a[i] > e) e = i;
    }

    if (a[e] >= b) cout << e << endl;
    else cout << 0 << endl; 
    

    }



  }



}



Compiler output:
a.cc:46:1: error: expected declaration before '}' token
   46 | }
      | ^
Language: C++

#include <stdio.h>
#include <set>
#include <algorithm>
using namespace std;
const int N=1e5+10;
int main(){
    int n,a[N];
    long long int ans=0;
    set<int> s;
    scanf("%d",&n);
    for(int i=0;i<n;i++)scanf("%d",&a[i]);
    sort(a,a+n);
    for(int i=1;i<=a[n-1];i++)if(a[n-1]%i==0)s.insert(i);
    for(int i=0;i<n;i++)ans+=s.lower_bound(a[i])-a[i];
    printf("%lld\n",ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:49: error: no match for 'operator-' (operand types are 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} and 'int')
   14 |     for(int i=0;i<n;i++)ans+=s.lower_bound(a[i])-a[i];
      |                              ~~~~~~~~~~~~~~~~~~~^~~~~
      |                                           |         |
      |                                           |         int
      |                                           std::set<int>::iterator {aka std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator}
In file included from /usr/include/c++/14/bits/stl_algobase.h:67,
                 from /usr/include/c++/14/bits/stl_tree.h:63,
                 from /usr/include/c++/14/set:62,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  618 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note:   template argument deduction/substitution failed:
a.cc:14:53: note:   'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} is not derived from 'const std::reverse_iterator<_Iterator>'
   14 |     for(int i=0;i<n;i++)ans+=s.lower_bound(a[i])-a[i];
      |                                                     ^
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1790 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note:   template argument deduction/substitution failed:
a.cc:14:53: note:   'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} is not derived from 'const std::move_iterator<_IteratorL>'
   14 |     for(int i=0;i<n;i++)ans+=s.lower_bound(a[i])-a[i];
      |                                                     ^
Language: C++

5
1 0 2 0 3 30 4 30 6 0 7 0
2 30 3 0 4 0 5 0 5 30 6 30
1 30 2 30 4 30 5 0 6 30 7 0
2 30 3 0 5 0 6 0 6 30 7 0
1 0 2 0 3 0 3 30 4 0 5 0


Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 5
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define FOR(i, a, b) for(int i=a;i<b;i++)
#define REP(i, n) FOR(i, 0, n)
#define LAR(a, b) ((a)=max((a),(b)))
#define SML(a, b) ((a)=min((a),(b)))
typedef vector<int> vi;
#define PB push_back
#define MP make_pair
#define YES() printf("yes\n"),exit(0);
#define NO() printf("no\n"),exit(0);

#define N 112345
int n, m;
int d[N];
vi path[N];
int g[N];
int cnt=0;
bool vis[N];
void dfs(int a){
		if(cnt++>=n*10){
				//while(1) cnt++;
				printf("%d(%d)\n", cnt, a);
		}
	REP(j, path[a].size()){
		int b=path[a][j];
		if(d[b]==a) continue;
		if(~d[b]){
			int c=b;
			while(g[c]!=g[a]){
				g[c]=g[a];
				c=d[c];
			}
		}else{
			if(g[a]!=g[b]){
				d[a]=b;
				dfs(b);
				d[a]=-1;
			}
		}
	}
}
vi stick[N];
int siz[N];
int memo[N][2];
int DP(int,int,bool);
int dp(int a, int p, bool av){
	if(~memo[a][av]) return memo[a][av];
	else return memo[a][av]=DP(a,p,av);
}
int DP(int a, int p, bool av){
	int x=0, y=INT_MIN;
	REP(i, stick[a].size()){
		int b=stick[a][i];
		if(b==p) continue;
		x+=dp(b, a, true);
	}
	if(av){
		y=siz[a];
		REP(i, stick[a].size()){
			int b=stick[a][i];
			if(b==p) continue;
			y+=dp(b, a, false);
		}
	}
	// printf("dp(%d, %d)=max(%d, %d)\n", a, av, x, y);
	return max(x, y);
}

int main(){
	scanf("%d%d", &n, &m);
	REP(i, m){
		int s, t;
		scanf("%d%d", &s, &t);
		path[s].PB(t);
		path[t].PB(s);
	}
	
	fill(d, d+N, -1);
	// fill(vis, vis+N, false);
	REP(i, N) g[i]=i;
	dfs(0);
	printf(6);
		return 0;
		
	// REP(i, n) printf("%2d ", i);  printf("\n");
	// REP(i, n) printf("%2d ",g[i]);printf("\n");
	
	int r=-1;
	REP(i, n){
		REP(j, path[i].size()){
			int p=g[i], q=g[path[i][j]];
			if(i<path[i][j] && p!=q){
				stick[p].PB(q);
				stick[q].PB(p);
				// printf("%d-%d\n", p, q);
			}
			r=p;
		}
	}
	fill(siz, siz+N, 0);
	REP(i, n) siz[g[i]]++;
	// REP(i, n) if(siz[i]) printf("siz[%d]=%d\n", i, siz[i]);
	REP(i, n) memo[i][0]=memo[i][1]=-1;
	printf("%d\n", dp(r, -1, true));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:85:16: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   85 |         printf(6);
      |                ^
      |                |
      |                int
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UncheckedIOException;
import java.util.StringTokenizer;

public class Main {
	public static void main(String[] args) {
		SC sc=new SC(System.in);
		int a=sc.nextInt();
		pl((a-30)/2)
	}
	static class SC {
		private BufferedReader reader = null;
		private StringTokenizer tokenizer = null;
		public SC(InputStream in) {
			reader = new BufferedReader(new InputStreamReader(in));
		}
		public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
			return tokenizer.nextToken();
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
		public long nextLong() {
			return Long.parseLong(next());
		}
		public double nextDouble() {
			return Double.parseDouble(next());
		}
		public String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new UncheckedIOException(e);
			}
		}
	}
	public static void pl(Object o) {
		System.out.println(o);
	}
	public static void pl() {
		System.out.println();
	}
	public static void p(Object o) {
		System.out.print(o);
	}
}



Compiler output:
Main.java:12: error: ';' expected
		pl((a-30)/2)
		            ^
1 error
Language: C++

// Celcius and Fahrenheit 2018/12/28

#include <iostream>
using namespace std;

int main() {
    int F, C;
    cin >> F;
    cout << (F - 30) / 2 << '\n';
    return 0;
}

~


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

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

using namespace std;

int main(){
	int F;
	cin >> F;
	cout << (F - 30) / 2
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: expected ';' before '}' token
   10 |         cout << (F - 30) / 2
      |                             ^
      |                             ;
   11 | }
      | ~
Language: C++

#include <iostream>
using namespace std;
int main(){

 	int a , b , c ;
	cin >> a >> b ;
	c = a – b ;
	if (c < 0 ) cout << c * -1 <<endl ;
	cout << c << endl ;

return 0;
}



Compiler output:
a.cc:7:15: error: extended character – is not valid in an identifier
    7 |         c = a – b ;
      |               ^
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before '\U00002013'
    7 |         c = a – b ;
      |              ^~
      |              ;
Language: C++

#include <iostream>
using namespace std;
int main(){

int a , b , c ;
cin >> a >> b ;
c = a – b ;
if (c < 0 ) cout << c * -1 <<endl ;
cout << c << endl ;

return 0;
}



Compiler output:
a.cc:7:7: error: extended character – is not valid in an identifier
    7 | c = a – b ;
      |       ^
a.cc: In function 'int main()':
a.cc:7:6: error: expected ';' before '\U00002013'
    7 | c = a – b ;
      |      ^~
      |      ;
Language: C++

#include <iostream>
using namespace std;
int main(){

int a , b , c ;
cin >> a >> b ;
c = a – b ;
if (c < 0 ) cout << c * -1 <<endl ;
cout << c << endl ;

return 0;
}


Compiler output:
a.cc:7:7: error: extended character – is not valid in an identifier
    7 | c = a – b ;
      |       ^
a.cc: In function 'int main()':
a.cc:7:6: error: expected ';' before '\U00002013'
    7 | c = a – b ;
      |      ^~
      |      ;
Language: C++

#include <iostream>
using namespace std;
int main(){

 	int x1 , x2 ;
	cin >> x1 >> x2 ;
	if (a < b ) cout << b - a <<endl ;
	cout << a - b << endl ;

return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'a' was not declared in this scope
    7 |         if (a < b ) cout << b - a <<endl ;
      |             ^
a.cc:7:17: error: 'b' was not declared in this scope
    7 |         if (a < b ) cout << b - a <<endl ;
      |                 ^
a.cc:8:17: error: 'a' was not declared in this scope
    8 |         cout << a - b << endl ;
      |                 ^
a.cc:8:21: error: 'b' was not declared in this scope
    8 |         cout << a - b << endl ;
      |                     ^
Language: C++

#include <iostream>
using namespace std;
int main(){

 	int x1 , x2 ;
	cin >> x1 >> x2 ;
	if (x1 < x2 ) cout << x2 – x1 <<endl ;
	cout << x1 – x2 << endl ;

return 0;
}



Compiler output:
a.cc:7:34: error: extended character – is not valid in an identifier
    7 |         if (x1 < x2 ) cout << x2 – x1 <<endl ;
      |                                  ^
a.cc:8:20: error: extended character – is not valid in an identifier
    8 |         cout << x1 – x2 << endl ;
      |                    ^
a.cc: In function 'int main()':
a.cc:7:33: error: expected ';' before '\U00002013'
    7 |         if (x1 < x2 ) cout << x2 – x1 <<endl ;
      |                                 ^~
      |                                 ;
a.cc:8:19: error: expected ';' before '\U00002013'
    8 |         cout << x1 – x2 << endl ;
      |                   ^~
      |                   ;
Language: C++

#include <iostream>
using namespace std;
int main(){

 	int x1 , x2 ;
	cin >> x1 >> x2 ;

	if (x1 < x2 ) cout << x2 – x1 <<endl ;
	cout << x1 – x2 << endl ;

return 0;
}



Compiler output:
a.cc:8:34: error: extended character – is not valid in an identifier
    8 |         if (x1 < x2 ) cout << x2 – x1 <<endl ;
      |                                  ^
a.cc:9:20: error: extended character – is not valid in an identifier
    9 |         cout << x1 – x2 << endl ;
      |                    ^
a.cc: In function 'int main()':
a.cc:8:33: error: expected ';' before '\U00002013'
    8 |         if (x1 < x2 ) cout << x2 – x1 <<endl ;
      |                                 ^~
      |                                 ;
a.cc:9:19: error: expected ';' before '\U00002013'
    9 |         cout << x1 – x2 << endl ;
      |                   ^~
      |                   ;
Language: C++

#include <iostream>
using namespace std;
int main(){

int x1 , x2 ;
cin >> x1 >> x2 ;

if ( x1 < x2 ) cout << x2 – x1 <<endl ;
else
cout << x1 – x2 << endl ;

return 0;
}



Compiler output:
a.cc:8:27: error: extended character – is not valid in an identifier
    8 | if ( x1 < x2 ) cout << x2 – x1 <<endl ;
      |                           ^
a.cc:10:12: error: extended character – is not valid in an identifier
   10 | cout << x1 – x2 << endl ;
      |            ^
a.cc: In function 'int main()':
a.cc:8:26: error: expected ';' before '\U00002013'
    8 | if ( x1 < x2 ) cout << x2 – x1 <<endl ;
      |                          ^~
      |                          ;
a.cc:10:11: error: expected ';' before '\U00002013'
   10 | cout << x1 – x2 << endl ;
      |           ^~
      |           ;
Language: C++

#include  <iostream>
using namespace std;
int main(){
int x1,x2;
cin>>x1>>x2;
if (x1>x2) cost<<x2-x1<<endl;
elsecost<<x1-x2<<endl;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: 'cost' was not declared in this scope; did you mean 'const'?
    6 | if (x1>x2) cost<<x2-x1<<endl;
      |            ^~~~
      |            const
a.cc:7:1: error: 'elsecost' was not declared in this scope
    7 | elsecost<<x1-x2<<endl;
      | ^~~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){

int x,y;
cin>>a>>b;
if a > b;
cout<<(a-b)<<;
else cout<<(b-a)<< endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: 'a' was not declared in this scope
    6 | cin>>a>>b;
      |      ^
a.cc:6:9: error: 'b' was not declared in this scope
    6 | cin>>a>>b;
      |         ^
a.cc:7:4: error: expected '(' before 'a'
    7 | if a > b;
      |    ^
      |    (
a.cc:8:14: error: expected primary-expression before ';' token
    8 | cout<<(a-b)<<;
      |              ^
a.cc:9:1: error: 'else' without a previous 'if'
    9 | else cout<<(b-a)<< endl;
      | ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){

int x,y;
cin>>a>>b;
if(a > b) cout<<(a-b)<<endl;
else
cout<<(b-a)<< endl;
return 0;
}


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

#include <iostream>
using namespace std;
int main(){

int x,y;
cin>>a>>b;
if(a>b) cout<<(a-b)<<endl;
else
cout<<(b-a)<< endl;
return 0;
}


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

#include <iostream>
using namespace std;
int main(){

int x,y;
cin>>a>>b;

if(a>b) cout<<(a-b)<<endl;
else
cout<<(b-a)<< endl;

return 0;
}


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

#include<iostream>
using namespace std;

int main(){
    int N,C,p[200];
    cin>>N>>C;
    inbt sum=0;
    for(int i=0;i<C;i++){
        cin>>p[i];
        sum+=p[i];
    }

    cout<<sum/(N+1)+(sum%(N;1)!=0)<<endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'inbt' was not declared in this scope; did you mean 'int'?
    7 |     inbt sum=0;
      |     ^~~~
      |     int
a.cc:10:9: error: 'sum' was not declared in this scope
   10 |         sum+=p[i];
      |         ^~~
a.cc:13:11: error: 'sum' was not declared in this scope
   13 |     cout<<sum/(N+1)+(sum%(N;1)!=0)<<endl;
      |           ^~~
a.cc:13:28: error: expected ')' before ';' token
   13 |     cout<<sum/(N+1)+(sum%(N;1)!=0)<<endl;
      |                          ~ ^
      |                            )
a.cc:13:28: error: expected ')' before ';' token
   13 |     cout<<sum/(N+1)+(sum%(N;1)!=0)<<endl;
      |                     ~      ^
      |                            )
a.cc:13:30: error: expected ';' before ')' token
   13 |     cout<<sum/(N+1)+(sum%(N;1)!=0)<<endl;
      |                              ^
      |                              ;
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int main (){

int a,b,x,az,bz,abh;
cin>>a>>b>>x;
//////////////////az//////////////////
if (x<a){
	az=a;
}
else {
	az=x/1000*a;
	if (x%1000!=0){
		az+=a;
	}
}
//////////////////bz//////////////////
if (x<b){
	bz=b;
}
else {
	bz=x/500*b;
	if (x%500!=0){
		bz+=b;
	}
}
/////////////////abh//////////////////
if (b*2<a){
	
	}
else {
	}








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

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

int main(){

	int a, n, m;
	int ans = 0;

	cin >> a >> n >> m;

	int kai = powl(a,n)+1;

	for( kai; kai <= m; kai++) {

		int  sum = 0;

		while(kai>0){
			sum = kai % 10;
			kai /10;

		if(kai - powl(a,n) == sum * (sum + 2*a)) ans++;
	}

	cout << ans << endl;

	return 0;
}


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

#include<bits/c++std.h>
using namespace std;
int main(void)
{
	int a[300001],A[300001];
	int n,q;
	int x,y;
	
	int cnt=0;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a[i];
		A[i]=a[i];
	}
	sort(a,a+n);
	for(int i=0;i<n;i++){
		if(a[i]==A[i]){
			cnt++;
		}
	}
	if(cnt==n){
		cout<<0<<endl;
		return 0;
	}
	cin>>q;
	for(int i=0;i<q;i++){
		cin>>x>>y;
		x--;y--;
		if(a[x]==A[x]){
			cnt--;
		}
		if(a[y]==a[y]){
			cnt--;
		}
		swap(A[x],A[y]);
		if(a[x]==A[x]){
			cnt++;
		}
		if(a[y]==A[y]){
			cnt++;
		}
		if(cnt==n){
			cout<<i+1<<endl;
			return 0;
		}
	}
	cout<<-1<<endl;
	return 0;
}

		


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

#include <stdio.h>

typedef struct {
    long long rotate;
    int flip;
} Query;

long long k, n, q;

Query tree[(1 << 20) * 2 + 5];
void init(void)
{
    long long _n = n;
    long long i;
    
    while (_n < n) {
        _n *= 2;
    }
    n = 2;
    
    for (long long i = 0; i <= n * 2; i++) {
        tree[i] = (Query){0, 0};
    }
    
    return;
}
Query merge(Query a, Query b)
{
    Query x;
    
    x.flip = (a.flip + b.flip) % 2;
    
    if (a.flip) x.rotate = a.rotate + b.rotate;
    else x.rotate = a.rotate - b.rotate;
    
    return Query;
}

void update(Query a, long long k)
{
    k += (n - 1);
    
    tree[k] = a;
    
    while (k > 0) {
        k = (k + 1) / 2;
        tree[k] = merge(tree[k * 2 + 1], tree[k * 2 + 2]);
    }
    
    return;
}

Query sum(void)
{
    return tree[0];
}

int main()
{
    long long a;
    scanf("%lld %lld %lld", &k, &n, &q);
    
    for (long long i = 0; i < n; i++) {
        Query x = (Query){0, 0};
        scanf("%lld", &a);
        
        if (a == 0) x.flip = 1;
        x.rotate = a;
        
        update(x, i);
    }
    
    for (long long i = 0; i < q; i++) {
        long long l, r;
        
        scanf("%lld %lld", &l, &r);
        
        Query left = tree[l + (n - 1)];
        Qeury right = tree[r + (n - 1)];
        
        update(left, r);
        update(right, l);
        
        
        Query total = sum();
        
        total.rotate = (k - total.rotate) % k;
        
        long long num = 1 + total.rotate;
        
        if (total.flip) {
            if (num == 1) {
                num = -1;
            } else {
                num = num - (k + 2);
            }
        }
        
        printf("%lld\n", num);
    }
    
    return 0;
}


Compiler output:
main.c: In function 'merge':
main.c:36:12: error: expected expression before 'Query'
   36 |     return Query;
      |            ^~~~~
main.c: In function 'main':
main.c:79:9: error: unknown type name 'Qeury'; did you mean 'Query'?
   79 |         Qeury right = tree[r + (n - 1)];
      |         ^~~~~
      |         Query
main.c:79:23: error: incompatible types when initializing type 'int' using type 'Query'
   79 |         Qeury right = tree[r + (n - 1)];
      |                       ^~~~
main.c:82:16: error: incompatible type for argument 1 of 'update'
   82 |         update(right, l);
      |                ^~~~~
      |                |
      |                int
main.c:39:19: note: expected 'Query' but argument is of type 'int'
   39 | void update(Query a, long long k)
      |             ~~~~~~^
Language: C

#include <stdio.h>

typedef struct {
    long long rotate;
    int flip;
} Query;

long long k, n, q;

Query tree[(1 << 20) * 2 + 5];
void init(void)
{
    long long _n = n;
    long long i;
    
    while (_n < n) {
        _n *= 2;
    }
    n = 2;
    
    for (long long i = 0; i <= n * 2; i++) {
        tree[i] = (Query){0, 0};
    }
    
    return;
}
Query merge(Query a, Query b)
{
    Query x;
    
    x.flip = (a.flip + b.flip) % 2;
    
    if (a.flip) x.rotate = a.rotate + b.rotate;
    else x.rotate = a.rotate - b.rotate;
    
    return x;
}

void update(Query a, long long k)
{
    k += (n - 1);
    
    tree[k] = a;
    
    while (k > 0) {
        k = (k + 1) / 2;
        tree[k] = merge(tree[k * 2 + 1], tree[k * 2 + 2]);
    }
    
    return;
}

Query sum(void)
{
    return tree[0];
}

int main()
{
    long long a;
    scanf("%lld %lld %lld", &k, &n, &q);
    
    for (long long i = 0; i < n; i++) {
        Query x = (Query){0, 0};
        scanf("%lld", &a);
        
        if (a == 0) x.flip = 1;
        x.rotate = a;
        
        update(x, i);
    }
    
    for (long long i = 0; i < q; i++) {
        long long l, r;
        
        scanf("%lld %lld", &l, &r);
        
        Query left = tree[l + (n - 1)];
        Qeury right = tree[r + (n - 1)];
        
        update(left, r);
        update(right, l);
        
        
        Query total = sum();
        
        total.rotate = (k - total.rotate) % k;
        
        long long num = 1 + total.rotate;
        
        if (total.flip) {
            if (num == 1) {
                num = -1;
            } else {
                num = num - (k + 2);
            }
        }
        
        printf("%lld\n", num);
    }
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:79:9: error: unknown type name 'Qeury'; did you mean 'Query'?
   79 |         Qeury right = tree[r + (n - 1)];
      |         ^~~~~
      |         Query
main.c:79:23: error: incompatible types when initializing type 'int' using type 'Query'
   79 |         Qeury right = tree[r + (n - 1)];
      |                       ^~~~
main.c:82:16: error: incompatible type for argument 1 of 'update'
   82 |         update(right, l);
      |                ^~~~~
      |                |
      |                int
main.c:39:19: note: expected 'Query' but argument is of type 'int'
   39 | void update(Query a, long long k)
      |             ~~~~~~^
Language: Java

public class Main{
  
    public static void main(String[] args){

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder createString = new StringBuilder();
        String line = br.readLine();
        String[] numbers = line.split(" ");

        int A = Integer.valueOf(numbers[0]);
        int B = Integer.valueOf(numbers[1]);
  
        int num = Math.floorDiv(B,A) + 1;
  
        System.out.print(num);
    }
}


Compiler output:
Main.java:5: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:5: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                ^
  symbol:   class BufferedReader
  location: class Main
Main.java:5: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                                   ^
  symbol:   class InputStreamReader
  location: class Main
3 errors
Language: Java

import java.io.*;
public class Main{
  
    public static void main(String[] args){

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder createString = new StringBuilder();
        String line = br.readLine();
        String[] numbers = line.split(" ");

        int A = Integer.valueOf(numbers[0]);
        int B = Integer.valueOf(numbers[1]);
  
        int num = Math.floorDiv(B,A) + 1;
  
        System.out.print(num);
    }
}


Compiler output:
Main.java:8: error: unreported exception IOException; must be caught or declared to be thrown
        String line = br.readLine();
                                 ^
1 error
Language: C++

#include<cassert>
using namespace std;

int main() {
  int H, A, B; cin >> H >> A >> B;

  int cnt = 0;
  for ( int i = A; i <= B; i++ ){
    cnt += (H % i == 0 );
  }

  cout << cnt << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: 'cin' was not declared in this scope
    5 |   int H, A, B; cin >> H >> A >> B;
      |                ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<cassert>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:12:3: error: 'cout' was not declared in this scope
   12 |   cout << cnt << endl;
      |   ^~~~
a.cc:12:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:18: error: 'endl' was not declared in this scope
   12 |   cout << cnt << endl;
      |                  ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<cassert>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

#include <bits/stdc++.h>
using namespace std;
bool fin;
int main(){
  int n,ans;
  cin>>n;
  vector<pair<int,int> >v(n);
  for(int i=0;i<n;++i){cin>>v[i].first;}
  for(int i=0;i<n;++i){cin>>v[i].second;}
  
  sort(v.begin(),v.end());
  if(v[0].first==1){
    cout<<0<<endl;
    return 0;
  }
  ans=v[0].second;
  for(int i=0;i<n;++i){
    if(v[i].first==1){
      ans+=v[i].second;
      fin=1;
      break;
    }
  }
  if(fi){cout<<ans<<endl;}
  else{cout<<0<<endl;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:6: error: 'fi' was not declared in this scope; did you mean 'fin'?
   24 |   if(fi){cout<<ans<<endl;}
      |      ^~
      |      fin
Language: Java

public class CardSum {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        while(true) {
            // 配られるカードの枚数取得
            int loopCnt = Integer.parseInt(sc.nextLine());
            if(loopCnt==0)break;
            // プレイヤーAの得点
            int sumA=0;
            // プレイヤーBの得点
            int sumB=0;

            // 枚数分ループ
            for(int cnt=1;cnt<=loopCnt;cnt++) {
                // カード取得
                List<String> listString = Arrays.asList(sc.nextLine().split(" "));
                List<Integer> list = new ArrayList<>();
                for (String num : listString) {
                    list.add(Integer.parseInt(num));
                }

                // カード比較
                if (list.get(0) == list.get(1)) {
                    // 同値の場合
                    sumA += list.get(0);
                    sumB += list.get(1);
                } else if (list.get(0) > list.get(1)) {
                    // Aが大きい場合
                    sumA += list.get(0) + list.get(1);
                } else {
                    // Bが大きい場合
                    sumB += list.get(0) + list.get(1);
                }
            }
            System.out.println(sumA+" "+sumB);
        }
    }

}


Compiler output:
Main.java:1: error: class CardSum is public, should be declared in a file named CardSum.java
public class CardSum {
       ^
Main.java:6: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class CardSum
Main.java:6: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class CardSum
Main.java:19: error: cannot find symbol
                List<String> listString = Arrays.asList(sc.nextLine().split(" "));
                ^
  symbol:   class List
  location: class CardSum
Main.java:19: error: cannot find symbol
                List<String> listString = Arrays.asList(sc.nextLine().split(" "));
                                          ^
  symbol:   variable Arrays
  location: class CardSum
Main.java:20: error: cannot find symbol
                List<Integer> list = new ArrayList<>();
                ^
  symbol:   class List
  location: class CardSum
Main.java:20: error: cannot find symbol
                List<Integer> list = new ArrayList<>();
                                         ^
  symbol:   class ArrayList
  location: class CardSum
7 errors
Language: Java

package sample;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class CardSum {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(true) {
            // 配られるカードの枚数取得
            int loopCnt = Integer.parseInt(sc.nextLine());
            if(loopCnt==0)break;
            // プレイヤーAの得点
            int sumA=0;
            // プレイヤーBの得点
            int sumB=0;

            // 枚数分ループ
            for(int cnt=1;cnt<=loopCnt;cnt++) {
                // カード取得
                List<String> listString = Arrays.asList(sc.nextLine().split(" "));
                List<Integer> list = new ArrayList<>();
                for (String num : listString) {
                    list.add(Integer.parseInt(num));
                }

                // カード比較
                if (list.get(0) == list.get(1)) {
                    // 同値の場合
                    sumA += list.get(0);
                    sumB += list.get(1);
                } else if (list.get(0) > list.get(1)) {
                    // Aが大きい場合
                    sumA += list.get(0) + list.get(1);
                } else {
                    // Bが大きい場合
                    sumB += list.get(0) + list.get(1);
                }
            }
            System.out.println(sumA+" "+sumB);
        }
    }

}



Compiler output:
Main.java:8: error: class CardSum is public, should be declared in a file named CardSum.java
public class CardSum {
       ^
1 error
Language: Java

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(true) {
            // 配られるカードの枚数取得
            int loopCnt = Integer.parseInt(sc.nextLine());
            if(loopCnt==0)break;
            // プレイヤーAの得点
            int sumA=0;
            // プレイヤーBの得点
            int sumB=0;

            // 枚数分ループ
            for(int cnt=1;cnt<=loopCnt;cnt++) {
                // カード取得
                List<String> listString = Arrays.asList(sc.nextLine().split(" "));
                List<Integer> list = new ArrayList<>();
                for (String num : listString) {
                    list.add(Integer.parseInt(num));
                }

                // カード比較
                if (list.get(0) == list.get(1)) {
                    // 同値の場合
                    sumA += list.get(0);
                    sumB += list.get(1);
                } else if (list.get(0) > list.get(1)) {
                    // Aが大きい場合
                    sumA += list.get(0) + list.get(1);
                } else {
                    // Bが大きい場合
                    sumB += list.get(0) + list.get(1);
                }
            }
            System.out.println(sumA+" "+sumB);
        }
    }



Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
    public static void main(String[] args) {
                  ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class CardSum {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！

        Scanner sc = new Scanner(System.in);
        while(true) {
            // 配られるカードの枚数取得
            int loopCnt = Integer.parseInt(sc.nextLine());
            if(loopCnt==0)break;
            // プレイヤーAの得点
            int sumA=0;
            // プレイヤーBの得点
            int sumB=0;

            // 枚数分ループ
            for(int cnt=1;cnt<=loopCnt;cnt++) {
                // カード取得
                List<String> listString = Arrays.asList(sc.nextLine().split(" "));
                List<Integer> list = new ArrayList<>();
                for (String num : listString) {
                    list.add(Integer.parseInt(num));
                }

                // カード比較
                if (list.get(0) == list.get(1)) {
                    // 同値の場合
                    sumA += list.get(0);
                    sumB += list.get(1);
                } else if (list.get(0) > list.get(1)) {
                    // Aが大きい場合
                    sumA += list.get(0) + list.get(1);
                } else {
                    // Bが大きい場合
                    sumB += list.get(0) + list.get(1);
                }
            }
            System.out.println(sumA+" "+sumB);
        }
    }

}



Compiler output:
Main.java:6: error: class CardSum is public, should be declared in a file named CardSum.java
public class CardSum {
       ^
1 error
Language: Java

import java.util.ArrayList;
import java.util.Scanner;

public class q0500 {
	public static void main (String[] args){
		Scanner s = new Scanner(System.in);
		
		ArrayList<Integer> a = new ArrayList<>();
		ArrayList<Integer> b = new ArrayList<>();
		
		int n = s.nextInt();
		while(n != 0){
			int x[] = new int[n];
			int y[] = new int[n];
			int x1 = 0;
			int y1 = 0;
			
			for(int i = 0; i < n; i++){
				x[i] = s.nextInt();
				y[i] = s.nextInt();
				
				if(x[i] > y[i]){
					x1 += x[i] + y[i];
				}
				else if( x[i] < y[i]){
					y1 += x[i] + y[i];
				}
				else{
					x1 += x[i];
					y1 += y[i];
				}
			}
			a.add(x1);
			b.add(y1);
			n = s.nextInt();
		}
		
		for (int i = 0 ;i < a.size() ; i++){
		      System.out.println(a.get(i) + " " + b.get(i));
		}

	}
}

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

import java.util.ArrayList;
import java.util.Scanner;

public class q0500 {
	public static void main (String[] args){
		Scanner s = new Scanner(System.in);
		
		ArrayList<Integer> a = new ArrayList<Integer>();
		ArrayList<Integer> b = new ArrayList<Integer>();
		
		int n = s.nextInt();
		while(n != 0){
			int x[] = new int[n];
			int y[] = new int[n];
			int x1 = 0;
			int y1 = 0;
			
			for(int i = 0; i < n; i++){
				x[i] = s.nextInt();
				y[i] = s.nextInt();
				
				if(x[i] > y[i]){
					x1 += x[i] + y[i];
				}
				else if( x[i] < y[i]){
					y1 += x[i] + y[i];
				}
				else{
					x1 += x[i];
					y1 += y[i];
				}
			}
			a.add(x1);
			b.add(y1);
			n = s.nextInt();
		}
		
		for (int i = 0 ;i < a.size() ; i++){
		      System.out.println(a.get(i) + " " + b.get(i));
		}

	}
}

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

/* package whatever; // don't place package name! */

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

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		int n = System.in.read(); 
		int as = 0;
		int bs = 0;
		
		for (int i=0; i<n ;i++){
			String tmp = System.in.read();
			String[] buf = tmp.split(" ");
			int a = Integer.parseInt(buf[0]);
			int b = Integer.parseInt(buf[1]);
			
			if ( a > b ){
				as += a + b;
			}else if (a < b){
				bs += a + b;
			}else{
				as += a;
				bs += b;
			}
			
		}
		
		System.out.println(as + " " + bs);
		
	}
}

Compiler output:
Main.java:17: error: incompatible types: int cannot be converted to String
			String tmp = System.in.read();
			                           ^
1 error
Language: Java

import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.util.Map;
import java.util.PriorityQueue???
import java.util.Scanner;
import java.math.BigInteger;
    
public class Main{

static final InputStream in=System.in;
static final PrintWriter out=new PrintWriter(System.out);
static final int INF=Integer.MAX_VALUE/2;
static final long LINF=Long.MAX_VALUE/2;

public static void main(String[] args) throws IOException{
Scanner ir=new Scanner(in);
while(sc.hasNextInt()){
int N=ir.nextInt();
int acnt,bcnt;
acnt=bcnt=0;
while(N-->0){
int a=ir.nextInt();
int b=ir.nextInt();
if(a>b) acnt+=(a+b);
else if(a==b){
acnt+=a;
bcnt+=b;
}
else bcnt+=(a+b);
}
out.println(acnt+" "+bcnt);
}
out.flush();
}

static class InputReader {
private InputStream in;
private byte[] buffer=new byte[1024];
private int curbuf;
private int lenbuf;

public InputReader(InputStream in) {this.in=in;}
  
public int readByte() {
if(lenbuf==-1) throw new InputMismatchException();
if(curbuf>=lenbuf){
curbuf= 0;
try{
lenbuf=in.read(buffer);
}
catch (IOException e) {
throw new InputMismatchException();
}
if(lenbuf<=0)
return -1;
}
return buffer[curbuf++];
}

public boolean isSpaceChar(int c){return !(c>=33&&c<=126);}

private int skip() {int b; while((b = readByte())!=-1&&isSpaceChar(b)); return b;}

public String next() {
int b=skip();
StringBuilder sb=new StringBuilder();
while(!isSpaceChar(b)){
sb.appendCodePoint(b);
b=readByte();
}
return sb.toString();
}
 
public int nextInt() {
int c=readByte();
while (isSpaceChar(c)) c=readByte();
boolean minus=false;
if (c=='-') {
minus=true;
c=readByte();
}
int res=0;
do{
if(c<'0'||c>'9') throw new InputMismatchException();
res=res*10+c-'0';
c=readByte();
}while(!isSpaceChar(c));
return (minus)?-res:res;
}

public long nextLong() {
int c=readByte();
while (isSpaceChar(c)) c=readByte();
boolean minus=false;
if (c=='-') {
minus=true;
c=readByte();
}
long res = 0;
do{
if(c<'0'||c>'9') throw new InputMismatchException();
res=res*10+c-'0';
c=readByte();
}while(!isSpaceChar(c));
return (minus)?-res:res;
}

public int[] toIntArray(int n){
int[] a=new int[n];
for(int i=0;i<n;i++) a[i]=nextInt();
return a;
}
}
}

Compiler output:
Main.java:13: error: ';' expected
import java.util.PriorityQueue???
                              ^
1 error
Language: Java

import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Scanner;
import java.math.BigInteger;
    
public class Main{

static final InputStream in=System.in;
static final PrintWriter out=new PrintWriter(System.out);
static final int INF=Integer.MAX_VALUE/2;
static final long LINF=Long.MAX_VALUE/2;

public static void main(String[] args) throws IOException{
Scanner ir=new Scanner(in);
while(sc.hasNextInt()){
int N=ir.nextInt();
int acnt,bcnt;
acnt=bcnt=0;
while(N-->0){
int a=ir.nextInt();
int b=ir.nextInt();
if(a>b) acnt+=(a+b);
else if(a==b){
acnt+=a;
bcnt+=b;
}
else bcnt+=(a+b);
}
out.println(acnt+" "+bcnt);
}
out.flush();
}

static class InputReader {
private InputStream in;
private byte[] buffer=new byte[1024];
private int curbuf;
private int lenbuf;

public InputReader(InputStream in) {this.in=in;}
  
public int readByte() {
if(lenbuf==-1) throw new InputMismatchException();
if(curbuf>=lenbuf){
curbuf= 0;
try{
lenbuf=in.read(buffer);
}
catch (IOException e) {
throw new InputMismatchException();
}
if(lenbuf<=0)
return -1;
}
return buffer[curbuf++];
}

public boolean isSpaceChar(int c){return !(c>=33&&c<=126);}

private int skip() {int b; while((b = readByte())!=-1&&isSpaceChar(b)); return b;}

public String next() {
int b=skip();
StringBuilder sb=new StringBuilder();
while(!isSpaceChar(b)){
sb.appendCodePoint(b);
b=readByte();
}
return sb.toString();
}
 
public int nextInt() {
int c=readByte();
while (isSpaceChar(c)) c=readByte();
boolean minus=false;
if (c=='-') {
minus=true;
c=readByte();
}
int res=0;
do{
if(c<'0'||c>'9') throw new InputMismatchException();
res=res*10+c-'0';
c=readByte();
}while(!isSpaceChar(c));
return (minus)?-res:res;
}

public long nextLong() {
int c=readByte();
while (isSpaceChar(c)) c=readByte();
boolean minus=false;
if (c=='-') {
minus=true;
c=readByte();
}
long res = 0;
do{
if(c<'0'||c>'9') throw new InputMismatchException();
res=res*10+c-'0';
c=readByte();
}while(!isSpaceChar(c));
return (minus)?-res:res;
}

public int[] toIntArray(int n){
int[] a=new int[n];
for(int i=0;i<n;i++) a[i]=nextInt();
return a;
}
}
}

Compiler output:
Main.java:26: error: cannot find symbol
while(sc.hasNextInt()){
      ^
  symbol:   variable sc
  location: class Main
1 error