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

#include <iostream>
using namespace std;

const int COL_SIZE = 9;
const int ROW_SIZE = 9;

void inputBoard( int board[][ COL_SIZE ] )
{
	for( int i = 0; i < ROW_SIZE; ++i ){
		for( int j = 0; j < COL_SIZE; ++j ){
			cin >> board[ i ][ j ];
		}
	}
}

void outputBoard( int board[][ COL_SIZE ], bool check[][ COL_SIZE ] )
{
	for( int i = 0; i < ROW_SIZE; ++i ){
		for( int j = 0; j < COL_SIZE; ++j ){
			cout << ( check[ i ][ j ] ? '*' : ' ' ) << board[ i ][ j ];
		}
		cout << endl;
	}
}

enum{
	COL = 0,
	ROW,
	BLOCK
};

bool investigate( int board[][ COL_SIZE ], bool check[][ COL_SIZE ] )
{
	for( int i = 0; i < ROW_SIZE; ++i ){
		int usedNumber[ 3 ][ 10 ];
		memset( usedNumber, 0, sizeof(usedNumber) );
		for( int j = 0; j < COL_SIZE; ++j ){
			usedNumber[ COL ][ board[ i ][ j ] ]++;
			usedNumber[ ROW ][ board[ j ][ i ] ]++;
			usedNumber[ BLOCK ][ board[ ( i / 3 ) * 3 + j / 3 ][ ( i % 3 ) * 3 + j % 3 ] ]++;
		}
		for( int j = 0; j < COL_SIZE; ++j ){
			if( usedNumber[ COL ][ board[ i ][ j ] ] > 1 ){
				check[ i ][ j ] = true;
			}
			if( usedNumber[ ROW ][ board[ j ][ i ] ] > 1 ){
				check[ j ][ i ] = true;
			}
			int y = ( i / 3 ) * 3 + j / 3;
			int x = ( i % 3 ) * 3 + j % 3;
			if( usedNumber[ BLOCK][ board[ y ][ x ] ] > 1 ){
				check[ y ][ x ] = true;
			}
		}
	}
	return false;
}

int main()
{
	int n;
	cin >> n;
	for( int i = 0; i < n; ++i ){
		int board[ ROW_SIZE ][ COL_SIZE ];
		bool check[ ROW_SIZE ][ COL_SIZE ];
		memset( check, 0, sizeof(check) );
		inputBoard( board );
		investigate( board, check );
		if( i != 0 ){
			cout << endl;
		}
		outputBoard( board, check );
	}
	return 0;
}

Compiler output:
a.cc: In function 'bool investigate(int (*)[9], bool (*)[9])':
a.cc:36:17: error: 'memset' was not declared in this scope
   36 |                 memset( usedNumber, 0, sizeof(usedNumber) );
      |                 ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
a.cc: In function 'int main()':
a.cc:66:17: error: 'memset' was not declared in this scope
   66 |                 memset( check, 0, sizeof(check) );
      |                 ^~~~~~
a.cc:66:17: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<iostream>
#include<set>
#include<utility>

typedef std::pair<int, int> P;

bool ver[9][9], hor[9][9], sq[9][9];
int n;
char puzzle[9][9];
std::set<int> s[3][9];

// k: 0 -> ver, 1 -> hor, 2 -> sq
int f( int k, int i, int j )
{
	switch( k )
	{
		case 0:
			return j;
		case 1:
			return i;
		case 2:
			return i / 3 * 3 + j / 3;
	}
}

