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

#include <stdio.h>

int main(){

  int n, m, total, pricemax;
  int price[1024];

  while(1){
    scanf("%d %d", &n, &m);
    if( (n == 0)&&(m == 0) ) break;
    for(i = 0; i < n; i++){
      scanf("%d", price[i]);
    }

    total = 0;
    pricemax = 0;

    for(i = 0; i < n - 1; i++){
      for(j = i+1; j < n; j++){
        total = price[i] + price[j];
        if( (total > pricemax)&&(total <= m) ){
          pricemax = total;
        }
      }
    }
    if(pricemax == 0){
      printf("NONE\n");
    }else{
      printf("%d\n", pricemax);
    }

  }

  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:11:9: error: 'i' undeclared (first use in this function)
   11 |     for(i = 0; i < n; i++){
      |         ^
main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:11: error: 'j' undeclared (first use in this function)
   19 |       for(j = i+1; j < n; j++){
      |           ^
Language: C++

#include "bits\stdc++.h"
using namespace std;
int main() {
	int a[1000];
	int n, m;
	while (cin >> n >> m, n) {
		for (int i = 0; i < n; i++) {
			cin >> a[i];
		}
		int ans = 0;
		for (int i = 0; i < n; i++) {
			for (int j = i + 1; j < n; j++) {
				if (a[i] + a[j] <= m) ans = max(ans, a[i] + a[j]);
			}
		}
		if (ans == 0) cout << "NONE" << endl;
		else cout << ans << endl;
	}
}


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

int a[1000];

int main(void)
{
  while (1) {
    int n, m, max = -1;
    cin >> n >> m;
    if (n == 0) {
      break;
    }
    for (int i = 0; i < n; ++i) {
      cin >> a[i];
    }

    for (int i = 0; i < n - 1; ++i) {
      for (int j = i + 1; j < n; ++j) {
	if (max < a[i] + a[j] && a[i] + a[j] <= m) {
	  max = a[i] + a[j];
	}
      }
    }
    if (max == -1) {
      cout << "NONE" << endl;
      continue;
    }
    cout << max << endl;
  }
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> n >> m;
      |     ^~~
a.cc:23:7: error: 'cout' was not declared in this scope
   23 |       cout << "NONE" << endl;
      |       ^~~~
a.cc:23:25: error: 'endl' was not declared in this scope
   23 |       cout << "NONE" << endl;
      |                         ^~~~
a.cc:26:5: error: 'cout' was not declared in this scope
   26 |     cout << max << endl;
      |     ^~~~
a.cc:26:20: error: 'endl' was not declared in this scope
   26 |     cout << max << endl;
      |                    ^~~~
Language: C++

n, m = map(int, input().split())
while n != 0 and m != 0:
    a = list(map(int, input().split()))
    dp = []
    for i in range(n):
        for j in range(n):
            if a[i]+a[j]<= m and i != j:
                dp.append(a[i]+a[j])
    if len(dp) == 0:
        print("NONE")
    else:
        print(max(dp))
    n, m = map(int, input().split())



Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n, m = map(int, input().split())
      | ^
Language: C++

#include <iostream>

int main(void){
  while(1){
    int n , m;
    cin >> n;
    cin >> m;
    if(n == 0 && m == 0){
      return 0;
    }

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

    int sum[n][n];

    for(int i = 0 ; i < n ; i ++){
      for(int j = 0 ; j < n ; j++){
        if(i != j){ sum[i][j] = a[i] + a[j]; }
        else{ sum[i][j] = -1000; }
      }
    }

    int max = -1000;

    for(int i = 0 ; i < n ; i++){
      for(int j = 0 ; j < n ; j++){
        if( sum[i][j] > max && sum[i][j] < m ){
          max = sum[i][j];
        }
      }
    }

    if(max = -1000){
      cout << "NONE" << endl;
    }else{
      cout << max;
    }
  }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     cin >> n;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:37:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   37 |       cout << "NONE" << endl;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:37:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   37 |       cout << "NONE" << endl;
      |                         ^~~~
      |                         std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:39:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   39 |       cout << max;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>

int main(void){
  while(1){
    int n , m;
    cin >> n;
    cin >> m;
    if(n == 0 && m == 0){
      return 0;
    }

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

    int sum[n][n];

    for(int i = 0 ; i < n ; i ++){
      for(int j = 0 ; j < n ; j++){
        if(i != j){ sum[i][j] = a[i] + a[j]; }
        else{ sum[i][j] = -1000; }
      }
    }

    int max = -1000;

    for(int i = 0 ; i < n ; i++){
      for(int j = 0 ; j < n ; j++){
        if( sum[i][j] > max && sum[i][j] < m ){
          max = sum[i][j];
        }
      }
    }

    if(max == -1000){
      cout << "NONE" << endl;
    }else{
      cout << max;
    }
  }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     cin >> n;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:37:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   37 |       cout << "NONE" << endl;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:37:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   37 |       cout << "NONE" << endl;
      |                         ^~~~
      |                         std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:39:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   39 |       cout << max;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <stdio.h>

int main(void)
{
	int n, m;	/* n:??????????????°, m:?????§????????? */
	int max = 0;
	int price[1000];
	int i = 0;

	while (1) {
		scanf_s("%d %d", &n, &m);
		if (n == 0 && m == 0)
			break;
		else {
			for (i = 0; i < n; i++) {
				scanf_s("%d", &price[i]);
			}
			/* printf("n = %d, m = %d\n", n, m);
			for (i = 0; i < n; i++)
				printf("price[%d] = %d\n", i, price[i]);
			*/

			for (i = 0; i < n - 1; i++) {
				for (int j = i + 1; j < n; j++) {
					if (max < (price[i] + price[j]) && m >= (price[i] + price[j])) {
						max = (price[i] + price[j]);
					}
					/*printf("i = %d, j = %d, max = %d, price+ = %d\n", i, j, max, price[i] + price[j]);*/
				}
			}
			if (max == 0)
				printf("NONE\n");
			else
				printf("%d\n", max);
		}
		max = 0;

	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   11 |                 scanf_s("%d %d", &n, &m);
      |                 ^~~~~~~
      |                 scanf
Language: C++

include <stdio.h>
int max(int a, int b){
    if(a > b)
    return a;
    else
    return b;
}

int main(){
    while(1 == 1){
	int n, m, i, j, k, tmp;
	int result = 0;
	scanf("%d%d", &n, &m);
	if(n == 0 && m ==0)
	    break;
	int a[n];
	for (i = 0; i < n; i++){
		scanf("%d", &a[i]);
	}
	for(int i = 0; i < n; i++){
	    for (j = i + 1; j < n; j++){
	        tmp = a[i] + a[j];
	        if(tmp <= m){
	            result = max(result, tmp);
	        }
	    }
	}
	if(result != 0){
	    printf("%d\n", result);
	}else{
	printf("NONE");
    }
    }
	return 0;	
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <stdio.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:13:9: error: 'scanf' was not declared in this scope
   13 |         scanf("%d%d", &n, &m);
      |         ^~~~~
a.cc:24:30: error: 'max' was not declared in this scope
   24 |                     result = max(result, tmp);
      |                              ^~~
a.cc:29:13: error: 'printf' was not declared in this scope
   29 |             printf("%d\n", result);
      |             ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | include <stdio.h>
a.cc:31:9: error: 'printf' was not declared in this scope
   31 |         printf("NONE");
      |         ^~~~~~
a.cc:31:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

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

int main(){
	while(true){
		int n,m;	
		cin>>n>>m;
		if(n=0&&m==0){
			break;
		}
		int a[n];
		for(int i=0;i<n;i++){
			cin>>a[i];
		}
		sort(a,a+n);
		while(true){
			int i=0;
			if(a[n]+a[n-i]<=m){
				int pay=a[n]+a[n-i];
				break;
			}
			i++;
		}
		cout<<pay<<endl;
	}
	return 0;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:23: error: 'pay' was not declared in this scope
   25 |                 cout<<pay<<endl;
      |                       ^~~
Language: C++

#include <iostream>

int main(void)
{
    int i, j, num, lim, price[1000], temp, max;

    for(;;) {
        cin >> num;
        cin >> lim;
        if(num == 0 && lim == 0) {
            return 0;
        }
        for(i = 0; i < num; i++) {
            cin >> price[i];
        }
        max = 0;
        for(i=0; i < num - 1; i++) {
            for(j = i + 1; j < num; j++) {
                temp = price[i] + price[j];
                if(temp > max && temp <= lim) {
                    max = temp;
                }
            }
        }
        if(max == 0) {
            cout << "NONE\n";
        }
        else {
            cout << max << "\n";
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         cin >> num;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:26:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   26 |             cout << "NONE\n";
      |             ^~~~
      |             std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:29:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   29 |             cout << max << "\n";
      |             ^~~~
      |             std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>

using namespace std;

int main() {
    int a[1001];
    while (cin >> n >> m) {
        if (n == 0 && m == 0) { break; }
        for (int i = 0; i < n; i++) {
            cin >> a[i];
        }
        ans = -1;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                if (a[i] + a[j] <= M && a[i] + a[j] > ans) {
                    ans = a[i] + a[j]
                }
            }
        }
        cout << (ans == -1 ? "NONE" : string(ans)) << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: 'n' was not declared in this scope
    7 |     while (cin >> n >> m) {
      |                   ^
a.cc:7:24: error: 'm' was not declared in this scope
    7 |     while (cin >> n >> m) {
      |                        ^
a.cc:12:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |         ans = -1;
      |         ^~~
      |         abs
a.cc:15:36: error: 'M' was not declared in this scope
   15 |                 if (a[i] + a[j] <= M && a[i] + a[j] > ans) {
      |                                    ^
Language: C++

#include <iostream>

using namespace std;

int main() {
    int a[1001];
    int n, m;
    while (cin >> n >> m) {
        if (n == 0 && m == 0) { break; }
        for (int i = 0; i < n; i++) {
            cin >> a[i];
        }
        ans = -1;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                if (a[i] + a[j] <= M && a[i] + a[j] > ans) {
                    ans = a[i] + a[j]
                }
            }
        }
        cout << (ans == -1 ? "NONE" : string(ans)) << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |         ans = -1;
      |         ^~~
      |         abs
a.cc:16:36: error: 'M' was not declared in this scope
   16 |                 if (a[i] + a[j] <= M && a[i] + a[j] > ans) {
      |                                    ^
Language: C++

# -*- coding: utf-8 -*-
while 1 do
  n,m=gets.split().map!{|i|i.to_i}
  if n==0&&m==0 then break end
  a=gets.split().map!{|i|i.to_i}
  a.slice!(n..a.length)
  a.sort
  max=-1
  n.times do |i|
    (i+1).upto(n-1) do |j|
      if a[i]+a[j]<=m then
        max=a[i]+a[j]
      end
    end
  end
  if max==-1 then puts "NONE"
  else puts max
  end
end


Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding: utf-8 -*-
      |   ^
a.cc:2:1: error: expected unqualified-id before 'while'
    2 | while 1 do
      | ^~~~~
a.cc:4:3: error: expected unqualified-id before 'if'
    4 |   if n==0&&m==0 then break end
      |   ^~
a.cc:6:3: error: 'a' does not name a type
    6 |   a.slice!(n..a.length)
      |   ^
Language: C++

int main()
{
  int n=1,m=1;
  int x[1000];
  int cnt=0;
  int max;

  while(n>0&&m>0){
    max=0;

    std::cin>>n>>m;
    if(n==0&&m==0) max=-1;
    int a[n+1];

    for(int i=1;i<n+1;i++){
      std::cin>>a[i];
    }

    for(int i=1;i<n;i++){
      for(int j=i+1;j<n+1;j++){
	int y=a[i]+a[j];
	if(max<y&&y<=m) max=a[i]+a[j];
      }
    }

    x[cnt]=max;

    cnt++;
  }

  for(int i=0;i<cnt;i++){
    if(x[i]==0){
      std::cout<<"NONE\n";
    }else if(x[i]>0){
      std::cout<<x[i]<<"\n";
    }else{
      break;
    }
  }

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 'cin' is not a member of 'std'
   11 |     std::cin>>n>>m;
      |          ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main()
a.cc:16:12: error: 'cin' is not a member of 'std'
   16 |       std::cin>>a[i];
      |            ^~~
a.cc:16:12: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:33:12: error: 'cout' is not a member of 'std'
   33 |       std::cout<<"NONE\n";
      |            ^~~~
a.cc:33:12: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:35:12: error: 'cout' is not a member of 'std'
   35 |       std::cout<<x[i]<<"\n";
      |            ^~~~
a.cc:35:12: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>


int main(void){
  int n,m,tmp,cnt,max;
  std::cin>>n;
  std::cin>>m;
  int a[n];
  while(n!=0 && m!=0){
    a[n]={0};
    for(int i=0;i<n;i++){
      std::cin>>a[i];
    }
    max=a[0]+a[1];
    cnt=0;
    for(int i=0;i<n;i++){
      for(int j=i+1;j<n;j++){
	tmp=a[i]+a[j];
	if(tmp<=m && tmp>=max){
	  max=tmp;
	  cnt=1;
	}
      }
    }
    if(cnt==0 && max>>m){
      std::cout<<"NONE\n";
    }else{
      std::cout<<max<<"\n";
    }
    std::cin>>n;
    std::cin>>m;    
  }
  std::cout<<("終わり\n");
  return 0;



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

s=[]

cnt=0

while 1:
    max=0
    n,m =map(int,input().split())
    l=list(map(int,input().split()))
    if n==0 and m==0:
        break

    for i in range(len(l)):
        for j in range(len(l)):
            if max<l[i]+l[j] and i!=j and m>=l[i]+l[j]:
                max=l[i]+l[j]

    if max==0:
        s+=["NONE"]
    else:
        s+=[max]


for x in s:
    print(x)



Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s=[]
      | ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main(){
  int n,m,b,max=0;
  while(n!=0 && m!=0){
    vector<int> a;
    max=0;
    int a[1000]={};
    cin>>n>>m;
    for(int i=0;i<n;i++){
      cin>>b;
      a.push_back(b);
    }
  
    for(int j=0;j<n;j++){
      for(int k=0;k<n;k++){
	if(j!=k){
	  if(max<a[j]+a[k] && a[j]+a[k]<=m){
	    max=a[j]+a[k];
	    cout<<max<<"\n";
	  }
	}
      }
    }
    a.clear();
    if(max==0 && n!=0&&m!=0){
      cout<<"NONE"<<endl;
    }else if(n!=0&&m!=0){
      cout<<max<<endl;
    }
  }
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: conflicting declaration 'int a [1000]'
    9 |     int a[1000]={};
      |         ^
a.cc:7:17: note: previous declaration as 'std::vector<int> a'
    7 |     vector<int> a;
      |                 ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n,m,b,max=0;
  while(1){
    max=0;
    cin>>n>>m;
    if(n==0&&m==0){
      break;
    }
    int a[n];
    for(int i=0;i<n;i++){
      cin>>a[i];
    }
  
    for(int j=0;j<n;j++){
      for(int k=0;k<n;k++){
	  if(max<a[j]+a[k] && a[j]+a[k]<=m&&j!=k){
	    max=a[j]+a[k];
	    cout<<max<<"\n";
	  }
      }
    }
    a.clear();
    if(max==0){
      cout<<"NONE"<<endl;
    }else{
      cout<<max<<endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:7: error: request for member 'clear' in 'a', which is of non-class type 'int [n]'
   24 |     a.clear();
      |       ^~~~~
Language: C++

#include "stdafx.h"
#include <iostream>
using namespace std;

int main(void) {
	int n, m;
	int i, j;
	int sum = 0, max = 0;
	int price[1000];

	while (1) {
		cin >> n >> m;
		if (n == 0 && m == 0)break;

		for (i = 0; i<n; i++) {
			cin >> price[i];
		}

		for (i = 0; i<n - 1; i++) {
			for (j = i + 1; j<n; j++) {
				sum = price[i] + price[j];
				if (max<sum&&sum <= m) {
					max = sum;
				}
			}
		}

		if (max == 0) {
			cout << "NONE" << endl;
		}
		else {
			cout << max << endl;
		}
		max = 0;
		sum = 0;
	}
	return 0;
}



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

int main(){
  int n,m;
  int A[10000];
  int B[10000];
  int max;
  
  while(1){
    std::scanf("%d %d",&n,&m);
    if(n == 0 && m == 0) break;
    bool flag = 1;
    for(int i = 0;i < n;i++){
      std::scanf("%d",&A[i]);
    }

    max = A[0] + A[1];
    
    if(max < m){
      flag = 0;
    }
  
    for(int i = 0;i < n;i++){
      for(int j = i + 1;j < n;j++){
	if(max < A[i] + A[j] && (A[i] + A[j]) <= m){
	  max = A[i] + A[j];
	  flag = 0;
	}
      }
    }

    if(!flag){
      std::printf("%d\n",max);
    }else{
      std::printf("NONE\n");
    }
    
    std::scanf("%d %d",&n,&m);
  }
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'scanf' is not a member of 'std'
    8 |     std::scanf("%d %d",&n,&m);
      |          ^~~~~
a.cc:12:12: error: 'scanf' is not a member of 'std'
   12 |       std::scanf("%d",&A[i]);
      |            ^~~~~
a.cc:31:12: error: 'printf' is not a member of 'std'
   31 |       std::printf("%d\n",max);
      |            ^~~~~~
a.cc:33:12: error: 'printf' is not a member of 'std'
   33 |       std::printf("NONE\n");
      |            ^~~~~~
a.cc:36:10: error: 'scanf' is not a member of 'std'
   36 |     std::scanf("%d %d",&n,&m);
      |          ^~~~~
Language: C++

#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;

	static int n, m, ans;
	static int a[100000];
void input() {
	cin >> n;
	cin >> m;
	for (int i = 1; i < n + 1; i++) {
		cin >> a[i];
	}
}
void pre() {
	ans = 0;
}
void operate() {
	for (int i=1;i<n+1;i++) 
		for (int j = i + 1; j < n + 1; j++) {
			if ((a[i] + a[j] <= m)&(a[i] + a[j] > ans)) ans = a[i] + a[j];
		}
}
void output() {
	if (ans == 0) cout << "NONE";
	else cout << ans;
	cout << endl;
}
int main() {
	while (true) {
		input();
		if (n == 0)return 0;
		pre();
		operate();
		output();
	}
	return(0);
}


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

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

//#define int long long
#define reps(i,s,n) for(int (i)=(s);(i)<(n);++(i))
#define rep(i,n) reps(i,0,n)
#define rept(i,n) rep(i,(n)+1)
#define repst(i,s,n) reps(i,s,(n)+1)
#define reprt(i,n,t) for(int (i)=(n);(i)>=(t);--(i))
#define repr(i,n) reprt(i,n,0)
#define each(itr,v) for(auto &(itr):(v))
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define tmax(x,y,z) max(x,max(y,z))
#define tmin(x,y,z) min(x,min(y,z))
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
#define ln '\n'
#define bln(i,n) (((i)==(n)-1)?'\n':' ')
#define dbg(x) cout<<#x" = "<<(x)<<ln<<flush
#define dbga(x,n) {cout<<#x" : ";for(int (i)=0;i<(n);++i){cout<<((x)[i])<<(i==((n)-1)?'\n':' ')<<flush;}}
#define zero(a) memset(a,0,sizeof(a))
#define unq(a) sort(all(a)),a.erase(unique(all(a)),a.end())

typedef long double ld;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<string> vst;
typedef vector<bool> vb;
typedef vector<ld> vld;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<vector<int> > mat;

const ll inf = (ll)1e9+10;
const ll linf = (ll)1e18+10;
const ll mod = (ll)(1e9+7);
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
const int ddx[] = {0, 1, 1, 1, 0, -1, -1, -1};
const int ddy[] = {1, 1, 0, -1, -1, -1, 0, 1};
const double eps = 1e-10;

ll mop(ll a,ll b,ll m=mod) {ll r=1;a%=m; assert(b>=0); for(;b;b>>=1){if(b&1)r=r*a%m;a=a*a%m;}return r;}
ll gcd(ll a,ll b) {return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b) {return a*b/gcd(a,b);}

struct oreno_initializer {
	oreno_initializer() {
		cin.tie(0);
		ios::sync_with_stdio(0);
	}
} oreno_initializer;

// ━━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…
// .｡.:( ^ω^)・ﾟ＋.｡.:( ^ω^)・ﾟ＋.｡.:( ^ω^)・ﾟ＋.｡.:( ^ω^)・ﾟ＋.｡.:( ^ω^)・ﾟ＋
// ・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・

int n, m, a[1000];

signed main() {
	while (1) {
		cin >> n >> m;
		if (n==0) break;
		rep(i,n) cin >> a[i];
		int res = 0;
		rep(i,n) rep(j,n) if (i!=j && a[i]+a[j]<=m) chmax(res,a[i]+a[j]);
		cout << (res==0 ? "NONE" : res) << ln;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:75:33: error: operands to '?:' have different types 'const char*' and 'int'
   75 |                 cout << (res==0 ? "NONE" : res) << ln;
      |                          ~~~~~~~^~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<cmath>
#include<map>
#include<cstdio>
#include<stack>
#include<queue>
#include<fstream>
#include<cstdio>
#include<deque>
#include<iomanip>

using namespace std;
#define ok1 printf("ok1\n");
#define ok2 printf("ok2\n");
#define M 1000000000000000000LL
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,s,n) for(int i=(s);i<(n);i++)
#define repr(i,n) for(int i=n-1;i>=0;i--)
#define REPR(i,s,n) for(int i=(s);i>=(n);(i)--)
#define all(a) (a).begin(),(a).end()
#define reall(a) (a).rbegin(),(a).rend()
#define pb push_back
#define pf push_front
#define MIN(a,b) a=min((a),(b))
#define MAX(a,b) a=max((a),(b))
#define SIZE(v) (int)v.size()
const double pi = acos(-1.0);

typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef deque<ll> dll;
#define mod 1e9 + 7;

int main()
{
	ios_base::sync_with_stdio(false);

	ll n, m;
	vll w;
	while (true) {
		cin >> n >> m;
		if (n == 0 && m == 0) break;
		vll v(n);
		ll ans = -1;
		rep(i, n) cin >> v[i];
		rep(i, n) {
			REP(j, i+1, n) {
				if (v[i] + v[j] <= m) {
					ans = max(ans, v[i] + v[j]);
				}
			}
		}
		if (ans == -1) cout << "NONE" << endl;;
		else cout << ans << endl;

		
	}
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:60:17: error: 'else' without a previous 'if'
   60 |                 else cout << ans << endl;
      |                 ^~~~
Language: Java

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

/**
 * Kadai
 */
public class Kadai {

    public void go() {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextLine()) {
            String[] lines = new String[2];
            String[][] linesStruct = new String[2][];
            lines[0] = sc.nextLine();
            if (lines[0].equals(".")) {
                return;
            }
            lines[1] = sc.nextLine();

            linesStruct[0] = lines[0].split(";");
            linesStruct[1] = lines[1].split(";");
            if (lines[0].equals(lines[1])) {
                System.out.println("IDENTICAL");
                continue;
            }
            if (linesStruct[0].length != linesStruct[1].length) {
                System.out.println("DIFFERENT");
                continue;
            }

            int size = linesStruct[0].length;
            int close = 0;
            boolean flg = false;
            for (int i = 0; i < size; i++) {
                String str0 = linesStruct[0][i];
                String str1 = linesStruct[1][i];
                String[] strSplit0 = str0.split("\"", -1);
                String[] strSplit1 = str1.split("\"", -1);
                if (strSplit0.length != strSplit1.length) {
                    close = 2;
                    flg = true;
                    break;
                }
                for (int j = 0; j < strSplit0.length; j++) {
                    if (!strSplit0[j].equals(strSplit1[j])) {
                        if (j % 2 == 1) {
                            close++;
                        } else {
                            close = 2;
                            flg = true;
                        }
                    }

                    if (flg) {
                        break;
                    }
                }
                if (flg) {
                    break;
                }
            }
            switch (close) {
            case 1:
                System.out.println("CLOSE");
                break;
            case 0:
                System.out.println("IDENTICAL");
                break;
            default:
                System.out.println("DIFFERENT");

            }
        }
    }

    public static void main(String[] args) {
        Kadai kadai = new Kadai();
        kadai.go();
    }
}


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

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

/**
 * Kadai
 */
public class Main {

    public void go() {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextLine()) {
            String lines0;
            String lines1String;
            lines0 = sc.nextLine();
            if (lines0.equals(".")) {
                return;
            }
            lines1 = sc.nextLine();

            if (lines0.equals(lines1)) {
                System.out.println("IDENTICAL");
                continue;
            }
            if (lines0.length() != lines1.length()) {
                System.out.println("DIFFERENT");
                continue;
            }

            String[] strSplit0 = lines0.split("\"", -1);
            String[] strSplit1 = lines1.split("\"", -1);

            for (int j = 0; j < strSplit0.length; j++) {
                if (!strSplit0[j].equals(strSplit1[j])) {
                    if (j % 2 == 1) {
                        close++;
                    } else {
                        close = 2;
                        break;
                    }
                }

            }
            switch (close) {
            case 1:
                System.out.println("CLOSE");
                break;
            case 0:
                System.out.println("IDENTICAL");
                break;
            default:
                System.out.println("DIFFERENT");

            }
        }
    }

    public static void main(String[] args) {
        Main kadai = new Main();
        kadai.go();
    }
}


Compiler output:
Main.java:18: error: cannot find symbol
            lines1 = sc.nextLine();
            ^
  symbol:   variable lines1
  location: class Main
Main.java:20: error: cannot find symbol
            if (lines0.equals(lines1)) {
                              ^
  symbol:   variable lines1
  location: class Main
Main.java:24: error: cannot find symbol
            if (lines0.length() != lines1.length()) {
                                   ^
  symbol:   variable lines1
  location: class Main
Main.java:30: error: cannot find symbol
            String[] strSplit1 = lines1.split("\"", -1);
                                 ^
  symbol:   variable lines1
  location: class Main
Main.java:35: error: cannot find symbol
                        close++;
                        ^
  symbol:   variable close
  location: class Main
Main.java:37: error: cannot find symbol
                        close = 2;
                        ^
  symbol:   variable close
  location: class Main
Main.java:43: error: cannot find symbol
            switch (close) {
                    ^
  symbol:   variable close
  location: class Main
7 errors
Language: Java

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

/**
 * Kadai
 */
public class Main {

    public void go() {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextLine()) {
            String lines0;
            String lines1;
            lines0 = sc.nextLine();
            if (lines0.equals(".")) {
                return;
            }
            lines1 = sc.nextLine();

            if (lines0.equals(lines1)) {
                System.out.println("IDENTICAL");
                continue;
            }
            if (lines0.length() != lines1.length()) {
                System.out.println("DIFFERENT");
                continue;
            }

            String[] strSplit0 = lines0.split("\"", -1);
            String[] strSplit1 = lines1.split("\"", -1);

            for (int j = 0; j < strSplit0.length; j++) {
                if (!strSplit0[j].equals(strSplit1[j])) {
                    if (j % 2 == 1) {
                        close++;
                    } else {
                        close = 2;
                        break;
                    }
                }

            }
            switch (close) {
            case 1:
                System.out.println("CLOSE");
                break;
            case 0:
                System.out.println("IDENTICAL");
                break;
            default:
                System.out.println("DIFFERENT");

            }
        }
    }

    public static void main(String[] args) {
        Main kadai = new Main();
        kadai.go();
    }
}


Compiler output:
Main.java:35: error: cannot find symbol
                        close++;
                        ^
  symbol:   variable close
  location: class Main
Main.java:37: error: cannot find symbol
                        close = 2;
                        ^
  symbol:   variable close
  location: class Main
Main.java:43: error: cannot find symbol
            switch (close) {
                    ^
  symbol:   variable close
  location: class Main
3 errors
Language: Java

import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String str1 = scan.nextLine();
		while(!str1.equals(".")){
			String str2 = scan.nextLine();
			if(str1.equals(str2)){
				System.out.println("IDENTICAL");
			}else{
				int dcnt1 = 0;
				int dcnt2 = 0;
				int i = 0;
				int j = 0;
				String tmp1;
				String tmp2;
				int start1 = 0;
				int start2 = 0;
				int cnt = 0;
				while(i < str1.length() || j < str2.length()){
					while(true){
						if(i >= str1.length()){
							tmp1 = null;
							break;
						}else if(i == str1.length() - 1){
							tmp1 = str1.substring(start1, i + 1);
							i++;
							break;
						}else if(str1.charAt(i) == '"'){
							tmp1 = str1.substring(start1, i + 1);
							start1 = i + 1;
							dcnt1++;
							i++;
							break;
						}
						i++;
					}
					while(true){
						if(j >= str2.length()){
							tmp2 = null;
							break;
						}else if(j == str2.length() - 1){
							tmp2 = str2.substring(start2, j + 1);
							j++;
							break;
						}else if(str2.charAt(j) == '"'){
							tmp2 = str2.substring(start2, j + 1);
							start2 = j + 1;
							dcnt2++;
							j++;
							break;
						}
						j++;
					}
					if((tmp1.isEmpty() || tmp2.isEmpty()) || dcnt1 != dcnt2){
						System.out.println("DIFFERENT");
						break;
					}else if(!tmp1.equals(tmp2) && dcnt1%2 == 1){
						System.out.println("DIFFERENT");
						break;
					}else if(!tmp1.equals(tmp2) && dcnt != 0){
						cnt++;
						if(cnt > 1){
							System.out.println("DIFFERENT");
							break;
						}
					}
				}
				if(i == str1.length() && j == str2.length() && cnt == 1){
					System.out.println("CLOSE");
				}else if(i == str1.length() && j == str2.length()){
					System.out.println("DIFFERENT");
				}
			}
			str1 = scan.nextLine();
		}
	}
}


Compiler output:
Main.java:61: error: cannot find symbol
					}else if(!tmp1.equals(tmp2) && dcnt != 0){
					                               ^
  symbol:   variable dcnt
  location: class Main
1 error
Language: Java



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

public class Main2 {

	public static void main(String[] args) 
	{
		Scanner scan = new Scanner(System.in);
		String[] s = new String[2];
		
		while(true)
		{
			s[0] = scan.next();
			if(s[0].equals(".")) {break;}
			s[1] = scan.next();
			List<String> ss1 = new ArrayList<String>();
			
			List<Integer> location = new ArrayList<Integer>();
			
			int miniCounter = -1;
			
			int stringDifferences = 0;
			int numOfSs2 = 0;
			boolean done = false;
			

			if(!done)
			{
				if(numOfSs2 == ss1.size())
				{
					if(stringDifferences == 1)
					{
						System.out.println("CLOSE");
					}
					else if(stringDifferences == 0)
					{
						System.out.println("IDENTICAL");
					}
				}
				else
				{
//					System.out.println(ss1.size() + " vs " + numOfSs2);
					System.out.println("DIFFERENT");
				}
			}
		}
	}

}



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



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

public class Main2 {

	public static void main(String[] args) 
	{
		Scanner scan = new Scanner(System.in);
		String[] s = new String[2];
		
		while(true)
		{
			s[0] = scan.next();
			if(s[0].equals(".")) {break;}
			s[1] = scan.next();
			List<String> ss1 = new ArrayList<String>();
			
			List<Integer> location = new ArrayList<Integer>();
			
			int miniCounter = -1;
			
			int stringDifferences = 0;
			int numOfSs2 = 0;
			boolean done = false;
			
			for(int c = 0; c <= 1; c++)
			{
				int zure = 0;
				int start = -1;
				int end = 0;
				
//				System.out.println("STARTC " + c);
				for(int i = 0; i < s[c].length(); i++)
				{
					if(c == 1)
					{
//						System.out.println("length " + s[c].length() + ", i " + i);
					}
//					if(i >= 15) {System.out.println("now i " + i);}
					String cur = s[c].substring(i, i+1);
					
					if(cur.equals("\""))
					{

					}
					else
					{
						//not quote
						if(start == -1)
						{
							//outside ministrings
							
							if(c == 1)
							{
								String cur1 = s[0].substring(i+zure, i+1+zure);
								String cur2 = s[1].substring(i, i+1);
								
								if(!cur1.equals(cur2))
								{
//									System.out.println(cur1 + " vs " + cur2);
									System.out.println("DIFFERENT");
									done = true;
//									stringDifferences = -1;
									break;
								}
							}
						}
					}
				}
			}
			
			if(!done)
			{
				if(numOfSs2 == ss1.size())
				{
					if(stringDifferences == 1)
					{
						System.out.println("CLOSE");
					}
					else if(stringDifferences == 0)
					{
						System.out.println("IDENTICAL");
					}
				}
				else
				{
//					System.out.println(ss1.size() + " vs " + numOfSs2);
					System.out.println("DIFFERENT");
				}
			}
		}
	}

}



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


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

public class Main2 {

	public static void main(String[] args) 
	{
		Scanner scan = new Scanner(System.in);
		String[] s = new String[2];
		
		while(true)
		{
			s[0] = scan.next();
			if(s[0].equals(".")) {break;}
			s[1] = scan.next();
			List<String> ss1 = new ArrayList<String>();
			
			List<Integer> location = new ArrayList<Integer>();
			
			int miniCounter = -1;
			
			int stringDifferences = 0;
			int numOfSs2 = 0;
			boolean done = false;
			
			for(int c = 0; c <= 1; c++)
			{
				int zure = 0;
				int start = -1;
				int end = 0;
				
//				System.out.println("STARTC " + c);
				for(int i = 0; i < s[c].length(); i++)
				{
					if(c == 1)
					{
//						System.out.println("length " + s[c].length() + ", i " + i);
					}
//					if(i >= 15) {System.out.println("now i " + i);}
					String cur = s[c].substring(i, i+1);
					
					if(cur.equals("\""))
					{
						if(start == -1)
						{
//							System.out.println("STARTQUOTE " + i);
							start = i+1;
						}
						else
						{
//							System.out.println("ENDQUOTE " + i);
							//closing quote mark
							
							end = i-1;
							if(c == 0)
							{
								location.add(i);
								ss1.add(s[c].substring(start, end+1));
							}
							else if(c == 1)
							{
								numOfSs2 += 1;
								miniCounter += 1;
								String thisOne = s[c].substring(start, end+1);
								String prevOne = ss1.get(miniCounter);

								
								
//								ss2.add(s[c].substring(start, end+1));
							}
							
							start = -1;
						}
					}
					else
					{
						//not quote
						if(start == -1)
						{
							//outside ministrings
							
							if(c == 1)
							{
								String cur1 = s[0].substring(i+zure, i+1+zure);
								String cur2 = s[1].substring(i, i+1);
								
								if(!cur1.equals(cur2))
								{
//									System.out.println(cur1 + " vs " + cur2);
									System.out.println("DIFFERENT");
									done = true;
//									stringDifferences = -1;
									break;
								}
							}
						}
					}
				}
			}
			
			if(!done)
			{
				if(numOfSs2 == ss1.size())
				{
					if(stringDifferences == 1)
					{
						System.out.println("CLOSE");
					}
					else if(stringDifferences == 0)
					{
						System.out.println("IDENTICAL");
					}
				}
				else
				{
//					System.out.println(ss1.size() + " vs " + numOfSs2);
					System.out.println("DIFFERENT");
				}
			}
		}
	}

}



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


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

public class Main2 {

	public static void main(String[] args) 
	{
		Scanner scan = new Scanner(System.in);
		String[] s = new String[2];
		
		while(true)
		{
			s[0] = scan.next();
			if(s[0].equals(".")) {break;}
			s[1] = scan.next();
			List<String> ss1 = new ArrayList<String>();
			
			List<Integer> location = new ArrayList<Integer>();
			
			int miniCounter = -1;
			
			int stringDifferences = 0;
			int numOfSs2 = 0;
			boolean done = false;
			
			for(int c = 0; c <= 1; c++)
			{
				int zure = 0;
				int start = -1;
				int end = 0;
				
//				System.out.println("STARTC " + c);
				for(int i = 0; i < s[c].length(); i++)
				{
					if(c == 1)
					{
//						System.out.println("length " + s[c].length() + ", i " + i);
					}
//					if(i >= 15) {System.out.println("now i " + i);}
					String cur = s[c].substring(i, i+1);
					
					if(cur.equals("\""))
					{
						if(start == -1)
						{
//							System.out.println("STARTQUOTE " + i);
							start = i+1;
						}
						else
						{
//							System.out.println("ENDQUOTE " + i);
							//closing quote mark
							
							end = i-1;

							
							start = -1;
						}
					}
					else
					{
						//not quote
						if(start == -1)
						{
							//outside ministrings
							
							if(c == 1)
							{
								String cur1 = s[0].substring(i+zure, i+1+zure);
								String cur2 = s[1].substring(i, i+1);
								
								if(!cur1.equals(cur2))
								{
//									System.out.println(cur1 + " vs " + cur2);
									System.out.println("DIFFERENT");
									done = true;
//									stringDifferences = -1;
									break;
								}
							}
						}
					}
				}
			}
			
			if(!done)
			{
				if(numOfSs2 == ss1.size())
				{
					if(stringDifferences == 1)
					{
						System.out.println("CLOSE");
					}
					else if(stringDifferences == 0)
					{
						System.out.println("IDENTICAL");
					}
				}
				else
				{
//					System.out.println(ss1.size() + " vs " + numOfSs2);
					System.out.println("DIFFERENT");
				}
			}
		}
	}

}



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



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

public class Main2 {

	public static void main(String[] args) 
	{
		Scanner scan = new Scanner(System.in);
		String[] s = new String[2];
		
		while(true)
		{
			s[0] = scan.next();
			if(s[0].equals(".")) {break;}
			s[1] = scan.next();
			List<String> ss1 = new ArrayList<String>();
			
			List<Integer> location = new ArrayList<Integer>();
			
			int miniCounter = -1;
			
			int stringDifferences = 0;
			int numOfSs2 = 0;
			boolean done = false;
			
			for(int c = 0; c <= 1; c++)
			{
				int zure = 0;
				int start = -1;
				int end = 0;
				
//				System.out.println("STARTC " + c);
				for(int i = 0; i < s[c].length(); i++)
				{
					if(c == 1)
					{
//						System.out.println("length " + s[c].length() + ", i " + i);
					}
//					if(i >= 15) {System.out.println("now i " + i);}
					String cur = s[c].substring(i, i+1);
					
					if(cur.equals("\""))
					{
						if(start == -1)
						{
//							System.out.println("STARTQUOTE " + i);
							start = i+1;
						}
						else
						{
//							System.out.println("ENDQUOTE " + i);
							//closing quote mark
							

						}
					}
					else
					{
						//not quote
						if(start == -1)
						{
							//outside ministrings
							
							if(c == 1)
							{
								String cur1 = s[0].substring(i+zure, i+1+zure);
								String cur2 = s[1].substring(i, i+1);
								
								if(!cur1.equals(cur2))
								{
//									System.out.println(cur1 + " vs " + cur2);
									System.out.println("DIFFERENT");
									done = true;
//									stringDifferences = -1;
									break;
								}
							}
						}
					}
				}
			}
			
			if(!done)
			{
				if(numOfSs2 == ss1.size())
				{
					if(stringDifferences == 1)
					{
						System.out.println("CLOSE");
					}
					else if(stringDifferences == 0)
					{
						System.out.println("IDENTICAL");
					}
				}
				else
				{
//					System.out.println(ss1.size() + " vs " + numOfSs2);
					System.out.println("DIFFERENT");
				}
			}
		}
	}

}



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

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

int main()
{
  char input_str1[200], input_str2[200];
  char seq1[200], seq2[200];
  int wrong_counter, different_counter;
  int char_num_i, char_num_j;

  for( ; ; )
  {
    wrong_counter = 0;
    different_counter = 0;
    char_num_i = 0;
    char_num_j = 0;
    memset(seq1, '\0', 200);
    memset(seq2, '\0', 200);

    scanf("%s", input_str1);
    if(input_str1[0] == '.')
      break;

    scanf("%s", input_str2);

    if(strcmp(input_str1, input_str2) == 0)
    {
      printf("IDENTICAL\n");
      continue;
    }

    while(input_str1[char_num_i] != '\0' || input_str2[char_num_j] != '\0')
    {
      for( ; input_str1[char_num_i] != '\"' && input_str1[char_num_i] != '\0' ; char_num_i++)
      {
        sprintf(seq1, "%s%c", seq1, input_str1[char_num_i]);
      }

      for( ; input_str2[char_num_j] != '\"' && input_str2[char_num_j] != '\0' ; char_num_j++)
      {
        sprintf(seq2, "%s%c", seq2, input_str2[char_num_j]);
      }

      if(strcmp(seq1, seq2) != 0)
      {
        printf("DIFFERENT\n");
        print_counter = 1;
        memset(seq1, '\0', strlen(seq1));
        memset(seq2, '\0', strlen(seq2));
        break;
      }

      sprintf(seq1, "%c", input_str1[char_num_i]);
      if(seq1[0] == '\"')
        char_num_i++;

      sprintf(seq2, "%c", input_str2[char_num_j]);
      if(seq2[0] == '\"')
        char_num_j++;

      if(seq1[0] != seq2[0])
        break;

      for( ; input_str1[char_num_i] != '\"' && input_str1[char_num_i] != '\0' ; char_num_i++)
        sprintf(seq1, "%s%c", seq1, input_str1[char_num_i]);

      for( ; input_str2[char_num_j] != '\"' && input_str2[char_num_j] != '\0' ; char_num_j++)
        sprintf(seq2, "%s%c", seq2, input_str2[char_num_j]);

      if(input_str1[char_num_i] == '\"')
      {
        sprintf(seq1, "%s%c", seq1, input_str1[char_num_i]);
        char_num_i++;
      }

      if(input_str2[char_num_j] == '\"')
      {
        sprintf(seq2, "%s%c", seq2, input_str2[char_num_j]);
        char_num_j++;
      }

      if(strcmp(seq1, seq2) != 0)
      {
        wrong_counter += 1;
        if(wrong_counter == 2)
        {
          printf("DIFFERENT\n");
          different_counter = 1;
          break;
        }
      }
      memset(seq1, '\0', strlen(seq1));
      memset(seq2, '\0', strlen(seq2));

    }

    if(different_counter == 0)
    {
      if(seq1[0] != seq2[0])
      {
        printf("DIFFERENT\n");
        continue;
      }
      if(wrong_counter == 1)
        printf("CLOSE\n");
    }
  }

  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:47:9: error: 'print_counter' undeclared (first use in this function); did you mean 'wrong_counter'?
   47 |         print_counter = 1;
      |         ^~~~~~~~~~~~~
      |         wrong_counter
main.c:47:9: note: each undeclared identifier is reported only once for each function it appears in