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

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

int main() {

	char c[101];
	char num,chl;

	scanf("%s", &c);

	num = strlen(c);

	chl = c[(num - 1)];

	printf("%c%d%c",c[0],(num-2),chl);
	
	return 0;

}


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


#include<cstring>
#include<cstdio>



int main()
{
      while(gets(a))
      {
            int n=strlen(a);


  printf("%c",a[0]);
  printf("%d",n-2);
  printf("%c\n",a[n-1]);

      }

}


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


#include<cstring>
#include<cstdio>

using namespace  std;

int main()
{
     string a;
     cin>>a;
     int m=s.size();
     cout<<s[0]<<n-2<<s[n-1]<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: 'string' was not declared in this scope
    9 |      string a;
      |      ^~~~~~
a.cc:4:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    3 | #include<cstdio>
  +++ |+#include <string>
    4 | 
a.cc:10:6: error: 'cin' was not declared in this scope
   10 |      cin>>a;
      |      ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include<cstdio>
  +++ |+#include <iostream>
    4 | 
a.cc:10:11: error: 'a' was not declared in this scope
   10 |      cin>>a;
      |           ^
a.cc:11:12: error: 's' was not declared in this scope
   11 |      int m=s.size();
      |            ^
a.cc:12:6: error: 'cout' was not declared in this scope
   12 |      cout<<s[0]<<n-2<<s[n-1]<<endl;
      |      ^~~~
a.cc:12:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:18: error: 'n' was not declared in this scope
   12 |      cout<<s[0]<<n-2<<s[n-1]<<endl;
      |                  ^
a.cc:12:31: error: 'endl' was not declared in this scope
   12 |      cout<<s[0]<<n-2<<s[n-1]<<endl;
      |                               ^~~~
a.cc:4:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    3 | #include<cstdio>
  +++ |+#include <ostream>
    4 |
Language: C


#include<string.h>
#include<stdio.h>
const int N=100;
char a[N];

int main()
{
      while(gets(a))
      {
            int n=strlen(a);


  printf("%c",a[0]);
  printf("%d",n-2);
  printf("%c\n",a[n-1]);

      }

}


Compiler output:
main.c:5:6: error: variably modified 'a' at file scope
    5 | char a[N];
      |      ^
main.c: In function 'main':
main.c:9:13: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    9 |       while(gets(a))
      |             ^~~~
      |             fgets
Language: C++

#include<iostream>
#include<math.h>
#include<cstdio>
#include<stdio.h>
#include<cstring>
#include<string>
#include<string.h>
#include<cmath>
#include<map>
#include<vector>
#include<set>
#include<algorithm>
#include<bits\stdc++.h>
using namespace std;
int main()
{
	char s[200];
	gets(s);
	cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
	return 0;
}

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


#include<string.h>
#include<stdio.h>
const int N=100;
char a[N];

int main()
{
      gets(a);
    int n=strlen(a);


  printf("%c",a[0]);
  printf("%d",n-2);
  printf("%c\n",a[n-1]);

}


Compiler output:
main.c:5:6: error: variably modified 'a' at file scope
    5 | char a[N];
      |      ^
main.c: In function 'main':
main.c:9:7: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    9 |       gets(a);
      |       ^~~~
      |       fgets
Language: C++

#include<iostream>
#include<cstring>
#include<cstdio>
const int N=100;
char a[N];
using namespace std;
int main()
{
      gets(a);
    int n=strlen(a),sum=0;

  for(int i=1;i<strlen(a)-1;i++)
  {
      sum++;

  }
  printf("%c",a[0]);
  printf("%d",sum);
  printf("%c",a[n-1]);

}


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

#include<iostream>
#include<math.h>
#include<cstdio>
#include<cstring>
#include<string>
#include<string.h>
#include<cmath>
#include<map>
#include<vector>
#include<set>
#include<algorithm>
using namespace std;
int main()
{
	char s[200];
	gets(s);
	cout<<s[0]<<strlen(s)-2<<s[strlen(a)-1];
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   16 |         gets(s);
      |         ^~~~
      |         getw
a.cc:17:43: error: 'a' was not declared in this scope
   17 |         cout<<s[0]<<strlen(s)-2<<s[strlen(a)-1];
      |                                           ^
Language: C++

#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<iomanip>
using namespace std;
int main()
{
    char a[101];
    gets(a);
    int len=strlen(a);
    cout<<a[0]<<(len-2)<<a[len-1];
 
	
	
	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(a);
      |     ^~~~
      |     getw
Language: C++

#include <iostream>
using namespace std;

int main() {
  string s;
  char x[100];
  cin >> s;

  int l = s.length() - 2;
  for (int i = 0; i < s.length(); i++) {
    x[i] = s[i];
  }
  int last = i - 1;

  cout << c[0] << l << c[last];

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: 'i' was not declared in this scope
   13 |   int last = i - 1;
      |              ^
a.cc:15:11: error: 'c' was not declared in this scope
   15 |   cout << c[0] << l << c[last];
      |           ^
Language: C++

#include <iostream>
#include <vector>
#include <utility>
#include <string>
#include <algorithm>
#include <numeric>
#include <cmath>
#define REP(i,j,n) for(int i=j;i<n;i++)
#define SORT(x) sort(x.begin(),x.end())

using namespace std;

int main() {
	char s[101];
	int x;
	
	
	cin >> s;
	x = strlen(s);
	cout << s[0] << strlen(s) - 2 << s[x - 1] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'strlen' was not declared in this scope
   19 |         x = strlen(s);
      |             ^~~~~~
a.cc:8:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    7 | #include <cmath>
  +++ |+#include <cstring>
    8 | #define REP(i,j,n) for(int i=j;i<n;i++)
Language: C++

#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main()
{
    char ch[110];
    gets(ch);
    int len=strlen(ch);
    printf("%c%d%c\n",ch[0],len-2,ch[len-1]);
    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(ch);
      |     ^~~~
      |     getw
Language: C++

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

int main(){
  string s[];

  cin >> s[];

  cout << s.begin() << s.size()-2 << s.end() << endl;  
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: array size missing in 's'
    5 |   string s[];
      |          ^
a.cc:7:12: error: expected primary-expression before ']' token
    7 |   cin >> s[];
      |            ^
a.cc:9:13: error: request for member 'begin' in 's', which is of non-class type 'std::string [1]' {aka 'std::__cxx11::basic_string<char> [1]'}
    9 |   cout << s.begin() << s.size()-2 << s.end() << endl;
      |             ^~~~~
a.cc:9:26: error: request for member 'size' in 's', which is of non-class type 'std::string [1]' {aka 'std::__cxx11::basic_string<char> [1]'}
    9 |   cout << s.begin() << s.size()-2 << s.end() << endl;
      |                          ^~~~
a.cc:9:40: error: request for member 'end' in 's', which is of non-class type 'std::string [1]' {aka 'std::__cxx11::basic_string<char> [1]'}
    9 |   cout << s.begin() << s.size()-2 << s.end() << endl;
      |                                        ^~~
Language: C++

#include <cstdio>
#include <cstdio>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
using namespace std;
int main ()
{
	char s[109];
	gets(s);
	int len = strlen(s);
	printf("%c%d%c",s[0],len-2,s[len-1]);
		}

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

#include <cstdio>
#include <cstdio>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
using namespace std;
int main ()
{
	char s[109];
	gets(s);
	int len = strlen(s);
	printf("%c%d%c",s[0],len-2,s[len-1]);
	
		}

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

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

int main()
{
    char a[101];
    gets(a);
    int n = strlen(a);
    printf("%c%d%c", *a, n - 2, *(a + n - 1));
    return 0;
}


Compiler output:
main.c:4:1: error: unknown type name 'using'
    4 | using namespace std;
      | ^~~~~
main.c:4:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    4 | using namespace std;
      |                 ^~~
main.c: In function 'main':
main.c:9:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    9 |     gets(a);
      |     ^~~~
      |     fgets
Language: C

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

int main()
{
    char a[101];
    gets(a);
    int n = strlen(a);
    printf("%c%d%c", *a, n - 2, *(a + n - 1));
    return 0;
}


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

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

int main()
{
    char a[101];
    gets(a);
    int n = strlen(a);
    printf("%c%d%c", *a, n - 2, *(a + n - 1));
    return 0;
}


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

#include<iostream>
#include<math.h>
#include<cstdio>
#include<cstring>
#include<string>
#include<string.h>
#include<cmath>
#include<map>
#include<vector>
#include<set>
#include<algorithm>
using namespace std;
int main()
{
	char a[2000];
	gets(a);
	cout<<a[0]<<strlen(a)-2<<a[strlen(a)-1];
	
}

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

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

int main()
{
    char a[101];
    gets(a);
    int n = strlen(a);
    printf("%c%d%c", *a, n - 2, *(a + n - 1));
    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(a);
      |     ^~~~
      |     getw
Language: C++

#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main()
{
    char ch[110];
    while(gets(ch))
    {
        int len=strlen(ch);
        printf("%c%d%c\n",ch[0],len-2,ch[len-1]);
    }
    return 0;
}


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

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

int main()
{
    char a[101];
    gets(a);
    int n = strlen(a);
    cout << a[0] << n - 2 << a[n - 1] << endl;
    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(a);
      |     ^~~~
      |     getw
Language: C++

#include <stdio.h>
#include <string.h>
int main()
{
	char s[101];
	while(gets(s))
	{
		int len = strlen(s);
		printf("%c%d%c\n", s[0], len-2, s[len-1]);
	}
	return 0;	
} 

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

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

int main (){
    char s[150] = {0};
    int len = 0;
    cin >> s;
    len = strlen(s);
    cout << s[0] << len - 2 << s[len-1] << "\n";
    
    return 0;
}


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

#include<iostream>
#include<vector>
#include<cstring>
#include<queue>
#include<algorithm>
#include<string>
#include<cstdio>
#include<cstdlib>
#include <math.h>
#define INF 0x3f3f3f3f
using namespace std;
int main() 
{
char s[100];
gets(s);
int len=strlen(s);
printf("%c%d%c",s[0],len-2,s[len-1]);
}

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

#include <string> 
#include <iostream> 
using namespace std;
string s;
int main(){
cin>>s;
cout<<s[0]<<s.size()-2<<s[s.size-1]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:29: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    7 | cout<<s[0]<<s.size()-2<<s[s.size-1]<<endl;
      |                           ~~^~~~
      |                                 ()
Language: C++

  1 #include <iostream>
  2 #include <cstdio>
  3 #include <algorithm>
  4 #include <cmath>
  5 #include <vector>
  6 
  7 using namespace std;
  8 
  9 int main() {
 10 
 11     string s;
 12     cin >> s;
 13     cout << s[0] << (int)s.size() - 2 << s[(int)s.size() - 1] << endl;
 14 
 15     return 0;
 16 }


Compiler output:
a.cc:1:5: error: stray '#' in program
    1 |   1 #include <iostream>
      |     ^
a.cc:2:5: error: stray '#' in program
    2 |   2 #include <cstdio>
      |     ^
a.cc:3:5: error: stray '#' in program
    3 |   3 #include <algorithm>
      |     ^
a.cc:4:5: error: stray '#' in program
    4 |   4 #include <cmath>
      |     ^
a.cc:5:5: error: stray '#' in program
    5 |   5 #include <vector>
      |     ^
a.cc:1:3: error: expected unqualified-id before numeric constant
    1 |   1 #include <iostream>
      |   ^
a.cc:8:3: error: expected unqualified-id before numeric constant
    8 |   8
      |   ^
Language: C++

#include <stdio.h>
#include <string.h>
char s[105];

int main(){
	int n;
	gets(s);
	n=strlen(s);
	printf("%c%d%c\n",s[0],n-2,s[n-1]);
}

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 <algorithm>
#include <cmath>
#include <string>
#include <utility>
using namespace std;

const int INT__MAX = 2147483647;
const int MOD = 1000000007;

int main() {

	string s;

	cin >> s;

	cout << s[0] << s.length - 2 << s[s.length-1] << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:27: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   17 |         cout << s[0] << s.length - 2 << s[s.length-1] << endl;
      |                         ~~^~~~~~
      |                                 ()
a.cc:17:45: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   17 |         cout << s[0] << s.length - 2 << s[s.length-1] << endl;
      |                                           ~~^~~~~~
      |                                                   ()
Language: C++

#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
#define ll long long
char s[105];

int main(){
	int n;
	gets(s);
	n=strlen(s);
	printf("%c%d%c\n",s[0],n-2,s[n-1]);
}

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

import java.util.Scanner;

public class Main099 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        long[] a = new long[n];
        int count4 = 0;
        int count2 = 0;
        int count = 0;
        for (int i = 0; i < a.length; i++) {
            a[i] = sc.nextLong();
            if(a[i] % 4 == 0) {
                count4++;
            } else if(a[i] % 2 == 0) {
                count2++;
            } else {
                count++;
            }
        }

        double b = Math.ceil((n -1) / 2.0);
        double c = b - count4;
        if(b <= count4) {
            System.out.println("Yes");
        } else if(n == count2){
            System.out.println("Yes");
        } else if (count2 > c){
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin >> n;
    queue<int> four;
    queue<int> two;
    queue<int> one;
    for(int i=0;i<n;i++){
        int a;
        cin >> a;
        if(a%4==0)four.push(a);
        else if(a%2==0)two.push(a);
        else one.push(a);
    }
    long long int x[n];
    for(int i=0;i<n;i++){
        if(i%2==0 && !one.empty()){
            x[i]=one.top();
            one.pop();
        }
        else if(i%2==0 && !two.empty()){
            x[i]=two.top();
            two.pop();
        }
        else if(i%2==0 && !four.empty()){
            x[i]=four.top();
            four.pop();
        }
        else if(i%2==1 && !four.empty()){
            x[i]=one.top();
            four.pop();
        }
        else if(i%2==1 && !two.empty()){
            x[i]=two.top();
            two.pop();
        }
        else if(i%2==1 && !two.empty()){
            x[i]=one.top();
            one.pop();
        }
    }
    for(int i=0;i<n-1;i++){
        if((x[i]*x[i+1])%4!=0){
            cout << "No";
            return 0;
        }
    }
    cout << "Yes";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:22: error: 'class std::queue<int>' has no member named 'top'; did you mean 'pop'?
   19 |             x[i]=one.top();
      |                      ^~~
      |                      pop
a.cc:23:22: error: 'class std::queue<int>' has no member named 'top'; did you mean 'pop'?
   23 |             x[i]=two.top();
      |                      ^~~
      |                      pop
a.cc:27:23: error: 'class std::queue<int>' has no member named 'top'; did you mean 'pop'?
   27 |             x[i]=four.top();
      |                       ^~~
      |                       pop
a.cc:31:22: error: 'class std::queue<int>' has no member named 'top'; did you mean 'pop'?
   31 |             x[i]=one.top();
      |                      ^~~
      |                      pop
a.cc:35:22: error: 'class std::queue<int>' has no member named 'top'; did you mean 'pop'?
   35 |             x[i]=two.top();
      |                      ^~~
      |                      pop
a.cc:39:22: error: 'class std::queue<int>' has no member named 'top'; did you mean 'pop'?
   39 |             x[i]=one.top();
      |                      ^~~
      |                      pop
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.at(i);
  int a = 0, b = 0, c = 0;
  for (auto a : A) if (a % 4 == 0) ? a++ : (a % 2 == 0) ? b++ : c++;
  b %= 2;
  c += b;
  cout << ((c - a < 1) ? "Yes" : "No") << "\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:36: error: expected primary-expression before '?' token
   10 |   for (auto a : A) if (a % 4 == 0) ? a++ : (a % 2 == 0) ? b++ : c++;
      |                                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define ll int64_t
#define _GLIBCXX_DEBUG
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
//約数列挙(√N)
vector< int64_t > divisor(int64_t n) {
  vector< int64_t > ret;
  for(int64_t i = 1; i * i <= n; i++) {
    if(n % i == 0) {
      ret.push_back(i);
      if(i * i != n) ret.push_back(n / i);
    }
  }
  sort(begin(ret), end(ret));
  return (ret);
}
//素因数分解(√N)
map< int64_t, int > prime_factor(int64_t n) {
  map< int64_t, int > ret;
  for(int64_t i = 2; i * i <= n; i++) {
    while(n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if(n != 1) ret[n] = 1;
  return ret;
}
//素数テーブル(NloglogN)
vector< bool > prime_table(int n) {
  vector< bool > prime(n + 1, true);
  if(n >= 0) prime[0] = false;
  if(n >= 1) prime[1] = false;
  for(int i = 2; i * i <= n; i++) {
    if(!prime[i]) continue;
    for(int j = i + i; j <= n; j += i) {
      prime[j] = false;
    }
  }
  return prime;
}
//二項係数(K)
template< typename T >
T binomial(int64_t N, int64_t K) {
  if(K < 0 || N < K) return 0;
  T ret = 1;
  for(T i = 1; i <= K; ++i) {
    ret *= N--;
    ret /= i;
  }
  return ret;
}
//二項係数テーブル(N^2)
template< typename T >
vector< vector< T > > binomial_table(int N) {
  vector< vector< T > > mat(N + 1, vector< T >(N + 1));
  for(int i = 0; i <= N; i++) {
    for(int j = 0; j <= i; j++) {
      if(j == 0 || j == i) mat[i][j] = 1;
      else mat[i][j] = mat[i - 1][j - 1] + mat[i - 1][j];
    }
  }
  return mat;
}
int main(){
  int c2=0,c4=0;
  int n;
  cin >> n;
  vector<int> a(n);
  rep(i,n){
    cin >> a.at(i);
    if(!(a.at(i)%4))c4++;
    else if(!(a.at(i)%2))c2++;
  }
  if(c2==0){
    if(c4*2+1>=n)cout << "Yes" << endl;
    else cout << "No" << endl;
  }
  else{
    if(C4*2+c2>=n)cout << "Yes" << endl;
    else cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:84:8: error: 'C4' was not declared in this scope; did you mean 'c4'?
   84 |     if(C4*2+c2>=n)cout << "Yes" << endl;
      |        ^~
      |        c4
Language: C++

int main(void)
{
    int N;
    cin >> N;
    vector<int> a(N);
    int four = 0;
    int two = 0;
    for (int i = 0; i < N; i++)
    {
        cin >> a[i];
        // 4の倍数
        if (a[i] % 4 == 0)
        {
            four++;
        }
        else if (a[i] % 2 == 0)
        {
            two++;
        }
    }
    // printf("four = %d, two = %d\n", four, two);

    string ans;
    int sum;
    if (two % 2 == 0)
    {
        sum = four * 4 + two * 2;
    }
    else
    {
        sum = four * 4 + (two - 1) * 2;
    }
    // printf("left = %d, sum = %d\n", (N / 2) * 4, sum);
    if ((N / 2) * 4 <= sum)
    {
        ans = "Yes";
    }
    else
    {
        ans = "No";
    }
    cout << ans << endl;
    return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> N;
      |     ^~~
a.cc:5:5: error: 'vector' was not declared in this scope
    5 |     vector<int> a(N);
      |     ^~~~~~
a.cc:5:12: error: expected primary-expression before 'int'
    5 |     vector<int> a(N);
      |            ^~~
a.cc:10:16: error: 'a' was not declared in this scope
   10 |         cin >> a[i];
      |                ^
a.cc:23:5: error: 'string' was not declared in this scope
   23 |     string ans;
      |     ^~~~~~
a.cc:36:9: error: 'ans' was not declared in this scope
   36 |         ans = "Yes";
      |         ^~~
a.cc:40:9: error: 'ans' was not declared in this scope
   40 |         ans = "No";
      |         ^~~
a.cc:42:5: error: 'cout' was not declared in this scope
   42 |     cout << ans << endl;
      |     ^~~~
a.cc:42:13: error: 'ans' was not declared in this scope
   42 |     cout << ans << endl;
      |             ^~~
a.cc:42:20: error: 'endl' was not declared in this scope
   42 |     cout << ans << endl;
      |                    ^~~~
Language: C++

#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include<math.h>
#define rep(i,n) for(int i = 0;i<(int)(n);i++);
using namespace std;
using ll = long long;
const ll INF = 100100100100100;

ll two(ll a) {//何回2で割れるか　２以上は変わらないので２にする
	ll cnt = 0;
	while (true) {
		if (a % 2 == 0) {
			a /= 2;
			cnt++;
		}
		else break;
	}
	if (cnt >= 2) return 2;
	else return cnt;
}
int main() {
	ll N;
	cin >> N;
	vector<ll> a(N);
	ll count = 0;
	for (int i = 0; i < N; i++) {
		cin >> count;
		a[i] = two(cnt);
	}//{1 2 4 8}ならa ={0 1 2 2}
	vector<ll> twonum(3);//{0の数,１の数,２の数}
	for (int i = 0; i < N; i++) twonum[a[i]]++;
	if (twonum[1] == 1)twonum[0] += 1;
	if (twonum[0] <= twonum[2] * 2)cout << "Yes" << endl;
	else cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:28: error: 'cnt' was not declared in this scope; did you mean 'int'?
   43 |                 a[i] = two(cnt);
      |                            ^~~
      |                            int
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define ll long long int
int sage(int n){
if(n%2==1){
  return n/2+1;
}else
{
  return n/2;
}
 
 
}
int main(){
int n;
cin>>n;
ll a[n];
int count2=0,count4=0;
rep(i,n){
  cin>>a[i];
  if(a[i]%4==0){
    count4++;
  }
  else if(a[i]%2==0){
    count2++;
  }
}
 
 
if(count2>1&&sage(n-count2-count4)<=count4){
  cout<<"Yes"<<endl;
}else if(count<=1&&sage(n-count4)<=count4){
  cout<<"Yes"<<endl;
}
else
{
  cout<<"No"<<endl;
}
 
 
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:15: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<='
   34 | }else if(count<=1&&sage(n-count4)<=count4){
      |          ~~~~~^~~
Language: C++

using namespace std;

#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;

int main() {
    int n; cin >> n;
    ll cnt1 = 0, cnt2 = 0;
    for(int i = 0; i < n; i++){
        ll a; cin >> a;
        if(a % 4 == 0) cnt1++;
        if(a % 2 == 0) cnt2++;
    }
    if(cnt1 == 0){
        if(cnt2 == n){
            cout << "Yes" << endl;
        }else{
            cout << "No" << endl;
        }
    }else if((n % 2 == 1 && cnt1 % 2 == 1) || (n % 2 == 0 && cnt1 % 2 == 0)){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'cin' was not declared in this scope
    8 |     int n; cin >> n;
      |            ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:17:13: error: 'cout' was not declared in this scope
   17 |             cout << "Yes" << endl;
      |             ^~~~
a.cc:17:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:30: error: 'endl' was not declared in this scope
   17 |             cout << "Yes" << endl;
      |                              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:19:13: error: 'cout' was not declared in this scope
   19 |             cout << "No" << endl;
      |             ^~~~
a.cc:19:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:29: error: 'endl' was not declared in this scope
   19 |             cout << "No" << endl;
      |                             ^~~~
a.cc:19:29: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:22:9: error: 'cout' was not declared in this scope
   22 |         cout << "Yes" << endl;
      |         ^~~~
a.cc:22:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:26: error: 'endl' was not declared in this scope
   22 |         cout << "Yes" << endl;
      |                          ^~~~
a.cc:22:26: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:24:9: error: 'cout' was not declared in this scope
   24 |         cout << "No" << endl;
      |         ^~~~
a.cc:24:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:24:25: error: 'endl' was not declared in this scope
   24 |         cout << "No" << endl;
      |                         ^~~~
a.cc:24:25: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
  cin>>N;
  vector<int>A(N);
  
  for(int j=0;j<N;j++){
  int x;
    cin>>x;
    int sum=0;
    for(int i=0; ;i++){
    if(x%2==0){
     x/=2; sum++;
    }else
      break;
      if(sum==2) break;
    }A.at(i)=sum;
  
 }int a1=0;
  int a2=0;
  for(int i=0;i<N;i++){
   if(A.at(i)==1)
     a1++;
    if(A.at(i)==2)
      a2++;
  }if(3*a2+a1-1<N)
    cout<<"No"<<endl;
  else
    cout<<"Yes"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: 'i' was not declared in this scope
   18 |     }A.at(i)=sum;
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
  cin>>N;
  vector<int>A(N){
  int x;
    cin>>x;
    int sum=0;
    for(int i=0; ;i++){
    if(x%2==0){
     x/=2; sum++;
    }else
      break;
      if(sum==2) break;
    }A.at(i)=sum;
  
 }int a1=0;
  int a2=0;
  for(int i=0;i<N;i++){
   if(A.at(i)==1)
     a1++;
    if(A.at(i)==2)
      a2++;
  }if(3*a2+a1-1<N)
    cout<<"No"<<endl;
  else
    cout<<"Yes"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: expected ',' or ';' before '{' token
    6 |   vector<int>A(N){
      |                  ^
Language: C++

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

odd_cnt = 0
multi_4 = 0
for i in range(n):
    if a[i] % 4 == 0:
        multi_4 += 1
    elif a[i] % 2 == 1:
        odd_cnt += 1

if multi_4 + odd_cnt == n:
    print("Yes" if multi_4 >= odd_cnt - 1 else "No")
else:
    print("Yes" if multi_4 >= odd_cnt else "No")

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

#include <iostream>
#include <cstdio>
#include <string>
#include <cmath>
#include <cctype>
#include <cstdlib>
#include <stack>
#include <queue>
#include <vector>
#include <algorithm>
#include <list>
#include <map>
#include <set>
using namespace std;

long long skb(long long i, long long j) {
	int n, a, x = 0, y = 0;
	cin >> n;
	for (int i = 0; i < n; i++) {
		if (a % 4 == 0) x++;
		else if (a % 2 != 0) y++;
	}
	if (y == x + 1 && x + y == n || x >= y) cout << "Yes" << endl;
	else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'long long int skb(long long int, long long int)':
a.cc:25:1: warning: no return statement in function returning non-void [-Wreturn-type]
   25 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(int argc, char *argv[]) {
    int N;
    cin >> N;
    int even = 0;
    int four = 0;
    for (int i = 0; i < N; i++) {
        int cur;
        cin >> cur;
        if (cur % 2 == 0 && cur % 4 != 0) even++;
        if (cur % 4 == 0) four++;
    }
  
    int sum = four * 3 + ((cur / 2) * 2);
    cout << ((sum >= N) ? "YES" : "NO") << endl;
    return 0; 
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:17:28: error: 'cur' was not declared in this scope
   17 |     int sum = four * 3 + ((cur / 2) * 2);
      |                            ^~~
Language: C++

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

signed main(){
    int N; cin >> N;
    int c2 = 0, c4 = 0;
    for(int i = 0; i < N; i++){
        int a; cin >> a;
        if(a % 4 == 0) c4++;
        else if(a % 2 == 0) c2++;
    }
    if(c2 == 0) len = 2 * c4 + 1;
    else len = 2 * c4 + c2;
    if(len >= N) cout << "Yes" << endl;
    else cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: 'len' was not declared in this scope
   13 |     if(c2 == 0) len = 2 * c4 + 1;
      |                 ^~~
a.cc:14:10: error: 'len' was not declared in this scope
   14 |     else len = 2 * c4 + c2;
      |          ^~~
a.cc:15:8: error: 'len' was not declared in this scope
   15 |     if(len >= N) cout << "Yes" << endl;
      |        ^~~
Language: C++

#include<iostream>
#include<vector>
#include<map>
#include<string>
#include<cstdio>
#include<cmath>
#include<algorithm>
using namespace std;
#define rep(i,x,n) for(int i=x;i<n;i++)
using ll=long long;

int n;
vector<ll> T(100);

ll gcl(ll x,ll y){
    if(x<y) swap(x,y);
    while(y>0){
        ll t=x%y;
        x=y;
        y=t;
    }
    return x;
}

int main(){
    cin>>n;
    int count0=0,count2=0,count4=0;
    rep(i,0,n){
        int a;cin>>a;
        if(a%2==1) count0++;
        if(a%4==0) count4++;
        if(a%4==2) count2++;
    }
    if(count0<=count4||(n%2==1&&count4=n/2&&count2==n/2+1)) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:31: error: lvalue required as left operand of assignment
   34 |     if(count0<=count4||(n%2==1&&count4=n/2&&count2==n/2+1)) cout<<"Yes"<<endl;
      |                         ~~~~~~^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina cout << ' '
#define in(n) cin >> n
#define in2(n, m) cin >> n >> m
#define in3(n, m, l) cin >> n >> m >> l
#define out(n) cout << n
const ll mei = (ll)1e9 + 7;

int main(){
  ll n, a, b, d;
  in(n);
  vector<ll> c(n);
  rep(i, n);
    in(c[i]);
  rep(i, n){
    if(c[i] % 4 == 0)
      c[i] = 2;
    else if(c[i] % 2 == 0)
      c[i] = 1;
    else
      c[i] = 0;
  }
  a = b = 0;
  rep(i, n){
    if(c[i] == 0)
      a++;
    if(c[i] == 2)
      b++;
  }
  if(a > b)
    out("No");
  else
    out("Yes");
  memi;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:10: error: 'i' was not declared in this scope
   22 |     in(c[i]);
      |          ^
a.cc:11:22: note: in definition of macro 'in'
   11 | #define in(n) cin >> n
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina cout << ' '
#define in(n) cin >> n
#define in2(n, m) cin >> n >> m
#define in3(n, m, l) cin >> n >> m >> l
#define out(n) cout << n
const ll mei = (ll)1e9 + 7;

int main(){
  ll n, a, b, d;
  in(n);
  vector<ll> c(n);
  in(c[i]);
  rep(i, n){
    if(c[i] % 4 == 0)
      c[i] = 2;
    else if(c[i] % 2 == 0)
      c[i] = 1;
    else
      c[i] = 0;
  }
  a = b = 0;
  rep(i, n){
    if(c[i] == 0)
      a++;
    if(c[i] == 2)
      b++;
  }
  if(a > b)
    out("No");
  else
    out("Yes");
  memi;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:8: error: 'i' was not declared in this scope
   21 |   in(c[i]);
      |        ^
a.cc:11:22: note: in definition of macro 'in'
   11 | #define in(n) cin >> n
      |                      ^
Language: C++

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

int main() {
    int N;
    int a[100001];
    cin >>N;
    double counteven2=0;
    double counteven4=0;
    for(int i=0;i<N;i++){
        cin>>a[i];
        if(a[i]%4==0){
            counteven4+=3.0;
        }else if(a[i]%2==0){
            counteven2++;
        }
    }
    if(counteven4>=N||N-counteven4<=counteven2||){
        cout<<"Yes";
    }else cout<<"No";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:49: error: expected primary-expression before ')' token
   18 |     if(counteven4>=N||N-counteven4<=counteven2||){
      |                                                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll  long long
#define endl '\n'
#define FASTINOUT ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
const ll mod = 1000000007;
const double PI = 3.141592653589793238463;
const int N=4e5+100;
int a[4];
int main()
{
    FASTINOUT;
    int x;
    cin>>x;
    int y[x];
    for (int i=0;i<x;i++){
        cin>>y[i];
        a[y[i]%4]++;
    }
    cout<<(y[0]>=y[1]+y[3]-(y[2]==0))?"Yes":"No");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:49: error: expected ';' before ')' token
   20 |     cout<<(y[0]>=y[1]+y[3]-(y[2]==0))?"Yes":"No");
      |                                                 ^
      |                                                 ;
Language: C++

n = int(input())
l=list(map(int ,input().split()))
four=0
two=0
one=0
for i in range(n):
	if l[i]%2==0:
		if l[i]==2:
			two+=1
		else:
			four+=1
	elif l[i]==1:
		one+=1

if one>=1:
	if n/2>=four>=one/2:
		print('Yes')
	else:
		print('No')
elif two==1:
	if n/2>=four:
		print('Yes')
	else:
		print('No')
elif four+two>=n/2:
	print('Yes')
else:
	print('No')

Compiler output:
a.cc:17:23: warning: multi-character character constant [-Wmultichar]
   17 |                 print('Yes')
      |                       ^~~~~
a.cc:19:23: warning: multi-character character constant [-Wmultichar]
   19 |                 print('No')
      |                       ^~~~
a.cc:22:23: warning: multi-character character constant [-Wmultichar]
   22 |                 print('Yes')
      |                       ^~~~~
a.cc:24:23: warning: multi-character character constant [-Wmultichar]
   24 |                 print('No')
      |                       ^~~~
a.cc:26:15: warning: multi-character character constant [-Wmultichar]
   26 |         print('Yes')
      |               ^~~~~
a.cc:28:15: warning: multi-character character constant [-Wmultichar]
   28 |         print('No')
      |               ^~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

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

const int maxn = 1e5 + 5;
int x,cnt[3];//1 2 4

int main()
{
    while(scanf("%d",&n)==1){
        memset(cnt,0,sizeof cnt);
        for(int i=1;i<=n;i++){
            scanf("%d",&x);
            if(x%4==0) cnt[0]++;
            else if(x%2==0) cnt[1]++;
            else cnt[2]++;
        }
        if(cnt[0]>=cnt[2]+(cnt[1]>0?1:0)) puts("Yes");
        else puts("No");
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 |     while(scanf("%d",&n)==1){
      |                       ^
      |                       yn
Language: C++

#include<cstdio>
#include<cstring>
//long long
const int len = 1e5 + 5;
int a[len],cnt[5];

int main(void)
{
	scanf("%d", &N);
	for (int i = 0; i < N; ++i)
	{
		scanf("%d", &a[i]);
		if (a[i] % 4 == 0)
			++cnt[4];
		else if (!(a[i] & 01))
			++cnt[2];
		else
			++ cnt[1];
	}
	if (cnt[2] == 0 && cnt[4] >= cnt[1] - 1)
		printf("Yes");
	else if (cnt[4] >= cnt[1])
		printf("Yes");
	else
		printf("No");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: 'N' was not declared in this scope
    9 |         scanf("%d", &N);
      |                      ^
Language: C++

import java.util.*
 
fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val a = (0 until n).map { sc.next().toLong() }
    println(problem069c(n, a))
}
 
fun problem069c(n: Int, a: List<Long>): String {
    val fours = a.filter { it % 4 == 0L }
    val twos = a.filter { it % 4 == 2L }
    val ones = a.filter { it % 2 == 1L }
    return if (ones.size <= fours.size) "Yes" else "No"
}

Compiler output:
a.cc:4:29: error: stray '`' in program
    4 |     val sc = Scanner(System.`in`)
      |                             ^
a.cc:4:32: error: stray '`' in program
    4 |     val sc = Scanner(System.`in`)
      |                                ^
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:10:1: error: 'fun' does not name a type
   10 | fun problem069c(n: Int, a: List<Long>): String {
      | ^~~
Language: Java

import java.util.Scanner;


public class Adjacent {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int n = scan.nextInt();
    if (2 <= n && n <= 1.0e5) {
      int[] sunukenoaho = new int[n];
      for (int i = 0; i < n ; i++) {
        sunukenoaho[i] = scan.nextInt();
      }
      int n4 = 0;
      int nodd = 0;
      int neven = 0;
      for (int i = 0; i < n; i++) {
        if (sunukenoaho[i] % 4 == 0) {
          n4++;
        } else if(sunukenoaho[i] % 2 == 0) {
          neven++;
        } else {
          nodd++;
        }
      }

      if (neven > 0) {
        nodd++;
      }

      if (n4 >= nodd - 1) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
    }
  }
}


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

import java.util.*;
class Main
  public static void main(String[] args){
    Scanner scan=new Scanner(System.in);
    int N=scan.nextInt();
    int[] a=new int[N];
    for(int i=0;i<N;i++){
      a[i]=scan.nextInt();
    }
    int count4=0;
    int count2=0;
    for(int i=0;i<N;i++){
      if(a[i]%4==0){
        count4++;
      }
      else if(a[i]%2==0){
        count2++;
      }
    }

    if(count4>=N/2){
      System.out.println("Yes");
    }
    else if(count2>=2||count4-1==N/2){
      System.out.println("Yes");
    }else if(count2==N){
      System.out.println("Yes");
    }
    else{
      System.out.println("No");
    }
  }
}

Compiler output:
Main.java:2: error: '{' expected
class Main
          ^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
  public static void main(String[] args){
                ^
  (use --enable-preview to enable unnamed classes)
Main.java:33: error: class, interface, enum, or record expected
}
^
3 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
#define RALL(A) A.rbegin(),A.rend()
typedef long long ll;
typedef pair<ll,ll> P;
const ll mod=1000000007;
const ll LINF=1LL<<60;
const int INF=1<<30;

int main(){
	ll n,l,tmp = 0;
	cin >> n;
	ll m = n;
	ll flag = 0;
	ll count  = 0;
	for(ll i = 0; i < n; i++) {
		cin >> l;
		if (l == 2){
			count ++;
		}
		else if(l % 4 == 0){
			tmp += 1;
		}
		else{
		  flag++;
		}
	}
	if (count != n && count != 0){
		flag += 1
	}
	// cout << m << endl;
	if (flag <= tmp + 1|| count == n){
		cout << "Yes" << endl;
	}
	else{
		cout << "No" << endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:26: error: expected ';' before '}' token
   35 |                 flag += 1
      |                          ^
      |                          ;
   36 |         }
      |         ~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#include<queue>
#define ll long long
#define itn int
#define co(ans) cout<<ans<<endl;
#define COYE cout<<"YES"<<endl;
#define COYe cout<<"Yes"<<endl;
#define COye cout<<"yes"<<endl;
#define CONO cout<<"NO"<<endl;
#define CONo cout<<"No"<<endl;
#define COno cout<<"no"<<endl;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define RREP(i,n)  FFOR(i,1,n)
#define SORT(V) sort((V).begin(),(V).end())
#define REVERSE(V) reverse((V).begin(),(V).end())
#define INF ((1LL<<62)-(1LL<<31))
#define MOD 1000000007
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
using namespace std;


int main(){
  ll N;
  cin>>N;
  
  ll A[N],L[3];
  REP(i,3) L[i]=0;
  REP(i,N){
    cin>>A[i];
    if(A[i]%4==0) L[2]++;
    else if(A[i]%4==2) L[1]++;
    else L[0]++;
  }
  
  if(L[1]>0) L[0]++;
  
  if(L[2]>=L[0]) COYe;
  else CONo;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:3: error: 'else' without a previous 'if'
   47 |   else CONo;
      |   ^~~~
Language: C++

/**
 *    author:  tourist
 *    created: 20.11.2019 08:37:52       
**/
#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int k1 = 0, k2 = 0, k4 = 0;
  for (int x : a[i]) if (x % 4 == 0) ++k4; else if (x % 2 == 0) ++k2; else ++k1;
  if (k2 == 0 && k4 >= k1 - 1 || k4 >= k1) cout << "Yes"; else cout << "No";
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:18: error: 'i' was not declared in this scope
   17 |   for (int x : a[i]) if (x % 4 == 0) ++k4; else if (x % 2 == 0) ++k2; else ++k1;
      |                  ^
Language: C++

/**
 *    author:  tourist
 *    created: 20.11.2019 08:37:52       
**/
#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int k1 = 0, k2 = 0, k4 = 0;
  for (int x : a[i]) if (a[i] % 4 == 0) ++k4; else if (a[i] % 2 == 0) ++k2; else ++k1;
  if (k2 == 0 && k4 >= k1 - 1 || k4 >= k1) cout << "Yes"; else cout << "No";
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:18: error: 'i' was not declared in this scope
   17 |   for (int x : a[i]) if (a[i] % 4 == 0) ++k4; else if (a[i] % 2 == 0) ++k2; else ++k1;
      |                  ^