int main()
{
	std::cin >> n;

	bool fst = true;
	while( n-- )
	{
		memset( ver, false, sizeof( ver ) );
		memset( hor, false, sizeof( hor ) );
		memset( sq, false, sizeof( sq ) );
		for( int i = 0; i != 3; ++i )
			for( int j = 0; j != 9; ++j )
				s[i][j].clear();

		for( int i = 0; i != 9; ++i )
		{
			for( int j = 0; j != 9; ++j )
			{
				std::cin >> puzzle[i][j];
	
				int t = puzzle[i][j] - '1';
				int fl = ver[f(0, i, j)][t] | ( hor[f(1, i, j)][t] << 1 ) | ( sq[f(2, i, j)][t] << 2 );

				if( !fl ) 
					ver[f(0, i, j)][t] = hor[f(1, i, j)][t] = sq[f(2, i, j)][t] = true;
				else
				{
					for( int k = 0; k != 3; ++k )
						if( fl >> k & 1 )
							s[k][f(k, i, j)].insert( t );
				}
			}
		}

		if( !fst )
			std::cout << std::endl;

		for( int i = 0; i != 9; ++i )
		{
			for( int j = 0; j != 9; ++j )
			{
				bool fl = false;
				for( int k = 0; k != 3; ++k )
					fl |= s[k][f(k, i, j)].count( puzzle[i][j] - '1' );

				std::cout << ( fl ? '*' : ' ' ) << puzzle[i][j]; 
			}
			
			std::cout << std::endl;
		}

		fst = false;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:17: error: 'memset' was not declared in this scope
   33 |                 memset( ver, false, sizeof( ver ) );
      |                 ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<utility>
  +++ |+#include <cstring>
    4 | 
a.cc: In function 'int f(int, int, int)':
a.cc:24:1: warning: control reaches end of non-void function [-Wreturn-type]
   24 | }
      | ^
Language: C++

#include <iostream>

using namespace std;

int main() {
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		if (i != 0) {
			cout << endl << flush;
		}
		int hyou[9][9][2] = {0};
		for (int j = 0; j < 9; j++) {
			for (int k = 0; k < 9; k++) {
				cin >> hyou[j][k][0];
			}
		}
		int hantei3[9][9] = {0};
		for (int j = 0; j < 9; j++) {
			int hantei[9] = {0};
			int hantei2[9] = {0};
			int p;
			for (int k = 0; k < 9; k++) { 
				hantei[hyou[j][k][0]-1]++; // yoko
			    hantei2[hyou[k][j][0]-1]++; // tate
				if (0 <= k && k <= 2) {
					if (0 <= j && j <= 2) {
						p = 0;
					} else if (3 <= j && j <= 5) {
						p = 3;
					} else {
						p = 6;
					}
				} else if (3 <= k && k <= 5) {
					if (0 <= j && j <= 2) {
						p = 1;
					} else if (3 <= j && j <= 5) {
						p = 4;
					} else {
						p = 7;
					}
				} else {
					if (0 <= j && j <= 2) {
						p = 2;
					} else if (3 <= j && j <= 5) {
						p = 5;
					} else {
						p = 8;
					}
				}
				hantei[p][hyou[j][k][0]-1]++;
			}
			for (int k = 0; k < 9; k++) {
				if (hantei[hyou[j][k][0]-1] > 1) {
					hyou[j][k][1]++;
				}
				if (hantei2[hyou[k][j][0]-1] > 1) {
					hyou[k][j][1]++;
				}
			}
		}
		for (int j = 0; j < 9; j++) {
			int p;
			for (int k = 0; k < 9; k++) { 
				if (0 <= k && k <= 2) {
					if (0 <= j && j <= 2) {
						p = 0;
					} else if (3 <= j && j <= 5) {
						p = 3;
					} else {
						p = 6;
					}
				} else if (3 <= k && k <= 5) {
					if (0 <= j && j <= 2) {
						p = 1;
					} else if (3 <= j && j <= 5) {
						p = 4;
					} else {
						p = 7;
					}
				} else {
					if (0 <= j && j <= 2) {
						p = 2;
					} else if (3 <= j && j <= 5) {
						p = 5;
					} else {
						p = 8;
					}
				}
				if (hantei3[p][hyou[j][k][0]-1] > 1) {
					hyou[j][k][1]++;
				}
			}
		}
		for (int j = 0; j < 9; j++) {
			for (int k = 0; k < 9; k++) {
				if (hyou[j][k][1] > 0) {
					cout << "*" << flush;
				} else {
					cout << " " << flush;
				}
				cout << hyou[j][k][0] << flush;
			}
			cout << endl << flush; 
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:42: error: invalid types 'int[int]' for array subscript
   51 |                                 hantei[p][hyou[j][k][0]-1]++;
      |                                          ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int n;
	cin >> n;
	bool flag = false;

	for(int i = 0; i < n; i++) {
		int board[16][16];
		char mark[16][16];
		memset(mark, ' ', sizeof(mark));
		for(int j = 0; j < 9; j++)
			for(int k = 0; k < 9; k++)
				cin >> board[j][k];

		// row & comlumn
		for(int j = 0; j < 9; j++) {
			for(int k = 0; k < 9; k++) {
				for(int l = k + 1; l < 9; l++) {
					if(board[j][k] == board[j][l])
						mark[j][k] = mark[j][l] = '*';
					if(board[k][j] == board[l][j])
						mark[k][j] = mark[l][j] = '*';
				}
			}
		}

		// block
		for(int j = 0; j < 3; j++) {
			for(int k = 0; k < 3; k++) {
				for(int l = 0; l < 3; l++) {
					for(int m = 0; m < 3; m++) {
						for(int n = l + 1; n < 3; n++) {
							for(int o = m + 1; o < 3; o++) {
								if(board[j * 3 + l][k * 3 + m] == board[j * 3 + n][k * 3 + o])
									mark[j * 3 + l][k * 3 + m] = mark[j * 3 + n][k * 3 + o] = '*';
							}
						}
					}
				}
			}
		}

		if(flag)
			cout << endl;

		for(int j = 0; j < 9; j++) {
			for(int k = 0; k < 9; k++) {
				cout << mark[j][k] << board[j][k];
			}
			cout << endl;
		}

		flag = true;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'memset' was not declared in this scope
   12 |                 memset(mark, ' ', sizeof(mark));
      |                 ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: Java

import java.util.*;
public class aoj0127 {
	static final Scanner stdin = new Scanner(System.in);
	static char[][] map = { {'a', 'b', 'c', 'd', 'e'}, {'f', 'g', 'h', 'i', 'j'}, {'k', 'l', 'm', 'n', 'o'}, {'p', 'q', 'r', 's', 't'}, {'u', 'v', 'w', 'x', 'y'}, {'z', '.', '?', '!', ' '}};
	public static void main(String[] args) {
		while(stdin.hasNext()){
			char[] line = stdin.nextLine().toCharArray();
			StringBuilder ans = new StringBuilder();
			try{
				for(int i = 0; i < line.length; i+=2) ans.append(map[line[i]-'1'][line[i+1]-'1']);
			}catch(Exception e){
				ans = new StringBuilder("NA");
			}finally{
				System.out.println(ans.toString());
			}
		}
	}
}

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class P127 {
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String input;
		while((input = br.readLine()) != null){
			System.out.println(encode(input));
		}
	}

	public static String encode(String input){
		if(input.length() % 2 != 0)	return "NA";
		
		StringBuffer sbuf = new StringBuffer();
		for(int i = 0; i < input.length(); i += 2){
			//数字を英字に変換
			int raw = Integer.parseInt(input.substring(i, i + 1));
			int line = Integer.parseInt(input.substring(i + 1, i + 2));
			int c = 'a' + (raw - 1) * 5 + line - 1;
			if(c > 'z' + 4)	return "NA";
			if(c == 'z' + 1)	c = '.';
			else if(c == 'z' + 2)	c = '?';
			else if(c == 'z' + 3)	c = '!';
			else if(c == 'z' + 4)	c = ' ';
			sbuf.append((char)c);
		}
		return sbuf.toString();
	}
}

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

#include <cstdio>
#include <string.h>
using namespace std;

int main()
{
	char change[6][6] = {
		"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "
	};
	
	char str[256];
	
	while (scanf("%s", str) != EOF){
		char str2[256];
		strcpy(str2, "");
		
		int i = 0;
		while (str[i] != '\0'){
			if (
			(str[i] < '1' || str[i] > '6') || 
			(str[i + 1] < '1' || str[i + 1] > '5')
			){
				strcpy(str2, "NA");
				break;
			}
						
			strncat(str2, &change[str[i] - '0' - 1][str[i + 1] - '0' - 1], 1);
			
			i += 2;
		}
		
		printf("%s\n", str2);
	}
	
	return 0;
}

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

/*
	0127:Pocket Pager Input
*/
#include	<iostream>
#include	<string>

using namespace std;

const char WORDS[30] = "abcdefghijklmnopqrstuvwxyz.?! ";

int main(void) {
	char WORDSET[6][5];
	int w = 0;
	
	for(int i = 0; i < 6; i++) {
		for(int j = 0; j < 5; j++) {
			WORDSET[i][j] = WORDS[w];
			w++;
		}
	}
	
	while(1) {
		string str;
		string ans;
		bool fl = true;
		
		cin >> str;
		
		if( cin.eof() ) { break; }
			else if( (int)str.size() % 2 != 0 ) { cout << "NA" << endl; continue; }
		string::iterator it = str.begin();
		while( it != str.end() ) {
			int a, b;
			
			a = *it - '0' - 1;
			it++;
			b = *it - '0' - 1;
			it++;
			
			if(0 <= a && a < 6 && 0 <= b && b < 5) {
				ans += WORDSET[a][b];
			} else {
				fl = false;
				break;
			}
		}
		if(fl) {
			cout << ans << endl;
		} else {
			cout << "NA" << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc:9:24: error: initializer-string for 'const char [30]' is too long [-fpermissive]
    9 | const char WORDS[30] = "abcdefghijklmnopqrstuvwxyz.?! ";
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#include<map>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vvc vector<vector<char>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define CC puts("-------ok--------");
#define all(in) in.begin(), in.end()
using namespace std;
typedef pair<int, int> pii;
#define MAX 99999999
int main(){
    char u[6][5] = {
        'a','b','c','d','e','f',
        'g','h','i','j','k','l',
        'm','n','o','p','q','r',
        's','t','u','v','w','x',
        'y','z','.','?','!',' ' };
    string s;
    cin>>s
        bool flag=true;
        if(s.length()%2){cout<<"NA"<<endl; flag=false;}
    if(flag){
    vector<pii>v(1000);
    rep(i,s.length()/2){
        v[i]=pii(s[2*i]-48,s[2*i+1]-48);
        if(v[i].first>=7||v[i].second>=6){goto E;}
    }
    rep(i,s.length()/2)
    cout<<u[v[i].first-1][v[i].second-1];
    cout<<endl;
    }
    E:;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:11: error: expected ';' before 'bool'
   40 |     cin>>s
      |           ^
      |           ;
   41 |         bool flag=true;
      |         ~~~~
a.cc:42:44: error: 'flag' was not declared in this scope
   42 |         if(s.length()%2){cout<<"NA"<<endl; flag=false;}
      |                                            ^~~~
a.cc:43:8: error: 'flag' was not declared in this scope
   43 |     if(flag){
      |        ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	string a="abcdefghijklmnopqrstuvwxyz.?! ";
	string b;
	while(cin>>b){
		if(b.length()%2==1) {
			cout<<"NA"<<endl;
			goto stop;
		}
		string c;
		for(int i=0;i<b.length();i+=2){
			int c,d;
			c=(int)b[i]-'1';
			d=(int)b[i+1]-'0';
			int e=c*5+d;
			if(e>25) {
				cout<<"NA"<<endl;
				goto stop;
			}
			c+=a[e-1];
		}
		cout<<endl;
		stop:;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:17: error: jump to label 'stop'
   24 |                 stop:;
      |                 ^~~~
a.cc:9:30: note:   from here
    9 |                         goto stop;
      |                              ^~~~
a.cc:11:24: note:   crosses initialization of 'std::string c'
   11 |                 string c;
      |                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
string s[]={"afkpuz","bglqv.","chmrw?","dinsx!","ejoty "};
int main(){string ss;while(cin>>ss){
if(ss.size()%2==1){cout<<"NA"<<endl;continue;}
bool b=1;string ans="";for(int i=0;i<ss.size()-1;i+=2){
if(!('1'<=ss[i+1]&&ss[i+1]<='5')||!('1'<=ss[i]&&ss[i]<='6')){b=0; break;}
ans+=s[in[i+1]-'0'-1][in[i]-'0'-1];}
if(b)cout<<ans<<endl;else cout<<"NA"<<endl;
}}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'in' was not declared in this scope; did you mean 'i'?
    8 | ans+=s[in[i+1]-'0'-1][in[i]-'0'-1];}
      |        ^~
      |        i
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string str[6]={"","aafkpuz","abglqv.","achmrw?"
		 ,"adinsx!","aejoty "};
  string str2;
  while(cin>>str2){
    if(str2.size()%2==1)
      cout<<"NA"<<endl;
    else{
      for(int i=0;i<str2.size();i+=2){
	cout<<str[str2[i+1]-'0'][str2[i]-'0'];
      }
      cout<<endl;34
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: expected ';' before '}' token
   14 |       cout<<endl;34
      |                    ^
      |                    ;
   15 |     }
      |     ~
Language: C++

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

int main(){
    char l[6][6]={{0}};
    for(int i=0;i<5;i++){
        for(int j=0;j<5;j++)
            l[i][j]='a'+i*5+j;
    }
    strcpy(l[5],"z.?! ");
 
    char str[256];
    while(scanf("%s",str)!=EOF){
        if(strlen(str)&1){
            puts("NA");
            continue;
        }
        bool flag=true;
        char ans[128]={0};
        for(int i=0;str[i];i+=2){
            int v1=str[i]-'0'-1,v2=str[i+1]-'0'-1;
            if(v1<0||v1>=6||v2<0||v2>=5){
                puts("NA");
                flag=false;
                break;
            }
            ans[i/2]=l[v1][v2];
        }
        if(flag)printf("%s\n",ans);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'strcpy' was not declared in this scope
   14 |     strcpy(l[5],"z.?! ");
      |     ^~~~~~
a.cc:6:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include<cstdio>
  +++ |+#include <cstring>
    6 | using namespace std;
a.cc:18:12: error: 'strlen' was not declared in this scope
   18 |         if(strlen(str)&1){
      |            ^~~~~~
a.cc:18:12: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

  if(a == '6' && b == '3') ans = '?';
  if(a == '6' && b == '4') ans = '!';
  if(a == '6' && b == '5') ans = ' ';
  
  return ans;
}

int main(void) {
  char c[200];
  char ans[100];
  int len = 0;
  while(scanf("%s", c) != EOF) {
    int cnt = 0;
    len = strlen(c);
    for(int i = 0 ; i < len ; i+=2) {
      ans[i] = change(c[i], c[i+1]);
    }
    if(len % 2 == 0) {
      for(int i = 0 ; i < len ; i+=2) {
	cout << ans[i];
      }
      cout << endl;
    }
    else cout << "NA" << endl;
  }
  return 0;
}   

Compiler output:
a.cc:1:3: error: expected unqualified-id before 'if'
    1 |   if(a == '6' && b == '3') ans = '?';
      |   ^~
a.cc:2:3: error: expected unqualified-id before 'if'
    2 |   if(a == '6' && b == '4') ans = '!';
      |   ^~
a.cc:3:3: error: expected unqualified-id before 'if'
    3 |   if(a == '6' && b == '5') ans = ' ';
      |   ^~
a.cc:5:3: error: expected unqualified-id before 'return'
    5 |   return ans;
      |   ^~~~~~
a.cc:6:1: error: expected declaration before '}' token
    6 | }
      | ^
a.cc: In function 'int main()':
a.cc:12:9: error: 'scanf' was not declared in this scope
   12 |   while(scanf("%s", c) != EOF) {
      |         ^~~~~
a.cc:12:27: error: 'EOF' was not declared in this scope
   12 |   while(scanf("%s", c) != EOF) {
      |                           ^~~
a.cc:1:1: note: 'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 |   if(a == '6' && b == '3') ans = '?';
a.cc:14:11: error: 'strlen' was not declared in this scope
   14 |     len = strlen(c);
      |           ^~~~~~
a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 |   if(a == '6' && b == '3') ans = '?';
a.cc:16:16: error: 'change' was not declared in this scope
   16 |       ans[i] = change(c[i], c[i+1]);
      |                ^~~~~~
a.cc:20:9: error: 'cout' was not declared in this scope
   20 |         cout << ans[i];
      |         ^~~~
a.cc:22:7: error: 'cout' was not declared in this scope
   22 |       cout << endl;
      |       ^~~~
a.cc:22:15: error: 'endl' was not declared in this scope
   22 |       cout << endl;
      |               ^~~~
a.cc:24:10: error: 'cout' was not declared in this scope
   24 |     else cout << "NA" << endl;
      |          ^~~~
a.cc:24:26: error: 'endl' was not declared in this scope
   24 |     else cout << "NA" << endl;
      |                          ^~~~
Language: C++

#include<cstdio>
#include<cstring>
using namespace std;
int main(){
    char a[7][7] = {"","*abcde","*fghij","*klmno","*pqrst","*uvwxy","*z.?! "};

    while(~scanf("%s",s)){
        char s[200];
        if(strlen(s)%2==1)printf("NA\n");
        else{
            for(int i=0;i<strlen(s);i+=2){
                printf("%c",a[s[i]-48][s[i+1]-48]);

            }
            printf("\n");
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: 's' was not declared in this scope
    7 |     while(~scanf("%s",s)){
      |                       ^
Language: C++

/*
	0127:Pocket Pager Input
*/
#include	<iostream>
#include	<string>

using namespace std;

const char WORDS[30] = "abcdefghijklmnopqrstuvwxyz.?! ";

int main(void) {
	char WORDSET[6][5];
	int w = 0;
	
	for(int i = 0; i < 6; i++) {
		for(int j = 0; j < 5; j++) {
			WORDSET[i][j] = WORDS[w];
			w++;
		}
	}
	
	while(1) {
		string str;
		
		cin >> str;
		if( cin.eof() ) { break; }
			else if( (int)str.size() % 2 != 0 ) { cout << "NA" << endl; continue; }
		string::iterator it = str.begin();
		while( it != str.end() ) {
			int a, b;
			
			a = *it - '0' - 1;
			it++;
			b = *it - '0' - 1;
			it++;
			
			cout << WORDSET[a][b];
		}
		cout << endl;
	}
	return 0;
}

Compiler output:
a.cc:9:24: error: initializer-string for 'const char [30]' is too long [-fpermissive]
    9 | const char WORDS[30] = "abcdefghijklmnopqrstuvwxyz.?! ";
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: Java

import java.util.Scanner;

public class AOJ0128 {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()){
			abacus(sc.nextInt());
		}
	}
	static void abacus(int n){
		//System.out.println(n);
		char ch[][]=new char[5][8];
		int m[]=new int[5];
		if(n>=10000){
			m[0]=n/10000;
			n%=10000;
		}
		if(n>=1000){
			m[1]=n/1000;
			n%=1000;
		}
		if(n>=100){
			m[2]=n/100;
			n%=100;
		}
		if(n>=10){
			m[3]=n/10;
			n%=10;
		}
		m[4]=n;
		for(int i=0;i<5;i++){
			//System.out.println(m[i]);
			switch(m[i]){
			case 0:{
				ch[i]="* = ****".toCharArray();
				break;
			}
			case 1:{
				ch[i]="* =* ***".toCharArray();
				break;
			}
			case 2:{
				ch[i]="* =** **".toCharArray();
				break;
			}			
			case 3:{
				ch[i]="* =*** *".toCharArray();
				break;
			}			
			case 4:{
				ch[i]="* =**** ".toCharArray();
				break;
			}			
			case 5:{
				ch[i]=" *= ****".toCharArray();
				break;
			}			
			case 6:{
				ch[i]=" *=* ***".toCharArray();
				break;
			}			
			case 7:{
				ch[i]=" *=** **".toCharArray();
				break;
			}			
			case 8:{
				ch[i]=" *=*** *".toCharArray();
				break;
			}			
			case 9:{
				ch[i]=" *=**** ".toCharArray();
				break;
			}
			}
		}
		for(int i=0;i<8;i++){
			for(int j=0;j<5;j++){
				System.out.print(ch[j][i]);
			}
			System.out.println();
		}
	}
}

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

#include <stdio.h>

main(){
  char data[10], data1[10];
  int i, j, p=0, temp, c=0, l;

  while(1){
    for(i=0;i<5;i++){
      data[i]='0';
    }
    for(i=0;i<6;i++){
      if(scanf("%c", &data1[i])==EOF){
        p=-1;
        break;
      }
      if(data1[i]=='\n'){
        temp=i;
        break;
      }
    }
    for(i=0;i<temp;i++){
      data[i+5-temp]=data1[i];
    }
    if(p==-1) break;
    if(c!=0) printf("\n");
    c=1;

    for(i=0;i<5;i++){
      if(data[i]=='0' || data[i]=='1' || data[i]=='2' || data[i]=='3' || data[i]=='4') printf("*");
      else printf(" ");
    }
    printf("\n");

    for(i=0;i<5;i++){
      if(data[i]=='5' || data[i]=='6' || data[i]=='7' || data[i]=='8' || data[i]=='9') printf("*");
      else printf(" ");
    }
    printf("\n");
    printf("=====\n");
    /*for(i=0;i<5;i++){
      if(data[i]=='0' || data[i]=='5') printf(" ");
      else printf("*");
    }
    printf("\n");
    for(i=0;i<5;i++){
      if(data[i]=='1' || data[i]=='6') printf(" ");
      else printf("*");
    }
    printf("\n");
    for(i=0;i<5;i++){
      if(data[i]=='2' || data[i]=='7') printf(" ");
      else printf("*");
    }
    printf("\n");
    for(i=0;i<5;i++){
      if(data[i]=='3' || data[i]=='8') printf(" ");
      else printf("*");
    }
    printf("\n");
    for(i=0;i<5;i++){
      if(data[i]=='4' || data[i]=='9') printf(" ");
      else printf("*");
      }
      printf("\n");
    */

  for(l = 0; l < 5; l++) {
    for(i = 0; i < 5; i++) {
      if((data[i]-'0') % 5 == l) printf(" ");
      else printf("*");
    }
    printf("\n");
  }
  return 0;
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:75:1: error: expected declaration or statement at end of input
   75 | }
      | ^
Language: C++

cnt = 0
while True:
    d = [[' ' for i in range(8)]  for j in range(5)]
    try:
        if (cnt != 0):
            cnt += 1
            print
        n = raw_input()
        while len(n) < 5:
            n = '0' + n    
        for i in range(len(n)):
            if (int(n[i]) <= 4):
                d[i][0] = '*'
            if (int(n[i]) >= 5):
                d[i][1] = '*'
            d[i][2] = '='
            if (int(n[i]) != 0 and int(n[i]) != 5):
                d[i][3] = '*'
            if (int(n[i]) != 1 and int(n[i]) != 6):
                d[i][4] = '*'
            if (int(n[i]) != 2 and int(n[i]) != 7):
                d[i][5] = '*'
            if (int(n[i]) != 3 and int(n[i]) != 8):
                d[i][6] = '*'
            if (int(n[i]) != 4 and int(n[i]) != 9):
                d[i][7] = '*'

        for i in range(8):
            s = ""
            for j in range(5):
                s += d[j][i]
            print s
    except:
        break
    

Compiler output:
a.cc:1:1: error: 'cnt' does not name a type; did you mean 'int'?
    1 | cnt = 0
      | ^~~
      | int
Language: C++

#include <string>
#include <iostream>
using namespace std;
string s; int c;
int main() {
	while(cin >> s) {
		if(c++) printf("\n");
		while(s.size() != 5) s = "0" + s;
		for(int i = 0; i < 5; i++) printf("%c", s[i] < '5' ? '*' : ' '); printf("\n");
		for(int i = 0; i < 5; i++) printf("%c", s[i] > '4' ? '*' : ' '); printf("\n");
		printf("=====\n");
		for(int i = 0; i < 5; i++) {
			for(int j = 0; j < 5; j++) printf("%c", (s[i] - 48) % 5 == i ? ' ' : '*'); pritf("\n");
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:100: error: 'pritf' was not declared in this scope; did you mean 'printf'?
   13 |                         for(int j = 0; j < 5; j++) printf("%c", (s[i] - 48) % 5 == i ? ' ' : '*'); pritf("\n");
      |                                                                                                    ^~~~~
      |                                                                                                    printf
Language: C++

#include <iostream>
using namespace std;

int main()
{
	char abacus[8][10] = {
		"*****     ",
		"     *****",
		"==========",
		" **** ****",
		"* **** ***",
		"** **** **",
		"*** **** *",
		"**** **** ",
	};
	
	int n;
	while (cin >> n){
		int num[5];
		char a[8][5];
		for (int i = 0; i < 5; i++){
			num[4 - i] = n % 10;
			n /= 10;
		}
		for (int i = 0; i < 8; i++){
			for (int j = 0; j < 5; j++){
				a[i][j] = abacus[i][num[j]];
			}
		}
		for (int i = 0; i < 8; i++){
			for (int j = 0; j < 5; j++){
				cout << a[i][j];
			}
			cout << endl;
		}
		cout << endl;
	}
	
	return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
    7 |                 "*****     ",
      |                 ^~~~~~~~~~~~
a.cc:8:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
    8 |                 "     *****",
      |                 ^~~~~~~~~~~~
a.cc:9:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
    9 |                 "==========",
      |                 ^~~~~~~~~~~~
a.cc:10:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   10 |                 " **** ****",
      |                 ^~~~~~~~~~~~
a.cc:11:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   11 |                 "* **** ***",
      |                 ^~~~~~~~~~~~
a.cc:12:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   12 |                 "** **** **",
      |                 ^~~~~~~~~~~~
a.cc:13:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   13 |                 "*** **** *",
      |                 ^~~~~~~~~~~~
a.cc:14:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   14 |                 "**** **** ",
      |                 ^~~~~~~~~~~~
Language: C++

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

int main()
{
	char abacus[8][10] = {
		"*****     ",
		"     *****",
		"==========",
		" **** ****",
		"* **** ***",
		"** **** **",
		"*** **** *",
		"**** **** ",
	};
	
	int n;
	while (scanf("%d", &n) != EOF){
		int num[5];
		char a[8][5];
		for (int i = 0; i < 5; i++){
			num[4 - i] = n % 10;
			n /= 10;
		}
		for (int i = 0; i < 8; i++){
			for (int j = 0; j < 5; j++){
				a[i][j] = abacus[i][num[j]];
			}
		}
		for (int i = 0; i < 8; i++){
			for (int j = 0; j < 5; j++){
				cout << a[i][j];
			}
			cout << endl;
		}
		cout << endl;
	}
	
	return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
    8 |                 "*****     ",
      |                 ^~~~~~~~~~~~
a.cc:9:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
    9 |                 "     *****",
      |                 ^~~~~~~~~~~~
a.cc:10:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   10 |                 "==========",
      |                 ^~~~~~~~~~~~
a.cc:11:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   11 |                 " **** ****",
      |                 ^~~~~~~~~~~~
a.cc:12:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   12 |                 "* **** ***",
      |                 ^~~~~~~~~~~~
a.cc:13:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   13 |                 "** **** **",
      |                 ^~~~~~~~~~~~
a.cc:14:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   14 |                 "*** **** *",
      |                 ^~~~~~~~~~~~
a.cc:15:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   15 |                 "**** **** ",
      |                 ^~~~~~~~~~~~
Language: C++

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

int main(void)
{
	char abacus[8][10] = {
		"*****     ",
		"     *****",
		"==========",
		" **** ****",
		"* **** ***",
		"** **** **",
		"*** **** *",
		"**** **** ",
	};
	
	int n;
	while (scanf("%d", &n) != EOF){
		int num[5];
		char a[8][5];
		for (int i = 0; i < 5; i++){
			num[4 - i] = n % 10;
			n /= 10;
		}
		for (int i = 0; i < 8; i++){
			for (int j = 0; j < 5; j++){
				a[i][j] = abacus[i][num[j]];
			}
		}
		for (int i = 0; i < 8; i++){
			for (int j = 0; j < 5; j++){
				cout << a[i][j];
			}
			cout << endl;
		}
		cout << endl;
	}
	
	return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
    8 |                 "*****     ",
      |                 ^~~~~~~~~~~~
a.cc:9:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
    9 |                 "     *****",
      |                 ^~~~~~~~~~~~
a.cc:10:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   10 |                 "==========",
      |                 ^~~~~~~~~~~~
a.cc:11:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   11 |                 " **** ****",
      |                 ^~~~~~~~~~~~
a.cc:12:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   12 |                 "* **** ***",
      |                 ^~~~~~~~~~~~
a.cc:13:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   13 |                 "** **** **",
      |                 ^~~~~~~~~~~~
a.cc:14:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   14 |                 "*** **** *",
      |                 ^~~~~~~~~~~~
a.cc:15:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   15 |                 "**** **** ",
      |                 ^~~~~~~~~~~~
Language: C++

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

int main(void)
{
	char abacus[8][10] = {
		"*****     ",
		"     *****",
		"==========",
		" **** ****",
		"* **** ***",
		"** **** **",
		"*** **** *",
		"**** **** ",
	};
	
	int n;
	bool flag = false;
	while (scanf("%d", &n) != EOF){
		int num[5];
		char a[8][5];
		for (int i = 0; i < 5; i++){
			num[4 - i] = n % 10;
			n /= 10;
		}
		for (int i = 0; i < 8; i++){
			for (int j = 0; j < 5; j++){
				a[i][j] = abacus[i][num[j]];
			}
		}
		
		if (flag){
			cout << endl;
		}
		
		for (int i = 0; i < 8; i++){
			for (int j = 0; j < 5; j++){
				cout << a[i][j];
			}
			cout << endl;
		}
		flag = true;
	}
	
	return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
    8 |                 "*****     ",
      |                 ^~~~~~~~~~~~
a.cc:9:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
    9 |                 "     *****",
      |                 ^~~~~~~~~~~~
a.cc:10:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   10 |                 "==========",
      |                 ^~~~~~~~~~~~
a.cc:11:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   11 |                 " **** ****",
      |                 ^~~~~~~~~~~~
a.cc:12:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   12 |                 "* **** ***",
      |                 ^~~~~~~~~~~~
a.cc:13:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   13 |                 "** **** **",
      |                 ^~~~~~~~~~~~
a.cc:14:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   14 |                 "*** **** *",
      |                 ^~~~~~~~~~~~
a.cc:15:17: error: initializer-string for 'char [10]' is too long [-fpermissive]
   15 |                 "**** **** ",
      |                 ^~~~~~~~~~~~
Language: C++

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

int main() {
    string N;
    bool flag = false;
    while (cin >> N) {
        if (flag) cout << enld;
        flag = true;
        while (N.size() < 5) N = "0" + N;
        vector<string> s(8);
        s[2] = "=====";

        for (int i = 0; i < N.size(); i++) {
            int n = N[i] - '0';
            if (n > 4) {
                s[1] += '*';
                s[0] += ' ';
            } else {
                s[0] += '*';
                s[1] += ' ';
            }

            int p;
            if (n >= 5) p = n - 5;
            else p = n;
            for (int j = 0; j < p; j++) {
                s[3+j] += "*";
            }

            s[3+p] += ' ';

            for (int j = 4+p; j < 8; j++) {
                s[j] += '*';
            }
        }

        for (auto i : s) cout << i << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: 'enld' was not declared in this scope
    8 |         if (flag) cout << enld;
      |                           ^~~~
Language: C++

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

int main()
{
    string s;
    string soro[10] = {"* = ****",
"* =* ***",
"* =** **",
"* =*** *",
"* =**** ",
" *= ****",
" *=* ***",
" *=** **",
" *=*** *",
" *=**** "};
    bool flag = true;
    while(cin >> s)
    {
        vector<char> c;
 
        rep(i,5-s.size())
        {
            c.push_back('0');
        }
 
        rep(i,s.size())
        {
            c.push_back(s[i]);
        }
 
        if(flag)
        {
            flag = false;
        }
        else
        {
            cout << endl;
        }
 
        rep(i,8)
        {
            rep(j,5)
            {
                cout << soro[c[j]-'0'][i];
            }
            cout << endl;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:13: error: 'i' was not declared in this scope
   26 |         rep(i,5-s.size())
      |             ^
a.cc:26:9: error: 'rep' was not declared in this scope; did you mean 'frexp'?
   26 |         rep(i,5-s.size())
      |         ^~~
      |         frexp
Language: C++

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

int main()
{
	bool aster[10][7]={0};
	for(int i=0; i<10; i++)
	{
		if(i<=4) aster[i][0]=1;
		else aster[i][1]=1;
	}
	
	for(int i=0; i<5; i++)
	for(int j=0; j<10; j++)
		if(i!=(j%5)) aster[j][i+2]=1;
	
	bool f=false;
	char buf[9];
	while(scanf("%s", buf) != EOF)
	{
		if(f) puts("");
		f=true;
		
		char str[9];
		int cnt[7]={0}, len=strlen(buf);
		for(int i=0; i<5; i++)
		{
			if(5-len<=i) str[i]=buf[i-(5-len)];
			else str[i]='0';
		}
		str[5]='\0';
		
		for(int i=0; i<7; i++)
		for(int j=0; j<5; j++)
		{
			if(aster[str[j]-'0'][i]) cnt[i]++;
		}
		
		for(int i=0; i<7; i++)
		{
			for(int j=0; j<5; j++)
			{
				if(cnt[i]==0) break;
				
				if(aster[str[j]-'0'][i]) printf("*");
				else printf(" ");
			}
			puts("");
			if(i==1) puts("=====");
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:37: error: 'strlen' was not declared in this scope
   26 |                 int cnt[7]={0}, len=strlen(buf);
      |                                     ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <string>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include<iostream>

int main()
{
	char abacus[8][5];
	
	bool first=true;
	while(1)
	{
		int num;
		std::cin>>num;
		if(std::cin.eof())break;
		
		for(int c=4;c>=0;i--)
		{
			int digit=num%10;
			num/=10;
			int q=digit/5;
			int s=digit%5;
			int i=0;
			if(q==1)
			{
				abacus[0][c]=' ';
				abacus[1][c]='*';
			}
			else
			{
				abacus[0][c]='*';
				abacus[1][c]=' ';
			}
			abacus[2][c]='=';
			
			for(i=3;i<3+s;i++)
			{
				abacus[i][c]='*';
			}
			abacus[i++][c]=' ';
			for(;i<8;i++)
			{
				abacus[i][c]='*';
			}
		}
		if(first){first=false;}
		else{std::cout<<std::endl;}
		for(int i=0;i<8;i++)
		{
			for(int j=0;j<5;j++)
			{
				std::cout<<abacus[i][j];
			}
			std::cout<<std::endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:34: error: 'i' was not declared in this scope
   14 |                 for(int c=4;c>=0;i--)
      |                                  ^
Language: C

#include<stdio.h>
#include<math.h>
#include<algorithm>
const double EPS=1e-10;

typedef struct Vec{double x,y;}Vec;
typedef struct Cer{double r;Vec cp;}Cer;

double dot(Vec a,Vec b){return a.x*b.x+a.y*b.y;}
double det(Vec a,Vec b){return a.x*b.y-a.y*b.x;}
double D(Vec a){return hypot(a.x,a.y);}
Vec F(Vec a,Vec b){Vec p={a.x-b.x,a.y-b.y};return p;}

double ch(Vec a,Vec b,Vec c)
{
	if(dot(F(b,a),F(c,a))<EPS)return D(F(b,a));
	if(dot(F(a,b),F(c,b))<EPS)return D(F(c,b));
	return fabs(det(F(b,a),F(c,a)))/D(F(b,a));
}

int N,M,i,j,f;
double m,d;
Cer W[100];

int main()
{
	for(;scanf("%d",&N),N;)
	{
		for(i=0;i<N;i++)
			scanf("%lf%lf%lf",&W[i].cp.x,&W[i].cp.y,&W[i].r);
		scanf("%d",&M);
		for(i=0;i<M;i++)
		{
			f=0;
			Vec t,s;
			scanf("%lf%lf%lf%lf",&t.x,&t.y,&s.x,&s.y);
			for(j=0;j<N;j++)
			{
				if(D(F(s,W[j].cp))<=W[j].r&&D(F(t,W[j].cp))<=W[j].r)continue;
				if(ch(t,s,W[j].cp)<=W[j].r)break;
			}
			puts(j==N?"Danger":"Safe");
		}
	}
	return 0;
}

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

#include <stdio.h>
#include <math.h>
#include <stdlib.h>

int i,j,n,m;
int wall[200][3],tx,ty,sx,sy;

int crosscheck(int tx,int ty,int sx,int sy,int wx,int wy,int rr){
	int abx=sx-tx,aby=sy-ty;
	int awx=wx-tx,awy=wy-ty;
	int bwx=wx-sx,bwy=wy-sy;

	int rr2=rr*rr;
	int aw2=awx*awx+awy*awy;
	int bw2=bwx*bwx+bwy*bwy;
	int ab2=abx*abx+aby*aby;

	int tim=abx*awy-aby*awx;
	int abw=abx*awx+aby*awy;

	if((aw2-rr2)*(bw2-rr2)<0)return 1;
	if(aw2<rr2 && bw2<rr2)return 0;
	if(abw<0)return 0;
	if(abw>ab2)return 0;

	if((double)tim*tim/ab2 - (double)rr2 > -0.001 (double)tim*tim/ab2 - (double)rr2 < 0.001) fprintf(stderr,"!!\n");

	if( (double)tim*tim/ab2 > (double)rr2)return 0;
	
	
	return 1;
}

int main(){
	while(scanf("%d",&n)*n){

		for(i=0;i<n;i++)scanf("%d %d %d",&wall[i][0],&wall[i][1],&wall[i][2]);

		for(scanf("%d",&m);m>0;m--){
			scanf("%d %d %d %d",&tx,&ty,&sx,&sy);
			int sss=0;
			for(i=0;i<n;i++){
				int wx=wall[i][0],wy=wall[i][1],rr=wall[i][2];
				if(crosscheck(tx,ty,sx,sy,wx,wy,rr))break;
			}
			if(i<n)printf("Safe\n"); else printf("Danger\n");
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'crosscheck':
main.c:26:56: error: expected expression before 'double'
   26 |         if((double)tim*tim/ab2 - (double)rr2 > -0.001 (double)tim*tim/ab2 - (double)rr2 < 0.001) fprintf(stderr,"!!\n");
      |                                                        ^~~~~~
main.c:26:49: error: called object is not a function or function pointer
   26 |         if((double)tim*tim/ab2 - (double)rr2 > -0.001 (double)tim*tim/ab2 - (double)rr2 < 0.001) fprintf(stderr,"!!\n");
      |                                                 ^~~~~
main.c:26:63: error: expected ')' before 'tim'
   26 |         if((double)tim*tim/ab2 - (double)rr2 > -0.001 (double)tim*tim/ab2 - (double)rr2 < 0.001) fprintf(stderr,"!!\n");
      |           ~                                                   ^~~
      |                                                               )
Language: C

#include <stdio.h>
#include <math.h>
#include <stdlib.h>

int i,j,n,m;
int wall[200][3],tx,ty,sx,sy;

int crosscheck(int tx,int ty,int sx,int sy,int wx,int wy,int rr){

	int abx=tx-sx,aby=ty-sy;
	int awx=wx-sx,awy=wy-sy;

	int rr2=rr*rr;
	int aw2=awx*awx+awy*awy;
	int bw2=bwx*bwx+bwy*bwy;
	int ab2=abx*abx+aby*aby;

	int tim=abx*awy-aby*awx;
	int abw=abx*awx+aby*awy;

	if((aw2-rr2)*(bw2-rr2)<0)return 1;
	if(aw2<rr2 && bw2<rr2)return 0;
	if(abw<0)return 0;
	if(abw>ab2)return 0;

	if( (double)tim*(double)tim/(double)ab2 <= (double)rr2)return 1;

	return 0;
}

int main(){
	while(scanf("%d",&n)*n){

		for(i=0;i<n;i++)scanf("%d %d %d",&wall[i][0],&wall[i][1],&wall[i][2]);

		for(scanf("%d",&m);m>0;m--){
			scanf("%d %d %d %d",&tx,&ty,&sx,&sy);
			int sss=0;
			for(i=0;i<n;i++){
				int wx=wall[i][0],wy=wall[i][1],rr=wall[i][2];
				if(crosscheck(tx,ty,sx,sy,wx,wy,rr))break;
			}
			if(i<n)printf("Safe\n"); else printf("Danger\n");
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'crosscheck':
main.c:15:17: error: 'bwx' undeclared (first use in this function); did you mean 'bw2'?
   15 |         int bw2=bwx*bwx+bwy*bwy;
      |                 ^~~
      |                 bw2
main.c:15:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:25: error: 'bwy' undeclared (first use in this function); did you mean 'bw2'?
   15 |         int bw2=bwx*bwx+bwy*bwy;
      |                         ^~~
      |                         bw2
Language: C++

#include <iostream>
using namespace std;
#define rep2(x,from,to) for(int x=(from);x<(to);++(x))
#define rep(x,to) rep2(x,0,to)
double dot(double ax, double ay, double bx, double by) {
	return ax*bx+ay*by;
}
int main() {
	int n,m;
	while(cin >> n, n) {
		double x[100],y[100],r[100];
		rep(i,n) {
			cin >> x[i] >> y[i] >> r[i];
		}
		cin >> m;
		double tx,ty,sx,sy;
		rep(i,m) {
			cin >> tx >> ty >> sx >> sy;
			bool flag = 0;
			rep(j,n) {
				double vx1 = tx-sx, vy1 = ty-sy;
				double vx2 = x[j]-sx, vy2 = y[j]-sy;
				double slen = sqrt(vx2*vx2+vy2*vy2);
				double tlen = sqrt(pow(x[j]-tx,2)+pow(y[j]-ty,2));				
				if(slen<r[j] && tlen>r[j] || slen>r[j] && tlen<r[j]) {
					flag = 1;
					break;
				} else {
					double n1 = dot(vx1,vy1,vx2,vy2);
					double n2 =	dot(vx1,vy1,vx1,vy1);
					double n3 = dot(vx2,vy2,vx2,vy2);
					if(n1>0 && n2>n1 && !(tlen<r[j]&&slen<r[j]) && n3-(n1/n2)*n1<=r[j]*r[j]) {
						flag = 1;
						break;
					}
				}
			}
			if(flag) cout << "Safe" << endl;
			else cout << "Danger" << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:47: error: 'sqrt' was not declared in this scope
   23 |                                 double slen = sqrt(vx2*vx2+vy2*vy2);
      |                                               ^~~~
a.cc:24:52: error: 'pow' was not declared in this scope
   24 |                                 double tlen = sqrt(pow(x[j]-tx,2)+pow(y[j]-ty,2));
      |                                                    ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <math.h>
using namespace std;
#define EPS 1e-7
int n, m, wall[100][3], pp[4];
bool jud;
int main(){
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> wall[i][0] >> wall[i][1] >> wall[i][2];
	}
	cin >> m;
	for(int i = 0; i < m; i++){
		for(int j = 0; j < 4; j++){
			cin >> pp[j];
		}
		double dx = pp[0] - pp[2], dy = pp[1] - pp[3], kmk, spn;
		if(dx)
			kmk = dy / dx;
		else{
			for(int j = 0; j < n; j++){
				double a = 1, b = -2 * wall[j][1], c = (pp[0] - wall[j][0]) * (pp[0] - wall[j][0]) + wall[j][1] * wall[j][1] - wall[j][2] * wall[j][2];
				if(b * b - 4 * a * c < -EPS){
					continue;
				}
				else if(b * b - 4 * a * c < 0){
					aa = 0;
				}
				if(b * b - 4 * a * c >= 0){
					double aa = (sqrt(b * b - 4 * a * c) - b) / (2 * a);
					if(aa >= pp[1] && aa <= pp[3]){
						jud = 1;
						break;
					}
					if(aa >= pp[3] && aa <= pp[1]){
						jud = 1;
						break;
					}
					aa = (-sqrt(b * b - 4 * a * c) - b) / (2 * a);
				//	cout << aa << endl;
					if(aa >= pp[1] && aa <= pp[3]){
						jud = 1;
						break;
					}
					if(aa >= pp[3] && aa <= pp[1]){
						jud = 1;
						break;
					}
				} 
			}
			if(jud)
				cout << "Safe" << endl;
			else
				cout << "Danger" << endl;
			continue;
		}
		spn = -kmk * pp[0] + pp[1];
		jud = 0;
		for(int j = 0; j < n; j++){
			double a = 1 + kmk * kmk, b = -2 * wall[j][0] + 2 * kmk * spn - 2 * kmk * wall[j][1], c = wall[j][0] * wall[j][0] + wall[j][1] * wall[j][1] + spn * spn - 2 * spn * wall[j][1] - wall[j][2] * wall[j][2];
				if(b * b - 4 * a * c < -EPS){
					continue;
				}
				else if(b * b - 4 * a * c < 0){
					aa = 0;
				}
				if(b * b - 4 * a * c >= 0){
				double aa = (sqrt(b * b - 4 * a * c) - b) / (2 * a);
				if(aa >= pp[0] && aa <= pp[2]){
					jud = 1;
					break;
				}
				if(aa >= pp[2] && aa <= pp[0]){
					jud = 1;
						break;
				}
				aa = (-sqrt(b * b - 4 * a * c) - b) / (2 * a);
				if(aa >= pp[0] && aa <= pp[2]){
					jud = 1;
					break;
				}
				if(aa >= pp[2] && aa <= pp[0]){
					jud = 1;
					break;
				}
			}
		}
		if(jud)
			cout << "Safe" << endl;
		else
			cout << "Danger" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:41: error: 'aa' was not declared in this scope; did you mean 'a'?
   29 |                                         aa = 0;
      |                                         ^~
      |                                         a
a.cc:67:41: error: 'aa' was not declared in this scope; did you mean 'a'?
   67 |                                         aa = 0;
      |                                         ^~
      |                                         a