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

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

int main()
{
    char a[15];
    int x,y,i,p;
    gets(a);
    if(a[0] == 'A' && a[1] >= 'a' && a[1] <= 'z' && a[strlen(a)-1] >= 'a' && a[strlen(a)-1] <='z')
        x = 0;
    else
        x = 1;
    y = 0;
    p = 0;
    for(i = 2; i < strlen(a); i++)
    {
        if(a[i] == 'C' && i != strlen(a)-1)
            y++;
        if(a[i] >= 'a' && a[i] <= 'z')
            p++;
    }
    if(x == 0 && y == 1 && p == strlen(a)-3)
        printf("AC");
    else
        printf("WA");
    return 0;
}


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

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

int main()
{
    char s[11];int i,k=1;
    scanf("%s",s);
    if(s[0]!='A') k=0;
    if(s[2]!='C') k=0;
    for(i=1;i<strlen(s);i++)
    {
        if(i!=2)
        {
            if(s[i]<97||s[i]>123) k=0;
        }
    }
    if(k==1)
    printf("AC\n");
    else printf("WA\n");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'strlen' was not declared in this scope
   10 |     for(i=1;i<strlen(s);i++)
      |               ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <stdlib.h>
  +++ |+#include <cstring>
    3 |
Language: C++

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

int main()
{
    char a[10];
    gets(a);
    int n=0,m=0,j;
    j=strlen(a);
    if(a[0]=='A')
    {
        if(a[1]!='C')
        {
            if(a[j-1]!='C')
            {
                for(int i=2; i<strlen(a)-1; i++)
                {
                    if(a[i]=='C')
                        n=n+1;
                    else if(a[i]<='z'&&a[i]>='a')
                        m++;
                }
                if(n==1&&m==strlen(a)-4)
                    printf("AC");
                else
                    printf("WA");
            }
            else
                printf("WA");
        }
        else
            printf("WA");

    }
    else
        printf("WA");


    return 0;

}


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

#include <bits/stc++.h>

using namespace std;

int main(){
	int s;cin>>s; int flag=1, i;
  	for(i=0; i<s.length()-1; i++){
    	if(i == 0 && s[i] != 'A') break;
      	else if(i == 1)
          	if(s[i] >=65 && s[i] <97 ) break;
      	else if(s[i] >= 65 && s[i]<97 && flag){
        	if(s[i] == 'C') flag = 0;
          	else break;
        }
   	}	
  	if(i != s.length()-1 || (s[n-1] >= 65 && s[n-1] < 97) cout<<"WA";
    else cout<<"AC";
  	return 0;
}

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

#include<bits/stdc++.h>
#include<string>

using namespace std;
int main(){
  string str,str2;
  int okisa,omozi=0;
  cin >> str;
  okisa=str.size();
  str2=str.substr(2, okisa-3);
  for(int i=0;i!=okisa;i++){
    if((str[i]>='A') && (str[i]<='Z')) omozi++;
  }
  if(str.front()!='A'){
    cout << "WA" << endl;
  }
  else if(str.find("C")==-1){
    cout << "WA" << endl;
  }
  else if(omozi!=2){
    cout << "WA" << endl;
  }
  else{
    cout << "AC" << endl:
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:25: error: expected ';' before ':' token
   24 |     cout << "AC" << endl:
      |                         ^
      |                         ;
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main() {
  cin >> S;
  if (S[0] != 'A') {
    cout << "WA" << endl;
    return 0;
  }
  int c = -1;
  for (int i=1; i<S.size(); i++) {
    if ('A' <= S[i] && S[i] <= 'Z') {
      if (S[i] != 'C') {
        c = -1; break;
      }
      if (i < 2 || i >= S.size() - 1) {
        c = -1; break;
      }
      if (c != -1) {
        c = -1; break;
      }
      c = i;
    }
  }
  if (c == -1) cout << "WA" << endl;
  else cout << "AC" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 'S' was not declared in this scope
    5 |   cin >> S;
      |          ^
Language: C++

int main() {

	std::string cinput;
	std::cin >> cinput;

	int flg = 0;

	if (cinput[0] == 'A') {
		flg += 1;
	}
	int cntx = 0;
	for (int xxx = 2; xxx < cinput.length() - 1; xxx++) {
		if ((cinput[xxx] == 'C') ) {
			cntx++;
		}
	}
	if (cntx == 1) {
		flg += 1;
	}

	cntx = cinput.length() - 3;
	for(int xxx = 1 ; xxx < cinput.length()  ; xxx++){
		if ((cinput[xxx] >= 'a') && (cinput[xxx] <= 'z')) {
			cntx--;
		}
	}
	if (cntx == 0) {
		flg += 1;
	}

	if (flg == 3) {
		std::cout << "AC" << std::endl;

	}
	else {
		std::cout << "WA" << std::endl;
	}



	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:14: error: 'string' is not a member of 'std'
    3 |         std::string cinput;
      |              ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | int main() {
a.cc:4:14: error: 'cin' is not a member of 'std'
    4 |         std::cin >> cinput;
      |              ^~~
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:4:21: error: 'cinput' was not declared in this scope
    4 |         std::cin >> cinput;
      |                     ^~~~~~
a.cc:32:22: error: 'cout' is not a member of 'std'
   32 |                 std::cout << "AC" << std::endl;
      |                      ^~~~
a.cc:32:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:32:43: error: 'endl' is not a member of 'std'
   32 |                 std::cout << "AC" << std::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:36:22: error: 'cout' is not a member of 'std'
   36 |                 std::cout << "WA" << std::endl;
      |                      ^~~~
a.cc:36:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:36:43: error: 'endl' is not a member of 'std'
   36 |                 std::cout << "WA" << std::endl;
      |                                           ^~~~
a.cc:36:43: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

//B - AcCepted
#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int main(void){
	int sum=0;
	char st[15];
	gets(st);
	if(st[0]=='A');sum++;
	for(int i=2;i<strlen(st)-1;i++){
		if(st[i]=='C') sum++;
	}
	if(sum==2) printf("AC");
	else printf("WA");
	return 0;
}

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(st);
      |         ^~~~
      |         getw
Language: Java


import java.util.Scanner;
public class Main_104b {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean c = true;
		if(s.charAt(0) == 'A' && s.substring(2, s.length()).split("C").length == 2) {
			char[] set = s.toCharArray();
			for(int i = 1; i < set.length; i++) {
				if(set[i] != 'C' && !Character.isLowerCase(set[i])) break;
			}
			c = false;
			System.out.println("AC");
		}
		if(c)System.out.println("WA");
	}
}

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

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


int main()
{
	string s;
	int x=0;
	cin >> s;
	int y = s.size();
	if (s.substr(0, 1) != "A"||s.substr(1,1)=="C"||s.substr(y-1,1)=="C") {
		cout << "WA" << endl;
		return 0;
	}
	else {
		for (int i = 2; i < y - 1; i++) {
			if (s.substr(i, 1) == "C") {
				x++;

			}
		}
		if (x == 1)cout << "AC" << endl;
		else cout << "WA" << endl;
	
    return 0;
}

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

import java.util.Scanner;
import java.util.Arrays;

public class Main
{

	public static void main(String[] args)
	{	Scanner s = new Scanner(System.in);
                String r = s.next();
                int n = l.length();
                int i=0,j=0,k=0,z=0,t=0;
                for(i=0;i<n;i++){

                  int l = l.charAt(i);
                     if(r.charAt(0)=='A'){
                        j=1;
                     }
                     if((i>=2 && i<n-1) && r.charAt(i)=='C'){
                        k=1;
                        t++;
                     }
                     if(l==65 || l==67 || (l>=97 && l<=122)){
                        z=1;
                     }else{
                        z=0;
                        break;
                     }
                     

                }
                if(j==1 && k==1 && z==1 && t==1){
                  System.out.println("AC");
                }else{
                  System.out.println("WA");
                }
                
	}
}


Compiler output:
Main.java:10: error: cannot find symbol
                int n = l.length();
                        ^
  symbol:   variable l
  location: class Main
Main.java:14: error: int cannot be dereferenced
                  int l = l.charAt(i);
                           ^
2 errors
Language: Java

import java.util.Scanner;
public class Main_104b {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean c = true;
		if(s.charAt(0) == 'A' && s.substring(1, s.length()).split("C").length == 2) {
			char[] set = s.toCharArray();
			for(int i = 1; i < set.length; i++) {
				if(set[i] != 'C' && !Character.isLowerCase(set[i])) break;
			}
			c = false;
			System.out.println("AC");
		}
		if(c)System.out.println("WA");
	}
}

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

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

typedef long long ll;

string s,t;
int c;

int main(){
  cin>>s;
  for(int i=0;i<s.size();i++){
    if(s[0]=='A'){
        continue;
      }else{
        cout<<"WA"<<endl;return 0;
      }
    }
    else if(s[i]=='C'){
      if(i>=2&&i<=s.size()-2){
        c++;
        if(c==2){
          cout<<"WA"<<endl;return 0;
        }else{
          continue;
        }
      }else{
        cout<<"WA"<<endl;return 0;
      }
    }
    else if(s[i]>='a'&&s[i]<='z')continue;
    else{
      cout<<"WA"<<endl;return 0;
    }
  }
  if(c==0)cout<<"WA"<<endl;
  else cout<<"AC"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'else' without a previous 'if'
   18 |     else if(s[i]=='C'){
      |     ^~~~
a.cc:18:15: error: 'i' was not declared in this scope
   18 |     else if(s[i]=='C'){
      |               ^
a.cc:24:11: error: continue statement not within a loop
   24 |           continue;
      |           ^~~~~~~~
a.cc:30:34: error: continue statement not within a loop
   30 |     else if(s[i]>='a'&&s[i]<='z')continue;
      |                                  ^~~~~~~~
a.cc: At global scope:
a.cc:35:3: error: expected unqualified-id before 'if'
   35 |   if(c==0)cout<<"WA"<<endl;
      |   ^~
a.cc:36:3: error: expected unqualified-id before 'else'
   36 |   else cout<<"AC"<<endl;
      |   ^~~~
a.cc:37:1: error: expected declaration before '}' token
   37 | }
      | ^
Language: C++

#include"bits/stdc++.h"
using namespace std;
typedef long long ll;
int main(){

      string s;
      cin>>s;
      int k=s.size()-2;
      int c=count(s.begin(),s.end(),'C');
      int d=count(s.begin(),s.end(),'A');
      int m=c+d;
      if((s[0]=='A' && s[2]=='C')&&(k!='C') && 2>=m)) cout<<"AC";
      else cout<<"WA";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:53: error: expected primary-expression before ')' token
   12 |       if((s[0]=='A' && s[2]=='C')&&(k!='C') && 2>=m)) cout<<"AC";
      |                                                     ^
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector> 
#include <cstring>
#include <queue>
#include <stack>
#include <ctime>
#include <set>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,int> pli;
typedef pair<int,ll> pil;

const int maxN = 510; 
const int INF = 1000000000;

char a[maxN];

int main()
{
	scanf("%s",a+1);
	int len = strlen(a+1);
	int flag = 0;
	if(a[1] != 'A')
	{
		printf("WA\n");
		return 0;
	}

	int cnt = 0;
	int pos;
	for(int i=3;i<=len-1;i++)
	{
		if(a[i] == "C")
			pos = i,cnt++; 
	}
	if(cnt > 1 )
	{
		printf("WA\n");
		return 0;
	}
	for(int i=1;i<=len;i++)
	{
		if(i == 1 || i== pos)
			continue;
		if(a[i]<='Z')
		{
			printf("WA\n");
			return 0;
		}	
	}
	printf("AC\n");
	return 0;
}

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


#include<bits/stdc++.h>

using namespace std;

int main()

{
    string s;
    cin>>s;

    if(s[0]=='A' && (s[2]=='C'|| s[1]=='C')&& !(s[2]=='C' && s[1]=='C')) {
        if((s[2]=='C' && ((s[1]>='a' && s[1]<='z') || s[1]=='A') ||(s[1]=='C' && ((s[2]>='a' && s[2]<='z')||s[2]=='A'))) {
        for(int i=3; s[i]; i++) {
                if(s[i]=='A')continue;
                if(s[i]>='a' && s[i]<='z')continue;
                else {
                    cout<<"WA"<<endl;
                    return 0;
                }
            }
            cout<<"AC"<<endl;
        } else {
            cout<<"WA"<<endl;
        }
    } else {
        cout<<"WA"<<endl;
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:121: error: expected ')' before '{' token
   13 |         if((s[2]=='C' && ((s[1]>='a' && s[1]<='z') || s[1]=='A') ||(s[1]=='C' && ((s[2]>='a' && s[2]<='z')||s[2]=='A'))) {
      |           ~                                                                                                             ^~
      |                                                                                                                         )
a.cc:26:5: error: expected primary-expression before '}' token
   26 |     } else {
      |     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
char str[11];
char str1[11];
void f(char arr[],int n)
{
	for(int i=0;i<n;i++)
	{
		if(arr[i]>='a'&&arr[i]<='z')
			arr[i]-=32;
	}
}
int main()
{
	int i,c=0;
	scanf("%s",str);
	strcpy(str1,str);
	f(str1,strlen(str1))
	if(strcmp(str,str1)!=0)
	{
		printf("WA");
		return 0; 	
	}
	else if(str[0]!='A')
	{
		printf("WA");
		return 0; 
	}
	else if(str[1]=='C')
	{
		printf("WA");
		return 0;
	}
	for(i=2;i<strlen(str);i++)
	{
		if(c==2)
		{
			printf("WA");
			return 0;
		}
		else if(str[i]=='C')
		{
			c++;
		}
	}
	printf("AC");
	return 0;			
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:29: error: expected ';' before 'if'
   18 |         f(str1,strlen(str1))
      |                             ^
      |                             ;
   19 |         if(strcmp(str,str1)!=0)
      |         ~~                   
a.cc:24:9: error: 'else' without a previous 'if'
   24 |         else if(str[0]!='A')
      |         ^~~~
Language: C++

#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
int main()
{
    char str[15];
    gets(str);
    char c;
    int sum=0,flag=0;
    for(int i=0;(c=str[i])!='\0';i++)
    {
        if(c=='C')
            sum++;
        if(c>='a'&&c<='z')
            flag++;
    }
   // cout<<flag<<"*"<<endl;
    int len=strlen(str);
    //cout<<len<<"*22"<<endl;
    if(str[0]=='A'&&str[2]=='C'&&sum==1&&flag==len-2)
        cout<<"AC"<<endl;
    else
        cout<<"WA"<<endl;
        return 0;
}


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

import java.util.*;


public class Main {
  public static void main(String[] args) {

  Scanner vd = new Scanner(System.in);
  String n = vd.next();
  
  if(n.substring(0, 1) != "A") System.out.println("WA");
  else{
    String p = n.substring(3, n.length());
    if(p .contains("C")) {
        String f = n.substring(1);
        int i = f.indexOf("C");
        String fo = f.substring(o, i);
        String en = f.substring(i+1);
        if(fo.toLowerCase() != fo) System.out.println("WA");
        else{
            if(en.toLowerCase() != en) System.out.println("WA");
            else System.out.println("AC");
        }
    }
    else System.out.println("WA");
  }
 }
}

Compiler output:
Main.java:16: error: cannot find symbol
        String fo = f.substring(o, i);
                                ^
  symbol:   variable o
  location: class Main
1 error
Language: C++

# include "iostream"
# include "cstdio"
# include "cstring" 

using namespace std;
char c[100]; 
int main(){
	int tot;
	bool cnt; 
	scanf("%s",c);
	if(c[0]!='A'){
		printf("WA");
		return 0; 
	}
	tot=strlen(c);cnt=false; 
	for(i=1;i<=3;i++){
		if(c[i]=='C'){
			if(cnt){
				printf("WA");
				return 0; 
			} 
			cnt=true; 
			continue; 
		}
		if(c[i]>='A' && c[i]<='Z'){
			printf("WA");
			return 0; 
		} 
	}
	cnt=false; 
	for(i=1;i<=tot-1;i++){
		if(c[i]=='C'){
			if(cnt){
				printf("WA");
				return 0; 
			} 
			cnt=true; 
			continue; 
		}
		if(c[i]>='A' && c[i]<='Z'){
			printf("WA");
			return 0; 
		} 
	}
	printf("AC"); 
	return 0; 
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'i' was not declared in this scope
   16 |         for(i=1;i<=3;i++){
      |             ^
a.cc:31:13: error: 'i' was not declared in this scope
   31 |         for(i=1;i<=tot-1;i++){
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize(2)
 
const int maxn = 1111;
char s[maxn];
int vis[maxn];
 
signed main() {
  // freopen("in", "r", stdin);
  while(~scanf("%s", s)) {
    memset(vis, 0, sizeof(vis));
    int tot = 0;
    for(int i = 0; s[i]; i++) {
      if(s[i] >= 'A' && s[i] <= 'Z') tot++;
      vis[s[i]]++;
    }
    if(tot != 2) {
      printf("WA\n");
      continue;
    }
    if(s[0] != 'A') {
      printf("WA\n");
      continue;
    }
    if(vis['A'] != 1 || vis['C'] != 1) {
      printf("WA\n");
      continue;
    }
    tot = 0;
    for(int i = 2; i <= n - 2; i++) {
      if(s[i] == 'C') tot++;
    }
    if(tot) printf("AC\n");
    else printf("WA\n");
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:25: error: 'n' was not declared in this scope
   31 |     for(int i = 2; i <= n - 2; i++) {
      |                         ^
Language: C

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

int main()
{
  char s[15];
  gets(s);
  int l=strlen(s),b=0,count=0;
  if(s[0]!='A')
  {
    b=1;
  }
  for(i=1;i<s;i++)
  {
    if(i!=2||i!=s-1)
    {
      if(s[i]=='c')
      {
        count++;
      }
    }
    if(s[i]!='c'&&s[i]<'a')
    {
      b=1;
      break;
    }
  }
  if(count!=1)
  {
    b=1;
  }
  if(b==1)
  {
    printf("AC");
  }
  else 
  {
    printf("WA");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    7 |   gets(s);
      |   ^~~~
      |   fgets
main.c:13:7: error: 'i' undeclared (first use in this function)
   13 |   for(i=1;i<s;i++)
      |       ^
main.c:13:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
	
	char a[80];
	while(gets(a)!=NULL)
	{
		if(a[0]!='A') {
			printf("WA\n");
			continue;
		}
		int n=0;
	int flag=1;
			for(int i=1;i<strlen(a);i++)
			{if(a[i]=='C')
			{ 
				n++;
				if(i==1||i==strlen(a)-1)
				{
			  
			  flag=0;
			  break;
				}
			}
			else if(a[i]>='A'&&a[i]<='Z')
			{flag=0;break;}
			
			}
			
			
			if(n==1&&flag==1) printf("AC\n");
		else printf("WA\n");
		
		
		
	}
	
	
	
	
	
}

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

#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main()
{
	string s;
	cin>>s;
	int n=s.length(),f=1;
	if(s[0]!="A") f=0;
	if(s[2]!="C") f=0;
	if(s[1]=="c" || s[1]<'a') f=0;
	for(int i=3;i<n;i++)
		if(s[i]<'a') f=0;
	if(f) cout<<"AC";
	else cout<<"WA";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if(s[0]!="A") f=0;
a.cc:11:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         if(s[2]!="C") f=0;
a.cc:12:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         if(s[1]=="c" || s[1]<'a') f=0;
Language: C

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

int main()
{
	char s[15];
	int len, judge = 0;
	scanf("%s", s);
	if (s[0] != 'A')
	{
		printf("WA");
		return 0;
	}
	if (s[1] < 'a' || s[1] > 'z')
	{
		printf("WA");
		return 0;
	}
	len = strlen(s);
	for (int i = 2; i < len; i++)
	{
		if (s[i] >= 'a' && s[i] <= 'z')
		{
			continue;
		}
		if (s[i] >= 'A' && s[i] <= 'Z')
		{
			if (s[i] == 'C' && s[i+1] != '\0')
			judge++;
			else
			judge = 2;
		}
	}
	if (judge == 1)
	{
		print("AC");
	}
	else
	{
		printf("WA");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:38:17: error: implicit declaration of function 'print'; did you mean 'lrint'? [-Wimplicit-function-declaration]
   38 |                 print("AC");
      |                 ^~~~~
      |                 lrint
Language: Java

import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);

        String s = scan.next();
        int Ccount = 0;
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
            System.exit(0);
        }
        for(int i = 1; i < s.length(); i++){
            if(i >= 2 && i < s.length() - 1){
                char c = s.charAt(i);
                if(c == 'C')Ccount++;
                else if(c >= 'A' && c <='Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
            else {
                char c = s.charAt(i);
                if(c >= 'A' && c <= 'Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        }
        if(Ccount == 1)System.out.println("AC");
        else System.out.println("WA");
        return;
    }
}
~                                                                          
~   

Compiler output:
Main.java:34: error: class, interface, enum, or record expected
~                                                                          
^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
char str[11];
void f(char arr[],int n)
{
	for(int i=0;i<n;i++)
	{
		if(arr[i]>='a'&&arr[i]<='z')
			arr[i]-=32;
	}
}
int main()
{
	int i,c=0;
	scanf("%s",str);
	if(strcmp(str,f(str,strlen(n)))!=0)
	{
		printf("WA");
		return 0; 	
	}
	f(str,strlen(n));
	else if(str[0]=='A')
	{
		printf("WA");
		return 0; 
	}
	else if(str[1]=='C')
	{
		printf("WA");
		return 0;
	}
	for(i=2;i<strlen(str);i++)
	{
		if(c==2)
		{
			printf("WA");
			return 0;
		}
		else if(str[i]=='C')
		{
			c++;
		}
	}
	printf("AC");
	return 0;			
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:36: error: 'n' was not declared in this scope
   16 |         if(strcmp(str,f(str,strlen(n)))!=0)
      |                                    ^
a.cc:21:22: error: 'n' was not declared in this scope
   21 |         f(str,strlen(n));
      |                      ^
a.cc:22:9: error: 'else' without a previous 'if'
   22 |         else if(str[0]=='A')
      |         ^~~~
Language: C++

#include<stdio.h>
#include<ctype.h>
#include<string.h>
int main()
{
	
		char a[100];
		gets(a);
		int len = strlen(a);
		int i;
		int ans = 1;
		int n_c = 0;
		if (a[0] != 'A' || a[1] == 'C' || a[len - 1] == 'C') {
			printf("WA\n");
			return 0;
		}
		for (i = 2; i < len - 1; i++)
		{
			if (a[i] == 'C') {
				n_c++;
				continue;
			}
			if (n_c >= 2) {
				printf("WA\n");
				return 0;
			}
			if (isupper(a[i])) {
				printf("WA\n");
				return 0;
			}
		}
		printf("AC\n");

	return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
int main()
{
	char a[100];
	int i,j,tmp=0;
	scanf("%s",&a);
	if(a[1]!='A')
	{
		printf("WA");
	}
	else
	{
		for(i=1;i<strlen(n);i++)
		{
			if(a[i]=='C'&&!tmp)
			{
				tmp=1;
			}
			if(a[i]>='A'&&a[i]<='Z')
			{
				printf("WA");
				return 0;
			}
		}
		printf("AC");
	}
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:14:34: error: 'n' was not declared in this scope
   14 |                 for(i=1;i<strlen(n);i++)
      |                                  ^
Language: C++

#include <stdio.h>
#include <iostream>
#include <string.h>
using namespace std;
int main(){
	int cnt=0;
	char a[20];
	gets(a);
	for(int i=0;i<strlen(a);i++){
		if(a[i]=='C'){
			cnt++;
		}
	}
	if(cnt!=1){
		cout<<"WA";
		return 0;
	}
	
	if(a[0]=='A'&&a[2]=='C'){
		for(int i=0;i<strlen(a);i++){
			if(i==0||i==2){
				continue;
			}else{
				if(a[i]<'a'){
					cout<<"WA";
					return 0;
				}
			}
		}
		cout<<"AC";
	}else{
		cout<<"WA";
	}
	return 0;
}

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

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

int main() {
	char s[11];
	int l = 0;
	scanf("%s", s);
	l = strlen(s);
	if (s[0] != 'A') {
		printf("WA");
		exit(1);
	}
	int i = 0,t;
	for (i = 2, i < l-1, i++) {
		if (s[i] == 'C') {
			t++;
		}
	}
	if (t != 1) {
		printf("WA");
		exit(1);
	}
	t = 0;
	for (i = 0, i < l, i++) {
		if ('A' <= s[i]) {
			t++;
		}
	}
	
	if (t == 2) {
		printf("AC");
	}
	else {
		printf("WA");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:33: error: expected ';' before ')' token
   15 |         for (i = 2, i < l-1, i++) {
      |                                 ^
      |                                 ;
main.c:15:33: error: expected expression before ')' token
main.c:25:31: error: expected ';' before ')' token
   25 |         for (i = 0, i < l, i++) {
      |                               ^
      |                               ;
main.c:25:31: error: expected expression before ')' token
Language: C++

#include<bits/stdc++.h>
using namespace std;
char str[11];
void f(char arr[],int n)
{
	for(int i=0;i<n;i++)
	{
		if(arr[i]>='a'&&arr[i]<='z')
			arr[i]-=32;
	}
}
int main()
{
	int i,c=0;
	scanf("%s",str);
	if(strcmp(str,f(str))!=0)
	{
		printf("WA");
		return 0; 	
	}
	else if(str[0]=='A')
	{
		printf("WA");
		return 0; 
	}
	else if(str[1]=='C')
	{
		printf("WA");
		return 0;
	}
	for(i=2;i<strlen(str);i++)
	{
		if(c==2)
		{
			printf("WA");
			return 0;
		}
		else if(str[i]=='C')
		{
			c++;
		}
	}
	printf("AC");
	return 0;			
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:24: error: too few arguments to function 'void f(char*, int)'
   16 |         if(strcmp(str,f(str))!=0)
      |                       ~^~~~~
a.cc:4:6: note: declared here
    4 | void f(char arr[],int n)
      |      ^
Language: C++

#include<bits/stdc++.h>
namespace ZDY{
#define fir freopen("2.in","r",stdin)
#define ll long long
#define Fur(i,x,y) for(int i=(x);i<=(y);i++)
#define fur(i,x,y) for(i=x;i<=y;i++)
#define Fdr(i,x,y) for(int i=x;i>=y;i--)
#define in2(x,y) in(x),in(y)
#define in3(x,y,z) in2(x,y),in(z)
#define in4(a,b,c,d) in2(a,b);in2(c,d)
#define clr(x,y) memset(x,y,sizeof(x))
#define cpy(x,y) memcpy(x,y,sizeof(x))
#define fl(i,x) for(ll i=head[x],to;to=e[i].to,i;i=e[i].next)
#define inf 2147483647
}
namespace FAST{
#define pob (fwrite(fob::b,sizeof(char),fob::f-fob::b,stdout),fob::f=fob::b,0)
#define pc(x) (*(fob::f++)=(x),(fob::f==fob::g)?pob:0)
#define gc ((*fib::f)?(*(fib ::f++)):(fgets(fib::b,sizeof(fib::b),stdin)?(fib::f=fib::b,*(fib::f++)):-1))
namespace fib{char b[300000]= {},*f=b;}namespace fob{char b[300000]= {},*f=b,*g=b+300000-2;}struct foce{~foce(){pob;fflush(stdout);}} _foce;namespace ib{char b[100];}template<class T>inline void in(T &x){x=0;char c;bool f=0;while((c=gc)>'9'||c<'0')if(c=='-')f=!f;x=c-48;while((c=gc)<='9'&&c>='0')x=x*10+c-48;if(f)x=-x;}template<class T>inline void out(T x){if(x==0){pc(48);return;}if(x<0){pc('-');x=-x;}char *s=ib::b;while(x) *(++s)=x%10,x/=10;while(s!=ib::b) pc((*(s--))+48);}template<class T>inline void outn(T x){out(x);pc('\n');}
inline char sc(){char c=gc;while(!(('A'<=c&&c<='Z')||('a'<=c&&c<='z')||('0'<=c<='9')))c=gc;return c;}
template<class T>inline T ABS(T x){return x>0?x:-x;}
template<class T>inline T MAX(T x,T y){return x>y?x:y;}
template<class T>inline T MIN(T x,T y){return x<y?x:y;}
template<class T>inline T GCD(T x,T y){return y?GCD(y,x%y):x;}
template<class T>inline void SWAP(T x,T y){T t=x;y=t;x=y;}
}using namespace FAST;using namespace ZDY;using namespace std;
string s;
int main(){
	cin>>s;
	if(s[0]!='A')return printf("WA\n"),0;
	bool f=0;
	Fur(i,2,s.size()-2){
		if(s[i]=='C'){
			if(f)return printf("WA\n"),0;
			else f=1;
		}
		else if('A'<=s[i]&&s[i]<='Z')return printf("WA\n"),0;
	}
	if(('A'<=s[1]&&s[1]<='Z')||('A'<=s[s.size()-1]&&s[s.size()-1]<='Z'&&s.size()>4)return printf("WA\n"),0;
	printf("AC\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:88: error: expected ';' before 'return'
   40 |         if(('A'<=s[1]&&s[1]<='Z')||('A'<=s[s.size()-1]&&s[s.size()-1]<='Z'&&s.size()>4)return printf("WA\n"),0;
      |                                                                                        ^~~~~~
      |                                                                                        ;
a.cc:41:23: error: expected ')' before ';' token
   41 |         printf("AC\n");
      |                       ^
      |                       )
a.cc:40:11: note: to match this '('
   40 |         if(('A'<=s[1]&&s[1]<='Z')||('A'<=s[s.size()-1]&&s[s.size()-1]<='Z'&&s.size()>4)return printf("WA\n"),0;
      |           ^
Language: C++

#include <bits/stdc++.h>

#define rep2(x,fr,to) for(int (x)=(fr);(x)<(to);(x)++)
#define rep(x,to) for(int (x)=0;(x)<(to);(x)++)
#define repr(x,fr,to) for(int (x)=(fr);(x)>=(to);(x)--)
#define all(c) (c).begin(),(c).end()
#define sz(v) (int)(v).size()

using namespace std;
typedef long long ll; typedef vector<int> VI; typedef pair<int,int> pii;

const int mod = (int)1e9 + 7;
void dbg(){ cerr << "\n"; } template <typename T,typename ...T2>
void dbg(const T& fst, const T2&...rst){ cerr << fst << ": "; dbg(rst...); }
const int dr[]={0,1,0,-1,0};


int main()
{
	
	//cin.tie(0); ios_base::sync_with_stdio(false);
	string s;
	
	cin >> s;
	bool ok=1;
	if(s[0] !='A') ok=0;
	int ct=0, n=sz(s);
	
	rep(i, n) if(s[i]=='C') ct++;
	if(ct !=1) ok=0;
	ct=0;
	rep2(i, n-1) if(s[i]=='C') ct++;
	if(ct !=1) ok=0;
	if(n < 4) ok=0;
	//dbg(ct);
	puts(ok? "AC":"WA");
	return 0;
}


Compiler output:
a.cc:32:20: error: macro "rep2" requires 3 arguments, but only 2 given
   32 |         rep2(i, n-1) if(s[i]=='C') ct++;
      |                    ^
a.cc:3:9: note: macro "rep2" defined here
    3 | #define rep2(x,fr,to) for(int (x)=(fr);(x)<(to);(x)++)
      |         ^~~~
a.cc: In function 'int main()':
a.cc:32:9: error: 'rep2' was not declared in this scope
   32 |         rep2(i, n-1) if(s[i]=='C') ct++;
      |         ^~~~
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
	char s[15];
	scanf("%s",&s);
	int n=strlen(s);
	int f=1;
	if(s[0]!='A')
	f=0;
	if(s[1]=='C'||s[n-1]=='C')
	f=0;
	int sumc=0,sumall=0,sumx=0;
	for(int i=2;i<n;i++)
	{	
	if(s[i]=='c')
	sumx++;
		if(s[i]=='C')
		sumc++;
		if(s[i]>='A'&&s[i]<='Z')
		sumall++;
	}
	if(f==1&&sumc==1&&sumall==0&&sumx=0)
	printf("AC");
	else
	printf("WA");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:36: error: lvalue required as left operand of assignment
   23 |         if(f==1&&sumc==1&&sumall==0&&sumx=0)
      |            ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
Language: C++

	if(firstC == string::npos){
		wa = true;
	}else if (sub.find('C',firstC+1) != string::npos){
		wa = true;
	}


Compiler output:
a.cc:1:9: error: expected unqualified-id before 'if'
    1 |         if(firstC == string::npos){
      |         ^~
a.cc:3:10: error: expected unqualified-id before 'else'
    3 |         }else if (sub.find('C',firstC+1) != string::npos){
      |          ^~~~
Language: C++

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cctype>
using namespace std;
int main(){
	char a[100];
	scnaf("%s",a);
	if(a[0]!='A'){
			printf("WA\n");
			return 0;
		}
	else if(islower(a[1])){
			printf("WA\n");
			return 0;
		}
	else if(a[2]!='C'){
			printf("WA\n");
			return 0;
		}
	int i=3;
	while(a[i]!='\0' && a[i]!='\n'){
		if(!islower(a[i])){
			printf("WA\n");
			return 0;
		}
		i++;
	}
	printf("AC\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scnaf' was not declared in this scope; did you mean 'scanf'?
    8 |         scnaf("%s",a);
      |         ^~~~~
      |         scanf
Language: C++

S = list(input())
flag = True
flag_t = False
  
if S[0] == "A":
    
    S_part = S[2:-1]
    #print(S_part)
    
    count = 0
    for i, str in enumerate(S_part):
        if str == "C":
            ind = i
            #print(i)
            count += 1

    if count == 1:
        #print(S)
        S.pop(0)
        S.pop(ind + 1)
        #print(S)
        
        for str in S:
            if not str.islower():
                flag = False
            
        if flag:
            print("AC")
            flag_t = True

if flag_t == False:
    print("WA")

Compiler output:
a.cc:8:6: error: invalid preprocessing directive #print
    8 |     #print(S_part)
      |      ^~~~~
a.cc:14:14: error: invalid preprocessing directive #print
   14 |             #print(i)
      |              ^~~~~
a.cc:18:10: error: invalid preprocessing directive #print
   18 |         #print(S)
      |          ^~~~~
a.cc:21:10: error: invalid preprocessing directive #print
   21 |         #print(S)
      |          ^~~~~
a.cc:1:1: error: 'S' does not name a type
    1 | S = list(input())
      | ^
Language: C++

#include<stdio.h>
#include <string.h>
int main(void){
    int b=0;
    char a[10],d;
    scanf(" %s",a);
    for(int i=0;i<strlen(a);i++){
        if(a[0]!='A'||a[2]!='C') {
                printf("WA\n");
                break;
        }
        if(isupper(a[i])==0) b++;
    }
    if(strlen(a)-2-b==0) printf("AC\n");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: 'isupper' was not declared in this scope
   12 |         if(isupper(a[i])==0) b++;
      |            ^~~~~~~
Language: C++

#include<stdio.h>
#include <string.h>
int main(){
    int b=0;
    char a[10],d;
    scanf(" %s",a);
    int c;
    c=strlen(a);
    for(int i=0;i<strlen(a);i++){
        if(a[0]!='A'||a[2]!='C') {
                printf("WA");
                break;
        }
        if(isupper(a[i])==0) b++;
    }
    if(strlen(a)-2-b==0) printf("AC");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: 'isupper' was not declared in this scope
   14 |         if(isupper(a[i])==0) b++;
      |            ^~~~~~~
Language: C++

#include<stdio.h>
#include<ctype.h>
#include<string.h>
int main()
{
	
		char a[100];
		gets_s(a);
		int len = strlen(a);
		int i;
		int ans = 1;
		int n_c = 0;
		if (a[0] != 'A' || a[1] == 'C' || a[len - 1] == 'C') {
			printf("WA\n");
			return 0;
		}
		for (i = 2; i < len - 1; i++)
		{
			if (a[i] == 'C') {
				n_c++;
				continue;
			}
			if (n_c >= 2) {
				printf("WA\n");
				return 0;
			}
			if (isupper(a[i])) {
				printf("WA\n");
				return 0;
			}
		}
		printf("AC\n");

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'gets_s' was not declared in this scope
    8 |                 gets_s(a);
      |                 ^~~~~~
Language: C++

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

#define ll long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define lb lower_bound
#define ub upper_bound
#define loop(i,a,b) for(ll i=a;i<b;i++)
#define inf (long long int) 1e18
#define vi vector<ll> 
#define pii pair<ll, ll>
#define mii map<ll, ll> 
#define mod 1000000007

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

ll palindrome(string s){
    ll l = 0;
    ll h = s.length() - 1;
    while (h > l){
        if (s[l++] != s[h--]){
            return 0;
        }
    }
    return 1;
}

ll modexp(ll a, ll b, ll m){
    if (b==0)
        return 1;
    ll temp = modexp(a,b/2,m);
    temp = (temp*temp)%m;
    if (b&1)
        return (temp*(a%m))%m; // if b is odd a^b = a^(b/2)*a^(b/2)*a
    return temp;
}

int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    /*#ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif*/

    string s;
    cin>>s;
    int l=s.length();
    int cnt=0;
    loop(i,2,l-1){
        if(s[i]=='C') cnt++;
    }
    bool flag=true;
    int c=0;
    for(int i=1;i<=l-1 && flag==true;i++){
            if((s[i]<'a' || s[i]>'z') && s[i]!='C'){
                flag=false;
            }
        }
    }

    if(s[0]=='A' && cnt==1 && flag==true){
        cout<<"AC"<<endl;
    } else {
        cout<<"WA"<<endl;
    }
}


Compiler output:
a.cc:72:5: error: expected unqualified-id before 'if'
   72 |     if(s[0]=='A' && cnt==1 && flag==true){
      |     ^~
a.cc:74:7: error: expected unqualified-id before 'else'
   74 |     } else {
      |       ^~~~
a.cc:77:1: error: expected declaration before '}' token
   77 | }
      | ^
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
	char s[15];
	gets(s);
	int n=strlen(s);
	int f=0;
	int sum=0;
	for(int i=0;i<n;i++){
		if(s[0]!='A'){
			f=1;
			break;
		}
		if(s[1]=='C'||s[n-1]=='C'){
			f=1;
			break;
		}
		else if(s[i]=='C'){
			sum++;
		}
		if(s[i]>'A'&&s[i]<'C'||s[i]>'C'&&s[i]<'Z'){
			f=1;
			break;
		}
	}
	if(sum==1&&f==0){
		printf("AC\n");
	}
	else printf("WA\n");
}


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

#include<stdio.h>
#include<string>
int main()
{
	char s[15];
	gets(s);
	if(s[0]=='A'&&s[2]=='C')
	{
		if(s[1]>='a'&&s[1]<='z')
		{
			for(int i=3;i<strlen(s);i++)
			{
				if(s[i]>='A'&&s[i]<='Z')
				{
					printf("WA\n");
					break;
				}
				if(s[i]>='a'&&s[i]<='z'&&i==strlen(s)-1)
				{
					printf("AC\n");
				}
			}
		}
		else printf("WA\n");
	}
	else printf("WA\n");
	return 0;
}


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

#include<iostream>
#include<string>
using namespace std;
int main(){
	string s;
	int i,k,m,n=0,f=0;
	cin >> s;
	if(s[0]!='A' || s[1]=='C' || s[s.size()-1]=='C')
        f=1;
	for(i=2;i<s.size();i++)
    {
        if(f)
            break;
        if(s[i]=='C')
            n++;
        if(s[i]>='A' && a[i]<='Z' || n>1)
            f=1;
    }
    if(n==0)
        f=1;
    if(f==0)
        cout << "AC\n";
    else
        cout << "WA\n";
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: 'a' was not declared in this scope
   16 |         if(s[i]>='A' && a[i]<='Z' || n>1)
      |                         ^
Language: C++

#include <stdio.h>
#include <iostream>


int main (){
	std:: string str;
	std:: cin >> str;
	if (str[0]=='A'){
		for (int j = 2; j < str.size() - 1; j + =1){
			if (str[j]=='C'){
				bool flag = false;
				for (int i = 1; i <str.size(); i += 1){
					if (j==2)continue;
					if (isupper(str[i])){
						flag = true;
						break;
					}
				}
				if (!flag){
					printf("AC\n");
					return 0;
				}
			}
		}
	}
	printf("WA");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:57: error: expected primary-expression before '=' token
    9 |                 for (int j = 2; j < str.size() - 1; j + =1){
      |                                                         ^
Language: Java

import java.util.Scanner;
import java.util.Arrays;

public class Main
{

	public static void main(String[] args)
	{	Scanner s = new Scanner(System.in);
                String l = s.nextInt();
                int n = l.length();
                int i=0,j=0,k=0;
                for(i=0;i<n;i++){
                     if(l.charAt(0)=='A'){
                        j=1;
                     }
                     if((i>=2 && i<n-1) && l.charAt(i)=='C'){
                        k=1;
                     }
                }
                if(j==1 && k==1){
                  System.out.println("AC");
                }else{
                  System.out.println("WA");
                }
                
	}
}


Compiler output:
Main.java:9: error: incompatible types: int cannot be converted to String
                String l = s.nextInt();
                                    ^
1 error
Language: C++

//競技プログラミング　テンプレ
//
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <cstdlib> //abs() これは整数のみ

using namespace std;

#define REP(i,n) for(int i = 0; i < (int)(n); ++i)

const int max_v = 300;
const int INF = 1000000;



int main() {
	string str;
	int n=0, ans=0,len=0,num;
	cin >> s;
	//vector <int> A(n);
	//string str;
	if(str[0] != 'A'){
		cout << "WA" << endl;
		return 0;
	}  
	int len = str.size;
	for(int i=2; i<len -1; i++){
		if(str[i] == 'C'){ n++; num = i;}
	}
	if(n != 1) {
		cout << "WA" << endl;
		return 0;
	}  
//97 122
	for(int i = 0; i<len; i++){
		if(str[i] < 97 || str[i] >122)  {
			cout << "WA" << endl;
			return 0;
		}  
	}

	cout << "AC" << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:16: error: 's' was not declared in this scope
   22 |         cin >> s;
      |                ^
a.cc:29:13: error: redeclaration of 'int len'
   29 |         int len = str.size;
      |             ^~~
a.cc:21:24: note: 'int len' previously declared here
   21 |         int n=0, ans=0,len=0,num;
      |                        ^~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main()
{
	string R;
	cin >> R;
	if(R.length()<=10 && R.length()>=4)
	{
		int lenR=R.length();
		if(R[0]!='A')
		{
			return "WA";
		}
		if(!(R[1]>='a' && R[1]<='z'))
		{
			cout<< "WA" << endl;
			return 0;
		}
		if(!(R[lenR-1]>='a' && R[lenR-1]<='z'))
		{
			cout<< "WA" << endl;
			return 0;
		}
		else
		{
			int count=0;
			for(int i=2;i<lenR-1;i++)
			{
				if(R[i]=='C')
				{
					count++;
				}
				else if(!(R[i]>='a' && R[i]<='z'))
				{
					cout<< "WA" << endl;
					return 0;
				}
			}
			if(count!=1)
			{
				cout<< "WA" << endl;
				return 0;
			}

		}
	
	}
	else
	{
		cout<< "WA" << endl;
		return 0;
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:32: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   15 |                         return "WA";
      |                                ^~~~
      |                                |
      |                                const char*
Language: C++

#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
	char s[15];
	gets(s);
	if(s[0]=='A'&&s[2]=='C')
	{
		if(s[1]>='a'&&s[1]<='z')
		{
			for(int i=3;i<strlen(s);i++)
			{
				if(s[i]>='A'&&s[i]<='Z')
				{
					printf("WA\n");
					break;
				}
				if(s[i]>='a'&&s[i]<='z'&&i==strlen(s)-1)
				{
					printf("AC\n");
				}
			}
		}
		else printf("WA\n");
	}
	else printf("WA\n");
	return 0;
}

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

#include <iostream>
#include <string>

void main()
{
	std::string S;
	std::cin >> S;
	auto result = "WA";
	if (S[0] == 'A') {
		int C = 0;
		bool b = true;
		int n = static_cast<int>(S.length());
		for (int i = 1; i < n; ++i) {
			if (2 <= i && i < n - 2 && S[i] == 'C') {
				C++;
			}
			else {
				b &= 'a' <= S[i] && S[i] <= 'z';
			}
		}
		if (C == 1 && b) {
			result = "AC";
		}
	}
	std::cout << result << std::endl;
}


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

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#define MAX_N 233

using namespace std;

int n;
char s[MAX_N];

int main()
{
	scanf("%s",s+1);
	n=strlen(s+1);
	if(s[1]!='A' || s[2]=='C' || s[n]=='C' || isupper(s[2]) || isupper(s[n]))
	{
		printf("WA\n");
		return 0;
	}
	int cnt=0;
	for(int i=3;i<n;i++)
	{
		if(s[i]=='C') cnt++;
		else if(isupper(s[i]))
		{
			printf("WA\n");
			return 0;
		}
	}
	if(cnt!=1) printf("WA\n");
	else printf("AC\n");
}
leohh@le

Compiler output:
a.cc:34:6: error: stray '@' in program
   34 | leohh@le
      |      ^
a.cc:34:1: error: 'leohh' does not name a type
   34 | leohh@le
      | ^~~~~
Language: C++

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

int main()
{
  int i, j, n, cnum=0;
  char s[12];
  cin >> s;
  n=strlen(s);

  for(i=2; i<n-1; i++) {
    if(s[i]=='C'){
      cnum++;
      j=i;}
  }
  for(i=1; i<j; i++)
    if(s[i]==toupper(s[i]))
      {cout << "WA";
	return 0;}
  for(i=j+1; i<n; i++)
    if(s[i]==toupper(s[i]))
      {cout << "WA";
	return 0;}
	if((s[0]=='A')&&(cnum==1))
     cout << "AC";
     else cout << "WA";
     
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'strlen' was not declared in this scope
   13 |   n=strlen(s);
      |     ^~~~~~
a.cc:6:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include <algorithm>
  +++ |+#include <cstring>
    6 | using namespace std;
Language: C++

#include<iostream>
#include<cstring>
using namespace std;
int b[27];
int main()
{
	char a[1005];
	cin>>a;
	int count1=0;
	for(int i=0;i<strlen(a);i++)
	{if(a[i]>='A'&&a[i]<='Z')
	{count1++;
	b[a[i]-'A']++;
	}
	}
	if(b[0]==1&&b[2]==1&&(a[strlen(a)-1]<='z'&&a[a[strlen(a)-1]>='a']&&count1==2)
	cout<<"AC";
	else cout<<"WA";
	return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:86: error: expected ';' before 'cout'
   16 |         if(b[0]==1&&b[2]==1&&(a[strlen(a)-1]<='z'&&a[a[strlen(a)-1]>='a']&&count1==2)
      |                                                                                      ^
      |                                                                                      ;
   17 |         cout<<"AC";
      |         ~~~~                                                                          
a.cc:18:9: error: expected primary-expression before 'else'
   18 |         else cout<<"WA";
      |         ^~~~
a.cc:17:20: error: expected ')' before 'else'
   17 |         cout<<"AC";
      |                    ^
      |                    )
   18 |         else cout<<"WA";
      |         ~~~~        
a.cc:16:11: note: to match this '('
   16 |         if(b[0]==1&&b[2]==1&&(a[strlen(a)-1]<='z'&&a[a[strlen(a)-1]>='a']&&count1==2)
      |           ^