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

#include<stdio.h>
int main(void) {
	char s1[200], s2[200];
	int i=0,cnt,jud;
	while (1) {
		cnt = 0;
		jud = 0;
		i = 0;
		scanf_s("%s", s1);
		scanf_s("%s", s2);
		if (s1[0] == '.') {
			break;
		}
		while (s1[i] != EOF) {
			if ((s1[i] != s2[i]) && (jud == 0)) {
				cnt++;
				jud = 1;
			}
			if (s1[i] == ';') {
				cnt = 0;
			}
		}
	}
	if (cnt == 0) {
		printf("IDENTICAL\n");
	}
	else if(cnt==1){
		printf("CLOSE\n");
	}else{
		printf("DIFFERENT\n");
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    9 |                 scanf_s("%s", s1);
      |                 ^~~~~~~
      |                 scanf
Language: C

#include<stdio.h>
int main(void) {
	char s1[200], s2[200];
	int i=0,cnt,jud;
	while (1) {
		cnt = 0;
		jud = 0;
		i = 0;
		gets("%s", s1);
		gets("%s", s2);
		if (s1[0] == '.') {
			break;
		}
		while (s1[i] != EOF) {
			if ((s1[i] != s2[i]) && (jud == 0)) {
				cnt++;
				jud = 1;
			}
			if (s1[i] == ';') {
				cnt = 0;
			}
		}
	}
	if (cnt == 0) {
		printf("IDENTICAL\n");
	}
	else if(cnt==1){
		printf("CLOSE\n");
	}else{
		printf("DIFFERENT\n");
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    9 |                 gets("%s", s1);
      |                 ^~~~
      |                 fgets
Language: C

#include<stdio.h>
int main(void) {
	char s1[200], s2[200];
	int i=0,cnt,jud;
	while (1) {
		cnt = 0;
		jud = 0;
		i = 0;
		gets(s1);
		gets(s2);
		if (s1[0] == '.') {
			break;
		}
		while (s1[i] != EOF) {
			if ((s1[i] != s2[i]) && (jud == 0)) {
				cnt++;
				jud = 1;
			}
			if (s1[i] == ';') {
				cnt = 0;
			}
		}
	}
	if (cnt == 0) {
		printf("IDENTICAL\n");
	}
	else if(cnt==1){
		printf("CLOSE\n");
	}else{
		printf("DIFFERENT\n");
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    9 |                 gets(s1);
      |                 ^~~~
      |                 fgets
Language: C

#include<stdio.h>
int main(void) {
	char s1[200], s2[200];
	int i = 0, cnt, jud;
	while (1) {
		cnt = 0;
		jud = 0;
		i = 0;
		gets(s1);
		if (s1[0] == '.') {
			break;
		}
		gets(s2);
		while (s1[i] != '\n') {
			if ((s1[i] != s2[i]) && (jud == 0)) {
				cnt++;
				jud = 1;
			}
			if (s1[i] == ';') {
				jud = 0;
			}
			i++;
		}
		if (cnt == 0) {
			printf("IDENTICAL\n");
		}
		else if (cnt == 1) {
			printf("CLOSE\n");
		}
		else {
			printf("DIFFERENT\n");
		}
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    9 |                 gets(s1);
      |                 ^~~~
      |                 fgets
Language: C

#include<stdio.h>
int main(void) {
	char s1[201], s2[201];
	int i = 0, cnt, jud;
	while (1) {
		cnt = 0;
		jud = 0;
		i = 0;
		j=0;
		scanf("%s",s1);
		if (s1[0] == '.') {
			break;
		}
		scanf("%s",s2);
		while (s1[i] != '\n') {
			if ((s1[i] != s2[j]) && (jud == 0)) {
				cnt++;
				jud = 1;
			}
			if (s1[i] == ';') {
			    if(s2[j]!='s'){
			        do{
			            j++;
			        }while(s2[j]!=';');
			    }
				jud = 0;
			}else if(s2[j]==';'){
			    do{
			        i++;
			    }while(s1[i]!=';')
			    jud=0;
			}
			i++;
			j++;
		}
		if (cnt == 0) {
			printf("IDENTICAL\n");
		}
		else if (cnt == 1) {
			printf("CLOSE\n");
		}
		else {
			printf("DIFFERENT\n");
		}
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:17: error: 'j' undeclared (first use in this function)
    9 |                 j=0;
      |                 ^
main.c:9:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:30:47: error: expected ';' before 'jud'
   30 |                             }while(s1[i]!=';')
      |                                               ^
      |                                               ;
   31 |                             jud=0;
      |                             ~~~
Language: C

#include<stdio.h>
int main(void) {
	char s1[201], s2[201];
	int i = 0, cnt, jud,j;
	while (1) {
		cnt = 0;
		jud = 0;
		i = 0;
		j=0;
		scanf("%s",s1);
		if (s1[0] == '.') {
			break;
		}
		scanf("%s",s2);
		while (s1[i] != '\n') {
			if ((s1[i] != s2[j]) && (jud == 0)) {
				cnt++;
				jud = 1;
			}
			if (s1[i] == ';') {
			    if(s2[j]!='s'){
			        do{
			            j++;
			        }while(s2[j]!=';');
			    }
				jud = 0;
			}else if(s2[j]==';'){
			    do{
			        i++;
			    }while(s1[i]!=';')
			    jud=0;
			}
			i++;
			j++;
		}
		if (cnt == 0) {
			printf("IDENTICAL\n");
		}
		else if (cnt == 1) {
			printf("CLOSE\n");
		}
		else {
			printf("DIFFERENT\n");
		}
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:30:47: error: expected ';' before 'jud'
   30 |                             }while(s1[i]!=';')
      |                                               ^
      |                                               ;
   31 |                             jud=0;
      |                             ~~~
Language: C

#include<stdio.h>
int main(void) {
	char s1[201], s2[201];
	int i = 0, cnt, jud,j;
	while (1) {
		cnt = 0;
		jud = 0;
		i = 0;
		j=0;
		fgets(s1,seizeof(s1),stdin);
		//scanf("%s",s1);
		if (s1[0] == '.') {
			break;
		}
		fgets(s2,sizeof(s2),stdin);
		//scanf("%s",s2);
		while (s1[i] != '\n') {
			if ((s1[i] != s2[j]) && (jud == 0)) {
				cnt++;
				jud = 1;
			}
			if (s1[i] == ';') {
			    if(s2[j]!='s'){
			        do{
			            j++;
			        }while(s2[j]!=';');
			    }
				jud = 0;
			}else if(s2[j]==';'){
			    do{
			        i++;
			    }while(s1[i]!=';');
			    jud=0;
			}
			i++;
			j++;
		}
		if (cnt == 0) {
			printf("IDENTICAL\n");
		}
		else if (cnt == 1) {
			printf("CLOSE\n");
		}
		else {
			printf("DIFFERENT\n");
		}
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:26: error: implicit declaration of function 'seizeof' [-Wimplicit-function-declaration]
   10 |                 fgets(s1,seizeof(s1),stdin);
      |                          ^~~~~~~
Language: C

#include<stdio.h>
int main(void) {
	char s1[300], s2[300];
	int i = 0, cnt, jud,j;
	while (1) {
		cnt = 0;
		jud = 0;
		i = 0;
		j = 0;
		fgets(s1,sizeof(s1),stdin);
		//scanf("%s",s1);
		if (s1[0] == '.') {
			break;
		}
		fgets(s2,sizeof(s2),stdin);
		//scanf("%s",s2);
		while (s1[i] != '\0'||s2[j:!='\0']) {
			printf("%c %c\n", s1[i], s2[j]);
			if (s1[i] != s2[j]) {
				if (jud == 0) {
					cnt = 2;
					break;
				}
				else {
					cnt++;
					if (s2[j] != '"') {
						do {
							j++;
						} while (s2[j] != '"');
					}
					if (s1[i] != '"') {
						do {
							i++;
						} while (s1[i] != '"');
					}
					jud = 0;
				}
			}
			if (s1[i] == '"') {
				jud = 1;
			}
			i++;
			j++;
		}
		if (cnt == 0) {
			printf("IDENTICAL\n");
		}
		else if (cnt == 1) {
			printf("CLOSE\n");
		}
		else {
			printf("DIFFERENT\n");
		}
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:17:43: error: expected ']' before ':' token
   17 |                 while (s1[i] != '\0'||s2[j:!='\0']) {
      |                                           ^
      |                                           ]
Language: C

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

int main(void) {
	char str1[201], str2[201];
	bool flag;
	int i, j, count;

	while(1) {
		scanf("%s", str1);
		if(str1[0] == '.' && str1[1] == '\0') break;
		scanf("%s", str2);

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

		flag = false;
		i = j = count = 0; 
		while(str1[i] != '\0' || str2[j] != '\0') {
			if(str1[i] != str2[j]) {
				if(flag == false) {
					count = 2;
					break;
				} else{
					if(++count >= 2) break;
					flag = false;
					while(str1[i] != '"') i++;
					while(str2[j] != '"') j++;
				}
			} else if(str1[i] == '"' && str2[j] == '"') {
				flag = !flag;
			}
			i++; j++;
		}

		if(count == 1){
			printf("CLOSE\n");
		} else{
			printf("DIFFERENT\n");
		}

	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:9: error: unknown type name 'bool'
    6 |         bool flag;
      |         ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include <string.h>
  +++ |+#include <stdbool.h>
    3 | 
main.c:19:24: error: 'false' undeclared (first use in this function)
   19 |                 flag = false;
      |                        ^~~~~
main.c:19:24: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:19:24: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main(void) {
	char str1[201], str2[201];
	int flag;
	int i, j, count;

	while(1) {
		scanf("%s", str1);
		if(str1[0] == '.' && str1[1] == '\0') break;
		scanf("%s", str2);

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

		flag = false;
		i = j = count = 0; 
		while(str1[i] != '\0' || str2[j] != '\0') {
			if(str1[i] != str2[j]) {
				if(flag == false) {
					count = 2;
					break;
				} else{
					if(++count >= 2) break;
					flag = false;
					while(str1[i] != '"') i++;
					while(str2[j] != '"') j++;
				}
			} else if(str1[i] == '"' && str2[j] == '"') {
				flag = !flag;
			}
			i++; j++;
		}//endwhile

		if(count == 1){
			printf("CLOSE\n");
		} else{
			printf("DIFFERENT\n");
		}

	}//endwhile
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:19:24: error: 'false' undeclared (first use in this function)
   19 |                 flag = false;
      |                        ^~~~~
main.c:3:1: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include <string.h>
  +++ |+#include <stdbool.h>
    3 | 
main.c:19:24: note: each undeclared identifier is reported only once for each function it appears in
   19 |                 flag = false;
      |                        ^~~~~
Language: C

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

int main()
{
	int i,j,k,l1,l2,l,f1,f2;
	char s1[200]={'\0'},s2[200]={'\0'},buf[200]={'\0'};
	int l1,l2,l;
	int c,flag;
	/*
	for(i=0;i<200;i++){
		s1[i] = '\0';
		s2[i] = '\0';
		buf[i] = '\0';
	}
	*/
	while(1){
		flag = c = 0;
		scanf("%s",s1);
		if( strcmp(s1,".") == 0 ) break;
		scanf("%s",s2);
		l1 = strlen(s1);
		l2 = strlen(s2);
		l = l1;
		if( l1 > l2 ){
			l = l2;
			strcpy( buf, s1 );
			strcpy( s1 , s2 );
			strcpy( s2 , buf);
		}
		for( i = 0, j = 0; i < l1 && j < l2 ; i++, j++){
			if( s1[i] != s2[j] ){
				if( flag == 1 ){
					f1 = f2 = 0;
					c++;
					for(k=0;k<l;k++){
						if( s1[i] == '"' ){
							flag = 0;
							f1 = 1;
							if( f1==1 && f2==1 ) break;
						}else{
							i++;
						}
						if( s2[j] == '"'){
							f1 = 1;
							if( f1 == 1 && f2==1 ) break;
						}else{
							j++;
						}
					}
				}else{ c = 2; break; }
			}else if( s1[i] == '"' ){
				flag = (flag+1) % 2;
			}
		};
		if( c == 0 && s2[j] == '\0' ) printf("IDENTICAL\n");
		else if( c == 1 ) printf("CLOSE\n");
		else printf("DIFFERENT\n");
	}
	return 0;
}
							
			


Compiler output:
main.c: In function 'main':
main.c:8:13: error: redeclaration of 'l1' with no linkage
    8 |         int l1,l2,l;
      |             ^~
main.c:6:19: note: previous declaration of 'l1' with type 'int'
    6 |         int i,j,k,l1,l2,l,f1,f2;
      |                   ^~
main.c:8:16: error: redeclaration of 'l2' with no linkage
    8 |         int l1,l2,l;
      |                ^~
main.c:6:22: note: previous declaration of 'l2' with type 'int'
    6 |         int i,j,k,l1,l2,l,f1,f2;
      |                      ^~
main.c:8:19: error: redeclaration of 'l' with no linkage
    8 |         int l1,l2,l;
      |                   ^
main.c:6:25: note: previous declaration of 'l' with type 'int'
    6 |         int i,j,k,l1,l2,l,f1,f2;
      |                         ^
Language: C

#include <cstdio>
#define MAX_L 200

char s1[MAX_L+1],s2[MAX_L+1];

void solve(){
	int flag=0;
	while(1){
		scanf("%s",s1);
		if(s1[0]=='.')return;
		scanf("%s",s2);
		char *f=s1,*s=s2;
		while(1){
			if(*f==*s){
				if(*f=='\0'){
					if(flag==1)printf("CLOSE\n");
					else if(flag>1)printf("DIFFERENT\n");
					else printf("IDENTICAL\n");
					flag=0;
					break;
				}
				if(*f=='\"'){
					f++;s++;
					while(1){
						if(*f==*s){
							if(*f=='\0')
								break;
							else if(*f=='\"'){
								f++;s++;
								break;
							}
						}else{
							flag++;
							while(*f!='\"')f++;
							while(*s!='\"')s++;
							f++;s++;
							break;
						}
						f++;s++;
					}
				}else{
					f++;s++;
				}
			}else{
				printf("DIFFERENT\n");
				break;
			}
		}

	}
}

int main(){
	solve();
	return 0;
}


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

#include<iostream>
#include<string>
#include<vector>

using namespace std;

void split(string &s, vector<string> &v) {
	s += '"';
	string buf = "";
	for (int i = 0; i < s.size(); i++) {
		if (s[i] == '"') {
			v.push_back(buf);
			buf = "";
		}
		else buf += s[i];
	}
}

int main() {

	while (1) {
		string S1, S2;
		cin >> S1;
		if (S1 == ".")break;
		cin >> S2;
		//すでに完全に一致ならば
		if (S1 == S2) {
			cout << "IDENTICAL" << endl;
			continue;
		}
		vector<string> v1, v2;
		split(S1, v1), split(S2, v2);

		if (v1.size() != v2.size()) {
			cout << "DIFFERENT" << endl;
			continue;
		}
		
		int cnt = 0;
		for (int i = 0; i < v1.size(); i++) {
			if (i % 2 == 0) {
				if (v1[i] != v2[i]){
					cout << "DIFFERENT" << endl; cnt++;
					continue;
				}
			else {
				if (v1[i] != v2[i]) {
					cnt++;
				}
			}
		}
		if (cnt > 1) {
			cout << "DIFFERENT" << endl;
		}
		else {
			cout << "CLOSE" << endl;
		}
	}
	
	return 0;
}


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

#include<iostream>
#include<string>
#include<vector>

using namespace std;

void split(string s, vector<string> &v) {
	s += '"';
	string buf = "";
	for (int i = 0; i < s.size(); i++) {
		if (s[i] == '"') {
			v.push_back(buf);
			buf = "";
		}
		else buf += s[i];
	}
}

int main() {

	while (1) {
		string S1, S2;
		cin >> S1;
		if (S1 == ".")break;
		cin >> S2;
		//すでに完全に一致ならば
		if (S1 == S2) {
			cout << "IDENTICAL" << endl;
			continue;
		}
		vector<string> v1, v2;
		split(S1, v1), split(S2, v2);

		if (v1.size() != v2.size()) {
			cout << "DIFFERENT" << endl;
			continue;
		}
		
		int cnt = 0;
		for (int i = 0; i < v1.size(); i++) {
			if (i % 2 == 0) {
				if (v1[i] != v2[i]) {
					cout << "DIFFERENT" << endl;
					goto next:
				}
			}
			else {
				if (v1[i] != v2[i]) {
					cnt++;
				}
			}
		}
		if (cnt > 1) {
			cout << "DIFFERENT" << endl;
		}
		else {
			cout << "CLOSE" << endl;
		}
	next:;
	}
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:50: error: expected ';' before ':' token
   44 |                                         goto next:
      |                                                  ^
      |                                                  ;
a.cc:44:50: error: expected primary-expression before ':' token
Language: C++

#include<iostream>
using namespace std;

int main(){
	while(true){
		char s1[200], s2[200];
		cin >> s1;
		if(s1[0] == '.' && s1[1] == '\0'){
			break;
		}
		cin >> s2;
		bool isClose = false, isDifferent = false;
		bool isInsideBlock = false;
		int s1Offset = 0, s2Offset = 0;
		for(int i = 0; i < 200; i++){
			if(isInsideBlock){
				if(s1[i + s1Offset] != s2[i + s2Offset]){
					isDifferent = true;
					break;
				}else if(s1[i + s1Offset] == '"'){
					isInsideBlock = true;
				}
			}else{
				if(s1[i + s1Offset] != s2[i + s2Offset]){
					if(isClose){
						isDifferent = true;
					}else{
						isClose = true;
						while(s1[i + s1Offset] == '"'){
							s1Offset++;
						}
						while(s2[i + s2Offset] == '"'){
							s2Offset++;
						}
					}
				}else if(s1[i + s1Offset] == '"'){
					isInsideBlock = false;
				}
			}
		}
		if(s1[i + s1Offset] == '\0' && s2[i + s1Offset] == '\0'){
			break;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:23: error: 'i' was not declared in this scope
   41 |                 if(s1[i + s1Offset] == '\0' && s2[i + s1Offset] == '\0'){
      |                       ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	while(1){
		string s1;	
		cin>>s1;

		if(s1==".")
			break;

		string s2;
  		cin>>s2;	
		
		if(s1==s2){
			cout<<"IDENTICAL"<<endl;
		}
		
		string t1=s1;
		string t2=s2;

		while(true){
			size_t d1b=t1.find('\"');
			if(d1b==string::npos)
				break;
			t1.replace(d1b,1,"@");

			size_t d1e=t1.find('\"');
			t1.replace(d1e,1,"@");

			size_t d2b=t2.find('\"');
			if(d2b==string::npos)
				break;
			t2.replace(d2b,1,"@");

			size_t d2e=t2.find('\"');
			t1.replace(d2e,1,"@");

			string u1=s1;
			u1.replace(d1b+1,d1e-d1b-1,"");
			string u2=s2;
			u2.replace(d2b+1,d2e-d2b-1,"");

			if(u1==u2){
				t1=u1;
				t2=u2;
				break;
			}
		}

		if(t1==t2){
			cout<<"CLOSE"<<endl;
		}
		else{`
			cout<<"DIFFERENT"<<endl;
		}
	}
	
	return 0;
}

Compiler output:
a.cc:54:22: error: stray '`' in program
   54 |                 else{`
      |                      ^
Language: C++

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

int main(){
	while(true){
		string s1;
		cin>>s1;
		if(s1=="."){
			break;
		}
		string s1;
		cin>>s1;
		if(s1==s2){
			cout<<"IDENTICAL"<<endl;
			continue;
		}
		string t1=s1;
		string t2=s2;
		while(true){
			size_t d1b=t1.find('\"');
			if(d1b==string::npos){
				break;
			}
			t1.replace(d1b,1,"@");
			size_t d1e=t1.find('\"');
			t1.replace(d1e,1,"@");

			size_t d2b=t2.find('\"');
			if(d2b==string::npos){
				break;
			}
			t2.replace(d2b,1,"@");
			size_t d2e=t2.find('\"');
			t2.replace(d2e,1,"@");

			string u1=s1;
			u1.replace(d1b+1,d1e-d1b-1,"");
			string u2=s2;
			u2.replace(d2b+1,d2e-d2b-1,"");

			if(u1==u2){
				t1=u1;
				t2=u2;
				break;
			}
		}
		if(t1==t2){
			cout<<"CLOSE"<<endl;
		}
		else{
			cout<<"DIFFERENT"<<endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: redeclaration of 'std::string s1'
   12 |                 string s1;
      |                        ^~
a.cc:7:24: note: 'std::string s1' previously declared here
    7 |                 string s1;
      |                        ^~
a.cc:14:24: error: 's2' was not declared in this scope; did you mean 's1'?
   14 |                 if(s1==s2){
      |                        ^~
      |                        s1
a.cc:19:27: error: 's2' was not declared in this scope; did you mean 't2'?
   19 |                 string t2=s2;
      |                           ^~
      |                           t2
Language: C++

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

int main(){
	while(1){
		string s1,s2;
		cin>>s1>>s2;
		
		if(s1=="."){
			break;
		}
		
		if(s1==s2){
			cout<<"IDENTICAL"<<endl;
		}
		
		string t1=s1;
		string t2=s2;
		
		while(1){
			size_t d1b=t1.find('\"');
			if(dib==string::npos){
				break;
			}
			t1.replace(d1b,1,"@");
			size_t d1e=t1.find('\"');
			t1.replace(d1e,1,"@");
			
			size_t d2b=t2.find('\"');
			if(d2b==string::npos){
				break;
			}
			t2.replace(d2b,1,"@");
			size_t d2e=t2.find('\"');
			t2.replace(d2e,1,"@");
		
			string u1=s1;
			string u2=s2;
			u1.replace(d1b+1,d1e-d1b-1,"");
			u2.replace(d2b+1,d2e-d2b-1,"");
	
			if(u1==u2){
				t1=u1;
				t2=u2;
				break;
			}
		}
		if(t1==t2){
			cout<<"CLOSE"<<endl;
		}else{
			cout<<"DIFFERENT"<<endl;
		}
			
	}
	return0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:28: error: 'dib' was not declared in this scope; did you mean 'd1b'?
   23 |                         if(dib==string::npos){
      |                            ^~~
      |                            d1b
a.cc:56:9: error: 'return0' was not declared in this scope
   56 |         return0;
      |         ^~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main()
{
  while(1){
    string row1,row2;
    string period(".");
    string cover("\"");

    cin>>row1;
    if(row1 == period){
      break;
    }
    cin>>row2;

    if(row1 == row2){
      cout<<"IDENTICAL"<<endl;
    }
    else{
      int size1 = row1.size();
      vector<string> Row1;
      string temp2;

      for(int i = 0;i < size1;++i){ 
        string temp1;
        temp1 = row1[i];
        if(temp1 == cover){
          string temp4;
          Row1.push_back(temp2);
          temp2 = temp4;
        }
        else if(i == size1 - 1){
          temp2 += temp1;
          Row1.push_back(temp2);
        }
        else{
          temp2 += temp1;
        }
      }

      int size2 = row2.size();
      vector<string> Row2;
      string temp3;

      for(int i = 0;i < size2;++i){ 
        string temp1;
        temp1 = row2[i];
        if(temp1 == cover){
          string temp4;
          Row2.push_back(temp3);
          temp3 = temp4;
        }
        else if(i == size2 - 1){
          temp3 += temp1;
          Row2.push_back(temp3);
        }
        else{
          temp3 += temp1;
        }
      }

      int Size1 = Row1.size();
      int Size2 = Row2.size();
      int count = 0;

      if(Size1 != Size2){
        cout<<"DIFFERENT"<<endl;
      }
      else{
        for(int i = 0;i <= Sizex;++i){
          string check1,check2;
          check1 = Row1[i];
          check2 = Row2[i];

          if(i % 2 == 0){
            if(check1 != check2){
              cout<<"DIFFERENT"<<endl;
              break;
            }
          }
          else{
            if(check1 != check2){
              ++count;
            }
          }
          
          if(count == 2){
            cout<<"DIFFERENT"<<endl;
            break;
          }
        }
      }

      if(count == 1){
        cout<<"CLOSE"<<endl;
      }
    }
  }
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:74:28: error: 'Sizex' was not declared in this scope; did you mean 'Size2'?
   74 |         for(int i = 0;i <= Sizex;++i){
      |                            ^~~~~
      |                            Size2
Language: C++

#include<iostream>
#include<vector>
#include<string>
int main(){
	int i,j,k,l,m,lim,flag1=0,flag2,flag3,flag4,count=0,x,scou1=0,scou2=0;
	std::string s1;
	std::string s2;
	std::vector<std::string> ans;
	char str1[200],str2[200];
	while(1){
		gets(str1);
		i=0;
		while(str1[i]!=NULL){
			s1.push_back(str1[i]);
			i++;
		}
//		std::cout<<s1<<"\n";
		if(s1=="."){
//			std::cout<<s1<<"\n";
			break;
		}
		gets(str2);
		k=0;
		while(str2[k]!=NULL){
			s2.push_back(str2[k]);
			k++;
		}
//		std::cout<<s2<<"\n";
//		std::cout<<i<<"\n";
		scou1=0;
		scou2=0;
		flag1=0;
		flag2=0;
		flag3=0;
		flag4=0;
		if(i<k){
			l=i;
			lim=k;
		}else{
			l=k;
			lim=i;
		}
		j=0;
		m=0;
		for(int z=0;z<l;z++){
			if(s1[j]=='"'){
				scou1++;
			}
			if(s2[m]=='"'){
				scou2++;
			}
			
			std::cout<<s1[j]<<" "<<s2[m]<<"\n";
			
			if(s1[j]!=s2[m]){
				if(flag4==1){
					flag2=1;
					break;
				}
				if(scou1%2==1&&scou2%2==1){
					flag2=2;
					flag3=1;
				}else if(scou1%2==1){
					while(s1[j]!='"'){
						j++;
					}
					scou1++;
					flag2=2;
					flag3=1;
				}else if(scou2%2==1){
					while(s2[m]!='"'){
						m++;
					}
					scou2++;
					flag2=2;
					flag3=1;
				}else{
					flag2=1;
					break;
				}
				
			}
			
			if(flag3==1&&scou1%2==0&&scou2%2==0){
					flag4=1;
					std::cout<<"tutgihanai\n";
				}
			
			j++;
			m++;
		}
		
		if(m<lim&&j<lim){
			flag2=1;
		}
		
//		std::cout<<m<<j<<lim<<"\n";
		
		if(flag2==0){
			ans.push_back("IDENTICAL");
		}else if(flag2==1){
			ans.push_back("DEFFERENT");
		}else{
			ans.push_back("CLOSE");
		}
		std::cout<<ans[count]<<"\n";
		
		count++;
		s1.erase(s1.begin(),s1.end());
		s2.erase(s2.begin(),s2.end());
	}
	
	for(int j=0;j<count;j++){
		std::cout<<ans[j]<<"\n";
	}
	
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
   11 |                 gets(str1);
      |                 ^~~~
      |                 getw
a.cc:13:32: warning: NULL used in arithmetic [-Wpointer-arith]
   13 |                 while(str1[i]!=NULL){
      |                                ^~~~
a.cc:24:32: warning: NULL used in arithmetic [-Wpointer-arith]
   24 |                 while(str2[k]!=NULL){
      |                                ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<stdio.h>
#include<cstdio>
int main(){
	int i,j,k,l,m,lim,flag1=0,flag2,flag3,flag4,count=0,x,scou1=0,scou2=0;
	std::string s1;
	std::string s2;
	std::vector<std::string> ans;
	char str1[200],str2[200];
	while(1){
		gets(str1);
		i=0;
		while(str1[i]!=NULL){
			s1.push_back(str1[i]);
			i++;
		}
//		std::cout<<s1<<"\n";
		if(s1=="."){
//			std::cout<<s1<<"\n";
			break;
		}
		gets(str2);
		k=0;
		while(str2[k]!=NULL){
			s2.push_back(str2[k]);
			k++;
		}
//		std::cout<<s2<<"\n";
//		std::cout<<i<<"\n";
		scou1=0;
		scou2=0;
		flag1=0;
		flag2=0;
		flag3=0;
		flag4=0;
		if(i<k){
			l=i;
			lim=k;
		}else{
			l=k;
			lim=i;
		}
		j=0;
		m=0;
		for(int z=0;z<l;z++){
			if(s1[j]=='"'){
				scou1++;
			}
			if(s2[m]=='"'){
				scou2++;
			}
			
			std::cout<<s1[j]<<" "<<s2[m]<<"\n";
			
			if(s1[j]!=s2[m]){
				if(flag4==1){
					flag2=1;
					break;
				}
				if(scou1%2==1&&scou2%2==1){
					flag2=2;
					flag3=1;
				}else if(scou1%2==1){
					while(s1[j]!='"'){
						j++;
					}
					scou1++;
					flag2=2;
					flag3=1;
				}else if(scou2%2==1){
					while(s2[m]!='"'){
						m++;
					}
					scou2++;
					flag2=2;
					flag3=1;
				}else{
					flag2=1;
					break;
				}
				
			}
			
			if(flag3==1&&scou1%2==0&&scou2%2==0){
					flag4=1;
					std::cout<<"tutgihanai\n";
				}
			
			j++;
			m++;
		}
		
		if(m<lim&&j<lim){
			flag2=1;
		}
		
//		std::cout<<m<<j<<lim<<"\n";
		
		if(flag2==0){
			ans.push_back("IDENTICAL");
		}else if(flag2==1){
			ans.push_back("DEFFERENT");
		}else{
			ans.push_back("CLOSE");
		}
		std::cout<<ans[count]<<"\n";
		
		count++;
		s1.erase(s1.begin(),s1.end());
		s2.erase(s2.begin(),s2.end());
	}
	
	for(int j=0;j<count;j++){
		std::cout<<ans[j]<<"\n";
	}
	
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
   13 |                 gets(str1);
      |                 ^~~~
      |                 getw
a.cc:15:32: warning: NULL used in arithmetic [-Wpointer-arith]
   15 |                 while(str1[i]!=NULL){
      |                                ^~~~
a.cc:26:32: warning: NULL used in arithmetic [-Wpointer-arith]
   26 |                 while(str2[k]!=NULL){
      |                                ^~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
main() {
	while (true) {
		string a, b;
		cin >> a;
		if (a[0] == ".") {
			break;
		}
		cin >> b;
		if (a == b) {
			cout << "IDENTICAL" << endl;
			continue;
		}
		int modea = 0, modeb = 0;
		int i = 0, j = 0, k = 0, c = 0;
		while(true){
			if (a[i+j] == '"') {
				swich(modea) {
					case 0:
						modea = 1;
						break;
					case 1:
						modea = 0;
						break;
				}
			}
			if (b[i+k] == '"') {
				swich(modeb) {
					case 0:
						modeb = 1;
						break;
					case 1:
						modeb = 0;
						break;
				}
			}
			if (modea == 1 and modeb==1) {
				if (a[i + j] != b[i + k]) {
					c++;
					continue;
				}
				j++;
				k++;
			}
			else if (modea == 1) {
				j++;
			}
			else if(modeb==1){
				k++;
			}
			else {
				if (a[i] != b[i]) {
					c = c + 2;
				}
				i++;
			}
		}
		if (C > 1) {
			cout << "DIFFERENT" << endl;
		}
		else {
			cout << "CLOSE" << endl;
		}
	}
}


Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:8:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |                 if (a[0] == ".") {
a.cc:20:33: error: 'swich' was not declared in this scope
   20 |                                 swich(modea) {
      |                                 ^~~~~
a.cc:30:33: error: 'swich' was not declared in this scope
   30 |                                 swich(modeb) {
      |                                 ^~~~~
a.cc:60:21: error: 'C' was not declared in this scope
   60 |                 if (C > 1) {
      |                     ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main() {
	while (true) {
		string a, b;
		cin >> a;
		if (a[0] == ".") {
			break;
		}
		cin >> b;
		if (a == b) {
			cout << "IDENTICAL" << endl;
			continue;
		}
		int modea = 0, modeb = 0;
		int i = 0, j = 0, k = 0, c = 0;
		while(true){
			if (a[i+j] == '"') {
				switch(modea) {
					case 0:
						modea = 1;
						break;
					case 1:
						modea = 0;
						break;
				}
			}
			if (b[i+k] == '"') {
				switch(modeb) {
					case 0:
						modeb = 1;
						break;
					case 1:
						modeb = 0;
						break;
				}
			}
			if (modea == 1 and modeb==1) {
				if (a[i + j] != b[i + k]) {
					c++;
					continue;
				}
				j++;
				k++;
			}
			else if (modea == 1) {
				j++;
			}
			else if(modeb==1){
				k++;
			}
			else {
				if (a[i] != b[i]) {
					c = c + 2;
				}
				i++;
			}
		}
		if (c > 1) {
			cout << "DIFFERENT" << endl;
		}
		else {
			cout << "CLOSE" << endl;
		}
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |                 if (a[0] == ".") {
Language: C++

while True:
    s1 = input()
    if s1 == '.':
        break
    s2 = input()

    if s1 == s2:
        print("IDENTICAL")
        continue

    s2 = s2.split('"')
    s1 = s1.split('"')
    # print(s1)
    # print(s2)
    count = 0
    isTmp = False
    if s1[0] == '"' and s2[0] == '"':
        isTmp = True

    for i in range(len(s1)):
        if len(s1) != len(s2):
            print("DIFFERENT")
            break
        if count > 1:
            print("DIFFERENT")
            break

        if not isTmp:
            if i % 2 == 0:
                if s1[i] != s2[i]:
                    print("DIFFERENT");
                    break
            if i % 2 == 1:
                if s1[i] != s2[i]:
                    count += 1
        else:
            if i+1 % 2 == 0:
                if s1[i] != s2[i]:
                    print("DIFFERENT");
                    break
            if i+1 % 2 == 1:
                if s1[i] != s2[i]:
                    count += 1

    if count == 1:
        print("CLOSE")



Compiler output:
a.cc:13:7: error: invalid preprocessing directive #print
   13 |     # print(s1)
      |       ^~~~~
a.cc:14:7: error: invalid preprocessing directive #print
   14 |     # print(s2)
      |       ^~~~~
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while True:
      | ^~~~~
a.cc:32:21: error: expected unqualified-id before 'break'
   32 |                     break
      |                     ^~~~~
a.cc:40:21: error: expected unqualified-id before 'break'
   40 |                     break
      |                     ^~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int n,m,l;
string s1, s2;
void input() {
	cin >> s1;
	if (s1 == ".")return;
	cin >> s2;
}
void output() {
	cout << endl;
}
void prep() {
	n = s1.length();
	m = s2.length();
	s1 = s1 + "$";
	s2 = s2 + "$";
}
void solve() {
	int i = 0;
	int j = 0;
	int h = 1;
	int cnt = 0;
	while (i+j<m+n-1) {
		h = 1 - h;
		string c1 = "";
		string c2 = "";
		while (i < n) {
			c1=c1+s1[i];
			if (s1[i] == '"')break;
			i++;
		}
		i++;
		while (j < m) {
			c2=c2+s2[j];
			if (s2[j] == '"')break;
			j++;
		}
		j++;
		if (c1._Equal(c2) == false) {
			if (h == 0) {
				cout << "DIFFERENT";
				return;
			}
			cnt++ ;
			if (cnt == 2) {
				cout << "DIFFERENT";
				return;
			}
		}
	}
	if (cnt == 0)cout << "IDENTICAL"; else cout << "CLOSE";
}
int main() {
	while (true) {
		input();
		if (s1 == ".")break;
		prep();
		solve();
		output();
	}
}



Compiler output:
a.cc: In function 'void solve()':
a.cc:41:24: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named '_Equal'
   41 |                 if (c1._Equal(c2) == false) {
      |                        ^~~~~~
Language: C++

print"hello";print123
print"hello";print123
read"B1input";solve;output;
read"B2";solve;output;
read"C1";solve;output"C1ans";
read"C2";solve;output"C2ans";
""""""""
"""42"""""
slow"program"
fast"code"
"super"fast"program"
"super"faster"program"
X""
X
I"S""CREAM"
I"CE""CREAM"
11"22"11
1"33"111
.


Compiler output:
a.cc:1:1: error: 'print' does not name a type; did you mean 'int'?
    1 | print"hello";print123
      | ^~~~~
      | int
a.cc:1:14: error: 'print123' does not name a type
    1 | print"hello";print123
      |              ^~~~~~~~
a.cc:2:14: error: 'print123' does not name a type
    2 | print"hello";print123
      |              ^~~~~~~~
a.cc:3:15: error: 'solve' does not name a type
    3 | read"B1input";solve;output;
      |               ^~~~~
a.cc:3:21: error: 'output' does not name a type
    3 | read"B1input";solve;output;
      |                     ^~~~~~
a.cc:4:1: error: 'read' does not name a type
    4 | read"B2";solve;output;
      | ^~~~
a.cc:4:10: error: 'solve' does not name a type
    4 | read"B2";solve;output;
      |          ^~~~~
a.cc:4:16: error: 'output' does not name a type
    4 | read"B2";solve;output;
      |                ^~~~~~
a.cc:5:1: error: 'read' does not name a type
    5 | read"C1";solve;output"C1ans";
      | ^~~~
a.cc:5:10: error: 'solve' does not name a type
    5 | read"C1";solve;output"C1ans";
      |          ^~~~~
a.cc:5:16: error: 'output' does not name a type
    5 | read"C1";solve;output"C1ans";
      |                ^~~~~~
a.cc:6:1: error: 'read' does not name a type
    6 | read"C2";solve;output"C2ans";
      | ^~~~
a.cc:6:10: error: 'solve' does not name a type
    6 | read"C2";solve;output"C2ans";
      |          ^~~~~
a.cc:6:16: error: 'output' does not name a type
    6 | read"C2";solve;output"C2ans";
      |                ^~~~~~
a.cc:7:1: error: expected unqualified-id before string constant
    7 | """"""""
      | ^~
Language: Java

import java.util.*;
public class C {
	public static void main(String arg[]){
		while(true){
			Scanner cs=new Scanner(System.in);
			int ans=0;
			int n=cs.nextInt();
			int m=cs.nextInt();
			if (n==0)break;
			int a[][]=new int[n+1][m+1];
			int s[][]=new int[n+1][m+1];
			for (int i=1;i<=n;i++)
				for(int j=1;j<=m;j++){
					a[i][j]=cs.nextInt();
				}
			for (int i=0;i<n;i++)
				for (int j=0;j<m;j++){
					s[i][j]=0;
				}
			for (int i=1;i<n;i++)
				for (int j=1;j<m;j++){
					s[i][j]=s[i][j-1]+s[i-1][j]-s[i-1][j-1]+a[i][j];
				}
			for (int st1=1;st1<n;st1++)
				for (int st2=1;st2<m;st2++)
					for (int en1=st1+2;en1<=n;en1++)
						for (int en2=st2+2;en2<=m;en2++){
							int min=a[st1][st2];
							for(int i=st1;i<=en1;i++){
								if (min>a[i][st2])min=a[i][st2];
								if (min>a[i][en2])min=a[i][en2];
							}
							for(int i=st2;i<=en2;i++){
								if (min>a[st1][i])min=a[st1][i];
								if (min>a[en1][i])min=a[en1][i];
							}
							int max=a[st1+1][st2+1];				
							for (int i=st1+1;i<en1;i++)
								for (int j=st2+1;j<en2;j++)
									if (max<a[i][j])max=a[i][j];
							if (max<min&& ans<min*(en1-st1-1)*(en2-st2-1)-(s[en1-1][en2-1]-s[st1][en2-1]-s[en1-1][st2]+s[st1][st2]))
								ans=min*(en1-st1-1)*(en2-st2-1)-(s[en1-1][en2-1]-s[st1][en2-1]-s[en1-1][st2]+s[st1][st2]);
						}
			System.out.println(ans);
		}
	}
}


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

#include <stdio.h>

int main()
{
  int input_d, input_w;
  int input_e[10][10];
  int okuyuki, haba;
  int moving_yoko, moving_tate;
  int counter_i, counter_j;

  for( ; ; )
  {
    int in_max_height = 0, out_min_height = 9;
    int sum_deepth = 0, max_deepth = 0;

    scanf("%d %d", &input_d, &input_w);
    if(input_d == 0 && input_w == 0)
      break;

    for(counter_i = 0 ; counter_i < input_d ; counter_i++)
    {
      for(counter_j = 0 ; counter_j < input_w ; counter_j++)
        scanf("%d", &input_e[counter_i][counter_j]);
    }

    for(okuyuki = 0 ; okuyuki <= input_d - 3 ; okuyuki++)
    {
      for(haba = 0 ; haba <= input_w - 3 ; haba++)
      {
        for(moving_tate = 0 ; moving_tate <= input_d - 3 - okuyuki ; moving_tate++)
        {
          for(moving_yoko = 0 ; moving_yoko <= input_w - 3 - haba ; moving_yoko++, sum_deepth = 0)
          {
            for(counter_i = moving_tate ; counter_i <= okuyuki + 2 + moving_tate ; counter_i++)
            {
              for(counter_j = moving_yoko ; counter_j <= haba + 2 + moving_yoko ; counter_j++)
              {
                if(moving_tate < counter_i && counter_i < okuyuki + 2 + moving_tate)
                {
                  if(moving_yoko < counter_j && counter_j < haba + 2 + moving_yoko)
                  {
                    sum_deepth += input_e[counter_i][counter_j];
                    if(in_max_height < input_e[counter_i][counter_j])
                    {
                      in_max_height = input_e[counter_i][counter_j];
                    }
                  }
                  else
                  {
                    if(out_min_height > input_e[counter_i][counter_j])
                    {
                      out_min_height = input_e[counter_i][counter_j];
                    }
                  }
                }
                else
                {
                  if(out_min_height > input_e[counter_i][counter_j])
                  {
                    out_min_height = input_e[counter_i][counter_j];
                  }
                }
              }
            }
            sum_deepth = sum_deepth - (out_min_height * (okuyuki + 1) * (haba + 1);
            if(out_min_height <= in_max_height)
            {
              in_max_height = 0;
              out_min_height = 9;
              continue;
            }
            if(max_deepth < sum_deepth)
            {
              max_deepth = sum_deepth;
            }
          }
        }
      }
    }

    printf("%d\n", max_deepth);
  }
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:65:83: error: expected ')' before ';' token
   65 |             sum_deepth = sum_deepth - (out_min_height * (okuyuki + 1) * (haba + 1);
      |                                       ~                                           ^
      |                                                                                   )
main.c:75:14: error: expected ';' before '}' token
   75 |             }
      |              ^
      |              ;
   76 |           }
      |           ~
Language: C

#include <bits/stdc++.h>
#define INF 0x3f3f3f3f
using namespace std;
const int AX = 20+6;
int a[AX][AX];
int d , w ; 
int mark[AX][AX];
struct Node{
	int x , y ;
};
int res ; 
int vis[AX][AX];

int main(){
	while( scanf("%d%d",&d,&w) && d && w ){
		for( int i = 0 ; i < d; i++ ){
			for( int j = 0 ; j < w ; j++ ){
				scanf("%d",&a[i][j]);
			}
		}
		res = 0 ;
		for( int sx = 0 ; sx < d ; sx++ ){
			for( int sy = 0 ; sy < w ; sy++ ){
				for( int ex = sx + 2 ; ex < d ; ex ++ ){
					for( int ey = sy + 2 ; ey < w ; ey ++ ){
						int minus = INF;
						int ans = 0 ;
						for( int i = sx ; i <= ex ; i++ ) minus = min( minus , a[i][sy] );
						for( int i = sx ; i <= ex ; i++ ) minus = min( minus , a[i][ey] );
						for( int i = sy ; i <= ey ; i++ ) minus = min( minus , a[sx][i] );
						for( int i = sy ; i <= ey ; i++ ) minus = min( minus , a[ex][i] );
						int f = 1;
						for( int i = sx + 1 ; i < ex ; ++i ){
							for( int j = sy + 1; j < ey ; j++ ){
								if( a[i][j] >= minus ){
									ans = 0;
									f = 0 ;
									break;
								}else ans += minus - a[i][j];
							}
							if( !f ) break;
						}
						res = max( res , ans ) ;
					}
				}
			}
		}
		printf("%d\n",res);
	}
	return 0 ;
}





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

#include <iostream>
#include <cstdio>
#define INF 0x3f3f3f3f
using namespace std;
const int AX = 20+6;
int a[AX][AX];
int d , w ; 
int res ; 
int main(){
	while( scanf("%d%d",&d,&w) && d && w ){
		for( int i = 0 ; i < d; i++ ){
			for( int j = 0 ; j < w ; j++ ){
				scanf("%d",&a[i][j]);
			}
		}
		res = 0 ;
		for( int sx = 0 ; sx < d ; sx++ ){
			for( int sy = 0 ; sy < w ; sy++ ){
				for( int ex = sx + 2 ; ex < d ; ex ++ ){
					for( int ey = sy + 2 ; ey < w ; ey ++ ){
						int minus = INF;
						int ans = 0 ;
						for( int i = sx ; i <= ex ; i++ ) minus = min( minus , a[i][sy] );
						for( int i = sx ; i <= ex ; i++ ) minus = min( minus , a[i][ey] );
						for( int i = sy ; i <= ey ; i++ ) minus = min( minus , a[sx][i] );
						for( int i = sy ; i <= ey ; i++ ) minus = min( minus , a[ex][i] );
						int f = 1;
						for( int i = sx + 1 ; i < ex ; ++i ){
							for( int j = sy + 1; j < ey ; j++ ){
								if( a[i][j] >= minus ){
									ans = 0;
									f = 0 ;
									break;
								}else ans += minus - a[i][j];
							}
							if( !f ) break;
						}
						res = max( res , ans ) ;
					}
				}
			}
		}
		printf("%d\n",res);
	}
	return 0 ;
}





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

#include<stdio.h>
int main(void) {
	int i, j, d, w, e[10][10], ds, ws, dl, wl, x, y, min, max, total, res;
	while (1) {
		res = 0;3
		scanf("%d", &d);
		scanf("%d", &w);
		if ((d == 0) && (w == 0)) {
			break;
		}
		for (i = 0; i < d; i++) {
			for (j = 0; j < w; j++) {
				scanf("%d", &e[i][j]);
			}
		}
		for (ds = 0; ds < d - 2; ds++) {
			for (ws = 0; ws < w - 2; ws++) {
			//	printf("ds:%d ws:%d\n", ds, ws);
				for (dl = 2 + ds; dl < d; dl++) {
					for (wl = 2 + ws; wl < w; wl++) {
					//	printf("dl:%d wl:%d\n", dl, wl);
						min = 10;
						max = 0;
						total = 0;
						for (x = ds; x <= dl; x++) {
						//	printf("%d %d\n", e[x][ws],e[x][wl]);
							if (min > e[x][ws]) {
								min = e[x][ws];
							}
							if (min > e[x][wl]) {
								min = e[x][wl];
							}
						//	printf("min:%d\n", min);
						}
						for (y = ws; y <= wl; y++) {
						//	printf("%d %d\n", e[ds][y], e[dl][y]);
							if (min > e[ds][y]) {
								min = e[ds][y];
							}
							if (min > e[dl][y]) {
								min = e[dl][y];
							}
						//	printf("min:%d\n", min);
						}
						for (x = ds + 1; x < dl; x++) {
							for (y = ws + 1; y < wl; y++) {
								if (max<e[x][y]) {
									max = e[x][y];
								}
								total += min - e[x][y];
							}
						}
						if (max >= min) {
							total = 0;
						}
						if (res < total) {
							res = total;
						}
						//printf("finish\n");
						//printf("res:%d total:%d\n", res, total);
					}
				}
			}
		}
		printf("%d\n", res);
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:26: error: expected ';' before 'scanf'
    5 |                 res = 0;3
      |                          ^
      |                          ;
    6 |                 scanf("%d", &d);
      |                 ~~~~~
Language: C

#include<stdio.h>
 
int main(void){
 
  int a,b;
  int c[1001][1001],i,j;
  int l,m,n,x1,y1,x2,y2,o,p,max;
   
  while(1){
   
    scanf("%d %d",&a,&b);
 
    if(a==0&&b==0){
      break;
    }
 
    for(i=0;i<a;i++){
      for(j=0;j<b;j++){
    scanf("%d",&c[i][j]);
      }
    }
 
    max=0;
 
    for(x2=2;x2<d;x2++){
      for(y2=2;y2<w;y2++){
    for(x1=0;x1<x2-1;x1++){
      for(y1=0;y1<y2-1;y1++){
 
        l=c[x1][y1];
 
        for(j=y1;j<y2+1;j++){
          if(c[x1][j]<l){
        l=c[x1][j];
          }
        }
 
        for(i=x1;i<x2+1;i++){
          if(e[i][y1]<l){
        l=c[i][y1];
          }
        }
 
        for(j=y1;j<y2+1;j++){
          if(c[x2][j]<l){
        l=c[x2][j];
          }
        }
 
        for(i=xs;i<xe+1;i++){
          if(e[i][ye]<l){
        l=e[i][ye];
          }
        }
 
        n=0;
        for(o=x1+1;o<x2;o++){
          for(p=y1+1;p<y2;p++){
 
        m=l-c[o][p];
        n=n+m;
     
          }
        }
 
        for(o=x1+1;o<x2;o++){
          for(p=y1+1;p<y2;p++){
        if(c[o][p]>=l){
          n=0;
        }
          }
        }
 
        if(max<n){
          max=n;
        }
  
      }
    }
      }
    }
 
    printf("%d\n",max);
 
  }
   
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:25:17: error: 'd' undeclared (first use in this function)
   25 |     for(x2=2;x2<d;x2++){
      |                 ^
main.c:25:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:26:19: error: 'w' undeclared (first use in this function)
   26 |       for(y2=2;y2<w;y2++){
      |                   ^
main.c:39:14: error: 'e' undeclared (first use in this function)
   39 |           if(e[i][y1]<l){
      |              ^
main.c:50:15: error: 'xs' undeclared (first use in this function); did you mean 'x2'?
   50 |         for(i=xs;i<xe+1;i++){
      |               ^~
      |               x2
main.c:50:20: error: 'xe' undeclared (first use in this function); did you mean 'x2'?
   50 |         for(i=xs;i<xe+1;i++){
      |                    ^~
      |                    x2
main.c:51:19: error: 'ye' undeclared (first use in this function); did you mean 'y2'?
   51 |           if(e[i][ye]<l){
      |                   ^~
      |                   y2