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

import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
  int N = sc.nextInt();
  int ans = 0;
  String[] s = new String[N];
  for(int i = 0;i<N;i++){
    s[i] = sc.next();
    if(s[i] == 'Y'){ans += 1;}
  }
  if(ans == 0){System.out.println("Three");}
  else{System.out.println("Four");}
}
}
  

Compiler output:
Main.java:10: error: bad operand types for binary operator '=='
    if(s[i] == 'Y'){ans += 1;}
            ^
  first type:  String
  second type: char
1 error
Language: C++

#include<iostream>
using namespace std;
int main()
{
int n;char s[1000];
cin>>n;
for(int i=0;i<n;i++)
cin>>s[i];
int ans=0,a=0,b=0,c=0,d=0;
for(int i=0;i<n;i++)
{
if(s[i]=='P'&&a==0){
    ans++;
    a=1;
    }
    if(s[i]=='W'&&b==0){
    ans++;
    b=1;
    }
    if(s[i]=='G'&&c==0){
    ans++;
    c=1;
    }
    if(s[i]=='Y'&&d==0){
    ans++;
    d=1;
    }
    }
    if(ans==1)
    {
    cout<<"One";
    }
    elsle if(ans==2)cout<<"Two";
    else if(ans==3)cout<<"Three";
    else cout<<"Four";
    return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:33:5: error: 'elsle' was not declared in this scope
   33 |     elsle if(ans==2)cout<<"Two";
      |     ^~~~~
a.cc:34:5: error: 'else' without a previous 'if'
   34 |     else if(ans==3)cout<<"Three";
      |     ^~~~
Language: C++

if(s[i]=='P'&&a==0){
    ans++;
    a=1;
    }
    if(s[i]=='W'&&b==0){
    ans++;
    b=1;
    }
    if(s[i]=='G'&&c==0){
    ans++;
    c=1;
    }
    if(s[i]=='Y'&&d==0){
    ans++;
    d=1;
    }
    }

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'if'
    1 | if(s[i]=='P'&&a==0){
      | ^~
a.cc:5:5: error: expected unqualified-id before 'if'
    5 |     if(s[i]=='W'&&b==0){
      |     ^~
a.cc:9:5: error: expected unqualified-id before 'if'
    9 |     if(s[i]=='G'&&c==0){
      |     ^~
a.cc:13:5: error: expected unqualified-id before 'if'
   13 |     if(s[i]=='Y'&&d==0){
      |     ^~
a.cc:17:5: error: expected declaration before '}' token
   17 |     }
      |     ^
Language: C

#include<stdio.h>
int main()
{
    int N;
    scanf("%d",&N);
    char c;
    bool flag=false;
    for(int i=0; i<N; i++)
    {
        scanf("%c",&c);
        if(c=='Y')  flag=true;
    }
    if(flag)  printf("Four");
    else   printf("Three");
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:5: error: unknown type name 'bool'
    7 |     bool flag=false;
      |     ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | int main()
main.c:7:15: error: 'false' undeclared (first use in this function)
    7 |     bool flag=false;
      |               ^~~~~
main.c:7:15: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:7:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:26: error: 'true' undeclared (first use in this function)
   11 |         if(c=='Y')  flag=true;
      |                          ^~~~
main.c:11:26: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include<stdio.h>


int main()
{
    int N;
    scanf("%d",&N);
    char c;
    bool flag=false;
    for(int i=0; i<N; i++)
    {
        scanf("%c",&c);
        if(c=='Y')flag=true;
    }
    if(flag)puts("Four");
    else puts("Three");
    return 0;
}

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

#include<include>


int main()
{
    int N;
    scanf("%d",&N);
    char c;
    bool flag=false;
    for(int i=0; i<N; i++)
    {
        scanf("%c",&c);
        if(c=='Y')flag=true;
    }
    if(flag)puts("Four");
    else puts("Three");
    return 0;
}

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

# include <iostream>
int N ;
char c ;
int main ()
{
scanf ("% d " ,& N );
bool flag = false ;
for ( int i =0; i < N ; i ++)
{
scanf ("% c " ,& c );
if ( c == ’Y ’) flag = true ;
}
if ( flag ) puts (" Four ");
else puts (" Three ");
}

Compiler output:
a.cc:11:11: error: extended character ’ is not valid in an identifier
   11 | if ( c == ’Y ’) flag = true ;
      |           ^
a.cc:11:14: error: extended character ’ is not valid in an identifier
   11 | if ( c == ’Y ’) flag = true ;
      |              ^
a.cc: In function 'int main()':
a.cc:11:11: error: '\U00002019Y' was not declared in this scope
   11 | if ( c == ’Y ’) flag = true ;
      |           ^~
a.cc:11:13: error: expected ')' before '\U00002019'
   11 | if ( c == ’Y ’) flag = true ;
      |    ~        ^~
      |             )
Language: C++

# include < cstdio >
int N ;
char c ;
int main ()
{
scanf ("% d " ,& N );
bool flag = false ;
for ( int i =0; i < N ; i ++)
{
scanf ("% c " ,& c );
if ( c == ’Y ’) flag = true ;
}
if ( flag ) puts (" Four ");
else puts (" Three ");
}

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<int(n);++i)
#define rep1(i,n) for(int i=1;i<=int(n);++i)
#define all(a) a.begin(),a.end()
#define lb(s,x) lower_bound(all(s),x)-s.begin()
#define debug(x) cout<<#x<<": "<<x<<endl
#define INF 1e9
typedef long long ll;

int main(void){
    int n;
    cin>>n;
    set<string> st;

    rep(i,n){
        string s;
        cin>>s;
        st.insert(s);
    }
    cout<<(s.size()==3 ? "Three" : "Four")<<endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:21:12: error: 's' was not declared in this scope; did you mean 'st'?
   21 |     cout<<(s.size()==3 ? "Three" : "Four")<<endl;
      |            ^
      |            st
Language: C++

#include <bits/stdc++.h>

using namespace std;

int n;
char s[105]

int main()
{
    cin >> n;
    for (int i = 1; i <= n; i++)
    {
        cin >> s[i];
        if (s[i]=='Y')
        {
            cout << "Four";
            return 0;
        }
    }
    cout << "Three";
}

Compiler output:
a.cc:8:1: error: expected initializer before 'int'
    8 | int main()
      | ^~~
Language: C++

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

int main(void)
{
 int N;
  std::cin >> N;
  std::vector<std::string> S;
  for(int i=0;i<N;i++)
  {
  	string s_x;
    std::cin >> s_x;
    S.push_back(s_x);
  }
  
  int flag=0;
  for(int i=0;i<N;i++)
  {
    if(S[i] == "Y")
    {
      flag = 1;
    }
  }
  
  if(flag == 1)
  {
    std::cout << "Four" << std::endl;
  }
  else 
  {
    std::cout << "Three" << std::endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'string' was not declared in this scope
   12 |         string s_x;
      |         ^~~~~~
a.cc:12:9: 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:13:17: error: 's_x' was not declared in this scope
   13 |     std::cin >> s_x;
      |                 ^~~
Language: C++

#include <cstdio>
using namespace std;

int main(){
    int n;
    bool a[4] = {false, false, false, false};
    char str[300];
    scanf("%d", &n);
    getchar();
    gets(str);
    for (int i = 0; i < 2 * n - 1; i++){
        switch(str[i]){
            case ' ': break;
            case 'G': a[0] = true; break;
            case 'W': a[1] = true; break;
            case 'P': a[2] = true; break;
            case 'Y': a[3] = true; break;
        }
    }
    int cnt = 0;
    for (int i = 0; i < 4; i++){
        if (a[i]) cnt++;
        // printf("%d ", a[i]);
    }
    // printf("\n%d\n", cnt);
    (cnt == 3) ? printf("Three\n") : printf("Four\n");
    return 0;
}


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

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

int main()
{
    int n;
    cin >> n;
    int p, w, g, y;
    p = w = g = y = 0;
    for (int i = 0; i < n; i++) {
        char c;
        cin >> c;
        if (c == 'P') p = 1;
        if (c == 'W') w = 1;
        if (c == 'G') g = 1;
        if (c == 'Y') y = 1;
    }
    if (p + w + g + y == 3) {
        cout << "Three" << endl;
    } else i (p + w + g + y == 4) {
        cout << "Four" << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:12: error: 'i' was not declared in this scope
   23 |     } else i (p + w + g + y == 4) {
      |            ^
Language: C++

#include <iostream>
#include <cstring>
#include <cstdio>
#include <algorithm>
using namespace std;
char a[100010];
int main()
{
    int n;
    string s;
    getchar();
    cin>>n;
    gets(a);
    int k=0;
    int len=strlen(a);
    int ans1=0,ans2=0,ans3=0,ans4=0;
    for(int i=0;i<len;i++)
    {
        if(a[i]=='Y') ans1++;
        else if(a[i]=='G') ans2++;
        else if(a[i]=='W') ans3++;
        else if(a[i]=='P') ans4++;
    }
//    cout<<ans4<<endl;
    if(ans1) cout<<"Four"<<endl;
    else cout<<"Three"<<endl;
}


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

#include <bits/stdc++.h>
using namespace std;
char a[100010];
int main()
{
    int n;
    string s;
    getchar();
    cin>>n;
    gets(a);
    int k=0;
    int len=strlen(a);
    int ans1=0,ans2=0,ans3=0,ans4=0;
    for(int i=0;i<len;i++)
    {
        if(a[i]=='Y') ans1++;
        else if(a[i]=='G') ans2++;
        else if(a[i]=='W') ans3++;
        else if(a[i]=='P') ans4++;
    }
//    cout<<ans4<<endl;
    if(ans1) cout<<"Four"<<endl;
    else cout<<"Three"<<endl;
}


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

#include <iostream>
using namespace std;
int main ( )
{
	int n,p;
	int s[4];
	cin>>n;
	char a[n];
	for(int i=1;i<=n;i++)
{
		scanf ("%s",a[i])
		if(a[i]="G")s[1]++;
		if(a[i]="W")s[2]++;
		if(a[i]="Y")s[3]++;	
		if(a[i]="P")s[4]++;
	}
	for(int i=1;i<=4;i++)
	{
		if (s[i]!=0)p++;
		
	}
   if(p=3)cout<<"Three";
   else
   cout<<"Four";
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:34: error: expected ';' before 'if'
   11 |                 scanf ("%s",a[i])
      |                                  ^
      |                                  ;
   12 |                 if(a[i]="G")s[1]++;
      |                 ~~                
a.cc:13:25: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   13 |                 if(a[i]="W")s[2]++;
      |                         ^~~
      |                         |
      |                         const char*
a.cc:14:25: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   14 |                 if(a[i]="Y")s[3]++;
      |                         ^~~
      |                         |
      |                         const char*
a.cc:15:25: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   15 |                 if(a[i]="P")s[4]++;
      |                         ^~~
      |                         |
      |                         const char*
Language: C

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

#define COL 'Y'

int main(void) {
	int n, i;
	char c;
	bool four_flag = false;

	scanf("%d", &n);

	for (i = 0; i < n; i++) {
		scanf("%c", &c);
		if (c == COL) four_flag = true;
	}

	if (four_flag) puts("Four");
	else puts("Three");

	return 0;
}

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

#include <iostream>

using namespace std;

int main(){
    int n;
    cin >> n;
    bool flag = false;
    for(int i=0;i<n;i++){
        char c;
        cin >> c;
        if(c == 'Y')
            flag = true;
    }
    cout << (flag?"Four":"Three")
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:34: error: expected ';' before 'return'
   15 |     cout << (flag?"Four":"Three")
      |                                  ^
      |                                  ;
   16 |     return 0;
      |     ~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int a[128]={0}
	int n;
	cin>>n;
	char b;
	for(int i=1;i<=n;i++)
	{
		cin>>b;
		if(a[b]!=1)
		a[b]++;
		s++;
	}
	if(s==3)
	cout<<"Three";
	else
	cout<<"Four";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected ',' or ';' before 'int'
    6 |         int n;
      |         ^~~
a.cc:7:14: error: 'n' was not declared in this scope
    7 |         cin>>n;
      |              ^
a.cc:14:17: error: 's' was not declared in this scope
   14 |                 s++;
      |                 ^
a.cc:16:12: error: 's' was not declared in this scope
   16 |         if(s==3)
      |            ^
Language: C++

#include <stdio.h>

int main(){
	int a;
	char d;
	int i;
	int countp = 0;
	int countw = 0;
	int countg = 0;
	int county = 0;
	scanf("%d",%a);
	for(i = 0;i < d;i++){
	scanf("%c",&d);
	if(d == 'P'){
	countp += 1;
	if(countp > 1)
	countp = 1;
	}
	if(d == 'W'){
	countw += 1;
	if(countw > 1)
	countw = 1;
	}
	if(d == 'G'){
	countg += 1;
	if(countg > 1)
	countg = 1;
	}
	if(d == 'Y'){
	county += 1;
	if(county > 1)
	county = 1;
	}	
	}
	if(countp + countw + countg + county == 4)
	printf("Four");
	else
	printf("Three");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: expected primary-expression before '%' token
   11 |         scanf("%d",%a);
      |                    ^
Language: C++

#include <stdio.h>

int main(){
  char flg = 0;
  int n, i;
  for (i = 0; i < 4; i++) flg[i] = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++){
    char x;
    scanf("%c", &x);
    if ( x == 'Y') flg = 1;
  }
  if (flg)
  printf("Four\n");
  else printf("Three\n");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:30: error: invalid types 'char[int]' for array subscript
    6 |   for (i = 0; i < 4; i++) flg[i] = 0;
      |                              ^
Language: C

/*
 AtCoder XXX 000
 */
 
#include <stdio.h>

int main(void){
   
    int arare=3;
    char c;
    int i;
    int n;
	
    scanf("%d",&n);
    
    for(i=0; i<n; i++){
      scanf("%c",c); 
      if(c ="Y") arare=4;
    }
    
    arare==3 ? printf("Three"); : printf("Four");
  
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:12: error: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
   18 |       if(c ="Y") arare=4;
      |            ^
main.c:21:31: error: expected ':' before ';' token
   21 |     arare==3 ? printf("Three"); : printf("Four");
      |                               ^
      |                               :
main.c:21:33: error: expected expression before ':' token
   21 |     arare==3 ? printf("Three"); : printf("Four");
      |                                 ^
Language: C++

#include<iostream>
using namespace std;



int main()
{
  int arare[100]
  for(int i=0;i<100;i++){
    cin>>arare[i];
  }
  for(int i=0;i<100;i++){
    if(i=="Y"){cout<<"Four"<<endl;}
    else{cout<<"Three"<<endl;}
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected initializer before 'for'
    9 |   for(int i=0;i<100;i++){
      |   ^~~
a.cc:9:15: error: 'i' was not declared in this scope
    9 |   for(int i=0;i<100;i++){
      |               ^
a.cc:13:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     if(i=="Y"){cout<<"Four"<<endl;}
      |        ~^~~~~
Language: C++

#include<iostream>
using namespace std;

int arare[100]

int main()
{
  for(int i=0;i<100;i++){
    cin>>arare[i];
  }
  for(int i=0;i<100;i++){
    if(i=="Y"){cout<<"Four"<<endl;}
    else{cout<<"Three"<<endl;}
  }
}


Compiler output:
a.cc:6:1: error: expected initializer before 'int'
    6 | int main()
      | ^~~
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int n;
  cin>>n;
  string s;
  cin>>s;
  int a=0;
  while(1){
    if(s==Y){break;cout<<"Four"<<endl;}
    a++;
    if(a==n){break;cout<<"Three"<<endl;}
  }
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'Y' was not declared in this scope
   12 |     if(s==Y){break;cout<<"Four"<<endl;}
      |           ^
Language: C++

#include<stdio.h>
int main()
{
	char a[100],s1[10]="three",s2[10]="four";
	int flag=1;
	int i,n;
	scanf("%d",&n);
	getchar();
	gets(a);
	for(i=0;i<n;i++)
	{
	if(a[i]=='Y')
	flag=0;
	}
	if(flag==1) puts(s1);
	else if(flag==0) puts(s2);
}


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

#include <iostream>
#include <array>

using namespace std;

int main() {
    int n;
    cin >> n;
    array<char, n> s;
    cin >> s;
    int a;

    for (int i; i < n; i++) {
        if (s[i] == Y) {
            a++;
        } else {
            a = 0;
        }
    }
    if (a != 0) { 
        cout << "Four";
    } else {
        cout << "Three";
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: the value of 'n' is not usable in a constant expression
    9 |     array<char, n> s;
      |                  ^
a.cc:7:9: note: 'int n' is not const
    7 |     int n;
      |         ^
a.cc:9:18: note: in template argument for type 'long unsigned int'
    9 |     array<char, n> s;
      |                  ^
a.cc:14:14: error: invalid types 'int[int]' for array subscript
   14 |         if (s[i] == Y) {
      |              ^
a.cc:14:21: error: 'Y' was not declared in this scope
   14 |         if (s[i] == Y) {
      |                     ^
Language: C++

#include<iostream>
using namespace std; 

int a;
char b;
bool flag=false;
int main()
{

scanf("%d",&a);
for(int i=0; i<a; i++) 
{scanf("%c",&b);
if(b=="Y")   flag=true;
}

if (flag)puts("Four");
else puts("Three");
return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 | if(b=="Y")   flag=true;
      |    ~^~~~~
Language: C++

#include<cstdio>

 int a;
char b;
bool flag=false;
int main()
{

cin >> a;
for(int i=0; i<a; i++) 
{scanf("%c",&b);
if(b=="Y")   flag=true;
}

if (flag)puts("Four");
else puts("Three");
return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: 'cin' was not declared in this scope
    9 | cin >> a;
      | ^~~
a.cc:12:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 | if(b=="Y")   flag=true;
      |    ~^~~~~
a.cc:17:10: error: expected '}' at end of input
   17 | return 0;
      |          ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: C++

#include<iostream>
using namespace std;
int main()
{ 
int a;
char b;

cin >> a;
for(int i=0; i<a; i++) 
{cin >> b;
if(b==Y)   cout <<"four"<< endl;
}

cout <<"three"<< endl;
return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: 'Y' was not declared in this scope
   11 | if(b==Y)   cout <<"four"<< endl;
      |       ^
Language: C++

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

typedef long long ll;
typedef pair<ll,ll> P;

const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const ll INF = 1LL<<29;
const ll mod = 1e9+7;

#define rep(i, a, b) for(ll (i) = (a); (i) < (b);++i)

int main()
{
  int N;
  cin >> N;
  char S[N];
  rep(i, 0, N){
    cin >> S[i];
    if (S[i] == Y){
      cout << "Four" << endl;
      return 0;
    }
  }
  cout << "Three" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:17: error: 'Y' was not declared in this scope
   21 |     if (S[i] == Y){
      |                 ^
Language: C++

 
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vi=vector<int>;
using vvi=vector<vi>;
using vs=vector<string>;
using msi=map<string,int>;
using mii=map<int,int>;
using psi=pair<string,int>;
using pii=pair<int,int>;
using vlai=valarray<int>;
#define rep(i,n) for(int i=0;i<n;i++)
#define range(i,s,n) for(int i=s;i<n;i++)
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define fs first
#define sc second
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define INF 1e9
#define EPS 1e-9
#define MOD ((ll)1e9+7)
void get(){}template<class H,class...T>void get(H&h,T&...t){cin>>h;get(t...);}
template<class T>void geti(T&a){for(auto&_:a)cin>>_;}
template<class T>void getii(T&a){for(auto&_:a)geti(_);}
void put(string d){}template<class H,class...T>void put(string d,H&h,T&...t){cout<<h;if(sizeof...(t))cout<<d;put(d,t...);}
template<class T>void puti(T&a,string d=" "){bool f=1;for(auto&_:a)cout<<(exchange(f,0)?"":d)<<_;cout<<endl;}
template<class T>void putii(T&a,string d=" "){for(auto&_:a)puti(_,d);}
#define dcl(...) ll __VA_ARGS__;get(__VA_ARGS__)
#define dclt(t,...) t __VA_ARGS__;get(__VA_ARGS__)
template<class F,class S>void add(map<F,S>&mp,F f,S s){if(mp.find(f)==mp.end())mp[f]=F();mp[f]+=s;}

int main(){
    cin>>n;
    rep(i,n){
        string s;
        cin>>s;
        if(s=="Y"){
            cout<<"Four"<<endl;
            return 0;
        }
    }
    cout<<"Yes"<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:10: error: 'n' was not declared in this scope; did you mean 'yn'?
   36 |     cin>>n;
      |          ^
      |          yn
Language: C

#include <stdio.h>
int N;
char c;
int main()
{
	scanf("%d", &N);
	bool flag = false;
	for (int i = 0; i < N; i++)
	{
		scanf("%c", &c);
		if (c == 'Y') flag = true;
	}
	if (flag) puts(" Four ");
	else puts(" Three ");
}


Compiler output:
main.c: In function 'main':
main.c:7:9: error: unknown type name 'bool'
    7 |         bool flag = false;
      |         ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | int N;
main.c:7:21: error: 'false' undeclared (first use in this function)
    7 |         bool flag = false;
      |                     ^~~~~
main.c:7:21: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:7:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:38: error: 'true' undeclared (first use in this function)
   11 |                 if (c == 'Y') flag = true;
      |                                      ^~~~
main.c:11:38: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include <stdio.h>
int N;
char c;
int main()
{
	scanf("% d ", &N);
	bool flag = false;
	for (int i = 0; i < N; i++)
	{
		scanf("% c ", &c);
		if (c == 'Y') flag = true;
	}
	if (flag) puts(" Four ");
	else puts(" Three ");
}


Compiler output:
main.c: In function 'main':
main.c:7:9: error: unknown type name 'bool'
    7 |         bool flag = false;
      |         ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | int N;
main.c:7:21: error: 'false' undeclared (first use in this function)
    7 |         bool flag = false;
      |                     ^~~~~
main.c:7:21: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:7:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:38: error: 'true' undeclared (first use in this function)
   11 |                 if (c == 'Y') flag = true;
      |                                      ^~~~
main.c:11:38: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C++

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

int main(){
  int n;
  char ch;
  cin>>n;
  for(int i = 0; i < n; i++){
    cin>>ch;
    if(ch = 'Y'){
      cout<<"Four"<<"\n";
      return 0;
    }
  }
  cout<<"Three"<<"\n";
}


Compiler output:
a.cc:1:9: fatal error: iosream: No such file or directory
    1 | #include<iosream>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#include<cstdio>
using namespace std;

int main(){
  int n;
  char ch;
  cin>>n;
  for(int i = 0; i < n; i++){
    cin>>ch;
    if(ch = 'Y'){
      cout<<"Four"<<"\n";
      return 0;
    }
  }
  cout<<"Three"<<"\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin>>n;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<cstdio>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:11:7: error: 'cout' was not declared in this scope
   11 |       cout<<"Four"<<"\n";
      |       ^~~~
a.cc:11:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:3: error: 'cout' was not declared in this scope
   15 |   cout<<"Three"<<"\n";
      |   ^~~~
a.cc:15:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<cstdio>
using namespace std;
int N;
char c;
int main(){
  int N;
  cin >> N;
  for(int i = 0; i < N; i++){
    string s;
    cin >> s;
    if(s == 'Y'){
      cout<< "Four" <<endl;
    return 0;
    }
  }
  cout<<"Three"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> N;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<cstdio>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:9:5: error: 'string' was not declared in this scope
    9 |     string s;
      |     ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    1 | #include<cstdio>
  +++ |+#include <string>
    2 | using namespace std;
a.cc:10:12: error: 's' was not declared in this scope
   10 |     cin >> s;
      |            ^
a.cc:12:7: error: 'cout' was not declared in this scope
   12 |       cout<< "Four" <<endl;
      |       ^~~~
a.cc:12:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:23: error: 'endl' was not declared in this scope
   12 |       cout<< "Four" <<endl;
      |                       ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<cstdio>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout<<"Three"<<endl;
      |   ^~~~
a.cc:16:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:18: error: 'endl' was not declared in this scope
   16 |   cout<<"Three"<<endl;
      |                  ^~~~
a.cc:16:18: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<iostream>
using namespace std;
int n,a[99],i;
int main void(){
  cin << n;
  for(i=0;i<=n;i++){
    cin << a[i];
    if (a[i]=Y ){cout>>four;
    break;}
    if i=n cout<< three;
  }
  return 0;
}

Compiler output:
a.cc:4:10: error: expected initializer before 'void'
    4 | int main void(){
      |          ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a[26]={0};
int main()
{
	int n;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		char c
		cin>>c;
		a[c-65]=1;
	}
	int s=0;
	for(int i=0;i<26;i++)
	{
		s+=a[i];
	}
	if(s==3)
	{
		cout<<"Three";
	}
	else
	{
		cout<<"Four";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: expected initializer before 'cin'
   11 |                 cin>>c;
      |                 ^~~
a.cc:12:19: error: 'c' was not declared in this scope
   12 |                 a[c-65]=1;
      |                   ^
Language: C++

#include<bits/stdc++.h>
#define ll long long
#define fi first
#define se second
#define show(x) cerr<<#x<<"="<<x<<"\n"
using namespace std;

int n,m;
string s;
set<char> st;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.precision(10);
    cout<<fixed;
#ifdef LOCAL_DEFINE
    FILE *stream1;
    //FILE *stream2;
    stream1=freopen("in","r",stdin);
    //stream2=freopen("out","w",stdout);
    if(stream1==NULL)return 0;
    //if(stream2==NULL)return 0;
#endif
    cin>>n;
    for(int i=0;i<n;i++){
      char a;cin>>a;
      st.insert(a);
    }
    if(st.size==3)cout<<"Three"<<endl;
    else cout<<"Four"<<endl;
#ifdef LOCAL_DEFINE
    cerr<<"Time elapsed: "<<1.0*clock()/CLOCKS_PER_SEC<<"s.\n";
    fclose(stream1);
    //fclose(stream2);
#endif
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:11: error: invalid use of member function 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::size() const [with _Key = char; _Compare = std::less<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   30 |     if(st.size==3)cout<<"Three"<<endl;
      |        ~~~^~~~
      |               ()
Language: C

#include<stdio.h>
#include <string.h>
int main()
{
	int a,i,j;
	j=0;
	scanf("%d",&a);
	char s;
	for(i=0;i<2*a+1;i++){
		scanf("%c",s);
		if(s=='Y')==0){
		j=j+1;
		}
	}
	if(j>0){
	printf("Four\n");}
	else{
	printf("Three\n");}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:27: error: expected expression before '==' token
   11 |                 if(s=='Y')==0){
      |                           ^~
main.c:11:30: error: expected statement before ')' token
   11 |                 if(s=='Y')==0){
      |                              ^
Language: C

#include<stdio.h>
int main()
{
	int n,i,x;
	char s[];
	char t[];
	scanf("%d",&n);
	scanf("%s",&s);
	for (i=0;i<n+1;i++){
		char t[2]={'\0'};
		strncpy(t,s+i,1);
		if (t="Y"){
			x=1;
			break;
		}
		else{
			x=0;
		}
	}
	if(x==0){
		printf("Three\n");
	}
	else{
		printf("Four\n");
	}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:14: error: array size missing in 's'
    5 |         char s[];
      |              ^
main.c:6:14: error: array size missing in 't'
    6 |         char t[];
      |              ^
main.c:11:17: error: implicit declaration of function 'strncpy' [-Wimplicit-function-declaration]
   11 |                 strncpy(t,s+i,1);
      |                 ^~~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strncpy'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | int main()
main.c:11:17: warning: incompatible implicit declaration of built-in function 'strncpy' [-Wbuiltin-declaration-mismatch]
   11 |                 strncpy(t,s+i,1);
      |                 ^~~~~~~
main.c:11:17: note: include '<string.h>' or provide a declaration of 'strncpy'
main.c:12:22: error: assignment to expression with array type
   12 |                 if (t="Y"){
      |                      ^
Language: C

#include<stdio.h>
#include <string.h>
int main()
{
	int n,i,x;
	char s[100];
	char t[2];
	scanf("%d",&n);
	scanf("%s",&s);
	for (i=0;i<n+1;i++){
		char t[2]={'\0'};
		strncpy(t,s+i,1);
		if (t="Y"){
			x=1;
			break;
		}
		else{
			x=0;
		}
	}
	if(x==0){
		printf("Three\n");
	}
	else{
		printf("Four\n");
	}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:22: error: assignment to expression with array type
   13 |                 if (t="Y"){
      |                      ^
Language: C

#include<stdio.h>
int main()
{
	int a,i,j;
	j=0;
	scanf("%d",&a);
	char s[2*a+1];
	scanf("%c",s);
	for(i=0;i<2*a+1;i++){
		if(strcmp(s[i],"Y")=0){
		j=j+1;
		}
	}
	if(j>0){
	printf("Four\n");}
	else{
	printf("Three\n");}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:20: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   10 |                 if(strcmp(s[i],"Y")=0){
      |                    ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | int main()
main.c:10:28: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   10 |                 if(strcmp(s[i],"Y")=0){
      |                           ~^~~
      |                            |
      |                            char
main.c:10:28: note: expected 'const char *' but argument is of type 'char'
main.c:10:36: error: lvalue required as left operand of assignment
   10 |                 if(strcmp(s[i],"Y")=0){
      |                                    ^
Language: C++

#include <iostream>
using namespace std;

int main(){
    int N, result;
    int P=0,W=0,G=0,Y=0;
    cin>>N;
    char **S = new string*[N];

    for(int i;i<=N;i++){
        cin>>S[i];
        if(S[i]=="P") P=1; 
        if(S[i]=="W") W=1; 
        if(S[i]=="G") G=1; 
        if(S[i]=="Y") Y=1; 
    }

    result=P+W+G+Y;

    if(result==3){
    cout<<'Three'<<endl;
    }
    if(result==4){
    cout<<'Four'<<endl;
    }

    return 0;
}

Compiler output:
a.cc:21:11: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   21 |     cout<<'Three'<<endl;
      |           ^~~~~~~
a.cc:24:11: warning: multi-character character constant [-Wmultichar]
   24 |     cout<<'Four'<<endl;
      |           ^~~~~~
a.cc: In function 'int main()':
a.cc:8:29: error: cannot convert 'std::string**' {aka 'std::__cxx11::basic_string<char>**'} to 'char**' in initialization
    8 |     char **S = new string*[N];
      |                             ^
      |                             |
      |                             std::string** {aka std::__cxx11::basic_string<char>**}
Language: C

#include<stdio.h>
#include <string.h>
int main()
{
	int n,i,x;
	char t[2];
	scanf("%d",&n);

	char s[n];
	scanf("%s",&s);
	for (i=0;i<n+1;i++){
		strncpy( t, str+i, 1 );
		if (t=="Y"){
			x=1;
			break;
		}
		else{
			x=0;
		}
	}
	if(x==0){
		printf("Three\n");
	}
	else{
		printf("Four\n");
	}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:29: error: 'str' undeclared (first use in this function)
   12 |                 strncpy( t, str+i, 1 );
      |                             ^~~
main.c:12:29: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include <string.h>
int main()
{
	int n,i,t,x;
	char t[2];
	scanf("%d",&n);

	char s[n];
	scanf("%s",&s);
	for (i=0;i<n+1;i++){
		strncpy( t, str+i, 1 );
		if (t=="Y"){
			x=1;
			break;
		}
		else{
			x=0;
		}
	}
	if(x==0){
		printf("Three\n");
	}
	else{
		printf("Four\n");
	}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:14: error: conflicting types for 't'; have 'char[2]'
    6 |         char t[2];
      |              ^
main.c:5:17: note: previous declaration of 't' with type 'int'
    5 |         int n,i,t,x;
      |                 ^
main.c:12:29: error: 'str' undeclared (first use in this function)
   12 |                 strncpy( t, str+i, 1 );
      |                             ^~~
main.c:12:29: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
using namespace std;
char a[110];
int n;
int main()
{
	cin>>n;
	for (int i=0;i<n;i++)
	{
		cin>>a[i];
	}
	sort(a,a+n);
	int ans=1;
	for (int i=1;i<n;i++)
	{
		if (a[i]!=a[i-1])
			ans++;
	}
	if (ans==4)
		cout<<"Four"<<endl;
	else
		cout<<"Three"<<endl;
	system("pause");
    return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n,i,a,b,c,d;
	char c;
	a=b=c=d=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%c",&c);
		if(c=='P')
			a++;
		if(c=='W')
			b++;
		if(c=='G')
			c++;
		if(c=='Y')
			d++;
	}
	if(a>0&&b>0&&c>0&&d>0)
		printf("Four");
	else
		printf("Three");
	return 0;
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: conflicting declaration 'char c'
    6 |         char c;
      |              ^
a.cc:5:21: note: previous declaration as 'int c'
    5 |         int n,i,a,b,c,d;
      |                     ^
Language: C

#include<stdio.h>
int main()
{
	int a,i,j;
	j=0;
	scanf("%d", &a);
	char s[][2*a+1];
	scanf("%s",s[i]);
	for(i=0;i<a;i++){
		if(s[i]=='Y'){
		j=j+1;
		}
	}
	if(j>0){
	printf("Four\n");}
	else{
	printf("Three\n");}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:14: error: array size missing in 's'
    7 |         char s[][2*a+1];
      |              ^
main.c:10:24: warning: comparison between pointer and integer
   10 |                 if(s[i]=='Y'){
      |                        ^~
Language: Java

import java.util.*;
import java.io.*;
import java.text.*;
import java.lang.*;
import java.math.*;

public class Solution {

	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);

			int n = in.nextInt();
		        List<Character> arr = new ArrayList<Character>();
			in.nextLine();
			String str = in.nextLine();
			for(int i = 0; i < str.length(); i++) {
				if(str.charAt(i) != ' ')
					arr.add(str.charAt(i));
			}

			if(arr.contains('P') && arr.contains('W') && arr.contains('G') && arr.contains('Y'))
				System.out.println("Four");
			else
				System.out.println("Three");
	}
    
}

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

import java.util.Scanner;
import java.util.ArrayList;
public class Main {
	public static void main(String[] args){
      	ArrayList<String> array = new ArrayList<String>();
		Scanner scanner = new Scanner(System.in);
      	int a = sccaner.nextInt();
		while (true) {
			String s = scanner.nextString();
			if (String.valueOf(s).length() == 0) { // 文字列が空(長さゼロ)の場合
				break;
			}
			array.add(s);
        }
        int n = 0;
        boolean i = false;
        for(n = 0;n < a;n++){
         	if("Y" == array.get(n))i = true;
        }
        if(i){
            System.out.println("Four");
        }else{
          System.out.println("Three");
        }
    }
}

Compiler output:
Main.java:7: error: cannot find symbol
      	int a = sccaner.nextInt();
      	        ^
  symbol:   variable sccaner
  location: class Main
Main.java:9: error: cannot find symbol
			String s = scanner.nextString();
			                  ^
  symbol:   method nextString()
  location: variable scanner of type Scanner
2 errors
Language: Java

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		//Scanner s = new Scanner(System.in);
		Scanner s = new Scanner(System.in);
		int N = s.nextInt();
		int[] S = new int[N];
		boolean flg = false;
		for(int i = 0;i < N;i++){
			flg |= s.next().equals("Y");
		}
		
		System.out.println(flg ? "Four" : "Three");
		
		
	}

}


Compiler output:
Main.java:6: error: cannot find symbol
		Scanner s = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
		Scanner s = new Scanner(System.in);
		                ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	int a = sc.nextInt();
      	ArrayList<String> array = new ArrayList<String>();
		Scanner scanner = new Scanner(System.in);
		while (true) {
			String s = scanner.nextString();
			if (String.valueOf(s).length() == 0) { // 文字列が空(長さゼロ)の場合
				break;
			}
			array.add(s);
        }
        int sz = array.size();
        int n = 0;
        boolean i = false;
        for(n = 0;n < sz;n++){
         	if("Y" == array.get(n))i = true;
        }
        if(i){
            System.out.println("Four");
        }else{
          System.out.println("Three");
        }
    }
}

Compiler output:
Main.java:6: error: cannot find symbol
      	ArrayList<String> array = new ArrayList<String>();
      	^
  symbol:   class ArrayList
  location: class Main
Main.java:6: error: cannot find symbol
      	ArrayList<String> array = new ArrayList<String>();
      	                              ^
  symbol:   class ArrayList
  location: class Main
Main.java:9: error: cannot find symbol
			String s = scanner.nextString();
			                  ^
  symbol:   method nextString()
  location: variable scanner of type Scanner
3 errors
Language: C++

#include<iostream>
using namespace std;
int main(){
	int a[5]={0},n;
	char f;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>f;
		if(f=='P') a[1]==1;
		if(f=='W') a[2]==1;
		if(f=='G') a[3]==1;
		if(f=='Y') a[4]==1;
	}
	if((a[1]+a[2]+a[3]+a[4])=4) cout<<"Four";
	else cout<<"Three";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: lvalue required as left operand of assignment
   14 |         if((a[1]+a[2]+a[3]+a[4])=4) cout<<"Four";
      |            ~~~~~~~~~~~~~~~^~~~~~
Language: C++

#include <stdio.h>
#include <string.h>
int main()
{
	int a,n,cnt=0,f1,f2,f3,f4;
	f1=f2=f3=f4=1;
	char s[1005];
	scanf("%d",&a);
	getchar();
	gets(s);
	for(int i=0;i<strlen(s);i++)
    {
        if(f1&&s[i]=='P') {cnt++;f1=0;}
        if(f2&&s[i]=='W') {cnt++;f2=0;}
        if(f3&&s[i]=='G') {cnt++;f3=0;}
        if(f4&&s[i]=='Y') {cnt++;f4=0;}
    }
    if(cnt==3) printf("Three");
    if(cnt==4) printf("Four");
 }


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

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

int main(){
    int a;
    cin>> a;
    char c[a];
    
    for(int n=0; n<a; n++)
    {
        cin>>c[n];
        if(c[n]=="Y")
        {
            cout<<"Four"<<"\n";
            return 0;
        }

    }
    cout<< "Three" <<"\n";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |         if(c[n]=="Y")
      |            ~~~~^~~~~
Language: C++

#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <array>
#include <bitset>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
typedef vector<double> VD;

int main() {
    int n;
    cin >> n;
    set<string> st;
    REP(i,n){
        strting s;
        cin >> s;
        st.insert(s);
    }
    if (st.size() == 3) cout << "Three" << endl;
    else cout << "Four" << endl;


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:9: error: 'strting' was not declared in this scope
   37 |         strting s;
      |         ^~~~~~~
a.cc:38:16: error: 's' was not declared in this scope
   38 |         cin >> s;
      |                ^
Language: C++

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

int main(){
    int a;
    cin>> a;
    char c[a];
    scanf(" %c", &c);
    for(int n=0; n<a; n++)
    {
        if(c[n]=="Y")
        {
            cout<<"Four"<<"\n";
            return 0;
        }

    }
    cout<< "Three" <<"\n";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         if(c[n]=="Y")
      |            ~~~~^~~~~
Language: C

#include <stdio.h>

int main(int argc, char** argv)
{
	int x, y, z, c;
	char a[200][200];
	char b[2];
	strcpy(b, "P");
	z = 0;
	char a[200][200];
	scanf("%d", &x);
	for (y = 0; y < x + 1; y++) {
		scanf("%s", a[y]);
		c = strcmp(a[y], b);
		if (c == 0) {
			z = 1;
		}
	}
	if (z == 1) {
		printf("Four\n");
	}
	else {
		printf("Three\n");
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
    8 |         strcpy(b, "P");
      |         ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcpy'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:8:9: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch]
    8 |         strcpy(b, "P");
      |         ^~~~~~
main.c:8:9: note: include '<string.h>' or provide a declaration of 'strcpy'
main.c:10:14: error: redeclaration of 'a' with no linkage
   10 |         char a[200][200];
      |              ^
main.c:6:14: note: previous declaration of 'a' with type 'char[200][200]'
    6 |         char a[200][200];
      |              ^
main.c:14:21: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   14 |                 c = strcmp(a[y], b);
      |                     ^~~~~~
main.c:14:21: note: include '<string.h>' or provide a declaration of 'strcmp'