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

#include<iostream>
#include<string>
using nemaspace std;
int main (){
string s;
int i;
int count=0;
cin>>s
string ans;
ans = 'No';
for(i=0;i<5;i++){
if(s[i]='A'){
if(s[i+1]='C') ans ='Yes';
               }
}
return 0;
}

Compiler output:
a.cc:10:7: warning: multi-character character constant [-Wmultichar]
   10 | ans = 'No';
      |       ^~~~
a.cc:13:21: warning: multi-character character constant [-Wmultichar]
   13 | if(s[i+1]='C') ans ='Yes';
      |                     ^~~~~
a.cc:3:7: error: expected nested-name-specifier before 'nemaspace'
    3 | using nemaspace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:1: error: 'string' was not declared in this scope
    5 | string s;
      | ^~~~~~
a.cc:5:1: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 | cin>>s
      | ^~~
      | std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:6: error: 's' was not declared in this scope
    8 | cin>>s
      |      ^
a.cc:10:1: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 | ans = 'No';
      | ^~~
      | abs
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main() {
	string s;
	cin >> s;
	for (int i = 0; i > s.size-1(); i++) {
		string s1=s[i]+s[i+1];
		if (s1 == "AC") {
			cout << "Yes" << endl;
			return 0;
		}
	}
	cout << "No" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:37: error: expression cannot be used as a function
    7 |         for (int i = 0; i > s.size-1(); i++) {
      |                                    ~^~
a.cc:8:31: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |                 string s1=s[i]+s[i+1];
Language: C++

#include <bits/stdc++.h>

using namespace std;

char s[10];

int main() {
	gets(s);
	for(int i = 1; i < strlen(s); i++) if(s[i-1] == 'A' && s[i] == 'C') { printf("Yes"); return 0; }
	printf("NO");
    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(s);
      |         ^~~~
      |         getw
Language: Java

package com.company;
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        if (S.indexOf("AC")==-1) System.out.println("No");
        else System.out.printlm("Yes");
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
        else System.out.printlm("Yes");
                       ^
  symbol:   method printlm(String)
  location: variable out of type PrintStream
1 error
Language: Java

package com.company;
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.nextLine();
        if (S.indexOf("AC")==-1) System.out.println("No");
        else System.out.printlm("Yes")
    }
}

Compiler output:
Main.java:8: error: ';' expected
        else System.out.printlm("Yes")
                                      ^
1 error
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstdlib>
#include<cstring>
using namespace std;
int n,s[100001];
int main()
{
	scanf("%s",s+1);
	for(int i=1;i<strlen(s+1);i++)
	{
		if(s[i]=='A'&&s[i+1]=='C') 
		{
			printf("Yes");
			return 0;
		}
	}
	printf("No");
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:11:31: error: cannot convert 'int*' to 'const char*'
   11 |         for(int i=1;i<strlen(s+1);i++)
      |                              ~^~
      |                               |
      |                               int*
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:5:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstdlib>
#include<cstring>
using namespace std;
int n,a[100001];
int main()
{
	scanf("%s",s+1);
	for(int i=1;i<strlen(s+1);i++)
	{
		if(s[i]=='A'&&s[i+1]=='C') 
		{
			printf("Yes");
			return 0;
		}
	}
	printf("No");
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: 's' was not declared in this scope
   10 |         scanf("%s",s+1);
      |                    ^
Language: C++

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

int main()
{
    char s[10];
    gets(s);
    for(int i=0; s[i]; i++)
    {
        if(s[i]=='A'&&s[i+1]=='C')
        {
            printf("Yse\n");
            return 0;
        }
    }
    printf("No\n");
    return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string ss,s;
    while(cin>>ss)
    {
        s="AC";
        if(ss.find(s)!=std::string::npos)
            printf("Yes\n");
        else printf("No\n");
    }
    RETURN 0;
}


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

#include <bits/stdc++.h>

#define FI(i,a,b) for(int i=(a);i<=(b);i++)
#define FD(i,a,b) for(int i=(a);i>=(b);i--)

#define LL long long
#define Ldouble long double
#define PI 3.14159265358979323846264338327950288419

#define PII pair<int,int>
#define PLL pair<LL,LL>
#define mp make_pair
#define fi first
#define se second

using namespace std;

char s[10];
int len;

int main(){
	gets(s);
	len = strlen(s);
	FI(i, 1, len - 1){
		if(s[i] == 'C' && s[i - 1] == 'A'){
			printf("Yes\n");
			return 0;
		}
	}
	printf("No\n");
	return 0;
}


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

#include <stdio.h>
#include <string.h>
int main()
{
char str[100];
scanf("%s", str);
int a = 0, c = 0, i;
for(i = 0; i < strlen(str)-1;i++){
if(str[i] == 'A' && str[i+1] = 'C')
a = 1;
}
if(a)
printf("Yes\n");
else
printf("No\n");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: lvalue required as left operand of assignment
    9 | if(str[i] == 'A' && str[i+1] = 'C')
      |    ~~~~~~~~~~~~~~^~~~~~~~~~~
Language: C++

#include <cstdio>
int buf[10];
int main(){
	scanf("%s",buf);
	int len=strlen(buf);
	bool A=false;
	for(int i=0;i<len;i++){
		if(A){
			if(buf[i]=='C'){
				puts("Yes");
				exit(0);
			}
		}
		else{
			if(buf[i]=='A')
				A=true;
		}
	}
	puts("No");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'strlen' was not declared in this scope
    5 |         int len=strlen(buf);
      |                 ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <cstdio>
  +++ |+#include <cstring>
    2 | int buf[10];
a.cc:11:33: error: 'exit' was not declared in this scope
   11 |                                 exit(0);
      |                                 ^~~~
a.cc:2:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
    1 | #include <cstdio>
  +++ |+#include <cstdlib>
    2 | int buf[10];
Language: C++

#pragma GCC optimize("O2")
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<limits.h>
#include<ctime>
#define N 100001
typedef long long ll;
const int inf=0x3fffffff;
const int maxn=2017;
using namespace std;
inline int read()
{
    int f=1,x=0;char ch=getchar();
    while(ch>'9'|ch<'0')
    {
        if(ch=='-')
        f=-1;
        ch=getchar();
    }
    while(ch<='9'&&ch>='0')
    {
        x=(x<<3)+(x<<1)+ch-'0';
        ch=getchar();
    }
    return f*x;
}char s[N];
int main()
{
	scanf("%s",s+1);
	for(int i=1;i<=strlen(s);i++)
	{
		
		if(s[i+1]=="C"&&s[i]=="A")
		{
			cout<<"Yes";return 0;
		}
		
	}
	cout<<"No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   40 |                 if(s[i+1]=="C"&&s[i]=="A")
      |                    ~~~~~~^~~~~
a.cc:40:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   40 |                 if(s[i+1]=="C"&&s[i]=="A")
      |                                 ~~~~^~~~~
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    String ans = "No";
    for(int i = 0; i < s.length() - 1; i++) {
      if((s.charAt(i) == 'A')) && (s.charAt(i + 1) == 'C')) ans = "Yes";
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:9: error: illegal start of expression
      if((s.charAt(i) == 'A')) && (s.charAt(i + 1) == 'C')) ans = "Yes";
                               ^
Main.java:9: error: ';' expected
      if((s.charAt(i) == 'A')) && (s.charAt(i + 1) == 'C')) ans = "Yes";
                                                          ^
2 errors
Language: C++

var s:string;
    i:longint;
begin
  readln(s);
  for i:=1 to length(s)-1 do
  if (s[i]='A')and(s[i+1]='C') then
  begin
    writeln('Yes');
    exit;
  end;
  writeln('No');
end,

Compiler output:
a.cc:8:13: warning: multi-character character constant [-Wmultichar]
    8 |     writeln('Yes');
      |             ^~~~~
a.cc:11:11: warning: multi-character character constant [-Wmultichar]
   11 |   writeln('No');
      |           ^~~~
a.cc:1:1: error: 'var' does not name a type
    1 | var s:string;
      | ^~~
a.cc:2:6: error: found ':' in nested-name-specifier, expected '::'
    2 |     i:longint;
      |      ^
      |      ::
a.cc:2:5: error: 'i' does not name a type
    2 |     i:longint;
      |     ^
a.cc:3:1: error: 'begin' does not name a type
    3 | begin
      | ^~~~~
a.cc:5:3: error: expected unqualified-id before 'for'
    5 |   for i:=1 to length(s)-1 do
      |   ^~~
a.cc:9:5: error: 'exit' does not name a type
    9 |     exit;
      |     ^~~~
a.cc:1:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
  +++ |+#include <cstdlib>
    1 | var s:string;
a.cc:10:3: error: 'end' does not name a type
   10 |   end;
      |   ^~~
a.cc:11:10: error: expected constructor, destructor, or type conversion before '(' token
   11 |   writeln('No');
      |          ^
a.cc:12:1: error: 'end' does not name a type
   12 | end,
      | ^~~
Language: C++

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

int main(){
	string s;
	cin>>s;
	bool f = false;
	if(s[0] == 'A') f = true;
	for(int i=1;i<s.size();i++){
		if(s[i] == 'C' && f){
			cout<<"Yes"<<endl;
			return 0;
		}
		f = false;
		else if(s[i] == 'A'){
			f = true;
		}
	}
	cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'else' without a previous 'if'
   15 |                 else if(s[i] == 'A'){
      |                 ^~~~
Language: C++

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

#define endl '\n'

int main() {
    ios::sync_with_stdio(0);

    char s[12];
    gets(s);
    for(int i = 0; i <= 5; i++) {
        if(s[i] == 'A' && s[i + 1] == 'C') {
            cout << "Yes";
            return 0;
        }
    }
    cout << "No";

    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(s);
      |     ^~~~
      |     getw
Language: C++

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


int main(void){
	char s[6];

	scanf("%s", s);

	int i = 0;
	while (s[i+1] != '\0'){
		if (s[i] == 'A' && s[i+1] == 'C'){
			cout << "Yes" << endl;
			return 0;
		}
		i++;
	}

	cout << "No" << endl;

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |                         cout << "Yes" << endl;
      |                         ^~~~
      |                         std::cout
In file included from a.cc:2:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |                         cout << "Yes" << endl;
      |                                          ^~~~
      |                                          std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:19:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |         cout << "No" << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:19:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 |         cout << "No" << endl;
      |                         ^~~~
      |                         std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <stdio.h>
#include <string.h>
int main()
{
char str[100];
scanf('%s", str);
int a = 0, c = 0, i;
for(i = 0; i < strlen(str);i++){
if(str[i] == 'A')
a = 1;
if(str[i] == 'C')
c = 1;
}
if(a && c)
printf("Yes\n");
else
printf("No\n");
return 0;
}

Compiler output:
a.cc:6:7: warning: missing terminating ' character
    6 | scanf('%s", str);
      |       ^
a.cc:6:7: error: missing terminating ' character
    6 | scanf('%s", str);
      |       ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:1: error: expected primary-expression before 'int'
    7 | int a = 0, c = 0, i;
      | ^~~
a.cc:7:12: error: 'c' was not declared in this scope
    7 | int a = 0, c = 0, i;
      |            ^
a.cc:7:19: error: 'i' was not declared in this scope
    7 | int a = 0, c = 0, i;
      |                   ^
a.cc:10:1: error: 'a' was not declared in this scope
   10 | a = 1;
      | ^
a.cc:14:4: error: 'a' was not declared in this scope
   14 | if(a && c)
      |    ^
Language: C++

#include <cstdio>
#include <iostream> 
#include <string>
#include <vector>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <intrin.h>

using namespace std;
using ll = long long;

const ll INF = 1e9;
const ll MOD = 1e9 + 7;
int dx[4] = { 1,0,-1,0 };
int dy[4] = { 0,1,0,-1 };

int main()
{
	int f = 0, i, n;
	string s;

	cin >> s;
	n = s.length();

	for (i = 0; i < n - 1; i++) {
		if (s[i] == 'A' && s[i + 1] == 'C') {
			f = 1;
		}
	}

	if (f) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}

	return 0;
}

Compiler output:
a.cc:13:10: fatal error: intrin.h: No such file or directory
   13 | #include <intrin.h>
      |          ^~~~~~~~~~
compilation terminated.
Language: Java

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

public class main {
    public static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    public static PrintWriter pw = new PrintWriter(System.out);
    public static String line;
    public static StringTokenizer st;
    public static ArrayList<ArrayList<Integer>> adjList;
    public static int[] dx = {-1, 0, 1, 0, -1, 1, 1, -1};
    public static int[] dy = {0, 1, 0, -1, 1, 1, -1, -1};
    public static int INF = 0x3f3f3f3f;
    public static int MOD = 1000000007;

    public static void main(String[] args) throws Exception{
        String s = br.readLine();
        boolean f = false;
        for(int i = 0; i < s.length()-1; i++){
            if(s.substring(i, i+2).equals("AC")){
                f = true;
                break;
            }
        }
        pw.print(f ? "Yes\n" : "No\n");

        pw.close(); 
        br.close();
    }
}

class Pair{
    public long x, y;

    Pair(long _x, long _y){
        x = _x;
        y = _y;
    }
}
class Point implements Comparable<Point>{
    public double x, y;

    Point(double x, double y){
        this.x = x;
        this.y = y;
    }

    public int compareTo(Point p){
        if(x != p.x) return x < p.x ? -1 : 1;
        else if(y != p.y) return y < p.y ? -1 : 1;
        return 0;
    }
}

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

#include <bits/stdc++.h>
using namespace std;
int main(void)
{
char s[128];
int i, len;
scanf("%s", s);
len = strlen(s);
for(i = 1;i < len;++i)
if('A'==s[i-1]&&'C'==s[i])
{
puts("Yes"); return 0;
}
puts("No);
return 0;
}

Compiler output:
a.cc:14:6: warning: missing terminating " character
   14 | puts("No);
      |      ^
a.cc:14:6: error: missing terminating " character
   14 | puts("No);
      |      ^~~~~
a.cc: In function 'int main()':
a.cc:15:1: error: expected primary-expression before 'return'
   15 | return 0;
      | ^~~~~~
Language: C++

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

int main(){
  string s;
  int a,b,n,m = 0;
  cin >> s;
  REP(i,s.size()-1){
    if(s[i] == 'A' && s[i+1] == 'C')
      m = 1;
  }
  if(m == 1)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   REP(i,s.size()-1){
      |       ^
a.cc:9:3: error: 'REP' was not declared in this scope
    9 |   REP(i,s.size()-1){
      |   ^~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <set>
#include <algorithm>

#define int_inf 1000000000
#define ll_inf	1000000000000000000

using namespace std;


int main(){
	string s;
	cin >> s;
	
	for(int i=0; i<s.size()-1; i++){
		if(s[i]=="A" && s[i+1]=="C"){
			cout << "Yes" << endl;
			return 0;
		}
	}
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |                 if(s[i]=="A" && s[i+1]=="C"){
a.cc:18:39: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |                 if(s[i]=="A" && s[i+1]=="C"){
Language: C++

import math as mt
import numpy as np

x = input()
for i in range(len(x) - 1):
    if 'AC' == x[i:i+2]:
        print('Yes')
        exit()
print('No')


Compiler output:
a.cc:6:8: warning: multi-character character constant [-Wmultichar]
    6 |     if 'AC' == x[i:i+2]:
      |        ^~~~
a.cc:7:15: warning: multi-character character constant [-Wmultichar]
    7 |         print('Yes')
      |               ^~~~~
a.cc:9:7: warning: multi-character character constant [-Wmultichar]
    9 | print('No')
      |       ^~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import math as mt
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: Java

import java.util.Scanner;

public class QualCProblemA {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();
        if (s.contains("AC"))   {
            System.out.println("Yes");
        } else  {
            System.out.println("No");
        }
    }
}


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

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

char s[114];

int main() {
  scanf("%s", s);
  int n = strlen(s);
  for (int i=0; i<=n-2; i++) {
    if (S[i] == 'A' &&  S[i+1] == 'C') {
      puts("Yes");
      return 0;
    }
  }
  puts("No");
}


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

#include <bits/stdc++.h>
#define ll long long

using namespace std;

ll gcd(ll a,ll b){
	if(b==0)return a;return gcd(b,a%b);
}
ll expo(ll base,ll pow){
    ll ans = 1;
    while(pow != 0){
        if(pow&1==1){ans = (ans*base)%mod;}
        base = (base*base)%mod;
        pow/=2;
        }
        return ans;
}
ll inv(ll x){return expo(x,mod-2);}

ll lt[1234][1234], rt[1234][1234], upper[1234][1234], lower[1234][1234];

int dist(int x1, int y1, int x2, int y2){
    return abs(x1-x2)+abs(y1-y2);
}


int arr[12345678];

int main(){
    //freopen("ip.txt", "rt", stdin);
    //freopen("op.txt", "wt", stdout);

    string s;
    cin >> s;
    for(int i = 0; i < s.size()-1; i++){
        if(s[i] == 'A' && s[i+1] == 'C'){
            cout << "Yes";
            return 0;
        }
    }
    cout << "No";
}


Compiler output:
a.cc: In function 'long long int expo(long long int, long long int)':
a.cc:12:39: error: 'mod' was not declared in this scope; did you mean 'modf'?
   12 |         if(pow&1==1){ans = (ans*base)%mod;}
      |                                       ^~~
      |                                       modf
a.cc:13:28: error: 'mod' was not declared in this scope; did you mean 'modf'?
   13 |         base = (base*base)%mod;
      |                            ^~~
      |                            modf
a.cc: In function 'long long int inv(long long int)':
a.cc:18:28: error: 'mod' was not declared in this scope; did you mean 'modf'?
   18 | ll inv(ll x){return expo(x,mod-2);}
      |                            ^~~
      |                            modf
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define equals(a, b) (fabs((a) - (b)) < EPS)

typedef long long ll;
typedef pair < int , int > Pi;

const int INF = 1 << 28;
const ll LLINF = 1LL << 60;
const double EPS = 1e-9;

int main()
{
    bool flag = false;
    string S;
    cin >> S;
    for(int i = 0; i < S.size() - 1; i++) {
        if(S[i] == 'A' && A[i + 1] == 'C') {
            flag = true;
        }
    }
    if(flag) cout << "Yes" << endl;
    else cout << "No" << endl;
    return (0);
}

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

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;
typedef long double ld;
inline void debugMode() {
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif // ONLINE_JUDGE
}
inline void PrintYes() { cout << "YES\n"; }
inline void PrintNo() { cout << "NO\n"; }

const int NMax = 1005;

int DP[300];

int main(){
    //debugMode();

    string s;
    cin >> s;

    for(int i = 0; i < (int)s.size() - 1) {
        if(s[i] == 'A' && s[i + 1] == 'C') {
            cout << "Yes";
            return 0;
        }
    }
    cout << "No";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:41: error: expected ';' before ')' token
   26 |     for(int i = 0; i < (int)s.size() - 1) {
      |                                         ^
      |                                         ;
Language: C++

#include<bits/stdc++.h>

using namespace std;

using int64 = long long;

int main()
{
  string S;
  cin >> S;
  for(int i = 0; i < 4; i++) {
    if(S[i] == 'A' && S[i + 1] == 'C') {
      cotu << "Yes" << endl;
      return (0);
    }
  }
  cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: 'cotu' was not declared in this scope
   13 |       cotu << "Yes" << endl;
      |       ^~~~
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int[] a = new int[n];
		for(int i=0; i<a.length; i++){
			a[i] = scn.nextInt();
		}
      	int check = 1;
      	for(int i=0; i<a.length; i++){
			if(a[i]%2==0) check*=2;
		}
      	int ans = Math.pow(3,n) - check;
      	System.out.println(ans);
	}
}


Compiler output:
Main.java:15: error: incompatible types: possible lossy conversion from double to int
      	int ans = Math.pow(3,n) - check;
      	                        ^
1 error
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int[] a = new int[n];
		for(int i=0; i<a.length; i++){
			a[i] = scn.nextInt();
		}
      	int check = 1;
      	for(int i=0; i<a.length; i++){
			if(a[i]%2==0) check*=2;
		}
      	long ans = Math.pow(3,n) - check;
      	System.out.println(Math.pow(2,n));
	}
}


Compiler output:
Main.java:15: error: incompatible types: possible lossy conversion from double to long
      	long ans = Math.pow(3,n) - check;
      	                         ^
1 error
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int[] a = new int[n];
		for(int i=0; i<a.length; i++){
			a[i] = scn.nextInt();
		}
      	int check = 1;
      	for(int i=0; i<a.length; i++){
			if(a[i]%2==0) check*=2;
		}
      	int ans = Math.pow(3,n) - check;
      	System.out.println(Math.pow(2,n));
	}
}


Compiler output:
Main.java:15: error: incompatible types: possible lossy conversion from double to int
      	int ans = Math.pow(3,n) - check;
      	                        ^
1 error
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int[] a = new int[n];
		for(int i=0; i<a.length; i++){
			a[i] = scn.nextInt();
		}
      	int check = 0;
      	for(int i=0; i<a.length; i++){
			if(a[i]%2==0) check=1;
		}
      	if(check==0) System.out.println("0");
      	else System.out.println(math.pow(2,n));
	}
}

Compiler output:
Main.java:16: error: cannot find symbol
      	else System.out.println(math.pow(2,n));
      	                        ^
  symbol:   variable math
  location: class Main
1 error
Language: C++

#include <cmath>
#include <iostream>

int main() {
    int n, c{}, a;
    std::cin >> n;

    while (std::cin >> a)
        c += a & 1;

    std::cout << std::pow(3, n) - (1 << (n - c)) << std::endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:11:63: error: expected '}' at end of input
   11 |     std::cout << std::pow(3, n) - (1 << (n - c)) << std::endl;
      |                                                               ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <cmath>
#include <iostream>
​
int main() {
    int n, c{}, a;
    std::cin >> n;
​
    while (std::cin >> a)
        c += a & 1;
​
    std::cout << std::pow(3, n) - (1 << n - c) << std::endl;


Compiler output:
a.cc:3:1: error: '\U0000200b' does not name a type
    3 | ​
      |
Language: C++

#include<bits/stdc++.h>
2
using namespace std;
3
​
4
int main() {
5
  int n; cin >> n;
6
  int a[n], all = 1;
7
  for(int i = 0; i < n; i++) {
8
    cin >> a[i];
9
    all *= 3;
10
  }
11
  int sub = 1;
12
  for(int i = 0; i < n; i++) {
13
    if(a[i] % 2 == 0) sub *= 2;
14
  }
15
  cout << all - sub << endl;
16
}

Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2
      | ^
a.cc:4:1: error: expected unqualified-id before numeric constant
    4 | 3
      | ^
Language: C++

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

int main() {
  int n; cin >> n;
  int a[n];
  for(int i = 0; i < n; i++) cin >> a[i];
  int sub = 1;
  for(int i _ 0; i < n; i++) {
    if(a[i] % 2 == 0) sub *= 2;
  }
  cout << pow(2, n) - sub << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected ';' before '_'
    9 |   for(int i _ 0; i < n; i++) {
      |            ^~
      |            ;
a.cc:9:13: error: '_' was not declared in this scope
    9 |   for(int i _ 0; i < n; i++) {
      |             ^
a.cc:9:14: error: expected ';' before numeric constant
    9 |   for(int i _ 0; i < n; i++) {
      |              ^~
      |              ;
a.cc:9:16: error: expected ')' before ';' token
    9 |   for(int i _ 0; i < n; i++) {
      |      ~         ^
      |                )
a.cc:9:18: error: 'i' was not declared in this scope
    9 |   for(int i _ 0; i < n; i++) {
      |                  ^
Language: C++

int main() {
  int n,cnt=1;
  cin>>n;
  rep(i,n){
    int a;
    cin>>a;
    if(a%2==0){
      cnt*=2;
    }
  }
  cout<<pow(3,n)-cnt<<endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin>>n;
      |   ^~~
a.cc:4:7: error: 'i' was not declared in this scope
    4 |   rep(i,n){
      |       ^
a.cc:4:3: error: 'rep' was not declared in this scope
    4 |   rep(i,n){
      |   ^~~
a.cc:11:3: error: 'cout' was not declared in this scope
   11 |   cout<<pow(3,n)-cnt<<endl;
      |   ^~~~
a.cc:11:9: error: 'pow' was not declared in this scope
   11 |   cout<<pow(3,n)-cnt<<endl;
      |         ^~~
a.cc:11:23: error: 'endl' was not declared in this scope
   11 |   cout<<pow(3,n)-cnt<<endl;
      |                       ^~~~
Language: C

#include <stdio.h>
int main()
{
  int N;
  int A[10][2];
  int i;
  int result_odd, result_total, result;
  scanf("%d", &N);
  for(i = 0; i < N; ++i){
    scanf("%d", &A[i][0]);
    /* 奇数の数 */
    if(A[i][0] % 2 == 1)
      A[i][1] = 1;
    else
      A[i][1] = 2;
  }
  result_odd	= A[0][1];
  result_total	= 3;
  for(i = 1; i < N; ++i){
    result_even	*= 3;
    result_odd	*= A[i][1];
  }
  result = result_total - result_odd;
  printf("%d\n", result);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:5: error: 'result_even' undeclared (first use in this function)
   20 |     result_even *= 3;
      |     ^~~~~~~~~~~
main.c:20:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main(){
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i=0;i<n;++i) cin >> a[i];
  
  vector<int> cnt(n);
  for (int i=0;i<n;++i){
      if (a[i]%2==1) cnt[a[i]]++;
  }
  if (cnt[i]==n) cout << pow(3,n)-1 << endl;
  if (cnt[i]!=n) cout << pow(3,n)-pow(2,n-cnt[i]) << endl;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: 'i' was not declared in this scope
   14 |   if (cnt[i]==n) cout << pow(3,n)-1 << endl;
      |           ^
a.cc:15:11: error: 'i' was not declared in this scope
   15 |   if (cnt[i]!=n) cout << pow(3,n)-pow(2,n-cnt[i]) << endl;
      |           ^
Language: C++

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

int main(){
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i=0;i<n;++i) cin >> a[i];
  
  int cnt=0;
  for (int i=0;i<n;++i){
      if (a[i]%2==1) cnt[a[i]]++;
  }
  if (cnt==n) cout << pow(3,n)-1 << endl;
  if (cnt!=n) cout << pow(3,n)-pow(2,n-cnt) << endl;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: invalid types 'int[__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}]' for array subscript
   12 |       if (a[i]%2==1) cnt[a[i]]++;
      |                         ^
Language: C++

N = int(input())
src = list(map(int,input().split()))
 
whole = 3**N
even = 0
for i in range(N):
    if src[i]%2 == 0: even += 1
 
print(whole - 2**even)

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N = int(input())
      | ^
Language: C++

#include <iostream>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <limits>
#include <numeric>
#include <algorithm>
#include <functional>

#include <vector>

using namespace std;

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	int N;
	cin >> N;

	int all = 1;
	int not = 1;
	for (int i = 0; i < N; i++)
	{
		int v;
		cin >> v;

		all *= 3;
		if (v % 2 == 0) not *= 2;
	}

	cout << all - not;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: expected unqualified-id before 'not' token
   25 |         int not = 1;
      |             ^~~
a.cc:32:37: error: expected primary-expression before '*=' token
   32 |                 if (v % 2 == 0) not *= 2;
      |                                     ^~
a.cc:35:26: error: expected primary-expression before ';' token
   35 |         cout << all - not;
      |                          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
vector<int>vec(n);
for(int i=0;i<n;i++){
  cin >> vec.at(i);
}
int sub=1;
  for(int i=0;i<n;i++){
  if(vec.at(i)%2==0){
  sub*=2;
  else sub*=1;}
  }
  cout << pow(3,n) - sub << endl; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: expected '}' before 'else'
   14 |   else sub*=1;}
      |   ^~~~
a.cc:12:21: note: to match this '{'
   12 |   if(vec.at(i)%2==0){
      |                     ^
a.cc: At global scope:
a.cc:16:3: error: 'cout' does not name a type
   16 |   cout << pow(3,n) - sub << endl;
      |   ^~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

#include<iostream>
#include<cmath>

int main(){
  long n; std::cin>>n;long v =0;for(long i =0;i<n;i++){long f;std::cin >>f;if(f%2==0)v++}
  long long dd = pow(3,n)-pow(2,v);
  std::cout<<dd;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:89: error: expected ';' before '}' token
    5 |   long n; std::cin>>n;long v =0;for(long i =0;i<n;i++){long f;std::cin >>f;if(f%2==0)v++}
      |                                                                                         ^
      |                                                                                         ;
Language: C

#include<stdio.h>

int main()
{
	int N,a;
	scanf_s("%d", &N);
	int n[100000];

	for (int i = 0; i < N; i++)
	{
		scanf("%d", &n[i]);

		if (n[i] == 2)
		{
			printf("%d", i);
			return 0;
		}
	}
	printf("-1");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |         scanf_s("%d", &N);
      |         ^~~~~~~
      |         scanf
Language: C++

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

int main(){
  int n,ev=0,ans1=1; cin>>n;
  for(int i=0;i<n;i++){
    int a; cin>>a;
    if(a%2==0)ev++;
    ans*=3;
  }
  
  int ans2=1;
  for(int i=0;i<ev;i++)ans2*=2;
  
  cout<<ans1-ans2<<endl;
  return 0;
}

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

n = int(input())
a = list(map(int,input().split()))

ans = 1
for i in range(n):
    if a[i]%2 == 0:
        ans *= 2

print(3**n - ans)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;typedef long long ll;
int main(){
  ll n, a, x = 1;
  cin >> n;
  for (ll i = 0; i < n; i++) {
    cin >> a;
    if (a % 2 == 0) {
      x *= 2;
    }
  }
  cout << pow(3, n) - odd << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: 'odd' was not declared in this scope
   12 |   cout << pow(3, n) - odd << endl;
      |                       ^~~
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int main() {
  int n,a[10],all=1;bad=1;
  cin >> n;
  for(int i=0; i<n; i++) {
    cin >> a[i];
    all*=3;
    if(a[i]%2==0) {
      bad*=2;
    }
  }
  cout << all-bad << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: 'bad' was not declared in this scope
    6 |   int n,a[10],all=1;bad=1;
      |                     ^~~
Language: Java

import java.util.Scanner;

public class MainA{
    private static Scanner scanner = new Scanner(System.in);

    public static void main(String args[]){
        int n = scanner.nextInt();
        int maxNum = powInt(3, n);
        int[] array = new int[n];
        for(int i = 0; i < n; ++i){
            array[i] = scanner.nextInt();
        }

        int ans = 0;
        for(int i = 0; i < maxNum; ++i){
            int[] ternary = getTernary(i, n);
            int[] arrayB = getArrayB(array, ternary, n);

            ans += (hasEven(arrayB))? 1 : 0;
        }

        System.out.println(ans);
        // int[] arrTest = getTernary(73, n);
        // System.out.print("[");
        // for(int i = n - 1; i >= 0; --i){
        //     System.out.print(" " + arrTest[i]);
        // }
        // System.out.println(" ]");

    }

    public static int powInt(int a, int x){
        int res = 1;
        for(int i = 0; i < x; ++i){
            res *= a;
        }
        return res;
    }

    public static int[] getTernary(int decimal, int arraySize){
        int[] res = new int[arraySize];
        for(int i = 0; i < arraySize; ++i){
            res[i] = decimal % 3;
            decimal /= 3;
        }
        return res;
    }

    public static int[] getArrayB(int[] array, int[] ternary, int arraySize){
        int[] res = new int[arraySize];
        for(int i = 0; i < arraySize; ++i){
            res[i] = array[i];
            res[i] += (ternary[i] == 0)? -1 : (ternary[i] == 1)? 0 : 1;
        }
        return res;
    }

    public static boolean hasEven(int[] array){
        for(int num : array){
            if(num % 2 == 0){
                return true;
            }
        }
        return false;
    }
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,ans=1;
  cin >>n;
  int a[n];
  for(int i=0;i<n;i++){
    cin >>a[i];
    if(a[i]%2==0)ans*=2;
  cout << pow(3,n)-ans<<endl;
}

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

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

int main()
{
  int N, tem;
  int aaa = 1;
  int ans = 1;
  cin >> N;
  for(int i = 0; i < n; i++) {
    cin >> tem;
    if(tem % 2 == 0)
      aaa *= 2;
    ans *= 3;
  }
  
  cout << ans - aaa << endl;
  
  return 0;
}

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

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

int n, a[10];

int main() {
    cin >> n;
    int MAX = pow(3, n), cnt = 0;
    for (int i = 0; i < n; i++)
        cin >> a[i];
        if (a[i] % 2 == 0) cnt++;
    }
    cout << MAX - pow(2, cnt) << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: 'i' was not declared in this scope
   11 |         if (a[i] % 2 == 0) cnt++;
      |               ^
a.cc: At global scope:
a.cc:13:5: error: 'cout' does not name a type
   13 |     cout << MAX - pow(2, cnt) << endl;
      |     ^~~~
a.cc:15:5: error: expected unqualified-id before 'return'
   15 |     return 0;
      |     ^~~~~~
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
Language: C++

#include "bits/stdc++.h"
#define for(i,a,n) for(int i = (a);i < (n);i++)
typedef unsigned long long ull;
typedef long long ll;
using namespace std;

int main(){
  ull n,memo,cnt = 1;
  
  cin >> n;
  
  ull a[n];
  
  rep(i,0,n){
    cin >> a[i];
    if(a[i] % 2 == 0){
      cnt *= 2;
    }
  }
  
  
  cout << (ull)pow(n,3) - cnt << endl;
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: 'i' was not declared in this scope
   14 |   rep(i,0,n){
      |       ^
a.cc:14:3: error: 'rep' was not declared in this scope
   14 |   rep(i,0,n){
      |   ^~~
Language: C++

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

int main(){
int n, a[100];
cin >> n;
for(int i = 0;i < n;i++) cin >> a[i];

int minus = 0;
for(int i = 0;i < n;i++) if(a[i] % 2) != 0) minus++;

cout << pow(3,n) - pow(2,minus);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:39: error: expected primary-expression before '!=' token
   10 | for(int i = 0;i < n;i++) if(a[i] % 2) != 0) minus++;
      |                                       ^~
Language: C++

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

int N;
int main(){
    cin >> N;
    int t = 1;
    for(int i=0; i<N; i++){
        int x;
        cin >> x;
        t *= ( x % 2 ? 1 : 2);
    }
    cout << pow(3,N) - t << endl;
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: expected '}' at end of input
   16 |     return 0;
      |              ^
a.cc:7:11: note: to match this '{'
    7 | int main(){
      |           ^
Language: C++

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

int main(){
  int n,a,ans;
  ans=1;
  cin>>n;
  for(int i=0;i<n;i++){
  	cin>>a;
    if(a%2==0)ans=ans*2;
  }
  cout<<pow(3,n)-ans<<endl;
  return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: expected '}' at end of input
   14 |   return 0;
      |            ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stdio.h>
using namespace std;
using ll =int long long;
map <int ,int> mpa,mpb;

int main (void){
  int N;
  cin >> N;
  int ans=3**N;
  int A[N];
  int count=0;
  for(int i=0;i<N;i++){
    cin >> A[i];
    if(A[i]%2==0){
      count=count+1;
    }
  }
  ans=ans-2*count;
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: invalid type argument of unary '*' (have 'int')
   18 |   int ans=3**N;
      |             ^~
Language: C++


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

int main(int argc, char** argv)
{
		int N;
		std::vector<int> A;
		scanf("%d", &N);
		int tmp;
		int even_num = 0;
		for(int i=0; i<N; i++) {
			scanf("%d", &tmp);
			A.push_back(tmp);
			if(0 == tmp%2){
				even_num++;
			}
		}

		double base1 = 3;
		double base2 = 2;
		double n1 = N;
		double n2 = even_num;

		double result = pow(base1, n1) - pow(base2, n2);
		printf("%d\n", int(result));
		return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:27:33: error: 'pow' was not declared in this scope
   27 |                 double result = pow(base1, n1) - pow(base2, n2);
      |                                 ^~~
Language: C++

#include <stdio.h>
#include <tchar.h>
#include <iostream>
#include <vector>
#include <algorithm>

int _tmain(int argc, _TCHAR* argv[])
{
		int N;
		std::vector<int> A;
		scanf("%d", &N);
		int tmp;
		int even_num = 0;
		for(int i=0; i<N; i++) {
			scanf("%d", &tmp);
			A.push_back(tmp);
			if(0 == tmp%2){
				even_num++;
			}
		}

		double base1 = 3;
		double base2 = 2;
		double n1 = N;
		double n2 = even_num;

		double result = pow(base1, n1) - pow(base2, n2);
		printf("%d\n", int(result));
		return 0;
}

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

#include <iostream>
#incluse <vector>
#include <math>
int main()
{
int N;
std::vector<int> A;
scanf("%d", &N);
int tmp;
int even_num = 0;
for(int i=0; i<N; i++) {
scanf("%d", &tmp);
A.push_back(tmp);
if(0 == tmp%2){
even_num++;
}
}

double base1 = 3;
double base2 = 2;
double n1 = N;
double n2 = even_num;

double result = pow(base1, n1) - pow(base2, n2);
return int(result)


}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #incluse; did you mean #include?
    2 | #incluse <vector>
      |  ^~~~~~~
      |  include
a.cc:3:10: fatal error: math: No such file or directory
    3 | #include <math>
      |          ^~~~~~
compilation terminated.
Language: C

// 再提出

#include <stdio.h>
#include <math.h>
 
int main(void) {
	int n;
	int hoge = 1;
 
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		int a;
		scanf("%d", &a);
		if (a % 2 == 0)
			hoge *= 2;
	}
 
	printf("%d\n", (int)pow(3, n) - hoge);
 
	return 0;


Compiler output:
main.c: In function 'main':
main.c:20:9: error: expected declaration or statement at end of input
   20 |         return 0;
      |         ^~~~~~
Language: C++

#include<stdio.h>
#include<math.h>
int main()
{
	int n,a,i;
	__int64 sum,sub;
	sum=1;
	sub=1;
	scanf("%d",&n);
	for (i=1;i<=n;i++)
	{
		sum=sum*3;
		scanf("%d",&a);
		if (a%2==0)
			sub=sub*2;
	}
	printf("%I64d\n",sum-sub);
	return 0;

	


}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: '__int64' was not declared in this scope; did you mean '__ynf64'?
    6 |         __int64 sum,sub;
      |         ^~~~~~~
      |         __ynf64
a.cc:7:9: error: 'sum' was not declared in this scope
    7 |         sum=1;
      |         ^~~
a.cc:8:9: error: 'sub' was not declared in this scope; did you mean 'fsub'?
    8 |         sub=1;
      |         ^~~
      |         fsub
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
 
int data[1000];

int main()
{
	int n;
	
	while(~scanf("%d",&n))
	{
		int i,j,sum=0,a;
		for(i=0;i<n;i++)
		{
			scanf("%d",&data[i]);
			if(data[i]%2==0)
			{
				sum++;
			}
		}
		
		a = pow(3,n)-pow(2,sum);
		
		printf("%d\n",a);
	}
	
	return 0;

Compiler output:
main.c: In function 'main':
main.c:28:9: error: expected declaration or statement at end of input
   28 |         return 0;
      |         ^~~~~~
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
 
int data[1000];

int main()
{
	int n;
	
	while(~scanf("%d",&n))
	{
		int i,j,sum=0,a;
		for(i=0;i<n;i++)
		{
			scanf("%d",&data[i]);
			if(data[i]%2==0)
			{
				sum++;
			}
		}
		
		a = pow(3,n)-pow(2,sum);
		
		printf("%d\n",a);
	}
	
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:28:18: error: expected '}' at end of input
   28 |         return 0;
      |                  ^
a.cc:8:1: note: to match this '{'
    8 | {
      | ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	long long int n, a[10], cnt = 0;
	cin >> n;
	for (int i = 0; i < n; i++){
		cin >> a[i];
		if (a[i] % 2 == 0){
			cnt++;
		}
	}
	cout << pow(3, n) - pow(2, cnt) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: 'pow' was not declared in this scope
   13 |         cout << pow(3, n) - pow(2, cnt) << endl;
      |                 ^~~