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

int main()
{
        using namespace std;
	char* A = new char[11];
	char* B = new char[11];;
	char* C = new char[11];;

	cin >> A;
	cin >> B;
	cin >> C;

	if (A[strlen(A) - 1] == B[0] &&
		B[strlen(B) - 1] == C[0]) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> A;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main()
a.cc:12:15: error: 'strlen' was not declared in this scope
   12 |         if (A[strlen(A) - 1] == B[0] &&
      |               ^~~~~~
a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | int main()
a.cc:14:17: error: 'cout' was not declared in this scope
   14 |                 cout << "YES" << endl;
      |                 ^~~~
a.cc:14:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:34: error: 'endl' was not declared in this scope
   14 |                 cout << "YES" << endl;
      |                                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main()
a.cc:17:17: error: 'cout' was not declared in this scope
   17 |                 cout << "NO" << endl;
      |                 ^~~~
a.cc:17:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:33: error: 'endl' was not declared in this scope
   17 |                 cout << "NO" << endl;
      |                                 ^~~~
a.cc:17:33: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <iostream>

using namespace std;

int main()
{
	char* A = new char[11];
	char* B = new char[11];;
	char* C = new char[11];;

	cin >> A;
	cin >> B;
	cin >> C;

	if (A[strlen(A) - 1] == B[0] &&
		B[strlen(B) - 1] == C[0]) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: 'strlen' was not declared in this scope
   15 |         if (A[strlen(A) - 1] == B[0] &&
      |               ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <iostream>
using namespace std;
 
int main()
{
int a, b, c;
cin >> a >> b >> c;
int x = c % b;
bool f = 0;
for (int i = 1; i <= 100; i++) {
if ((i * a) % b == x) {
f = 1;
break;
}
} 
if (f)
cout << "YES"
else 
cout << "NO";
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: expected ';' before 'else'
   17 | cout << "YES"
      |              ^
      |              ;
   18 | else
      | ~~~~
Language: C++

#include <iostream>
using namespace std;
 
int main()
{
int a, b, c;
cin >> a >> b >> c;
int x = c % b;
bool f = false;
for (int i = 1; i <= 100; i++) {
if (i * a % b == x) {
f = true;
break;
}
} 
if (f)
cout << "YES"
else 
cout << "NO";
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: expected ';' before 'else'
   17 | cout << "YES"
      |              ^
      |              ;
   18 | else
      | ~~~~
Language: C++

#define forn(i,n) for(in i=0;i<(n);++i)
#define forv(i,v) forn(i,sz(v))
#define fors(i,s) for(auto i=(s).begin();i!=(s).end();++i)
#define all(v) (v).begin(),(v).end()
using namespace std;
typedef long long ll;
int N = 200005;
int a[805][805];
int main(){
  string s, s1,s2;
  cin >> s >> s1 >> s2;
  if (s[s.size() - 1] == s1[0] && s1[s1.size() - 1] == s2[0]){
  	cout <<"YES\n";
  } else {
  	cout <<"NO\n";
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'string' was not declared in this scope
   10 |   string s, s1,s2;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #define forn(i,n) for(in i=0;i<(n);++i)
a.cc:11:3: error: 'cin' was not declared in this scope
   11 |   cin >> s >> s1 >> s2;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #define forn(i,n) for(in i=0;i<(n);++i)
a.cc:11:10: error: 's' was not declared in this scope
   11 |   cin >> s >> s1 >> s2;
      |          ^
a.cc:11:15: error: 's1' was not declared in this scope
   11 |   cin >> s >> s1 >> s2;
      |               ^~
a.cc:11:21: error: 's2' was not declared in this scope
   11 |   cin >> s >> s1 >> s2;
      |                     ^~
a.cc:13:9: error: 'cout' was not declared in this scope
   13 |         cout <<"YES\n";
      |         ^~~~
a.cc:13:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:9: error: 'cout' was not declared in this scope
   15 |         cout <<"NO\n";
      |         ^~~~
a.cc:15:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

import Control.Applicative

check a b= (last a == head b)
yn a b c=  if(check a b && check b c) then "YES" else "NO"

main = do
  [a,b,c]<- words<$>getLine
  putStrLn.yn a b c

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import Control.Applicative
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

main = do 
--    (x:y:[])<- (map read).words<$>getLine ::IO [Int]
    (a:b:c:[]) <- words<$>getLine:: IO [String]
    if last a == head b && last b == head c then putStrLn "YES" else putStrLn "NO"

Compiler output:
a.cc:1:1: error: 'main' does not name a type
    1 | main = do
      | ^~~~
Language: C++

package main

import (
  "fmt"
)

func main(){
  var a,b,c string
  fmt.Scan(&a, &b, &c)
  if a[len(a) - 1] == b[0] && b[len(b) - 1] == c[0] {
    fmt.Println("YES")
  } else {
    fmt.Println("NO")
  }
}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
Language: C++

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

int main() {
  string a, b, c;
  cin >> a >> b >> c;

  if ((a.back() == b.front()) && (b.back() == c.front()))
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
~           

Compiler output:
a.cc:14:2: error: expected class-name at end of input
   14 | ~
      |  ^
Language: C++

#include <bits/stdc++.h>


#define itn int
#define LL long long
#define pb push_back
#define mp make_pair
#define x first
#define y second
#define all(x) (x).begin(), (x) end()
#define sz(x) (int)((x).size())
#define REP(i,a,b) for(int i = a ; i <= b; i ++)

using namespace std;
inline int GetInt(){
	int x;
	scanf("%d" , &x);
	return x;
}
inline string GetString(void){
	char x[100005];
	scanf("%s",x); string s = x;
	return s;
}
void solve(){
	string a,b,c;
	cin >> a >> b >> c;
	if(a.back() == b[ 0 ] && b.back() == c[ 0 ]){
		cout <<"YES";
	}else{
		cout << "NO";
	}
}
int main(){

	*/#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	#endif*/

	int T = 1;
	while(T--){
		solve();
	}
	  	
	return 0;
}


Compiler output:
a.cc:36:11: error: stray '#' in program
   36 |         */#ifndef ONLINE_JUDGE
      |           ^
a.cc:39:10: error: #endif without #if
   39 |         #endif*/
      |          ^~~~~
a.cc: In function 'int main()':
a.cc:36:10: error: expected primary-expression before '/' token
   36 |         */#ifndef ONLINE_JUDGE
      |          ^
a.cc:36:12: error: 'ifndef' was not declared in this scope; did you mean 'index'?
   36 |         */#ifndef ONLINE_JUDGE
      |            ^~~~~~
      |            index
Language: C

main(f,s){for(;read(0,s,1);s++)s[-1]-32||(f&=s[-2]==*s);puts(f?"YES":"NO");}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(f,s){for(;read(0,s,1);s++)s[-1]-32||(f&=s[-2]==*s);puts(f?"YES":"NO");}
      | ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'f' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 's' defaults to 'int' [-Wimplicit-int]
main.c:1:16: error: implicit declaration of function 'read' [-Wimplicit-function-declaration]
    1 | main(f,s){for(;read(0,s,1);s++)s[-1]-32||(f&=s[-2]==*s);puts(f?"YES":"NO");}
      |                ^~~~
main.c:1:33: error: subscripted value is neither array nor pointer nor vector
    1 | main(f,s){for(;read(0,s,1);s++)s[-1]-32||(f&=s[-2]==*s);puts(f?"YES":"NO");}
      |                                 ^
main.c:1:47: error: subscripted value is neither array nor pointer nor vector
    1 | main(f,s){for(;read(0,s,1);s++)s[-1]-32||(f&=s[-2]==*s);puts(f?"YES":"NO");}
      |                                               ^
main.c:1:53: error: invalid type argument of unary '*' (have 'int')
    1 | main(f,s){for(;read(0,s,1);s++)s[-1]-32||(f&=s[-2]==*s);puts(f?"YES":"NO");}
      |                                                     ^~
main.c:1:57: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
    1 | main(f,s){for(;read(0,s,1);s++)s[-1]-32||(f&=s[-2]==*s);puts(f?"YES":"NO");}
      |                                                         ^~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'puts'
  +++ |+#include <stdio.h>
    1 | main(f,s){for(;read(0,s,1);s++)s[-1]-32||(f&=s[-2]==*s);puts(f?"YES":"NO");}
Language: C++

#include <iostream>
#include <string>
int main(){
string a[2];
cin >> a[0] >>a[1] >>a[2];
if (a[0].back() == a[1].front() && a[1].back() == a[2].front()) {
cout << "YES";
}else{
cout << "NO";
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:1: error: 'string' was not declared in this scope
    4 | string a[2];
      | ^~~~~~
a.cc:4:1: 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:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 | cin >> a[0] >>a[1] >>a[2];
      | ^~~
      | std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:8: error: 'a' was not declared in this scope
    5 | cin >> a[0] >>a[1] >>a[2];
      |        ^
a.cc:7:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 | cout << "YES";
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 | cout << "NO";
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

a,b,c=gets.split.map &:to_i;
b.times{|i|if a%b*i%b==c;puts"YES";exit;end}
puts"NO"

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a,b,c=gets.split.map &:to_i;
      | ^
a.cc:2:1: error: 'b' does not name a type
    2 | b.times{|i|if a%b*i%b==c;puts"YES";exit;end}
      | ^
a.cc:3:1: error: 'puts' does not name a type
    3 | puts"NO"
      | ^~~~
Language: C++

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

char A[],B[],C[];

int main(){
    



Compiler output:
a.cc:4:6: error: storage size of 'A' isn't known
    4 | char A[],B[],C[];
      |      ^
a.cc:4:10: error: storage size of 'B' isn't known
    4 | char A[],B[],C[];
      |          ^
a.cc:4:14: error: storage size of 'C' isn't known
    4 | char A[],B[],C[];
      |              ^
a.cc: In function 'int main()':
a.cc:6:12: error: expected '}' at end of input
    6 | int main(){
      |           ~^
Language: C++

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

int main()
{
	int n, w, price[100], weight[100], max = 1;
	int weightg[20000] = { 0 }, priceg[20000] = { 0 };
	cin >> n >> w;
	for (int i = 0; i < n; i++)
	{
		cin >> weight[i] >> price[i];
		if (weight[i] <= w) {
			for (int z = max; z >= 0; z--)
			{
				weightg[max] = weightg[z] + weight[i];
if(weighg[max]<=w){
				priceg[max] = priceg[z] + price[i];
				max++;}
			}
		}
	}
	int kachi = 0;
	for (int i = 0; i < max; i++)
	{
		if (weightg[i] <= w) {
			if (priceg[i] > kachi) {
				kachi = priceg[i];
			}
		}
	}
	cout << kachi;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:4: error: 'weighg' was not declared in this scope; did you mean 'weightg'?
   19 | if(weighg[max]<=w){
      |    ^~~~~~
      |    weightg
Language: C++

#include<stdio.h>
#include<string.h>
char s[50];
int main()
{
	//freopen("in.txt","r",stdin);
	//freopen("out.txt","w",stdout);
	memset(s,0,sizeof(s));
	while(gets(s))
	{
		int flag=1;
		for(int i=0;i<strlen(s);i++)
		{
			//printf("i = %d\n",i);
			if(s[i]==' ')
			{
				if(s[i-1]!=s[i+1])
				{
					flag=0;
					break;
				}
			}
		}
		if(flag)
			printf("YES\n");
		else
			printf("NO\n");
	}
	return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
string a,b,c;
cin>>a>>b>>c;
if(a[a.size()-1]==b[0]&&b[b.size()-1==c[0])
cout<<"YES";
else cout<<"NO";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:43: error: expected ']' before ')' token
    6 | if(a[a.size()-1]==b[0]&&b[b.size()-1==c[0])
      |                                           ^
      |                                           ]
Language: C

#include <stdio.h>

int main(void) {
	int A, B, C;
	int i;
	
	scanf("%d %d %d", A, B, C);

	for ( i = 0; i < 10000000000000000; i++ ) {
		if ((A * i) % B == C ) {
			printf("YES");
		} else {
			printf("NO");
		]
	}

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:14:17: error: expected statement before ']' token
   14 |                 ]
      |                 ^
main.c:18:1: error: expected declaration or statement at end of input
   18 | }
      | ^
Language: C++

cin>>A>>B>>C;
court<<"YES"<<endl;
court<<"NO"<<endl;

Compiler output:
a.cc:1:1: error: 'cin' does not name a type
    1 | cin>>A>>B>>C;
      | ^~~
a.cc:2:1: error: 'court' does not name a type
    2 | court<<"YES"<<endl;
      | ^~~~~
a.cc:3:1: error: 'court' does not name a type
    3 | court<<"NO"<<endl;
      | ^~~~~
Language: C++

#include <cstdio>
#include <algorithm>
#include <cassert>
using namespace std;
typedef long long ll;

#ifdef _MSC_VER
#pragma warning(disable: 4996) // Disable deprecation
#endif 

char cbuf1[10000];
char cbuf2[10000];
char cbuf3[10000];

int main()
{
	scanf("%s % %s", cbuf1, cbuf2, cbuf3);
	int l1 = strlen(cbuf1);
	int l2 = strlen(cbuf2);
	int l3 = strlen(cbuf3);
	if (cbuf1[l1 - 1] == cbuf2[0] && cbuf2[l2 - 1] == cbuf3[0])
		printf("YES\n");
	else
		printf("NO\n");

	fclose(stdout);
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: 'strlen' was not declared in this scope
   18 |         int l1 = strlen(cbuf1);
      |                  ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <cassert>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

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

using namespace std;

int main()
{
  uint32_t N, W;

  cin >> N >> W;
  
  vector<uint32_t> v_w(N,0), v_v(N,0);

  for (uint32_t n=0; n<N; ++n)
    cin >> v_w[n] >> v_v[n];

  uint32_t dp[N+1][W+1];

  for (uint32_t n=0; n<N+1; ++n)
    dp[n][0] = 0;

  for (uint32_t w=0; w<W+1; ++w)
    dp[0][w] = 0;
  
  for (uint32_t n=1; n<=N; ++n) {
    for (uint32_t w=1; w<=W; ++w) {
      if (w >= v_w[n-1])
	dp[n][w] = max(dp[n-1][w-v_w[n-1]]+v_v[n-1], dp[n-1][w]);
      else
	dp[n][w] = dp[n-1][w];
    }
  }
  
  cout << dp[N][W] << endl;
  
  return 0;
}
    dp[n][0] = 0;

  for (uint32_t w=0; w<W+1; ++w)
    dp[0][w] = 0;
  
  for (uint16_t n=1; n<=N; ++n) {
    for (uint32_t w=1; w<=W; ++w) {
      if (w >= v_w[n-1])
	dp[n][w] = max(dp[n-1][w-v_w[n-1]]+v_v[n-1], dp[n-1][w]);
      else
	dp[n][w] = dp[n-1][w];
    }
  }
  
  cout << dp[N][W] << endl;
  
  return 0;
}

Compiler output:
a.cc:40:5: error: 'dp' does not name a type
   40 |     dp[n][0] = 0;
      |     ^~
a.cc:42:3: error: expected unqualified-id before 'for'
   42 |   for (uint32_t w=0; w<W+1; ++w)
      |   ^~~
a.cc:42:22: error: 'w' does not name a type
   42 |   for (uint32_t w=0; w<W+1; ++w)
      |                      ^
a.cc:42:29: error: expected unqualified-id before '++' token
   42 |   for (uint32_t w=0; w<W+1; ++w)
      |                             ^~
a.cc:45:3: error: expected unqualified-id before 'for'
   45 |   for (uint16_t n=1; n<=N; ++n) {
      |   ^~~
a.cc:45:22: error: 'n' does not name a type
   45 |   for (uint16_t n=1; n<=N; ++n) {
      |                      ^
a.cc:45:28: error: expected unqualified-id before '++' token
   45 |   for (uint16_t n=1; n<=N; ++n) {
      |                            ^~
a.cc:54:3: error: 'cout' does not name a type
   54 |   cout << dp[N][W] << endl;
      |   ^~~~
a.cc:56:3: error: expected unqualified-id before 'return'
   56 |   return 0;
      |   ^~~~~~
a.cc:57:1: error: expected declaration before '}' token
   57 | }
      | ^
Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace abc60
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] str = Console.ReadLine().Split(' ');
            string A = str[0];
            string B = str[1];
            string C = str[2];
            if(A[A.Length-1] == B[B.Length - 1]&&B[B.Length - 1]==C[C.Length - 1])
            {
                Console.WriteLine("YES");
            }else
            {
                Console.WriteLine("NO");
            }
        }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Threading.Tasks;
      |       ^~~~~~
a.cc:11:26: error: 'string' has not been declared
   11 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:11:35: error: expected ',' or '...' before 'args'
   11 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:25:6: error: expected ';' after class definition
   25 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void abc60::Program::Main(int*)':
a.cc:13:13: error: 'string' was not declared in this scope
   13 |             string[] str = Console.ReadLine().Split(' ');
      |             ^~~~~~
a.cc:13:20: error: expected primary-expression before ']' token
   13 |             string[] str = Console.ReadLine().Split(' ');
      |                    ^
a.cc:14:20: error: expected ';' before 'A'
   14 |             string A = str[0];
      |                    ^
a.cc:15:20: error: expected ';' before 'B'
   15 |             string B = str[1];
      |                    ^
a.cc:16:20: error: expected ';' before 'C'
   16 |             string C = str[2];
      |                    ^
a.cc:17:16: error: 'A' was not declared in this scope
   17 |             if(A[A.Length-1] == B[B.Length - 1]&&B[B.Length - 1]==C[C.Length - 1])
      |                ^
a.cc:17:33: error: 'B' was not declared in this scope
   17 |             if(A[A.Length-1] == B[B.Length - 1]&&B[B.Length - 1]==C[C.Length - 1])
      |                                 ^
a.cc:17:67: error: 'C' was not declared in this scope
   17 |             if(A[A.Length-1] == B[B.Length - 1]&&B[B.Length - 1]==C[C.Length - 1])
      |                                                                   ^
a.cc:19:17: error: 'Console' was not declared in this scope
   19 |                 Console.WriteLine("YES");
      |                 ^~~~~~~
a.cc:22:17: error: 'Console' was not declared in this scope
   22 |                 Console.WriteLine("NO");
      |                 ^~~~~~~
Language: C

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

int main(void) {
	char A[10], B[10], C[10];

	scanf("%s %s %s", A, B, C);
	
	if ( A[stlen(A) - 1] == B[0] && B[strlen(B) - 1] == C[0] ) {
		printf("YES\n");
	} else {
		printf("NO\n");
	}

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:16: error: implicit declaration of function 'stlen'; did you mean 'strlen'? [-Wimplicit-function-declaration]
    9 |         if ( A[stlen(A) - 1] == B[0] && B[strlen(B) - 1] == C[0] ) {
      |                ^~~~~
      |                strlen
Language: C++

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

#pragma warning(disable:4996)

using namespace std;



int main()
{
	char a[100], b[100], c[100];
	while (~scanf("%s %s %s", a, b, c))
	{
		if (b[0] == a[strlen(a) - 1] && c[0] == b[strlen(b) - 1])
			printf("YES\n");
		else
			printf("NO\n");

	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:31: error: 'strlen' was not declared in this scope
   22 |                 if (b[0] == a[strlen(a) - 1] && c[0] == b[strlen(b) - 1])
      |                               ^~~~~~
a.cc:10:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    9 | #include <iostream>
  +++ |+#include <cstring>
   10 |
Language: C++

#include<stdio.h>
#include<string.h>
int main(){
	char s[35];
	gets(s);
	
	char *s1 = strtok(s, " ");
	char *s2 = strtok(NULL, " ");
	char *s3 = strtok(NULL, " ");
	
	int len1 = strlen(s1);
	int len2 = strlen(s2);
	
	if(s1[len1-1] == s2[0] && s2[len2-1] == s3[0]){
		printf("YES\n"); 
	}else{
		printf("NO\n");
	}
	return 0;
} 

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


#include "stdio.h"

int _tmain(int argc, _TCHAR* argv[])
{
	//まずは変数を作って初期化
	char A[40];
	char Aend=' ',Bfirst=' ',Bend=' ',Cfirst=' ';
	int counter=0;
	for (int i=0; i<40; i++) {
		A[i]=' ';
	}

	//gets()で取得
	gets(A);

	for (int i=0 ; i<40; i++) {
		//空白がどこのものなのかをチェックする
		if (A[i]==' ')
			counter++;
		
		//一個目の空白をチェックしたら、Aの最後とBの最初がわかる
		if ((A[i]==' ')&&(counter==1)) {
			Aend=A[i-1];
			Bfirst=A[i+1]; 
		}
			
		//ニ個目の空白をチェックしたら、Bの最後とCの最初がわかる
		if ((A[i]==' ')&&(counter==2)) {
			Bend=A[i-1];
			Cfirst=A[i+1]; 
		}
	}

	/*
	//テスト
	printf("%s\n",A);
	printf("%c\n",Aend);
	printf("%c\n",Bfirst);
	printf("%c\n",Bend);
	printf("%c\n",Cfirst);
	*/

	//Aの最後とBの最初、Bの最後とCの最初が同じならしりとりが成立
	if ((Aend==Bfirst)&&(Bend==Cfirst))
		printf("YES");
	else
		printf("NO");

	return 0;
}



Compiler output:
a.cc:4:22: error: '_TCHAR' has not been declared
    4 | int _tmain(int argc, _TCHAR* argv[])
      |                      ^~~~~~
a.cc: In function 'int _tmain(int, int**)':
a.cc:15:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   15 |         gets(A);
      |         ^~~~
      |         getw
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// ここにコードを挿入
		Scanner s = new Scanner(System.in);
		String[] str = s.nextLine().split(" ");
		String a = str[0];
		String b = str[1];
		String c = str[2];
		boolean ans = false;
		if(a.charAt(a.length() - 1) == b.charAt(0) && b.charAt(b.length() - 1) == c.charAt(0)) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}
	}

}import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// ここにコードを挿入
		Scanner s = new Scanner(System.in);
		String[] str = s.nextLine().split(" ");
		String a = str[0];
		String b = str[1];
		String c = str[2];
		boolean ans = false;
		if(a.charAt(a.length() - 1) == b.charAt(0) && b.charAt(b.length() - 1) == c.charAt(0)) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}
	}

}

Compiler output:
Main.java:20: error: class, interface, enum, or record expected
}import java.util.Scanner;
 ^
1 error
Language: C++

#include <iostream>
#include <cmath>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <numeric>
#include <limits>

using namespace std;

typedef long long ll;

int main()
{
    int n,t;
    scanf("%d%d",&n,&t);
    int a[200010];
    for(int i=0;i<n;i++)
        scanf("%d",&a[i]);
    sort(a,a+n);
    ll res=0;
    for(int i=0;i<n-1;i++)
    {
        if(a[i+1]-a[i]>t)
            res+=t;
        else res+=(a[i+1]-a[i]);
    }
    res+=t;
    cout<<res<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   21 |     sort(a,a+n);
      |     ^~~~
      |     sqrt
Language: C++

#include <stdio.h>
#include <conio.h>

int main(){
	char A[3][31];
	char B[11];
	char C[11];
	int c=0;
	scanf("%s",&A[0]);
	scanf("%s",&A[1]);
	scanf("%s",&A[2]);
	for(int j=0;j<2;j++){
	for(int i=0;i<36;i++){
		if(A[j][i]==0){
			if(A[j][i-1]==A[j+1][0]){
				c++;
				break;
			}
			printf("NO\n");
			return 0;
		}
	}
	}
	printf("YES\n");
	return 0;
}

Compiler output:
a.cc:2:10: fatal error: conio.h: No such file or directory
    2 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

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

int main()
{
    int MAX = 11;
    char a[MAX], b[MAX], c[MAX];
    scanf("%s", a);
    scanf("%s", b);
    scanf("%s", c);
    if(a[strlen(a)-1] != b[0] || b[strlen(b)-1] != c[0]) {
        printf("No");
    }
    else {
        printf("Yes");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: Java

import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int i=0;
String rtn="";
StringBuffer[] sb=new StringBuffer[3];
for(i=0;i<3;i++){sb[i]=(sc.next());}
rtn=(sb[0].reverse().substring(0,1)==sb[1].substring(0,1)&&sb[1].reverse().substring(0,1)==sb[2].reverse().substring(0,1))?"YES":"NO";
System.out.println(rtn);
}
}

Compiler output:
Main.java:8: error: incompatible types: String cannot be converted to StringBuffer
for(i=0;i<3;i++){sb[i]=(sc.next());}
                               ^
1 error
Language: C++

#include <iostream>
#include <cstring>

using namespace std;

string A, B, C;

void main(){

	cin >> A >> B >> C;
	
	if (A[A.length() - 1] == B[0] && B[B.length()-1] == C[0]) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
}

Compiler output:
a.cc:8:1: error: '::main' must return 'int'
    8 | void main(){
      | ^~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

string A, B, C;

void main(){

	cin >> A >> B >> C;
	
	if (A[A.length() - 1] == B[0] && B[B.length()-1] == C[0]) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
}

Compiler output:
a.cc:8:1: error: '::main' must return 'int'
    8 | void main(){
      | ^~~~
Language: C++

if __name__ == '__main__':
    a, b, c = input().split()
    ans = "YES" if a[-1] == b[0] and b[-1] == c[0] else "NO"
    print(ans)


Compiler output:
a.cc:1:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
    1 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: expected unqualified-id before 'if'
    1 | if __name__ == '__main__':
      | ^~
Language: C

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

typedef unsigned int uint;
#define BUF_SIZE (20)

int main(void)
{
	char strA[BUF_SIZE];
	char strB[BUF_SIZE];
	char strC[BUF_SIZE];
	int lengthA;
	int lengthB;
	int lengthC;
	char strA_End;
	char strB_Begin;
	char strB_End;
	char strC_Begin;

	scanf_s("%s %s %s", strA, BUF_SIZE, strB, BUF_SIZE, strC, BUF_SIZE);
	lengthA = strlen(strA);
	lengthB = strlen(strB);
	lengthC = strlen(strC);

	strA_End = strA[lengthA - 1];
	strB_Begin = strB[0];
	strB_End = strB[lengthB - 1];
	strC_Begin = strC[0];

	if((strA_End == strB_Begin) && (strB_End == strC_Begin)){
		printf("YES\n");
	} else {
		printf("NO\n");
	}
    
    return 0;
}


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

a,b,c = raw_input().split()
if a[-1] == b[0] and b[-1] == c[0]:
    print 'YES'
else:
    print 'NO'

Compiler output:
a.cc:3:11: warning: multi-character character constant [-Wmultichar]
    3 |     print 'YES'
      |           ^~~~~
a.cc:5:11: warning: multi-character character constant [-Wmultichar]
    5 |     print 'NO'
      |           ^~~~
a.cc:1:1: error: 'a' does not name a type
    1 | a,b,c = raw_input().split()
      | ^
Language: C++

stem;
using System.Linq;

class Program
{
	static void Main(string[] args)
	{
        string[] input = Console.ReadLine().Split(' ');

        if (input[0].Last() == input[1].First() && input[1].Last() == input[2].First())
        {
            Console.WriteLine("YES");
        }
        else
        {
            Console.WriteLine("NO");
        }
	}
}


Compiler output:
a.cc:1:1: error: 'stem' does not name a type
    1 | stem;
      | ^~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Linq;
      |       ^~~~~~
a.cc:6:26: error: 'string' has not been declared
    6 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:6:35: error: expected ',' or '...' before 'args'
    6 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:19:2: error: expected ';' after class definition
   19 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::Main(int*)':
a.cc:8:9: error: 'string' was not declared in this scope
    8 |         string[] input = Console.ReadLine().Split(' ');
      |         ^~~~~~
a.cc:8:16: error: expected primary-expression before ']' token
    8 |         string[] input = Console.ReadLine().Split(' ');
      |                ^
a.cc:10:13: error: 'input' was not declared in this scope; did you mean 'int'?
   10 |         if (input[0].Last() == input[1].First() && input[1].Last() == input[2].First())
      |             ^~~~~
      |             int
a.cc:12:13: error: 'Console' was not declared in this scope
   12 |             Console.WriteLine("YES");
      |             ^~~~~~~
a.cc:16:13: error: 'Console' was not declared in this scope
   16 |             Console.WriteLine("NO");
      |             ^~~~~~~
Language: C++

#include<iostream>
#include<string>
#include<cstdlib>
#include<algorithm>

using namespace std;

int main(){
	string a,b,c;
	cin >> a >> b >> c;
	if(a[size.a()-1] == b[0] && b[size.b()-1] == c[0])
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: overloaded function with no contextual type information
   11 |         if(a[size.a()-1] == b[0] && b[size.b()-1] == c[0])
      |                   ^
a.cc:11:44: error: overloaded function with no contextual type information
   11 |         if(a[size.a()-1] == b[0] && b[size.b()-1] == c[0])
      |                                            ^
Language: C++

#include <iostream>
#include <list>
#include <vector>
#include <string>
#include <cmath>

using namespace std;

int main()
{
	string a[3];

	cin >> a[0];
	cin >> a[1];
	cin >> a[2];

	if (a[0].back() == a[1].front() && a[1].back() == a[2].front())
	{
		cout << "YES";
		return;
	}

	cout << "NO";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   20 |                 return;
      |                 ^~~~~~
Language: C

#include <stdio.h>
#include <string.h>
#pragma warning(disable : 4996)

int main()
{
    int A, B, C;
    int i, ans = false;
    int sum = 0;

    scanf("%d %d %d", &A, &B, &C);

    for (i = 1; i <= 100; i++) {
        sum = A * i;

        if (C == sum % B) {
            ans = true;
            break;
        }
    }

    if (ans)
        printf("Yes");
    else
        printf("No");

    return 0;

}

Compiler output:
main.c: In function 'main':
main.c:8:18: error: 'false' undeclared (first use in this function)
    8 |     int i, ans = false;
      |                  ^~~~~
main.c:3:1: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include <string.h>
  +++ |+#include <stdbool.h>
    3 | #pragma warning(disable : 4996)
main.c:8:18: note: each undeclared identifier is reported only once for each function it appears in
    8 |     int i, ans = false;
      |                  ^~~~~
main.c:17:19: error: 'true' undeclared (first use in this function)
   17 |             ans = true;
      |                   ^~~~
main.c:17:19: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C++

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

int main(){
  int A,B,C;
  cin >> A >> B >> C;
  bool ok = false;
  for(int i = 1; i <= b; i++){
    if(A*i%B == C){
      ok = true;
    }
  }
  cout<<(ok ? "Yes" : "No") << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: 'b' was not declared in this scope
    8 |   for(int i = 1; i <= b; i++){
      |                       ^
Language: C++

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

int main(){
  int a,b,c;
  cin>>a>>b>>c;
  bool flag=false;
  for(int i=1;i<=b;i++){
    if((a*i%b)==c){
      flag=true;
      break;
    }
  }
  cout<<(flag?"Yes":"No")<<endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #includ; did you mean #include?
    1 | #includ<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>a>>b>>c;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #includ<bits/stdc++.h>
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout<<(flag?"Yes":"No")<<endl;
      |   ^~~~
a.cc:14:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:28: error: 'endl' was not declared in this scope
   14 |   cout<<(flag?"Yes":"No")<<endl;
      |                            ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #includ<bits/stdc++.h>
Language: C++

#include <iostream>
using namespace std;

int main(void){
  int a,b,c;
  cin>>a>>b>>c;
  
  if(a%B==0){
   cout<<"NO"<<endl; 
  }else{
   int i,ans;
   for(i=1;i<=b;i++){
     ans=a*i-c;
     if(ans%b==0){
      cout<<"YES"<<endl;
 	  break;
     }
   }
   if(i==b+1)cout<<"NO"<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'B' was not declared in this scope
    8 |   if(a%B==0){
      |        ^
Language: Java

package rensyuu;

import java.util.*;
import java.io.*;

public class Cmondai {

	public static void main(String[] args) throws IOException {
		
		// 入出力高速化 java.io.* とthrows IOExceptionを忘れずに
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String[] in = br.readLine().split(" ");
		int A = Integer.parseInt(in[0]);
		int B = Integer.parseInt(in[1]);
		int C = Integer.parseInt(in[2]);
		
		String ans = "NO";
		for(int i=1; i<=B; i++) {
			if(i*A%B == C)
				ans = "YES";
		}
				
		System.out.println(ans);	
	}
}


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

public class Main {

	public static void main(String[] args) throws IOException {
		
		// 入出力高速化 java.io.* とthrows IOExceptionを忘れずに
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String[] in = br.readLine().split(" ");
		int A = Integer.parseInt(in[0]);
		int B = Integer.parseInt(in[1]);
		int C = Integer.parseInt(in[2]);
		
		String ans = "NO";
		for(int i=1; i<A+B; i++) {
			if(i*A%B == C)
				ans = "YES";
		}
				
		System.out.println(ans);	
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
	public static void main(String[] args) throws IOException {
	                                              ^
  symbol:   class IOException
  location: class Main
Main.java:6: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		^
  symbol:   class BufferedReader
  location: class Main
Main.java:6: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:6: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                                           ^
  symbol:   class InputStreamReader
  location: class Main
4 errors
Language: C++

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

int main(){
  int64_t A,B,C;
  cin>>A>>B>>C;
  bool Q=false;
  for(int i=1;i<10000000){
    if((A*i)%B==C){
      Q=true;
      break;
    }
  }
  if(Q){
    cout<<"YES"<<endl;
  }
  else{
    cout<<"NO"<<endl;
  }
}
  
  
      

Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: expected ';' before ')' token
    8 |   for(int i=1;i<10000000){
      |                         ^
      |                         ;
Language: C++

int main()
{
    int aa,a,b,c,i=0,m;
    vector<int> box(110); //1<=A<=100より、余りは99通り
    cin >> aa >> b >> c;

    while (true)
    {
        i++;
        a = aa*i;
        m = a%b;
        if(m==c) {
            cout <<"YES"<< endl;
            return 0;
        }
        if(count(box.begin(),box.end(),m)) {
            cout << "NO" << endl;
            return 0;
        }
        box.push_back(m);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'vector' was not declared in this scope
    4 |     vector<int> box(110); //1<=A<=100より、余りは99通り
      |     ^~~~~~
a.cc:4:12: error: expected primary-expression before 'int'
    4 |     vector<int> box(110); //1<=A<=100より、余りは99通り
      |            ^~~
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> aa >> b >> c;
      |     ^~~
a.cc:13:13: error: 'cout' was not declared in this scope
   13 |             cout <<"YES"<< endl;
      |             ^~~~
a.cc:13:28: error: 'endl' was not declared in this scope
   13 |             cout <<"YES"<< endl;
      |                            ^~~~
a.cc:16:18: error: 'box' was not declared in this scope
   16 |         if(count(box.begin(),box.end(),m)) {
      |                  ^~~
a.cc:16:12: error: 'count' was not declared in this scope
   16 |         if(count(box.begin(),box.end(),m)) {
      |            ^~~~~
a.cc:17:13: error: 'cout' was not declared in this scope
   17 |             cout << "NO" << endl;
      |             ^~~~
a.cc:17:29: error: 'endl' was not declared in this scope
   17 |             cout << "NO" << endl;
      |                             ^~~~
a.cc:20:9: error: 'box' was not declared in this scope
   20 |         box.push_back(m);
      |         ^~~
Language: C++

#include <iostream>
using namespace std;

int main() {
  int a, b, c;
  cin >> a >> b >> c;

  int d = b / __gcd(a, b);
  // [0, d)があまりの周期
  int e = c / __gcd(b, c);
  if (e < d)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: '__gcd' was not declared in this scope
    8 |   int d = b / __gcd(a, b);
      |               ^~~~~
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using ll = long long;
using namespace std;

int main() {
    int a,b,c;
    cin >> a >> b >> c;
    
    if(c%gcd(a,b) != 0) {
        cout << "NO";
    }    
    
    else {
     cout << "YES";
    }

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

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

int prime(int A,int B){
  int ret=0;
  for(int i=2;i<=10;i++){
    if((A%i==0)&&(B%i==0)){
      ret=i;
    }
  }
  return ret;
}

int main() {
  int A,B,C;
  cin>>A>>B>>C;
  int factor=0;
  bool ans=true;
  while(ans){
    factor = prime(A,B)
    if(factor){
      A/=factor;
      B/=factor;
      if(C%factor==0)
        C/=factor;
      else
        ans=false;
    }
    else
      break;
  }
  if(ans)
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:24: error: expected ';' before 'if'
   20 |     factor = prime(A,B)
      |                        ^
      |                        ;
   21 |     if(factor){
      |     ~~                  
a.cc:29:5: error: 'else' without a previous 'if'
   29 |     else
      |     ^~~~
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args){
	Scanner scn = new Scanner(System.in);
	int a = scn.nextInt();
      int b = scn.nextInt();
      int c = scn.nextInt();
      int check = 0;
      long x = (long)(5*Math.pow(10,13))
      for(long i=0; i<x; ++i){
        if((a*i) % b == c){
          check =1;
        }
      }
      if(check==0){
        System.out.println("No");
      }
      if(check==1){
        System.out.println("Yes");
      }
	}
}

Compiler output:
Main.java:10: error: ';' expected
      long x = (long)(5*Math.pow(10,13))
                                        ^
1 error
Language: C++

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

int main(){
    int a,b,c;cin>>a>>b>>c;
    bool res=0;
    for(int i=1;i<b;i++){
        if(a*i%b==c)res=1;
    }
    if(res)cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
}

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

#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	B
# CreatedDate:  2020-06-26 15:04:28 +0900
# LastModified: 2020-06-26 15:10:43 +0900
#


import os
import sys
# import numpy as np
# import pandas as pd


def main():
    a, b, c = map(int, input().split())
    for i in range(100):
        if float((a*i-c)/b).is_integer():
            print("YES")
            return
    print("NO")



if __name__ == "__main__":
    main()


Compiler output:
main.c:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env python
      |  ^
main.c:2:3: error: invalid preprocessing directive #-
    2 | # -*- coding: utf-8 -*-
      |   ^
main.c:4:3: error: invalid preprocessing directive #FileName
    4 | # FileName:     B
      |   ^~~~~~~~
main.c:5:3: error: invalid preprocessing directive #CreatedDate
    5 | # CreatedDate:  2020-06-26 15:04:28 +0900
      |   ^~~~~~~~~~~
main.c:6:3: error: invalid preprocessing directive #LastModified
    6 | # LastModified: 2020-06-26 15:10:43 +0900
      |   ^~~~~~~~~~~~
main.c:10:1: error: unknown type name 'import'
   10 | import os
      | ^~~~~~
main.c:11:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'import'
   11 | import sys
      | ^~~~~~
main.c:11:1: error: unknown type name 'import'
main.c:12:3: warning: #import is a deprecated GCC extension [-Wdeprecated]
   12 | # import numpy as np
      |   ^~~~~~
main.c:12:10: error: #import expects "FILENAME" or <FILENAME>
   12 | # import numpy as np
      |          ^~~~~
main.c:13:3: warning: #import is a deprecated GCC extension [-Wdeprecated]
   13 | # import pandas as pd
      |   ^~~~~~
main.c:13:10: error: #import expects "FILENAME" or <FILENAME>
   13 | # import pandas as pd
      |          ^~~~~~
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;
using st=string;
using ch=char;
typedef pair<ll,ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<P> vP;
typedef vector<ch> vc;
typedef vector<vc> vvc;
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,n) FOR(i,0,n)
#define ROF(i,a,b) for(ll i=a;i>=b;i--)
#define per(i,a) ROF(i,a,0)
#define pb push_back
#define mp make_pair
const ll MOD=1000000007;
const ll MOD2=998244353;
const ld PI=acos(-1);
const ll INF=1e18;
st abc="abcdefghijklmnopqrstuvwxyz";
st ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
struct edge{ll to,cost;};

ll gcd(ll a,ll b){
  if(a%b==0){
    return b;
  }
  else{
    return gcd(b,a%b);
  }
}

int main() {
  ll a,b,c;
  cin >> a >>> b >> c;
  a=gcd(a,b);
  if(c%a==0){
    cout << "YES" << endl;
  }
  else{
    cout << "NO" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:14: error: expected primary-expression before '>' token
   39 |   cin >> a >>> b >> c;
      |              ^
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;
using st=string;
using ch=char;
typedef pair<ll,ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<P> vP;
typedef vector<ch> vc;
typedef vector<vc> vvc;
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,n) FOR(i,0,n)
#define ROF(i,a,b) for(ll i=a;i>=b;i--)
#define per(i,a) ROF(i,a,0)
#define pb push_back
#define mp make_pair
const ll MOD=1000000007;
const ll MOD2=998244353;
const ld PI=acos(-1);
const ll INF=1e18;
st abc="abcdefghijklmnopqrstuvwxyz";
st ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
struct edge{ll to,cost;};

ll gcd(ll a,ll b){
  if(a%b==0){
    return b;
  }
  else{
    return gcd(b,a%c);
  }
}

int main() {
  ll a,b,c;
  cin >> a >>> b >> c;
  a=gcd(a,b);
  if(c%a==0){
    cout << "YES" << endl;
  }
  else{
    cout << "NO" << endl;
  }
}

Compiler output:
a.cc: In function 'll gcd(ll, ll)':
a.cc:33:20: error: 'c' was not declared in this scope
   33 |     return gcd(b,a%c);
      |                    ^
a.cc: In function 'int main()':
a.cc:39:14: error: expected primary-expression before '>' token
   39 |   cin >> a >>> b >> c;
      |              ^
Language: C++

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

int main() {
  int A,B,C;
  cin >> A >> B >> C;
  for(int i=1;i<B+1){
    if((A*i)%B==C){
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: expected ';' before ')' token
    7 |   for(int i=1;i<B+1){
      |                    ^
      |                    ;