criyle/codenet-compile-errors huggingface dataset:
Language: Java

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

class Main {

    public static void main( final String[] args ) {

	final Scanner stdin = new Scanner( System.in );

	final String[] param = stdin.nextLine().split( " " );
	final int N = Integer.parseInt( param[ 0 ] );
	final int Q = Integer.parseInt( param[ 1 ] );

	final String[] input = stdin.nextLine().split( " " );
	final int[] cs = new int[ input.length ];
	int maxValue = Integer.MIN_VALUE;
	for ( int i = 0; i < cs.length; i++ ) {
	    cs[ i ] = Integer.parseInt( input[ i ] );
	    maxValue = max( maxValue, cs[ i ] );
	}

	if ( N * Q < 10000000 ) {
	    for ( int i = 0; i < Q; i++ ) {
		final int q = stdin.nextInt();
		int maxMod = 0;
		for ( int i : cs ) {
		    maxMod = max( maxMod, i % q );
		}
		Systme.out.println( maxMod );
	    }
	} else {
	    boolean[] ns = new boolean[ maxValue + 1 ];
	    for ( final int c : cs ) {
		ns[ c ] = true;		
	    }
	    
	    for ( int i = 0; i < Q; i++ ) {
		final int q = stdin.nextInt();
		int stepIndex = 0;
		int maxMod = 0;
		while ( stepIndex <= maxValue ) {
		    for ( int j = maxMod; stepIndex + j <= maxValue && j < q; j++ ) {
			if ( ns[ stepIndex + j ] ) {
			    maxMod = j;
			}
		    }
		    stepIndex += q;
		    if ( maxMod == q - 1 ) {
			break;
		    }
		}
		System.out.println( maxMod );
	    }	
	}
    }
}

