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

#include<iostream>
#include<string.h>
#include<vector>
#include<list>
#include<stdio.h>
#include<math.h>
#include<iomanip>
#include<map>
#include<stack>
#include<queue>
#include<algorithm>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << "debug " << x << endl;
using namespace std;

int a, b;

void check(int A[], char inp[]){
    int k;
    rep(i, 1000){
        rep(j, 1000){
            if((i * A[0] + j) % 26 == inp[0] - 'a'){
                for(k = 1; k < 4; k++){
                    if((i * A[k] + j) % 26 != inp[k] - 'a') break;
                }
            }
            if(k == 4){
                a = i;
                b = j;
                return;
            }
        }
    }
}

int main(){
    char str[356][356];
    char inp[356];
    int n,i;
    int This[4] = {19, 7, 8, 18}, That[4] = {19, 7, 0, 19};
    while(cin >> n){
        rep(i,n){
            len = 0;
            a = b = -1;
            for(i = 0; cin >> inp; i++){
                strcpy(str[i], inp);
                if(strlen(inp) == 4){
                    check(This, inp);
                    if(a == -1)
                        check(That, inp);
                }
            }
            rep(j,i){
                rep(k, strlen(str[j])){
                    rep(l,26){
                        if((a * l + b) % 26 == str[j][k] - 'a'){
                            printf("%c",'a' + l);
                        }
                    }
                }
                cout << ' ';
            }
            cout << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:13: error: 'len' was not declared in this scope
   44 |             len = 0;
      |             ^~~
Language: C++

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

//Affine Cipher
public class AOJ0040 {

	static long gcd(long a, long b){
		if(a < b){
			long tmp = a;
			a = b;
			b = tmp;
		}
		while(b!=0){
			long r = a%b;
			a = b;
			b = r;
		}
		return a;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		sc.nextLine();
		Set<String> valid = new HashSet<String>();
		for(int a=1;a<=100;a++){
			if(gcd(a,26)>1)continue;
			for(int b=1;b<=100;b++){
				boolean f = true;
				boolean[] c = new boolean[26];
				for(int j=0;j<26;j++){
					int x = (a*j+b)%26;
					if(c[x])f=false;
					c[x] = true;
				}
				if(f)valid.add(a+" "+b);
			}
		}
		while(t--!=0){
			String[] s = sc.nextLine().split(" ");
			for(String vv:valid){
				String[] v = vv.split(" ");
				int a = Integer.parseInt(v[0]);
				int b = Integer.parseInt(v[1]);
				boolean f = false;
				StringBuilder sb = new StringBuilder();
				boolean head = true;
				for(String m : s){
					if(!head)sb.append(' ');
					head = false;
					char[] ch = new char[m.length()];
					for(int i=0;i<ch.length;i++)ch[i]=(char)(((m.charAt(i)-'a')*a+b)%26 + 'a');
					String x = new String(ch);
					if(x.equals("that")||x.equals("this"))f=true;
					sb.append(x);
				}
				if(f){
					System.out.println(sb);
					break;
				}
			}
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.HashSet;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.Scanner;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.Set;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class AOJ0040 {
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,a) for(int i = 0;i < (a); i++)
#define repi(i,a,b) for(int i = (a); i < (b); i++)
using namespace std;

int n;

int main(){
    cin >> n;
    cin.ignore();
    while(n--){
        vector<string> str;
        string tmp;
        getline(cin,tmp);
        stringstream ss;
        ss << tmp;
        while(ss >> tmp) str.pb(tmp);
        int a = 0, b = 0;
        rep(i,str.size())if(str[i].size() == 4){
            repi(j,3,26*26)if(__gcd(j,26) == 1){
                rep(k,26){
                    string s = "this", t = "that";
                    rep(u,4){
                        s[u] = (j * (s[u]-'a') + k) % 26 + 'a';
                        t[u] = (j * (t[u]-'a') + k) % 26 + 'a';
                    }
                    if(s == str[i] || t == str[i]){
                        a = j; b = k;
                        break;
                    }
                }
                if(a) break;
            }
            if(a) break;
        }
        string abc = "abcdefghijklmnopqrstuvwxyz";
        rep(i,26) abc[i] = (a * i + b) % 26 + 'a';
        rep(i,str.size()){
            rep(j,str[i].size()) cout << (char)(abc.find(str[i][j]) + 'a');
            cout << (i==str.size()-1? '\n': ' ');
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:30: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'pb'
   17 |         while(ss >> tmp) str.pb(tmp);
      |                              ^~
Language: C++

#include<iostream>
#include<string>
#include<stdio.h>
int main(){
 string s;
 int n;
 cin>>n;
 for(int u=0;u<n;u++){
 getline(cin,s);
 int a=0;
 bool t=false;
 while(true){
  int b=0;
  while(true){
      for(int i=0;i<s.size();i++){
       if(isalpha(s[i])!=0)
        s[i]=(a*(s[i]-'a')+b)%26+'a';   
      }
      for(int i=0;i<s.size()-3;i++){
       if(s[i]=='t'&&s[i+1]=='h'&&s[i+2]=='i'&&s[i+3]=='s'){
       t=true;
       break;
       }
       if(s[i]=='t'&&s[i+1]=='h'&&s[i+2]=='a'&&s[i+3]=='t'){
       t=true;
       break;
       }
      }
      b++;
  }
  if(t==true)
  break;
  a++;
 }
 for(int i=0;i<s.size();i++)
 cout<<s[i];
 cout<<endl;
 }
 return 0;   
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:2: error: 'string' was not declared in this scope
    5 |  string s;
      |  ^~~~~~
a.cc:5:2: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |  cin>>n;
      |  ^~~
      |  std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:14: error: 's' was not declared in this scope
    9 |  getline(cin,s);
      |              ^
a.cc:36:2: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   36 |  cout<<s[i];
      |  ^~~~
      |  std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:37:2: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   37 |  cout<<endl;
      |  ^~~~
      |  std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:37:8: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   37 |  cout<<endl;
      |        ^~~~
      |        std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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


bool IsCoprime(int a, int b)
{
	while (a > 0 && b > 0)
	{
		if (a < b) swap(a, b);
		a %= b;
	}
	if (a == 1 || b == 1) return true;
	return false;
}


char get(int a, int b, char c)
{
	for (int i = 0; i < 26; i++)
	{
		if ((a * i + b) % 26 == c - 'a') return char(i + 'a');
	}
}


int main()
{
	int n;
	string cip;
	string dec;

	cin >> n;
	cin.get();

	while (n--)
	{
		getline(cin, cip);
		dec = cip;

		for (int a = 0; a < 26; a++)
		{
			if (!IsCoprime(a, 26)) continue;
			for (int b = 0; b < 26; b++)
			{
				for (int i = 0; i < cip.size(); i++)
				{
					dec[i] = get(a, b, cip[i]);
				}
				if (dec.find("that") != -1 || dec.find("this") != -1)
				{
					cout << dec << endl;
				}
			}
		}
	}
	
	return 0;
}

Compiler output:
a.cc:58:9: error: stray '\32' in program
   58 |         <U+001A>
      |         ^~~~~~~~
a.cc: In function 'char get(int, int, char)':
a.cc:25:1: warning: control reaches end of non-void function [-Wreturn-type]
   25 | }
      | ^
Language: C++

#include<iostream>
#include<map>
#include<string>
#include<vector>
#include<algorithm>
#include<numeric>
#include<cmath>
using namespace std;
int inf = 1000000000;

char affine(char c, int a, int b){
  int x = c - 'a';
  int y = ( a * x + b ) % 26;
  char r = 'a' + y;
  return r;
}

int main(){

  int n;
  cin >> n;
  cin.ignore();
  for(int l=0; l<n; l++){
    string s;
    getline(cin, s);

    for(int i=0; i<50; i++){
      if( i %= 2 == 0 || i %= 13 == 0 ) continue;
      for(int j=0; j<50; j++){
        string t = "";
        for(int k=0; k<s.size(); k++){
          if( 'a' <= s[k] && s[k] <= 'z' ) t += affine(s[k], i, j);
          else t += s[k];
        }
        for(int k=0; k<t.size()-4; k++){
          if( (t[k] == 't' && t[k+1] == 'h' && t[k+2] == 'a' && t[k+3] == 't') || (t[k] == 't' && t[k+1] == 'h' && t[k+2] == 'i' && t[k+3] == 's') ) cout << t << endl;
        }
      }
    }

  }


  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:28: warning: division by zero [-Wdiv-by-zero]
   28 |       if( i %= 2 == 0 || i %= 13 == 0 ) continue;
      |                ~~~~~~~~~~~~^~~~~~~~~~
a.cc:28:23: error: lvalue required as left operand of assignment
   28 |       if( i %= 2 == 0 || i %= 13 == 0 ) continue;
      |                ~~~~~~~^~~~
Language: C++

#include<stdio.h>
#include<string.h>
char c[257];
char d[257];
bool use[26];
int main(){
	int a;
	scanf("%d ",&a);
	while(a--){
		gets(c);
		int t=strlen(c);
		for(int i=0;i<26;i++){
			for(int j=0;j<26;j++){
				bool ok=false;
				for(int k=0;k<26;k++)use[k]=false;
				for(int k=0;k<26;k++){
					if(use[(i*k+j)%26])goto dame;
					else use[(i*k+j)%26]=true;
				}
				for(int k=0;k<t;k++){
					if(c[k]<='z'&&c[k]>='a'){
						d[k]=(i*(c[k]-'a')+j)%26+'a';
					}else{
						d[k]=c[k];
					}
				}
				for(int k=0;k<t-3;k++){
					if(d[k]=='t'&&d[k+1]=='h'){
						if(d[k+2]=='a'&&d[k+3]=='t')ok=true;
						if(d[k+2]=='i'&&d[k+3]=='s')ok=true;
					}
				}
				if(ok){
					printf("%s\n",d);
				}
				dame:;
			}
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
   10 |                 gets(c);
      |                 ^~~~
      |                 getw
Language: C++

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

char encode(char x,int a,int b){
	return ( ( a * (x-'a') + b) % 26 ) + 'a';
}

char decode(char x, int a, int b){
	int t = ( x - 'a') - b;
	while( (t%a) != 0 ) t += 26;
	return (t/a) % 26 + 'a';
}

string encode(string s, int a, int b){
	for(int i =0 ; i<(int)s.size() ; ++i )
		if( s[i] >= 'a' && s[i] <= 'z' )
			s[i] = encode( s[i] , a , b );
	return s;
}

string decode(string s, int a, int b){
	for(int i =0 ; i<(int)s.size() ; ++i )
		if( s[i] >= 'a' && s[i] <= 'z' )
			s[i] = decode( s[i] , a , b );
	return s;
}

int main(){
	int n=1;
	int a[12] = {1,3,5,7,9,11,15,17,19,21,23,25};
	
	string str, s;
	scanf("%d ", &n);
	
	for(int i=0 ; i<n ; ++i){
		bool flag = false;
		//getline( cin , str );
		char foo[257];
		gets( foo );
		str = foo;

		for(int i=0 ; i<12 ; ++i){
			for(int j=0 ; j<26 ; j++){
				s = decode( str , a[i] , j );
				if( s.find("this") != string::npos || s.find("that") != string::npos ){
					flag = true;
					break;
				}
			}
			if( flag ) break;
		}
		cout << s << endl;
	} 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
   42 |                 gets( foo );
      |                 ^~~~
      |                 getw
Language: C++

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

char encode(char x,int a,int b){
	return ( ( a * (x-'a') + b) % 26 ) + 'a';
}

char decode(char x, int a, int b){
	int t = ( x - 'a') - b;
	while( (t%a) != 0 ) t += 26;
	return (t/a) % 26 + 'a';
}

string encode(string s, int a, int b){
	for(int i =0 ; i<(int)s.size() ; ++i )
		if( s[i] >= 'a' && s[i] <= 'z' )
			s[i] = encode( s[i] , a , b );
	return s;
}

string decode(string s, int a, int b){
	for(int i =0 ; i<(int)s.size() ; ++i )
		if( s[i] >= 'a' && s[i] <= 'z' )
			s[i] = decode( s[i] , a , b );
	return s;
}

int main(){
	int n=1;
	int a[12] = {1,3,5,7,9,11,15,17,19,21,23,25};
	
	string str, s;
	scanf("%d ", &n);
	
	for(int i=0 ; i<n ; ++i){
		bool flag = false;
		//getline( cin , str );
		char foo[257];
		gets( foo );
		str = foo;

		for(int i=0 ; i<12 ; ++i){
			for(int j=0 ; j<26 ; j++){
				s = decode( str , a[i] , j );
				if( s.find("this") != string::npos || s.find("that") != string::npos ){
					flag = true;
					break;
				}
			}
			if( flag ) break;
		}
		printf("%s\n" , s.c_str() );
	} 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
   42 |                 gets( foo );
      |                 ^~~~
      |                 getw
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

int main() {
	int i,n;
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		string str;
		char s[300];
		gets(s);
		str=s;
//cout<<str<<endl;
		int a,b;
		for(a=1;a<26;a+=2){
			if(a==13)continue;
			for(b=0;b<26;b++){
				string st="";
				int j;
				for(j=0;j<str.size();j++){
					if(isalpha(str[j])){
						st+=((str[j]-'a')*a+b)%26+'a';
					}else{
						st+=str[j];
					}
				}
//if(st[0]=='i')cout<<st<<endl;
				string::size_type index1=st.find("that");
				string::size_type index2=st.find("this");
				if(index1!=string::npos||index2!=string::npos){
					cout<<st<<endl;
					goto end;
				}
			}
		}
		end:;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
   37 |                 gets(s);
      |                 ^~~~
      |                 getw
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

int main() {
	int i,n;
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		string str;
		char s[300];
		gets(s);
		str=s;
//cout<<str<<endl;
		int a,b;
		for(a=1;a<26;a+=2){
			if(a==13)continue;
			for(b=0;b<26;b++){
				string st="";
				int j;
				for(j=0;j<str.size();j++){
					if(isalpha(str[j])){
						st+=((str[j]-'a')*a+b)%26+'a';
					}else{
						st+=str[j];
					}
				}
//if(st[0]=='i')cout<<st<<endl;
				/*string::size_type index1=st.find("that");
				string::size_type index2=st.find("this");
				if(index1!=string::npos||index2!=string::npos){
					cout<<st<<endl;
					goto end;
				}*/
			}
		}
		end:;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
   37 |                 gets(s);
      |                 ^~~~
      |                 getw
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

int main() {
	int i,n;
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		string str;
		char s[300];
		gets(s);
		str=s;
//cout<<str<<endl;
		int a,b;
		for(a=1;a<26;a+=2){
			if(a==13)continue;
			for(b=0;b<26;b++){
				string st="";
				int j;
				for(j=0;j<str.size();j++){
					if('a'<=str[j]&&str[j]<='z')){
						st+=((str[j]-'a')*a+b)%26+'a';
					}else{
						st+=str[j];
					}
				}
//if(st[0]=='i')cout<<st<<endl;
				string::size_type index1=st.find("that");
				string::size_type index2=st.find("this");
				if(index1!=string::npos||index2!=string::npos){
					cout<<st<<endl;
					goto end;
				}
			}
		}
		end:;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
   37 |                 gets(s);
      |                 ^~~~
      |                 getw
a.cc:47:69: error: expected primary-expression before ')' token
   47 |                                         if('a'<=str[j]&&str[j]<='z')){
      |                                                                     ^
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

int main() {
	int i,n;
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		string str;
		char s[300];
		gets(s);
		str=s;
//cout<<str<<endl;
		int a,b;
		for(a=1;a<26;a+=2){
			if(a==13)continue;
			for(b=0;b<26;b++){
				string st="";
				int j;
				for(j=0;j<str.size();j++){
					if('a'<=str[j]&&str[j]<='z'){
						st+=((str[j]-'a')*a+b)%26+'a';
					}else{
						st+=str[j];
					}
				}
//if(st[0]=='i')cout<<st<<endl;
				string::size_type index1=st.find("that");
				string::size_type index2=st.find("this");
				if(index1!=string::npos||index2!=string::npos){
					cout<<st<<endl;
					goto end;
				}
			}
		}
		end:;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
   37 |                 gets(s);
      |                 ^~~~
      |                 getw
Language: C++

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

string solve(string cipher)
{
  for ( ; ; ) {
    for (int a = 1; ; ++a) {
      if (__gcd(a, 26) != 1)
	continue;
      bool decrypt = false;
      for (int b = 0; b < 26; ++b) {
	string plain = cipher;
	for (unsigned int i = 0; i < plain.size(); ++i) {
	  if (isalpha(plain[i]))
	    plain[i] = ('a' + ((a * (plain[i]-'a') + b) % 26));
	}
	if (plain.find("that") != string::npos || plain.find("this") != string::npos)
	  return plain;
      }
    }
  }
}

int main()
{
  int n;
  cin >> n;
  string cipher;
  getline(cin, cipher);
  for (int i = 0; i < n; ++i) {
    getline(cin, cipher);
    if (cipher.find_first_of("\n") != string::npos)
      cipher.erase(cipher.end()-1);
    if (cipher.find_first_of("\r") != string::npos)
      cipher.erase(cipher.end()-1);
    cout << solve(cipher) << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'std::string solve(std::string)':
a.cc:10:11: error: '__gcd' was not declared in this scope
   10 |       if (__gcd(a, 26) != 1)
      |           ^~~~~
Language: C++

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Scanner;

public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		Scanner cin = new Scanner(System.in);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> list = new ArrayList<Integer>();
		for(int i = 2; i < 100; i++){
			if(gcm(26,i)==1){
				list.add(i);
			}
		}
		String NN =br.readLine(); 
		int N = Integer.parseInt(NN);
		while(N--!=0){
			String str = br.readLine();
			label:for(int i = 0; i < list.size(); i++){
				
				for(int j = 0; j < 26; j++){
					String nstr = "";
					for(int k = 0; k < str.length(); k++){
						if(Character.isLetter(str.charAt(k))){
							nstr += (char)(((list.get(i)*(str.charAt(k)-'a') + j)%26) + 'a');
						}
						else{
							nstr += " " ;
						}
						//nstr+=str.charAt(k);
					}
					if(nstr.contains("that") || nstr.contains("this")){
						System.out.println(nstr);
						break label;
					}
				}
			}
		}
	}
	static int gcm(int p, int q){
		if(p < q){
			int tmp=p;
			p=q;
			q=tmp;
		}
		if(q==0){
			return p;
		}
		else{
			return gcm(q, p%q);
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.IOException;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.util.ArrayList;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.util.Scanner;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: expected unqualified-id before 'public'
    7 | public class Main {
      | ^~~~~~
Language: C++

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<Integer> list = new ArrayList<Integer>();
		for(int i = 2; i < 100; i++){
			if(gcm(26,i)==1){
				list.add(i);
			}
		}
		String NN =br.readLine(); 
		int N = Integer.parseInt(NN);
		while(N--!=0){
			String str = br.readLine();
			label:for(int i = 0; i < list.size(); i++){

				for(int j = 0; j < 26; j++){
					String nstr = "";
					for(int k = 0; k < str.length(); k++){
						if(Character.isLetter(str.charAt(k))){
							nstr += (char)(((list.get(i)*(str.charAt(k)-'a') + j)%26) + 'a');
						}
						else{
							nstr += " " ;
						}
					}
					if(nstr.contains("that") || nstr.contains("this")){
						System.out.println(nstr);
						break label;
					}
				}
			}
		}
	}
	static int gcm(int p, int q){
		if(p < q){
			int tmp=p;
			p=q;
			q=tmp;
		}
		if(q==0){
			return p;
		}
		else{
			return gcm(q, p%q);
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.IOException;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.util.ArrayList;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: expected unqualified-id before 'public'
    5 | public class Main {
      | ^~~~~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
	
int F(int alpha,int beta,int ch){
	return (alpha*ch+beta)%26;
}
int gcd(int a,int b){
	return b==0?a:gcd(b,a%b);
}
int main(){
	int n;
	string in,s,ans;
	cin>>n;
	getline(cin,in);
	while(n--){
		getline(cin,in);
		for(int i=1;i<26;i++){
			if(gcd(26,i)!=1)continue;
			for(int j=0;j<26;j++){
				for(int k=0;k<26;k++){
					table[F(i,j,k)] = k;
				}
				s.resize(in.size());
				for(int k=0;k<in.size();k++){
					if(in[k]==' ')s[k]=' ';
					else s[k] = table[in[k]-'a']+'a';
				}
				if(s.find("that",0)!=string::npos
					|| s.find("this",0)!=string::npos){
					cout<<s;
					goto BREAK;
				}
			}
		}
		BREAK:;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:41: error: 'table' was not declared in this scope; did you mean 'mutable'?
   23 |                                         table[F(i,j,k)] = k;
      |                                         ^~~~~
      |                                         mutable
a.cc:28:53: error: 'table' was not declared in this scope; did you mean 'mutable'?
   28 |                                         else s[k] = table[in[k]-'a']+'a';
      |                                                     ^~~~~
      |                                                     mutable
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <map>
#include <cstdio>
#include <sstream>
#include <math.h>
#include <boost/math/common_factor.hpp>

using namespace std;

string check(string str);
map<char, int> create_table();

int main(){
  char ch = 'a';
  string str;
  int num;
  vector<string> answers;
  map<char,int> table = create_table();
  cin >> num;

  cin.ignore();
  for(int k=0; k<num; k++){
    getline(cin, str);

    char c;
    char list[1];
    bool flag = true;
    int beta;
    int alpha = 1;
    map<char, int>::iterator itr;
    while(flag){
      if(boost::math::gcd(alpha,26) == 1){ 
        for(beta=1; beta<26; beta++){
          string result;
          for(int i=0; i<str.size(); i++){
            c = str[i];
            if(c != ' '){
              sprintf(list, "%c", ch+(19*table[c]+20)%26);
              result += list[0];
            }else{
              result += ' ';
            }
          }
          if(result.find("this",0) !=string::npos || result.find("that",0) != string::npos){
            answers.push_back(result);
            flag = false;
            break;
          }
        }
      }
      alpha++;
    }
  }

  for(int j=0; j<answers.size(); j++){
    cout << answers[j] << endl;
  }
  return 0;
}


map<char, int> create_table(){
  map<char, int> table;
  char ch[1];
  char str = 'a';

  for(int i=0; i<26; i++){
    sprintf(ch, "%c", str+i); 
    table.insert(pair<char,int>(ch[0],i));
  }
  return table;
}

Compiler output:
a.cc:8:10: fatal error: boost/math/common_factor.hpp: No such file or directory
    8 | #include <boost/math/common_factor.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: Java


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.regex.Pattern;

import org.apache.el.stream.Stream;

public class Main {
	public static void main(String[] args) throws NumberFormatException,
			IOException {
		BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in));
		StringBuilder builder = new StringBuilder();
		while (true) {
			String line = reader.readLine();
			if (line.equals("0 0 0 0")) {
				break;
			}
			int[] num = new int[4];
			StringTokenizer tokenizer = new StringTokenizer(line);
			for (int i = 0; i < 4; i++) {
				num[i] = Integer.parseInt(tokenizer.nextToken());
			}
			boolean flag = false;
			loop: for (int i = 0; i < 4; i++) {
				for (int j = i + 1; j < i + 4; j++) {
					for (int k = 0; k < 4; k++) {
						if (i == k || j % 4 == k) {
							continue;
						}
						for (int l = 0; l < 1; l++) {
							if (check(num[i], num[j % 4], num[k], num[6 - (i
									+ j % 4 + k)])) {
								flag = true;
								break loop;
							}
						}
					}

				}
			}
			if (!flag) {
				System.out.println(0);
			}
		}

	}

	private static boolean check(int a, int b, int c, int d) {
		char[] chs = { '+', '-', '*' };
		for (int i = 0; i < 3; i++) {
			for (int j = 0; j < 3; j++) {
				for (int k = 0; k < 3; k++) {
					if (cal(cal(cal(a, chs[i], b), chs[j], c), chs[k], d) == 10) {
						System.out.println(String.format(
								"(((%d %s %d) %s %d) %s %d)", a, chs[i], b,
								chs[j], c, chs[k], d));
						return true;
					} else if (cal(cal(a, chs[i], b), chs[j], cal(c, chs[k], d)) == 10) {
						System.out.println(String.format(
								"((%d %s %d) %s (%d %s %d))", a, chs[i], b,
								chs[j], c, chs[k], d));
						return true;
					}
				}
			}
		}
		return false;
	}

	private static int cal(int a, char c, int b) {
		switch (c) {
		case '+':
			return a + b;
		case '-':
			return a - b;
		default:
			return a * b;
		}
	}
}

Compiler output:
Main.java:8: error: package org.apache.el.stream does not exist
import org.apache.el.stream.Stream;
                           ^
1 error
Language: C

#include<stdio.h>
#include<stdlib.h>
int calc(int x, int y, int z)
{
  switch (z){
  case 0: return (x + y);
  case 1: return (x - y);
  case 2: return (x * y);
  }
}
int hantei(int a, int b, int c, int d){
  char en[3]={'+','-','*'};
    for(i=0;i<3;i++){
      for(j=0;j<3;j++){
	int(k=0;k<3;k++){
	  if (calc(calc(a, b, i), calc(c, d, j), k) == 10){
	    return printf("(%d%c%d)%c(%d%c%d)\n", a, en[i], b, en[k], c, en[j], d);
	  }
	  if (calc(calc(calc(a, b, i), c, j), d, k) == 10){
	      return printf("((%d%c%d)%c%d)%c%d\n", a, en[i], b, en[j], c, en[k], d);
	  }
	}
      }
    }
    return 0;
}
int main(void){
  int a, b, c, d;
  while (scanf("%d %d %d %d", &a, &b, &c, &d)!=EOF){
    if(check(a, b, c, d)) continue;//??¨??????????????´?????????
    else if(check(a, b, d, c)) continue;
    else if(check(a, c, b, d)) continue;
    else if(check(a, c, d, b)) continue;
    else if(check(a, d, b, c)) continue;
    else if(check(a, d, c, b)) continue;
    else if(check(b, a, d, c)) continue;
    else if(check(b, a, c, d)) continue;
    else if(check(b, c, a, d)) continue;
    else if(check(b, c, d, a)) continue;
    else if(check(b, d, a, c)) continue;
    else if(check(b, d, c, a)) continue;
    else if(check(c, a, b, d)) continue;
    else if(check(c, a, d, b)) continue;
    else if(check(c, b, a, d)) continue;
    else if(check(c, b, d, a)) continue;
    else if(check(c, d, a, b)) continue;
    else if(check(c, d, b, a)) continue;
    else if(check(d, a, b, c)) continue;
    else if(check(d, a, c, b)) continue;
    else if(check(d, b, a, c)) continue;
    else if(check(d, b, c, a)) continue;
    else if(check(d, c, a, b)) continue;
    else if(check(d, c, b, a)) continue;
    printf("0\n");
  }
  return 0;
}
 

Compiler output:
main.c: In function 'hantei':
main.c:13:9: error: 'i' undeclared (first use in this function)
   13 |     for(i=0;i<3;i++){
      |         ^
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:11: error: 'j' undeclared (first use in this function)
   14 |       for(j=0;j<3;j++){
      |           ^
main.c:15:14: error: expected ')' before '=' token
   15 |         int(k=0;k<3;k++){
      |              ^
      |              )
main.c: In function 'main':
main.c:30:8: error: implicit declaration of function 'check' [-Wimplicit-function-declaration]
   30 |     if(check(a, b, c, d)) continue;//??¨??????????????´?????????
      |        ^~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
int calc(int x, int y, int z)
{
  switch (z){
  case 0: return (x + y);
  case 1: return (x - y);
  case 2: return (x * y);
  }
}

int hantei(int a, int b, int c, int d){
  char en[3]={'+','-','*'};
  int i,j,k;
    for(i=0;i<3;i++){
      for(j=0;j<3;j++){
	int(k=0;k<3;k++){
	  if (calc(calc(a, b, i), calc(c, d, j), k) == 10){
	    return printf("(%d%c%d)%c(%d%c%d)\n", a, en[i], b, en[k], c, en[j], d);
	  }
	  if (calc(calc(calc(a, b, i), c, j), d, k) == 10){
	      return printf("((%d%c%d)%c%d)%c%d\n", a, en[i], b, en[j], c, en[k], d);
	  }
	}
      }
    }
    return 0;
}
int main(void){
  int a, b, c, d;
  while (scanf("%d %d %d %d", &a, &b, &c, &d)!=EOF){
    if(check(a, b, c, d)) continue;//??¨??????????????´?????????
    else if(check(a, b, d, c)) continue;
    else if(check(a, c, b, d)) continue;
    else if(check(a, c, d, b)) continue;
    else if(check(a, d, b, c)) continue;
    else if(check(a, d, c, b)) continue;
    else if(check(b, a, d, c)) continue;
    else if(check(b, a, c, d)) continue;
    else if(check(b, c, a, d)) continue;
    else if(check(b, c, d, a)) continue;
    else if(check(b, d, a, c)) continue;
    else if(check(b, d, c, a)) continue;
    else if(check(c, a, b, d)) continue;
    else if(check(c, a, d, b)) continue;
    else if(check(c, b, a, d)) continue;
    else if(check(c, b, d, a)) continue;
    else if(check(c, d, a, b)) continue;
    else if(check(c, d, b, a)) continue;
    else if(check(d, a, b, c)) continue;
    else if(check(d, a, c, b)) continue;
    else if(check(d, b, a, c)) continue;
    else if(check(d, b, c, a)) continue;
    else if(check(d, c, a, b)) continue;
    else if(check(d, c, b, a)) continue;
    printf("0\n");
  }
  return 0;
}
 

Compiler output:
main.c: In function 'hantei':
main.c:17:14: error: expected ')' before '=' token
   17 |         int(k=0;k<3;k++){
      |              ^
      |              )
main.c: In function 'main':
main.c:32:8: error: implicit declaration of function 'check' [-Wimplicit-function-declaration]
   32 |     if(check(a, b, c, d)) continue;//??¨??????????????´?????????
      |        ^~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
int calc(int x, int y, int z)
{
  switch (z){
  case 0: return (x + y);
  case 1: return (x - y);
  case 2: return (x * y);
  }
}
int hantei(int a, int b, int c, int d){
  int i,j,k;
  char en[3]={'+','-','*'};
    for(i=0;i<3;i++){
      for(j=0;j<3;j++){
	for(k=0;k<3;k++){
	  if (calc(calc(a, b, i), calc(c, d, j), k) == 10){
	    return printf("(%d%c%d)%c(%d%c%d)\n", a, en[i], b, en[k], c, en[j], d);
	  }
	  if (calc(calc(calc(a, b, i), c, j), d, k) == 10){
	      return printf("((%d%c%d)%c%d)%c%d\n", a, en[i], b, en[j], c, en[k], d);
	  }
	}
      }
    }
    return 0;
}
int main(void){
  int a, b, c, d;
  while (scanf("%d %d %d %d", &a, &b, &c, &d)!=EOF){
    if(check(a, b, c, d)) continue;//??¨??????????????´?????????
    else if(check(a, b, d, c)) continue;
    else if(check(a, c, b, d)) continue;
    else if(check(a, c, d, b)) continue;
    else if(check(a, d, b, c)) continue;
    else if(check(a, d, c, b)) continue;
    else if(check(b, a, d, c)) continue;
    else if(check(b, a, c, d)) continue;
    else if(check(b, c, a, d)) continue;
    else if(check(b, c, d, a)) continue;
    else if(check(b, d, a, c)) continue;
    else if(check(b, d, c, a)) continue;
    else if(check(c, a, b, d)) continue;
    else if(check(c, a, d, b)) continue;
    else if(check(c, b, a, d)) continue;
    else if(check(c, b, d, a)) continue;
    else if(check(c, d, a, b)) continue;
    else if(check(c, d, b, a)) continue;
    else if(check(d, a, b, c)) continue;
    else if(check(d, a, c, b)) continue;
    else if(check(d, b, a, c)) continue;
    else if(check(d, b, c, a)) continue;
    else if(check(d, c, a, b)) continue;
    else if(check(d, c, b, a)) continue;
    printf("0\n");
  }
  return 0;
}
 

Compiler output:
main.c: In function 'main':
main.c:31:8: error: implicit declaration of function 'check' [-Wimplicit-function-declaration]
   31 |     if(check(a, b, c, d)) continue;//??¨??????????????´?????????
      |        ^~~~~
Language: C

#include <stdio.h>

int main(void){
     int t;
     while(~scanf("%d",&t)){
          if(t<0 || t>=10) return 1;

     return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:1: error: expected declaration or statement at end of input
    9 | }
      | ^
Language: C

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

#define NG -1
#define TRUE 1
#define FALSE 0

void cal(int a,int b,int c,int d,int *flag); 

int main(){

	int i,j,k,l,no[4],flag;
	char ans[20];

	while(scanf("%d %d %d %d",&no[0],&no[1],&no[2],&no[3])!=EOF){
		if(!no[0] && !no[1] && !no[2] && !no[3]) break;
		flag=FALSE;
		for(i=0;i<4;i++){
			for(j=0;j<4;j++){
				if(i!=j){
					for(k=0;k<4;k++){
						if(k!=i && k!=j){
							for(l=0;l<4;l++){
								cal(no[i],no[j],no[k],no[l],&flag,ans);
								if(flag==TRUE) break;
							}
						}
						if(flag==TRUE) break;
					}
				}
				if(flag==TRUE) break;
			}
			if(flag==TRUE) break;
		}
		if(flag==TRUE){
			printf("%s\n",ans);
			continue;
		}
		printf("0\n");
	}





	return 0;

}

void cal(int a,int b,int c,int d,int *flag,char *tmp){

	int i,j,k,tmp1,tmp2,tmp3;
	char op[3]={'+','-','*'};

	for(i=0;i<3;i++){
		switch(i){
			case 0:
				tmp1=a+b;
				break;
			case 1:
				tmp1=a-b;
				break;
			case 2:
				tmp1=a*b;
		}
		for(j=0;j<3;j++){
			switch(j){
				case 0:
					tmp2=tmp1+c;
					break;
				case 1:
					tmp2=tmp1-c;
					break;
				case 2:
					tmp2=tmp1*c;
			}
			for(k=0;k<3;k++){
				switch(k){
					case 0:
						tmp3=tmp2+d;
						break;
					case 1:
						tmp3=tmp2-d;
						break;
					case 2:
						tmp3=tmp2*d;
				}
				if(tmp3==10){
					sprintf(tmp,"(((%d%c%d)%c%d)%c%d)",a,op[i],b,op[j],c,op[k],d);
					*flag=TRUE;
					return;
				}
			}
		}
	}

	for(i=0;i<3;i++){
		switch(i){
			case 0:
				tmp1=a+b;
				break;
			case 1:
				tmp1=a-b;
				break;
			case 2:
				tmp1=a*b;
		}
		for(j=0;j<3;j++){
			switch(j){
				case 0:
					tmp2=c+d;
					break;
				case 1:
					tmp2=c-d;
					break;
				case 2:
					tmp2=c*d;
			}
			for(k=0;k<3;k++){
				switch(k){
					case 0:
						tmp3=tmp1+tmp2;
						break;
					case 1:
						tmp3=tmp1-tmp2;
						break;
					case 2:
						tmp3=tmp1*tmp2;
				}
				if(tmp3==10){
					sprintf(tmp,"((%d%c%d)%c(%d%c%d))",a,op[i],b,op[k],c,op[j],d);
					*flag=TRUE;
					return;
				}
			}
		}
	}
	*flag=FALSE;
	sprintf(tmp,"NG");
	return;
}

Compiler output:
main.c: In function 'main':
main.c:24:65: error: too many arguments to function 'cal'
   24 |                                                                 cal(no[i],no[j],no[k],no[l],&flag,ans);
      |                                                                 ^~~
main.c:8:6: note: declared here
    8 | void cal(int a,int b,int c,int d,int *flag);
      |      ^~~
main.c: At top level:
main.c:50:6: error: conflicting types for 'cal'; have 'void(int,  int,  int,  int,  int *, char *)'
   50 | void cal(int a,int b,int c,int d,int *flag,char *tmp){
      |      ^~~
main.c:8:6: note: previous declaration of 'cal' with type 'void(int,  int,  int,  int,  int *)'
    8 | void cal(int a,int b,int c,int d,int *flag);
      |      ^~~
Language: C

main(a){for(;++a<2e5;)printf("(");for(;gets(&a),*a%16;)puts(&a);}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(a){for(;++a<2e5;)printf("(");for(;gets(&a),*a%16;)puts(&a);}
      | ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:23: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | main(a){for(;++a<2e5;)printf("(");for(;gets(&a),*a%16;)puts(&a);}
      |                       ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | main(a){for(;++a<2e5;)printf("(");for(;gets(&a),*a%16;)puts(&a);}
main.c:1:23: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    1 | main(a){for(;++a<2e5;)printf("(");for(;gets(&a),*a%16;)puts(&a);}
      |                       ^~~~~~
main.c:1:23: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:40: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
    1 | main(a){for(;++a<2e5;)printf("(");for(;gets(&a),*a%16;)puts(&a);}
      |                                        ^~~~
main.c:1:49: error: invalid type argument of unary '*' (have 'int')
    1 | main(a){for(;++a<2e5;)printf("(");for(;gets(&a),*a%16;)puts(&a);}
      |                                                 ^~
main.c:1:56: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
    1 | main(a){for(;++a<2e5;)printf("(");for(;gets(&a),*a%16;)puts(&a);}
      |                                                        ^~~~
main.c:1:56: note: include '<stdio.h>' or provide a declaration of 'puts'
main.c:1:61: error: passing argument 1 of 'puts' from incompatible pointer type [-Wincompatible-pointer-types]
    1 | main(a){for(;++a<2e5;)printf("(");for(;gets(&a),*a%16;)puts(&a);}
      |                                                             ^~
      |                                                             |
      |                                                             int *
main.c:1:61: note: expected 'const char *' but argument is of type 'int *'
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:2:7: error: 'true' undeclared (first use in this function)
    2 | while(true){}
      |       ^~~~
main.c:1:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
  +++ |+#include <stdbool.h>
    1 | int main(){
main.c:2:7: note: each undeclared identifier is reported only once for each function it appears in
    2 | while(true){}
      |       ^~~~
Language: C

int main(void){
while(true);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:2:7: error: 'true' undeclared (first use in this function)
    2 | while(true);
      |       ^~~~
main.c:1:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
  +++ |+#include <stdbool.h>
    1 | int main(void){
main.c:2:7: note: each undeclared identifier is reported only once for each function it appears in
    2 | while(true);
      |       ^~~~
Language: C++

#!ruby -pal
exit if$_[0]==?0
t=[?+,?-,?*]
$_=$F.permutation(4).to_a.product(t.product(t,t),[1,2,3].product([1,2])).map{|a,b,c|c.inject(a.zip(b).flatten){|s,r|r*=2;s[r-2..r]=?(+s[r-2..r]*""+?);s}*""}.find{|i|eval(i)==10}||0

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!ruby -pal
      |  ^
a.cc:4:126: error: too many decimal points in number
    4 | $_=$F.permutation(4).to_a.product(t.product(t,t),[1,2,3].product([1,2])).map{|a,b,c|c.inject(a.zip(b).flatten){|s,r|r*=2;s[r-2..r]=?(+s[r-2..r]*""+?);s}*""}.find{|i|eval(i)==10}||0
      |                                                                                                                              ^~~~
a.cc:4:139: error: too many decimal points in number
    4 | $_=$F.permutation(4).to_a.product(t.product(t,t),[1,2,3].product([1,2])).map{|a,b,c|c.inject(a.zip(b).flatten){|s,r|r*=2;s[r-2..r]=?(+s[r-2..r]*""+?);s}*""}.find{|i|eval(i)==10}||0
      |                                                                                                                                           ^~~~
a.cc:2:1: error: 'exit' does not name a type
    2 | exit if$_[0]==?0
      | ^~~~
a.cc:1:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
  +++ |+#include <cstdlib>
    1 | #!ruby -pal
a.cc:4:157: error: expected unqualified-id before '.' token
    4 | $_=$F.permutation(4).to_a.product(t.product(t,t),[1,2,3].product([1,2])).map{|a,b,c|c.inject(a.zip(b).flatten){|s,r|r*=2;s[r-2..r]=?(+s[r-2..r]*""+?);s}*""}.find{|i|eval(i)==10}||0
      |                                                                                                                                                             ^
a.cc:4:178: error: expected unqualified-id before '||' token
    4 | $_=$F.permutation(4).to_a.product(t.product(t,t),[1,2,3].product([1,2])).map{|a,b,c|c.inject(a.zip(b).flatten){|s,r|r*=2;s[r-2..r]=?(+s[r-2..r]*""+?);s}*""}.find{|i|eval(i)==10}||0
      |                                                                                                                                                                                  ^~
Language: C++

#include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); ++i)

const string op = "+-*";

string S(int x) {
    stringstream ss;
    ss << x;
    return ss.str();
}

int calc(int a, char op, int b) {
    if (op == '+') return a + b;
    if (op == '-') return a - b;
    return a * b;
}

string solve(vector<int> a) {
    sort(a.begin(), a.end());
    do {
        rep(i,3) rep(j,3) rep(k,3) {
            if (calc(calc(calc(a[0], op[i], a[1]), op[j], a[2]), op[k], a[3]) == 10) {
                return "((" + S(a[0]) + " " + op[i] + " " + S(a[1]) + ")" + " " + op[j] + " " + S(a[2]) + ")" + " " + op[k] + " " + S(a[3]);
            }
            if (calc(calc(a[0], op[i], a[1]), op[j], calc(a[2], op[k], a[3])) == 10) {
                return "(" + S(a[0]) + " " + op[i] + " " + S(a[1]) + ")" + " " + op[j] + " " + "(" + S(a[2]) + " " + op[k] + " " + S(a[3]) + ")";
            }
        }
    } while (next_permutation(a.begin(), a.end()));
    return "0";
}

int main() {
    vector<int> a(4);
    while (cin >> a[0] >> a[1] >> a[2] >> a[3], a[0]) {
        cout << solve(a) << endl;
    }
    return 0;
}

Compiler output:
a.cc:22:14: error: 'vector' was not declared in this scope
   22 | string solve(vector<int> a) {
      |              ^~~~~~
a.cc:5:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    4 | #include <algorithm>
  +++ |+#include <vector>
    5 | using namespace std;
a.cc:22:21: error: expected primary-expression before 'int'
   22 | string solve(vector<int> a) {
      |                     ^~~
a.cc:22:29: error: expected ',' or ';' before '{' token
   22 | string solve(vector<int> a) {
      |                             ^
a.cc: In function 'int main()':
a.cc:38:5: error: 'vector' was not declared in this scope
   38 |     vector<int> a(4);
      |     ^~~~~~
a.cc:38:5: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:38:12: error: expected primary-expression before 'int'
   38 |     vector<int> a(4);
      |            ^~~
a.cc:39:19: error: 'a' was not declared in this scope
   39 |     while (cin >> a[0] >> a[1] >> a[2] >> a[3], a[0]) {
      |                   ^