Compiler output:
Main.java:27: error: variable i is already defined in method main(String[])
		for ( int i : cs ) {
		          ^
Main.java:30: error: package Systme does not exist
		Systme.out.println( maxMod );
		      ^
2 errors
Language: Java

import java.io.*;

public class ModuloQuery {
	public static void main(String[] args) throws Exception {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String input = in.readLine();
		String[] tmp = input.split(" ",0);
		int n = Integer.parseInt(tmp[0]);
		int Q = Integer.parseInt(tmp[1]);
		int[] c = new int[n];
		input = in.readLine();
		tmp = input.split(" ",0);
		for (int i = 0; i < n; i++)
			c[i] = Integer.parseInt(tmp[i]);
		for (int i = 0; i < Q; i++) {
			int r, max = 0, q = Integer.parseInt(in.readLine());
			for (int j = 0; j < n; j++) {
				r = c[j] % q;
				if (r > max)
					max = r;
			}
			System.out.println(max);
		}
	}
}

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

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

vector<int> card;

int main(void){
  int N, Q, c, q;
  cin >> N >> Q;
  for(int i = 0; i < N; i++){
    cin >> c;
    card.push_back(c);
  }
  sort(card.begin(), card.end());
  int me = card[N - 1];
  for(int i = 0; i < Q; i++){
    cin >> q;
    int M = -1;
    int u = int(1.0 * me / q + 0.9);
    for(int i = 1; i <= u; i++){
      vector<int>::iterator it = lower_bound(card.begin(), card.end(), q * i);
      if(it != card.begin()) M = max(M, *(it - 1) % q);
    }
    cout << M << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   14 |   sort(card.begin(), card.end());
      |   ^~~~
      |   short
Language: C++

#include<stdio.h>

int main(){
int N,Q,c[300000],q[100000],i,j;
innt j=-1
scanf("%d",&N);
scanf("%d",&Q);
for(i=0;i<N;i++){
scanf("%d",&c[i]);
}
for(i=0;i<Q;i++){
scanf("%d",&q[i]);
}
for(i=0;i<Q;i++){
for(j=0;j<N;j++){
if(c[j]%q[i]>g){
g=c[j]%q[i];
}
}
printf("%d\n",g);
g=0;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'innt' was not declared in this scope; did you mean 'int'?
    5 | innt j=-1
      | ^~~~
      | int
a.cc:16:14: error: 'g' was not declared in this scope
   16 | if(c[j]%q[i]>g){
      |              ^
a.cc:20:15: error: 'g' was not declared in this scope
   20 | printf("%d\n",g);
      |               ^
Language: C++

#include<stdio.h>

int main(){
int N,Q,c[300000],q[100000],i,j;
int j=-1
scanf("%d",&N);
scanf("%d",&Q);
for(i=0;i<N;i++){
scanf("%d",&c[i]);
}
for(i=0;i<Q;i++){
scanf("%d",&q[i]);
}
for(i=0;i<Q;i++){
for(j=0;j<N;j++){
if(c[j]%q[i]>g){
g=c[j]%q[i];
}
}
printf("%d\n",g);
g=0;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: redeclaration of 'int j'
    5 | int j=-1
      |     ^
a.cc:4:31: note: 'int j' previously declared here
    4 | int N,Q,c[300000],q[100000],i,j;
      |                               ^
a.cc:16:14: error: 'g' was not declared in this scope
   16 | if(c[j]%q[i]>g){
      |              ^
a.cc:20:15: error: 'g' was not declared in this scope
   20 | printf("%d\n",g);
      |               ^
Language: C++

#include<stdio.h>

int main(){
int N,Q,c[300000],q[100000],i,j;
int j=-1;
scanf("%d",&N);
scanf("%d",&Q);
for(i=0;i<N;i++){
scanf("%d",&c[i]);
}
for(i=0;i<Q;i++){
scanf("%d",&q[i]);
}
for(i=0;i<Q;i++){
for(j=0;j<N;j++){
if(c[j]%q[i]>g){
g=c[j]%q[i];
}
}
printf("%d\n",g);
g=0;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: redeclaration of 'int j'
    5 | int j=-1;
      |     ^
a.cc:4:31: note: 'int j' previously declared here
    4 | int N,Q,c[300000],q[100000],i,j;
      |                               ^
a.cc:16:14: error: 'g' was not declared in this scope
   16 | if(c[j]%q[i]>g){
      |              ^
a.cc:20:15: error: 'g' was not declared in this scope
   20 | printf("%d\n",g);
      |               ^
Language: C++

int main(){
int N,Q,c[300000],q[100000],i,j,g=-1;
scanf("%d",&N);
scanf("%d",&Q);
for(i=0;i<N;i++){
scanf("%d",&c[i]);
}
for(i=0;i<Q;i++){
scanf("%d",&q[i]);
}
for(i=0;i<Q;i++){
for(j=0;j<N;j++){
if(c[j]%q[i]>g){
g=c[j]%q[i];
}
}
printf("%d\n",g);
g=0;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:1: error: 'scanf' was not declared in this scope
    3 | scanf("%d",&N);
      | ^~~~~
a.cc:17:1: error: 'printf' was not declared in this scope
   17 | printf("%d\n",g);
      | ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
Language: C++

#include <cstdio>
#define MAX_N 300000
#define MAX_C 300000
int main(){
  int N, Q;
  scanf("%d %d\n", &N, &Q);
  int card[MAX_N];
  bool has_card[MAX_C+1];


  for(int i = 0; i < N; i++){
    scanf("%d", &card[i]);
  //  printf("card %d ", card[i]);
  }
  for(int i = 0; i <= MAX_C; i++){
    has_card[i] = false;
  }
  for(int i = 0; i < N; i++){
    has_card[card[i]] = true;
  }
//  printf("\n");
  for(int i = 0; i < Q; i++){
    int q;
    scanf(" %d", &q);
  //  printf("q = %d\n", q);
    bool found = false;
    for(int init = q-1; init => 0; init--){
      for(int j = init; j < MAX_C ; j += q){
        if(has_card[j]){
          printf("%d\n", init);
          found = true;
          break;
        }
      }
      if(found){
        break;
      }
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:31: error: expected primary-expression before '>' token
   27 |     for(int init = q-1; init => 0; init--){
      |                               ^
Language: C++

#include<iostream>
int p[1<<20],n,q,a,i,j,c;main(){cin>>n>>q;for(i=0;i<n;i++){std::cin>>a;p[a]=1;}for(i=0;i<q;i++){cin>>a;for(j=a-1;j>=0;j--){c=j;while(1){if(p[c]){std::cout<<j<<"\n";goto E;}c+=a;if(c>300000)break;}}E:;}}

Compiler output:
a.cc:2:26: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | int p[1<<20],n,q,a,i,j,c;main(){cin>>n>>q;for(i=0;i<n;i++){std::cin>>a;p[a]=1;}for(i=0;i<q;i++){cin>>a;for(j=a-1;j>=0;j--){c=j;while(1){if(p[c]){std::cout<<j<<"\n";goto E;}c+=a;if(c>300000)break;}}E:;}}
      |                          ^~~~
a.cc: In function 'int main()':
a.cc:2:33: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    2 | int p[1<<20],n,q,a,i,j,c;main(){cin>>n>>q;for(i=0;i<n;i++){std::cin>>a;p[a]=1;}for(i=0;i<q;i++){cin>>a;for(j=a-1;j>=0;j--){c=j;while(1){if(p[c]){std::cout<<j<<"\n";goto E;}c+=a;if(c>300000)break;}}E:;}}
      |                                 ^~~
      |                                 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
      |                  ^~~
Language: C++

#include<iostream>
int p[1<<20],n,q,a,i,j,c;main(){std::cin>>n>>q;for(i=0;i<n;i++){std::cin>>a;p[a]=1;}for(i=0;i<q;i++){cin>>a;for(j=a-1;j>=0;j--){c=j;while(1){if(p[c]){std::cout<<j<<"\n";goto E;}c+=a;if(c>300000)break;}}E:;}}

Compiler output:
a.cc:2:26: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | int p[1<<20],n,q,a,i,j,c;main(){std::cin>>n>>q;for(i=0;i<n;i++){std::cin>>a;p[a]=1;}for(i=0;i<q;i++){cin>>a;for(j=a-1;j>=0;j--){c=j;while(1){if(p[c]){std::cout<<j<<"\n";goto E;}c+=a;if(c>300000)break;}}E:;}}
      |                          ^~~~
a.cc: In function 'int main()':
a.cc:2:102: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    2 | int p[1<<20],n,q,a,i,j,c;main(){std::cin>>n>>q;for(i=0;i<n;i++){std::cin>>a;p[a]=1;}for(i=0;i<q;i++){cin>>a;for(j=a-1;j>=0;j--){c=j;while(1){if(p[c]){std::cout<<j<<"\n";goto E;}c+=a;if(c>300000)break;}}E:;}}
      |                                                                                                      ^~~
      |                                                                                                      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
      |                  ^~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int c[300001] = { 0 },N,Q,max=1,num,q;
  cin >> N >> Q;
  for(int i=0;i<N;i++){
   cin >> num;
   c[num]=1;
   if(max < num)max=num;
  }
  for(int i=0; i<Q ; i++){
   cin >> q;
   for(int j=q-1;j>=0;j--){
    for(int k = j;k <= max;k+=q){
     if(c[k]){???
      cout << j << endl;
      goto SKIP;
     }
    }
   }
SKIP:;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: expected primary-expression before '?' token
   16 |      if(c[k]){???
      |               ^
a.cc:16:16: error: expected primary-expression before '?' token
   16 |      if(c[k]){???
      |                ^
a.cc:16:17: error: expected primary-expression before '?' token
   16 |      if(c[k]){???
      |                 ^
a.cc:17:24: error: expected ':' before ';' token
   17 |       cout << j << endl;
      |                        ^
      |                        :
a.cc:17:24: error: expected primary-expression before ';' token
a.cc:17:24: error: expected ':' before ';' token
   17 |       cout << j << endl;
      |                        ^
      |                        :
a.cc:17:24: error: expected primary-expression before ';' token
a.cc:17:24: error: expected ':' before ';' token
   17 |       cout << j << endl;
      |                        ^
      |                        :
a.cc:17:24: error: expected primary-expression before ';' token
Language: C++

#include<bits/stdc++.h>
#define int long long
#define MOD 1000000007
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3f
#define EPS (1e-10)
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;
typedef pair<int, int>P;

bool b[10000001];
int main() {
	int n, q; scanf("%lld%lld", &n, &q);
	int s = INT_MAX, g = 0;
	rep(i, n) {
		int c; scanf("%d", &c);
		b[c] = true;
		s = min(s, c); g = max(g, c);
	}
	rep(i, q) {
		int p; scanf("%lld", &p);
		int Max = 0;
		int t = s;
		while (t <= g) {
			if (b[t]) {
				Max = t%p; t++;
				if (Max == p - 1)break;
			}
			else t += p;
		}
		printf("%lld\n", Max);
	}
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

# include <iostream>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <utility>
# include <stack>
# include <queue>
# include <list>
# include <bitset>
# include <complex>
#include<limits.h>
#include<unordered_map>
#include<unordered_set>
#include<deque>
#include<cstdio>
typedef long long int ll;
#define FOR(i,a,n) for(int i=(ll)a;i<(ll)n;++i)
#define TFOR(i,n)FOR(i,0,n)
#define ALL(x) x.begin(),x.end();
const int INF = 1LL << 30;
const ll LLINF = 1LL << 60;
int main() {
	int n, q;
	std::cin >> n >> q;
	int max = 0;
	std::bitset<???00000> bit;
	TFOR(i, n) {
		int nn;
		std::cin >> nn;
		bit[nn-1] = 1;
		if (max < nn)max = nn;
	}
	TFOR(i, q) {
		int nn;
		std::cin >> nn;
		bool fl = 0;
		for (int j = nn-1; j>=0; --j) {
			for (int k =max/nn*nn+j; k > 0; k -= nn) {
				if (bit[k - 1] == 1) { std::cout << j << std::endl; fl = 1; }
				if (fl == 1)break;
			}
			if (fl == 1) { fl = 0; break; }
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:29: error: template argument 1 is invalid
   31 |         std::bitset<???00000> bit;
      |                             ^
a.cc:35:20: error: invalid types 'int[int]' for array subscript
   35 |                 bit[nn-1] = 1;
      |                    ^
a.cc:44:40: error: invalid types 'int[int]' for array subscript
   44 |                                 if (bit[k - 1] == 1) { std::cout << j << std::endl; fl = 1; }
      |                                        ^
Language: C++


#include <stdio.h>
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;


int main() {
    long n,qq;
    scanf ("%ld %ld",&n,&qq);
    vector<long> c;
    int k;
    for(k=0;k<n;k++){
      c.push_back(0);
      scanf ("%ld",&c[k]);
    }
    long q;
    long ans=0;
    for(int t=0;t<qq;t++){
      ans=0
      scanf ("%ld",&q);
      for(int s=0;s<k;s++){
        if(ans<(c[s]%q)){
          ans=c[s]%q;
        }
        if(ans==(q-1)) break;
      }
      printf("%ld\n",ans);
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:21:12: error: expected ';' before 'scanf'
   21 |       ans=0
      |            ^
      |            ;
   22 |       scanf ("%ld",&q);
      |       ~~~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(void){
    int n,q;
    cin>>n>>q;
    int m=n;
    int a[300010];
    while(m--)cin>>a[i];
    int ans=0;
    for(int i=0;i<q;i++){
        int x;
        cin>>x;
        for(int j=x;j<300000;j+=x)ans=max(ans,a[lower_bound(a,a+n,j)-a-1]%x);
        cout<<ans<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: 'i' was not declared in this scope
    9 |     while(m--)cin>>a[i];
      |                      ^
Language: C

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

int main(void){
	clock_t startTime, endTime;
	using namespace std;
	int i,j;
	//階乗の計算
	long long int fact[100000]={0};
	for(i=0; i<100000; i++){
		if(i==0) fact[i] = 1;
		else fact[i] = (fact[i-1]*i)%1000000007;
	}

	long int N,K;
	cin >> N;
	while(N!=0){
		cin >> K;
		long int a,b;
		long int k=0, value=0, index = -1;
		vector <long int> data;
		vector <long int> data2;
		vector <long int>::iterator itr;
		//入れ替え前
		for(i=0; i<N; i++){
			data.push_back(i);
			data2.push_back(i);
		}
		
		//入れ替え
		for(i=0; i<K; i++){
		cin >> a >> b;
		swap(data[a-1],data[b-1]);
		}
		
		//探索
		for(i=0; i<N; i++){
			//data[i]のインデックス取得
			itr = find(data2.begin(), data2.end(), data[i]);
			index = itr - data2.begin();
			k = data[i] - index;
			value += (data[i]-k)*fact[N-1-i];
			value = value % 1000000007;
			data2.erase(itr);
		}
		cout << value <<endl;
		cin >> N;
	}
	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>
#include<algorithm>
using namespace std;

const long long B = 1000000007;
	
bool countOne(){
	int N, R;
	cin >> N;
	if(N==0) return false;
	cin >> R;
	int *counter = new int[N]();
	for(int r=0; r<R; r++){
		int s, t;
		*fin >> s >> t;
		for(int i=t-1; i>=s; i--){
			int a = counter[i-1];
			int b = counter[i];
			if(a <= b){
				counter[i] = a;
				counter[i-1] = b+1;
			}
			else{
				counter[i] = a-1;
				counter[i-1] = b;
			}
		}
		for(int i=s+1; i<=t-1; i++){
			int a = counter[i-1];
			int b = counter[i];
			if(a <= b){
				counter[i] = a;
				counter[i-1] = b+1;
			}
			else{
				counter[i] = a-1;
				counter[i-1] = b;
			}
		}
	}
	
	long long fact = 1, index=0;
	for(int n=1; n<N; n++){
		index += counter[N-n-1]*fact;
		fact = ((n+1)*fact)%B;
		index = index%B;
	}
	cout << index << endl;
	delete[] counter;
	return true;
}

int main(){
	while(countOne()){}
	return 0;
}

Compiler output:
a.cc: In function 'bool countOne()':
a.cc:15:18: error: 'fin' was not declared in this scope
   15 |                 *fin >> s >> t;
      |                  ^~~
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
using namespace std;

const int N_MAX = 100000;
const int R_MAX = 50;
const int BigNumber = 1000000007;	

 struct squaence{
	int start,length, counter;
	
	squaence(){}
	squaence(int _start, int _end){
		start = _start;
		length = _end - _start + 1;
		counter = 0;
	}
};



int main(){
	int s[R_MAX], t[R_MAX], N, R;
	
	long long SigmaFactrial[N_MAX+1];
	SigmaFactrial[0] = 0;
	long long factrial = 1;
	for(int i=1; i<N_MAX+1; i++){
		SigmaFactrial[i] = (SigmaFactrial[i-1]+factrial)%BigNumber;
		factrial = (factrial*i)%BigNumber;	
	}

	while(true){
		cin >> N;
		if(N==0) break;
		cin >> R;	
		
		vector<int> st_vector(2*R);
		for(int r=0; r<R; r++){
			int tmp_s, tmp_t;
			fin >> tmp_s >> tmp_t;
			s[r] = tmp_s-1;
			t[r] = tmp_t-1;
			st_vector[2*r  ] = s[r];
			st_vector[2*r+1] = t[r];
		}
		sort(st_vector.begin(), st_vector.end());
		st_vector.erase(unique(st_vector.begin(), st_vector.end()), st_vector.end());
		const int st_vector_size = st_vector.size();
		
		vector<squaence> number;
		int n=0;
		for(int j=0; j<st_vector_size; j++){
			if(n <st_vector[j])number.push_back(squaence(n, st_vector[j]-1));
			n = st_vector[j];
			number.push_back(squaence(n, n));
			n++;
		}
		if(n<N)number.push_back(squaence(n, N-1));
			
		map<int,int> index_map;
		for(int i=0; i<st_vector_size; i++){
			int v = st_vector[i];
			auto it = find_if(number.begin(), number.end(), [v](squaence s){return s.start==v;});
			index_map[v] = distance(number.begin(), it) ;
		}

		for(int r=0; r<R; r++){
			int rs = index_map[s[r]];
			int rt = index_map[t[r]];

			int ns = number[rs].start;
			int nt = number[rt].start;
			int cs = number[rs].counter;
			int ct = number[rt].counter;
				
			if(ns<nt)	ct++;
			else		cs--;
			for(int i=rs+1; i<rt; i++){
				int ni = number[i].start;
				if(ni < nt){
					ct+=number[i].length;
					if(ns<ni) number[i].counter++;
				}
				if(ni < ns){
					cs-=number[i].length;
					if(nt<ni) number[i].counter--;
				}
			}

			number[rs].counter = cs;
			number[rt].counter = ct;
			swap(number[rs], number[rt]);
		}
	
		n=0;
		long long index = 0;
		const int number_size = number.size();
		for(int i=0; i<number_size; i++){
			const squaence* s = &number[number_size-1-i];
			if(s->counter != 0)index += s->counter * (SigmaFactrial[n+s->length] - SigmaFactrial[n]) % BigNumber;
			n += s->length;
		}
		
		while(index<0) index+=BigNumber;
		cout << index%BigNumber << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:25: error: 'fin' was not declared in this scope
   43 |                         fin >> tmp_s >> tmp_t;
      |                         ^~~
Language: C++

#include<bits/stdc++.h>

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

using namespace std;

typedef long long ll;
const ll MOD = 1000000007LL;
int N;
ll fact[200000];

ll compute(vector<int> vec){
  ll ret = fact[vec.size()];
  set<int> S;
  rep(i,vec.size()) {
    int tp = -1;
    for(int j=N;j>=1;j--) if( !S.count(j) ) { tp = j; break; }
    assert( tp != -1 );
    ll coef = tp - vec[i];
    assert( ceof >= 0LL );
    ret = ( ret - coef * fact[N-i-1] + MOD ) % MOD;
    S.insert(vec[i]);
  }
  return (ret-1LL+MOD)%MOD;
}

int main(){
  fact[0] = fact[1] = 1LL;
  REP(i,2,200000) fact[i] = ( fact[i-1] * ll(i) ) % MOD;
  while( cin >> N, N ){
    vector<int> vec(N);
    rep(i,N) vec[i] = i+1;
    int R;
    cin >> R;
    rep(_,R){
      int s,t;
      cin >> s >> t;
      --s, --t;
      swap(vec[s],vec[t]);
    }
    cout << compute(vec) << endl;
  }
  return 0;
}

Compiler output:
In file included from /usr/include/c++/14/cassert:44,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:106,
                 from a.cc:1:
a.cc: In function 'll compute(std::vector<int>)':
a.cc:21:13: error: 'ceof' was not declared in this scope; did you mean 'coef'?
   21 |     assert( ceof >= 0LL );
      |             ^~~~
Language: C++

include<bits/stdc++.h>

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

using namespace std;

typedef long long ll;
const ll MOD = 1000000007LL;
int N;
ll fact[200000];

ll compute(vector<int> vec){
  ll ret = fact[vec.size()];
  set<int> S;
  rep(i,vec.size()) {
    int tp = -1;
    for(int j=N;j>=1;j--) if( !S.count(j) ) { tp = j; break; }
    assert( tp != -1 );
    ll coef = tp - vec[i];
    assert( coef >= 0LL );
    ret = ( ret -  ( coef * fact[N-i-1] ) % MOD + MOD ) % MOD;
    S.insert(vec[i]);
  }
  return (ret-1LL+MOD)%MOD;
}

int main(){
  fact[0] = fact[1] = 1LL;
  REP(i,2,200000) fact[i] = ( fact[i-1] * ll(i) ) % MOD;
  while( cin >> N, N ){
    vector<int> vec(N);
    rep(i,N) vec[i] = i+1;
    int R;
    cin >> R;
    rep(_,R){
      int s,t;
      cin >> s >> t;
      --s, --t;
      swap(vec[s],vec[t]);
    }
    cout << compute(vec) << endl;
  }
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc:13:12: error: 'vector' was not declared in this scope
   13 | ll compute(vector<int> vec){
      |            ^~~~~~
a.cc:13:19: error: expected primary-expression before 'int'
   13 | ll compute(vector<int> vec){
      |                   ^~~
a.cc: In function 'int main()':
a.cc:31:10: error: 'cin' was not declared in this scope
   31 |   while( cin >> N, N ){
      |          ^~~
a.cc:32:5: error: 'vector' was not declared in this scope
   32 |     vector<int> vec(N);
      |     ^~~~~~
a.cc:32:12: error: expected primary-expression before 'int'
   32 |     vector<int> vec(N);
      |            ^~~
a.cc:33:14: error: 'vec' was not declared in this scope
   33 |     rep(i,N) vec[i] = i+1;
      |              ^~~
a.cc:40:12: error: 'vec' was not declared in this scope
   40 |       swap(vec[s],vec[t]);
      |            ^~~
a.cc:40:7: error: 'swap' was not declared in this scope
   40 |       swap(vec[s],vec[t]);
      |       ^~~~
a.cc:42:5: error: 'cout' was not declared in this scope
   42 |     cout << compute(vec) << endl;
      |     ^~~~
a.cc:42:21: error: 'vec' was not declared in this scope
   42 |     cout << compute(vec) << endl;
      |                     ^~~
a.cc:42:24: error: 'compute' cannot be used as a function
   42 |     cout << compute(vec) << endl;
      |                        ^
a.cc:42:29: error: 'endl' was not declared in this scope
   42 |     cout << compute(vec) << endl;
      |                             ^~~~
Language: C++

#include <iostream>
#include <set>
#include <vector>
using namespace std;

typedef long long ll;

#define MOD 1000000007LL

int n, m;
int a[52], b[52];
int t[100002];
ll f[100002];
vector<int> cg;

void mkFact(){
  f[0] = 1;
  for(ll i = 1; i <= 100000; i++){
    f[i] = f[i - 1] * i;
    f[i] %= MOD;
  }
}

void show(int nn, int mm){
  string s;
  for(int i = 0; i < nn; i++){
    s += (char)('a' + i);
  }
  for(int i = 0; i < mm; i++){
    next_permutation(s.begin(), s.end());
  }
  cout << s << endl;
}

void show2(){
  for(int i = 0; i < n; i++){
    cout << (char)(t[i] + 'a');
  }
  cout << endl;
}

void solve(){
  ll res = 0;

  for(int i = 0; i < n - 1; i++){
    int x = t[i];
    int low = min(i, x);

    for(int j = 0; j < cg.size(); j++){
      if(cg[j] >= i) break;
      int y = t[cg[j]];

      if(cg[j] < x && y > x){
        low--;
      }
      else if(x <= cg[j] && y < x){
        low++;
      }
    }

    x -= low;
    res += (ll)x * f[n - i - 1];
    res %= MOD;
  }

  cout << res << endl;
}

int main(){
  mkFact();

  while(cin >> n, n){
    for(int i = 0; i < n; i++){
      t[i] = i;
    }

    set<int> st;

    cin >> m;
    for(int i = 0; i < m; i++){
      cin >> a[i] >> b[i];
      a[i]--;
      b[i]--;
      swap(t[a[i]], t[b[i]]);

      st.insert(a[i]);
      st.insert(b[i]);
    }

    cg.clear();
    for(set<int>::iterator iter = st.begin(); iter != st.end(); iter++){
      cg.push_back(*iter);
    }
    solve();
  }
}

Compiler output:
a.cc: In function 'void show(int, int)':
a.cc:30:5: error: 'next_permutation' was not declared in this scope
   30 |     next_permutation(s.begin(), s.end());
      |     ^~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef complex<double> P;
typedef pair<int,int> state;

int N,M;
P t[100];
int f[100][100];
int d[100][100];

bool check(int from,int to){
  P base=t[to]-t[from];
  for(int i=0;i<N;i++){
    P target=t[i]-t[from];
    if(imag(target*conj(base))<0)
      return false;
  }
  return true;
}

void init(){
  memset(f,0,sizeof(f));
  memset(d,1,sizeof(d));
}

int solve(){
  /*
  int si=0,ti;
  double mini=1e9;
  for(int i=0;i<N;i++)
    if(t[i].real()<t[si].real())si=i;
  
  for(int i=0;i<N;i++)
    if(f[si][i] && arg(t[i]-t[si])< mini)
      ti=i,mini=arg(t[i]-t[si]);
      Q.push_back(state(si,ti));
  */
  
  deque<state> Q;  

  d[si][ti]=0;

  for(int i=0;i<N;i++){
    for(int j=0;j<N;j++){
      if(f[i][j]&&check(i,j)){
        d[i][j]=0;
        Q.push_front(state(i,j));
      }
    }
  }
   
  int ans=0;
  while(!Q.empty()){
    state p=Q.front();
    Q.pop_front();
    int from=p.first;
    int to=p.second;
    ans=d[from][to];
    
    if(d[from][to]+1<d[to][from]){
      d[to][from]=d[from][to]+1;
      Q.push_back(state(to,from));
    }
    int id=-1;
    double mini=1e9;
    for(int i=0;i<N;i++){
      if(f[to][i]&&i!=from){
        if( arg( (t[i]-t[to])*conj(t[to]-t[from]) ) < mini){
          id=i;
          mini=arg( (t[i]-t[to])*conj(t[to]-t[from]) );
        }
      }
    }
    if(id!=-1&&d[to][id]>d[from][to]){
      d[to][id]=d[from][to];
      Q.push_front(state(to,id));
    }
  }
  return ans;
}

int main(){
  while(1){
    cin>>N>>M;
    if(N==0&&M==0)break;
    init();
    for(int i=0;i<N;i++){
      int x,y;
      cin>>x>>y;
      t[i]=P(x,y);
    }
    for(int i=0;i<M;i++){
      int x,y;
      cin>>x>>y;
      x--,y--;
      f[x][y]=f[y][x]=true;
    }
    cout<<solve()<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int solve()':
a.cc:41:5: error: 'si' was not declared in this scope; did you mean 'sin'?
   41 |   d[si][ti]=0;
      |     ^~
      |     sin
a.cc:41:9: error: 'ti' was not declared in this scope; did you mean 'tm'?
   41 |   d[si][ti]=0;
      |         ^~
      |         tm
Language: C++

#include <queue>
#include <cstdio>

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

using namespace std;

typedef long long ll;

const int INF=1<<29;

struct edge{ int v,cost; };

int main(){
	int n,m; scanf("%d%d",&n,&m);
	static vector<edge> G[100000];
	rep(i,m){
		int u,v,cost; scanf("%d%d%d",&u,&v,&cost); u--; v--;
		G[u].push_back((edge){v,cost});
		G[v].push_back((edge){u,cost});
	}

	int a,b,q; scanf("%d%d%d",&a,&b,&q); a--; b--;
	static int c[40000],d[40000];
	rep(i,q) scanf("%d%d",c+i,d+i), c[i]--, d[i]--;

	// calculate distances from a
	static int dist_a[100000];
	rep(u,n) dist_a[u]=(u==a?0:INF);
	priority_queue< pair<int,int> > Qa; Qa.push(make_pair(0,a));
	while(!Qa.empty()){
		int d_now=-Qa.top().first,u=Qa.top().second; Qa.pop();
		if(d_now>dist_a[u]) continue;
		rep(i,G[u].size()){
			int v=G[u][i].v,cost=G[u][i].cost;
			if(dist_a[v]>dist_a[u]+cost){
				dist_a[v]=dist_a[u]+cost;
				Qa.push(make_pair(-dist_a[v],v));
			}
		}
	}

	// calculate distances from b
	static int dist_b[100000];
	rep(u,n) dist_b[u]=(u==b?0:INF);
	priority_queue< pair<int,int> > Qb; Qb.push(make_pair(0,b));
	while(!Qb.empty()){
		int d_now=-Qb.top().first,u=Qb.top().second; Qb.pop();
		if(d_now>dist_b[u]) continue;
		rep(i,G[u].size()){
			int v=G[u][i].v,cost=G[u][i].cost;
			if(dist_b[v]>dist_b[u]+cost){
				dist_b[v]=dist_b[u]+cost;
				Qb.push(make_pair(-dist_b[v],v));
			}
		}
	}

	// build the shortest path DAG from a to b
	static vector<int> H[100000];
	rep(u,n) rep(i,G[u].size()) {
		int v=G[u][i].v,cost=G[u][i].cost;
		if(dist_a[u]+cost+dist_b[v]==dist_a[b]) H[u].push_back(v);
	}

	// find a topological order of H
	vector<int> top;
	static bool vis[100000];
	queue<int> Q; Q.push(a);
	while(!Q.empty()){
		int u=Q.front(); Q.pop();
		top.push_back(u);
		rep(i,H[u].size()){
			int v=H[u][i];
			if(!vis[v]) vis[v]=true, Q.push(v);
		}
	}

	// query
	rep(i,(q+63)/64){
		static ll dp[100000];
		memset(dp,0,sizeof dp);
		rep(j,64) if(64*i+j<q) dp[c[64*i+j]]|=1LL<<j;
		rep(i,n){
			int u=top[i];
			rep(j,H[u].size()){
				int v=H[u][j];
				dp[v]|=dp[u];
			}
		}
		rep(j,64) if(64*i+j<q) puts(dp[d[64*i+j]]&(1LL<<j)?"Yes":"No");
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:82:17: error: 'memset' was not declared in this scope
   82 |                 memset(dp,0,sizeof dp);
      |                 ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <cstdio>
  +++ |+#include <cstring>
    3 |
Language: C++

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

typedef pair<int,int> P;

#define rep(i,x) for(int i=0;i<x;i++)
#define rep1(i,x) for(int i=1;i<=x;i++)
#define pb push_back
#define lb(vec,a) lower_bound(vec.begin(),vec.end(),a)
#define ub(vec,a) upper_bound(vec.begin(),vec.end(),a)
#define sor(vec) sort(vec.begin(),vec.end())
#define rev(vec) reverse(vec.begin(),vec.end())
#define pque(x) priority_queue<x>
#define rpque(x) priority_queue<x,vector<x>,greater<x> >
#define fr first
#define sc second

const int INF=1000000000;


int main(){
	int s,r,u,v,w,a,b,q;
	static vector<P> G[100010];
	
	scanf("%d%d",&s,&r);
	rep(i,r){
		scanf("%d%d%d",&u,&v,&w);
		G[u].pb(P(v,w));
		G[v].pb(P(u,w));
	}
	scanf("%d%d%d",&a,&b,&q);
	
	static bool used[100010];
	static int d[100010];
	rpque(P) que;
	static vector<int> prev[100010];
	
	rep(i,100010)used[i]=false;
	rep(i,100010)d[i]=INF;
	d[a]=0;
	que.push(P(0,a));
	
	while(!que.empty()){
		P p=que.top(); que.pop();
		if(!used[p.sc]){
			rep(i,G[p.sc].size()){
				P ed=G[p.sc][i];
				if(d[ed.fr]>d[p.sc]+ed.sc){
					d[ed.fr]=d[p.sc]+ed.sc;
					prev[ed.fr].clear();
					prev[ed.fr].pb(p.sc);
					que.push(P(d[ed.fr],ed.fr));
				}
				else if(d[ed.fr]==d[p.sc]+ed.sc){
					prev[ed.fr].pb(p.sc);
				}
			}
			used[p.sc]=true;
		}
	}
	
	/*rep1(i,s){
		printf("%d:",i);
		rep(j,prev[i].size()){
			printf("%d ",prev[i][j]);
		}
		printf("\n");
	}*/
		
	
	rep(i,100010)used[i]=false;
	queue<int> que0;
	static vector<int> nG[100010];
	que0.push(b); used[b]=true;
	
	while(!que0.empty()){
		int x=que0.front(); que0.pop();
		rep(i,prev[x].size()){
			int p=prev[x][i];
			nG[p].pb(x);
			if(!used[p]){
				que0.push(p);
				used[p]=true;
			}
		}
	}
	
	/*rep1(i,s){
		printf("%d:",i);
		rep(j,nG[i].size()){
			printf("%d ",nG[i][j]);
		}
		printf("\n");
	}*/
	
	static bool used0[100010];
	rep(i,100010)used0[i]=used[i];
	
	rep(i,q){
		int c,e;
		scanf("%d%d",&c,&e);
		
		if(!used0[e]){
			printf("No\n");
			continue;
		}
		
		rep(i,100010)used[i]=false;
		stack<int> sta;
		sta.push(c); used[c]=true;
		
		bool ret=false;
		while(!sta.empty()){
			int x=sta.top(); sta.pop();
			if(x==e){ ret=true; break; }
			rrep(i,nG[x].size()){
				int nex=nG[x][i];
				if(!used[nex]){
					sta.push(nex);
					used[nex]=true;
				}
			}
		}
		
		if(ret)printf("Yes\n");
		else printf("No\n");
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:122:25: error: 'rrep' was not declared in this scope; did you mean 'rep'?
  122 |                         rrep(i,nG[x].size()){
      |                         ^~~~
      |                         rep
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<queue>
using namespace std;
typedef pair<long long, long long> P;
#define INF (1LL << 60)

vector<P> edge[105000];
long long adist[105000], bdist[105000];
long long a, b, c, d, q, u, v, w, s, r;
void dijkstra(long long *dist, long long x){
    for(int i = 0;i < 105000;i++)dist[i] = INF;
    dist[x] = 0;
    priority_queue<P, vector<P>, greater<P> > pq;
    pq.push(P(0, x));
    while(!pq.empty()){
	P tmp = pq.top();pq.pop();
	long long from = tmp.second;
	if(dist[from] < tmp.first)break;
	for(long long i = 0;i < edge[from].size();i++){
	    long long tw = edge[from][i].first, to = edge[from][i].second;
	    if(dist[to] > dist[from] + tw){
		dist[to] = dist[from] + tw;
		pq.push(P(dist[to], to));
		if(to >= 105000)return 1;
	    }
	}
    }
}


bool solve(long long c, long long d){
    if(adist[c] + bdist[c] != adist[b])return false;
    if(c == d)return true;
    for(long long i = 0;i < edge[c].size();i++){
	long long r = edge[c][i].first, to = edge[c][i].second;
	if(adist[c] + r != adist[to])continue;
	if(solve(to, d))return true;
    }
    return false;
}

int main(){
    cin >> s >> r;
    for(long long i = 0;i < r;i++){
	cin >> u >> v >> w;
	edge[u].push_back(P(w, v));
	edge[v].push_back(P(w, u));
    }
    cin >> a >> b >> q;
    dijkstra(adist, a);
    dijkstra(bdist, b);
    for(long long i = 0;i < q;i++){
	cin >> c >> d;
	if(solve(c, d))
	    cout << "Yes" << endl;
	else
	    cout << "No" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'void dijkstra(long long int*, long long int)':
a.cc:27:40: error: return-statement with a value, in function returning 'void' [-fpermissive]
   27 |                 if(to >= 105000)return 1;
      |                                        ^
Language: C++

#include<iostream>
#include<algorithm>
#include<queue>
#include<map>
using namespace std;
#define INF (1LL << 60)
typedef pair<long long, long long> P;

vector<P> valid_edge;
long long adist[105000], bdist[105000];
vector<P> edge[105000];
long long come[105000];
void dijkstra(long long start, long long *dist){
    fill(dist, dist + 103000, INF);
    priority_queue<P, vector<P>, greater<P> > pq;
    dist[start] = 0;
    pq.push(P(0, start));
    while(!pq.empty()){
	P tmp = pq.top();pq.pop();
	long long from = tmp.second, d = tmp.first;
	if(dist[from] < d)continue;
	for(long long i = 0;i < edge[from].size();i++){
	    long long to = edge[from][i].first, r = edge[from][i].second;
	    if(dist[from] + r >= dist[to])continue;
	    dist[to] = dist[from] + r;
	    pq.push(P(dist[to], to));
	}
    }
}

int main(){
    long long s, r, a, b, q, u[210000], v[210000], w[210000];
    cin >> s >> r;
    for(long long i = 0;i < r;i++){
	cin >> u[i] >> v[i] >> w[i];
	edge[u[i]].push_back(P(v[i], w[i]));
	edge[v[i]].push_back(P(u[i], w[i]));
    }
    cin >> a >> b >> q;
    dijkstra(a, adist);
    dijkstra(b, bdist);
if(adist[b] != bdist[a])reutrn 1;
    for(int i = 0;i < r;i++){
	if(adist[u[i]] == INF || adist[v[i]] == INF ||
	   bdist[u[i]] == INF || bdist[v[i]] == INF)
	    continue;

	if(adist[u[i]] + bdist[u[i]] == bdist[a] && 
	   adist[v[i]] + bdist[v[i]] == bdist[a] && 
	   adist[u[i]] + w[i] == adist[v[i]]){
	    valid_edge.push_back(P(u[i], v[i]));
	}
	swap(u[i], v[i]);
	if(adist[u[i]] + bdist[u[i]] == bdist[a] && 
	   adist[v[i]] + bdist[v[i]] == bdist[a] && 
	   adist[u[i]] + w[i] == adist[v[i]]){
	    valid_edge.push_back(P(u[i], v[i]));
	}
    }

    long long c[64], d[64];
    long long dp[105000];
    for(long long i = 0;i < q;i += 50){
	fill(dp, dp + 105000, 0);
	for(long long j = 0;j < 50 && i + j < q;j++){
	    cin >> c[j] >> d[j];
	    dp[c[j]] |= (1ULL << j);
	}
	for(long long j = 0;j < valid_edge.size();j++){
	    long long from = valid_edge[j].first;
	    long long to = valid_edge[j].second;
	    dp[to] |= dp[from];
	}
	for(long long j = 0;j < 50 && i + j < q;j++){
	    if(dp[d[j]] & (1ULL << j))cout << "Yes" << endl;
	    else cout << "No" << endl;
	}
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:25: error: 'reutrn' was not declared in this scope
   42 | if(adist[b] != bdist[a])reutrn 1;
      |                         ^~~~~~
Language: Java

package kyuu1;

import java.util.Scanner;

public class SelectionSort2 {
	Scanner sc = new Scanner(System.in);
	int[] kode = {100,101,102,103,104,105,106,107,108,109};
	int n;
	int m;
	int taihi;
	int soeji;
	int max;

	public void sort(){
		for(n=0;n<kode.length-1;n++){
			soeji = n;
			max = kode[n];
			for(m=n+1;m<kode.length;m++){
				if(max<kode[m]){
					soeji = m;
					max = kode[m];
				}
			}
			if(n != soeji){
				taihi = kode[n];
				kode[n] = kode[soeji];
				kode[soeji] = taihi;
			}
		}
	}
	public void hyouji(){
		for(n=0;n<kode.length;n++){
			System.out.println(kode[n]);
		}
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		SelectionSort2 sele2 = new SelectionSort2();
		sele2.sort();
		sele2.hyouji();
	}

}

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

public class Main {
	Scanner sc =new Scanner(System.in);
	int x;
	int nissu = sc.nextInt();
	int[]  goukei = new int[nissu];
	double gnyuryo,gpuryo;;
	public void ryoukin(){
		for(x=0;x<=nissu-1;x++){
			int nyuryo = sc.nextInt();
			int puryo = sc.nextInt();
			int nyumai = sc.nextInt();
			int pumai  = sc.nextInt();

				if(nyumai>=5&&pumai>=2){
					gnyuryo = (nyuryo * nyumai)* 0.8 ;
					gpuryo = (puryo * pumai)* 0.8;
				}else{
				if(nyumai==6&&pumai<=0){
					goukei[x] = (int)((goukei[x]+puryo*2)*0.8);	
				}}
				gpuryo = puryo * pumai;
				gnyuryo = nyuryo * nyumai;
				goukei[x] = (int) (gnyuryo + gpuryo);
		}
	}
	public void hyouji(){
		for(x=0;x<=nissu-1;x++){
		System.out.println(goukei[x]);
		}
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Main kin = new Main();
		kin.ryoukin();
		kin.hyouji();
	}
}

Compiler output:
Main.java:2: error: cannot find symbol
	Scanner sc =new Scanner(System.in);
	^
  symbol:   class Scanner
  location: class Main
Main.java:2: error: cannot find symbol
	Scanner sc =new Scanner(System.in);
	                ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

public class Main {
	Scanner sc = new Scanner(System.in);
	
	int[] dai = new int[8];
	int[] tei = new int[8];
	int[] sa = new int[8];
	int nikka ;
	int ww ;
	
	
public void syukei(){
	for (nikka=1;nikka <8;nikka++){
		System.out.println(nikka + "日目の最大気温を入力してください。；");
		 dai[nikka] = sc.nextInt();
		 System.out.println(nikka + "日目の最低気温を入力してください。；");
		 tei[nikka] = sc.nextInt();
		 sa[nikka] = dai[nikka] - tei [nikka];
		
	}
	
}
public void hyouji(){
	for(ww=1;ww<8;ww++){
		
	
	System.out.println(sa[ww]);
	}
}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Mondai20131 wao = new Mondai20131();
		wao.syukei();
		wao.hyouji();

Compiler output:
Main.java:37: error: reached end of file while parsing
		wao.hyouji();
		             ^
1 error
Language: Java

package ;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);

		int a,b,c;
		c = 1;

		do{
			a = sc.nextInt();
			b = sc.nextInt();
			System.out.println(a - b);
			c++;
		}while(c > 7);
	}
}

Compiler output:
Main.java:1: error: <identifier> expected
package ;
       ^
1 error
Language: Java

public class Main {
	Scanner sc = new Scanner(System.in);
	int x;
	int[] kionsa = {1,2,3,4,5,6,7};
	public void nyuryoku(){
		for(x=0;x<=6;x++){
			int saiko = sc.nextInt();
			int saitei = sc.nextInt();
			kionsa[x] = saiko-saitei;
		}
	}
	
	public void nyuuryoku2(){
		for(x=0;x<=6;x++){
			System.out.println(kionsa[x]);
		}
	}
	

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		
		Main hai =new Main();
		hai.nyuryoku();
		hai.nyuuryoku2();

	}

}

Compiler output:
Main.java:2: error: cannot find symbol
	Scanner sc = new Scanner(System.in);
	^
  symbol:   class Scanner
  location: class Main
Main.java:2: error: cannot find symbol
	Scanner sc = new Scanner(System.in);
	                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

package kouza;

import java.util.Scanner;

public class main {
	Scanner sc = new Scanner(System.in);
	int a,b,k;
	int sa[]=new int[7];{
		for(k=0;k<=7;k++){
			a = sc.nextInt();
			b = sc.nextInt();
			System.out.print(a - b);
	}
	}
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		main sa = new main();
	}

}

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

import java.util.Scanner;
public class Main {
	Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int a;
		int []kotae = new int [8];
		int saikou =sc.nextInt();
		int saitei=sc.nextInt();
		int aa=0;

		for(a=0;a<7;a++){
		
		kotae[a] = saikou-saitei;
		System.out.print(saikou);
		System.out.print(saitei);
		System.out.println(kotae[a]);
			
		}
			
				
	       	}

		}

Compiler output:
Main.java:7: error: non-static variable sc cannot be referenced from a static context
		int saikou =sc.nextInt();
		            ^
Main.java:8: error: non-static variable sc cannot be referenced from a static context
		int saitei=sc.nextInt();
		           ^
2 errors
Language: Java

package pasokonkousien;

import java.util.Scanner;

public class Toi12013 {
	Scanner sc = new Scanner(System.in);
	int[] saikou = {30,39,19,25,22,23,10};
	int[] saitei = {19,20,18,20,21,10,-10};
	int n;
	int [] sa = new int [8];

	public void hiki(){
		for(n=0;n<7;n++){
			sa[n]=saikou[n] - saitei[n];
			System.out.println(sa[n]);
		}
	}




	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Toi12013 toi = new Toi12013();
		toi.hiki();
	}
}

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

mport java.util.Scanner;


public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int[] sa = new int[7];
		for(int i=0;i<7;i++){
		int a = sc.nextInt();
		int b = sc.nextInt();
		 sa[i] = a-b;
		}
		for(int i = 0;i<7;i++){
			System.out.println(sa[i]);
		}
	}

}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
Language: Java

package ;

import java.util.Scanner;

public class Main {
	
	public Main(){
		Scanner sc = new Scanner(System.in);
		int a,b,k;
		int sa[]=new int[7];

		for(k=0;k<7;k++){
	a = sc.nextInt();
	b = sc.nextInt();
	System.out.print(a - b);
}
}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
         Main sa = new Main();
	}

}

Compiler output:
Main.java:1: error: <identifier> expected
package ;
       ^
1 error
Language: Java

public class Main {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int i,a,b;
		for(i=0; i<7; i++) {
			a = sc.nextInt();
			b = sc.nextInt();
			System.out.println(a-b);
			}
		}
	}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

package pasokonkousien;

import java.util.Scanner;

public class Toi12013 {
	Scanner sc = new Scanner(System.in);
	int[] a = {30,39,19,25,22,23,10};
	int[] b = {19,20,18,20,21,10,-10};
	int n;
	int [] c = new int [8];

	public void hiki(){
		for(n=0;n<7;n++){
			c[n]=a[n] - b[n];
			System.out.println(c[n]);
		}
	}




	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Toi12013 toi = new Toi12013();
		toi.hiki();
	}
}

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

import java.util.Scanner
    public class Main{
    int a,b,i;
    public static void main(String[] args){
        for(i=0;i<=7;i++){
            a = sc.nextInt();
            b = sc.nextInt();
        }
        for(int j=0;j<=7;j++){
            System.out.println(a-b);
        }
}

Compiler output:
Main.java:1: error: ';' expected
import java.util.Scanner
                        ^
Main.java:12: error: reached end of file while parsing
}
 ^
2 errors
Language: Java

import java.util.Scanner
    public class Main{
    int a,b,i;
    public static void main(String[] args){
        for(i=0;i<=7;i++){
            a = sc.nextInt();
            b = sc.nextInt();
        }
        for(int j=0;j<=7;j++){
            System.out.println(a-b);
        }
    }
}

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

    public class Main{
    int a,b,i;
    public static void main(String[] args){
        for(i=0;i<=7;i++){
            a = sc.nextInt();
            b = sc.nextInt();
        }
        for(int j=0;j<=7;j++){
            System.out.println(a-b);
        }
    }
}

Compiler output:
Main.java:4: error: non-static variable i cannot be referenced from a static context
        for(i=0;i<=7;i++){
            ^
Main.java:4: error: non-static variable i cannot be referenced from a static context
        for(i=0;i<=7;i++){
                ^
Main.java:4: error: non-static variable i cannot be referenced from a static context
        for(i=0;i<=7;i++){
                     ^
Main.java:5: error: non-static variable a cannot be referenced from a static context
            a = sc.nextInt();
            ^
Main.java:5: error: cannot find symbol
            a = sc.nextInt();
                ^
  symbol:   variable sc
  location: class Main
Main.java:6: error: non-static variable b cannot be referenced from a static context
            b = sc.nextInt();
            ^
Main.java:6: error: cannot find symbol
            b = sc.nextInt();
                ^
  symbol:   variable sc
  location: class Main
Main.java:9: error: non-static variable a cannot be referenced from a static context
            System.out.println(a-b);
                               ^
Main.java:9: error: non-static variable b cannot be referenced from a static context
            System.out.println(a-b);
                                 ^
9 errors
Language: Java

import java.util.Scanner;
    public class Main{
    int a,b,i;
    public void solve(){
        for(i=0;i<=7;i++){
            a = sc.nextInt();
            b = sc.nextInt();
        }
        for(int j=0;j<=7;j++){
            System.out.println(a-b);
        }
    }
    public static void main(String[] args){
            Main obj= new Main();
            obj.solve();
    }
    }
}

Compiler output:
Main.java:18: error: class, interface, enum, or record expected
}
^
1 error
Language: Java

import java.util.Scanner;
public class Main{
    
    int a;
    int b;
    int sa;
	
    public void solve(){
        Scanner sc=new Scanner(System.in);
        	for(int i=0;i<;i++){
				a=sc.nextInt();
				b=sc.nextInt();
				sa=a-b;
				System.out.println(sa);
        	}
	}
    
    public static void main(String[]args){
		Main obj=new Main();
        obj.solve();
    }
}

Compiler output:
Main.java:10: error: illegal start of expression
        	for(int i=0;i<;i++){
        	              ^
1 error
Language: Java

//問題１　2704 上石彩花
imoort java.util.Scanner;
public class Main{
	
	public void solve(){
		Scanner sc=new Scanner(System.in);
		int a,b,sa;
		for(int i=0;i<7;i++){
			a=sc.nextInt();
			b=sc.nextInt();
			sa=a-(b);
			System.out.println(sa);
		}
	}
	
	public static void main(String[]arges){
		Main obj=new Main();
		obj.solve();
	}
}

Compiler output:
Main.java:2: error: class, interface, enum, or record expected
imoort java.util.Scanner;
^
1 error