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

#include <iostream>
#include <vector>
#include <cmath>

using namespce std;

int main(){
  long long W,H,x,y;
  cin>>W>>H>>x>>y;
  double area = 0;
  bool multiple = false;
  int l2,b2;
  l2 = H*H;
  b2 = W*W;
  double diag = sqrt(l2+b2);
  if(x%diag==0 || y%diag==0){
    multiple = true;
  }
    area = max((W-x) * H, W * (H-y));
  
  if(multiple){
    cout<<area<<" 1\n";
   else
     cout<<area<<" 0\n";
  return 0;
}

Compiler output:
a.cc:5:7: error: expected nested-name-specifier before 'namespce'
    5 | using namespce std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |   cin>>W>>H>>x>>y;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:16:7: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   16 |   if(x%diag==0 || y%diag==0){
      |      ~^~~~~
      |      | |
      |      | double
      |      long long int
a.cc:16:20: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   16 |   if(x%diag==0 || y%diag==0){
      |                   ~^~~~~
      |                   | |
      |                   | double
      |                   long long int
a.cc:19:12: error: 'max' was not declared in this scope; did you mean 'std::max'?
   19 |     area = max((W-x) * H, W * (H-y));
      |            ^~~
      |            std::max
In file included from /usr/include/c++/14/string:51,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:22:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   22 |     cout<<area<<" 1\n";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:23:4: error: expected '}' before 'else'
   23 |    else
      |    ^~~~
a.cc:21:15: note: to match this '{'
   21 |   if(multiple){
      |               ^
a.cc:24:6: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   24 |      cout<<area<<" 0\n";
      |      ^~~~
      |      std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

void main(void){

    int W,H,x,y;
    scanf("%d %d %d %d", &W,&H,&x,&y);
    int a;

    if(x==W/2 && y==H/2) a = 1;
    else a = 0;

    printf("%lf, %d\n", (double)(W*H)/2.0, a);
}

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

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

//AtCoderC++.cpp

using namespace std;

template<typename T> void Show(const vector<vector<T>>& v, string delimiter = " ") {
	for (int i = 0; i < v.size(); i++) {
		for (int j = 0; j < v[i].size(); j++) {
			cout << v[i][j];
			if (j != v[i].size() - 1) {
				cout << delimiter;
			} else {
				cout << endl;
			}
		}
	}
}
template<typename T> void Show(const vector<T>& v, string delimiter = " ") {
	for (int i = 0; i < v.size(); i++) {
		cout << v[i];
		if (i != v.size() - 1) {
			cout << delimiter;
		} else {
			cout << endl;
		}
	}
}
template<typename T> vector<T> getUniform(T value, int n) {
	vector<vector<T>> ts;
	ts.resize(n);
	for (int i = 0; i < n; i++) {
		ts[i] = value;
	}
	return ts;
}
template<typename T> vector<vector<T>> getUniform(T value, int row, int col) {
	vector<vector<T>> ts;
	ts.resize(row);
	for (int i = 0; i < row; i++) {
		ts[i].resize(col);
		for (int j = 0; j < col; j++) {
			ts[i][j] = value;
		}
	}
	return ts;
}
bool All(vector<vector<bool>> ts) {
	int h = ts.size();
	int w = ts[0].size();
	for (int i = 0; i < h; i++)
		for (int j = 0; j < w; j++)
			if (!ts[i][j])return false;
	return true;
}

vector<string> split(string& content, char delim) {
	auto ss = vector<string>();
	string s = "";
	for (size_t i = 0; i < content.length(); i++) {
		if (content[i] == delim) {
			ss.push_back(s);
			s = "";
			continue;
		}
		s += content[i];
	}
	if (s != "")ss.push_back(s);
	return ss;
}

void solveB() {
	int N, X; cin >> N >> X;
	int D = 0;
	int l;
	int count = 0;
	for (size_t i = 0; i < N; i++) {
		if (X < D)break;
		count++;
		cin >> l;
		D += l;
	}
	cout << count << endl;
}
int main() {
	double W, H, x, y;
	cin >> W >> H >> x >> y;
	if (W / 2 == x && H / 2 == y) {
		cout << W * H / 2.0 << " " << 1 << endl;
		return 0;
	}

	if (x == 0 || x == W || y == 0 || y == W || y / x == H / W || (H - y) / x == H / W) {
		cout << H * W / 2.0 << " " << 0 << endl;
		return 0;
	}
	double min_w = min(x, W - x);
	double min_h = min(y, H - y);
	if (W > H) {
		cout << (W*min_h) << " " << 0 << endl;
		return 0;
	} else if (W < H) {
		cout << (H*min_w) << " " << 0 << endl;
		return 0;
	} else {
		cout << min_w * H / << " " << 1 << endl;
		return 0;
	}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:110:37: error: expected primary-expression before '<<' token
  110 |                 cout << min_w * H / << " " << 1 << endl;
      |                                     ^~
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
int main(){
int w,h,x,y,ans;
cin>>w>>h>>x>>y;
int a=min(x*h,(w-x)*h),b=min(y*w;(h-y)*w);
cout<<max(a,b)/1.000000;
if(a==b)cout<<'1';
else cout<<'0';
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:33: error: expected ')' before ';' token
    7 | int a=min(x*h,(w-x)*h),b=min(y*w;(h-y)*w);
      |                             ~   ^
      |                                 )
a.cc:7:41: error: expected ';' before ')' token
    7 | int a=min(x*h,(w-x)*h),b=min(y*w;(h-y)*w);
      |                                         ^
      |                                         ;
Language: C++

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

int main()
{
    int w, h, x, y;
    double sq1, sq2, sq3, sq4;
    cin >> w >> h >> x >> y;

    sq1 = x * h;
    sq2 = (w - x) * h;
    sq3 = (h - y) * w;
    sq4 = y * w;

    if (max(sq1, sq2) == max(sq3, sq4))
    {
         printf("%f 1\n",max({sq1, sq2, sq3, sq4}));
    }
    else
    {
        if (max(sq1, sq2) > max(sq3, sq4))
        {
            printf("%f 0\n",max(sq3, sq4));
            cout << max(sq3, sq4) << " " << 0 << endl;
        }
        else
        {
             printf("%f 0\n",max(sq1, sq2));
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:29: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   20 |          printf("%f 1\n",max({sq1, sq2, sq3, sq4}));
      |                          ~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include<iomanip>
using namespace std;

int main(){
  double w,h,x,y;cin>>w>>h>>x>>y;
  double area=w*h/double(2);
  int ok;
  if((x==(w/2))&&(y==(h/2))){
    ok=1;
  }else{
    ok=0;
  }
  cout<<setprecision(10)<<area<<" "<<ok<<endl;
  
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:18: error: 'cin' was not declared in this scope
    5 |   double w,h,x,y;cin>>w>>h>>x>>y;
      |                  ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<iomanip>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:13:3: error: 'cout' was not declared in this scope
   13 |   cout<<setprecision(10)<<area<<" "<<ok<<endl;
      |   ^~~~
a.cc:13:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

int main()
{
	long long w, h, x, y;
	cin >> w >> h >> x >> y;

	long long menseki[5];
	menseki[1] = x * y;
	menseki[2] = (w - x) * y;
	menseki[3] = (w - x) * (h - y);
	menseki[4] = x * (h - y);

	//long long smallmenseki = min()

	long long mensekia = menseki[1] + menseki[2];
	long long mensekib = menseki[2] + menseki[3];
	long long mensekic = menseki[3] + menseki[4];
	long long mensekid = menseki[1] + menseki[4];

	long long mensekis1 = min(mensekia, mensekic);
	long long mensekis2 = min(mensekib, mensekid);
	cout << max(mensekis1, mensekis2);
	if (mensekis1 == mensekis2)
	{
		cout << " 1" << endl;
	}
	else cout << " 0" << endl;



Compiler output:
a.cc: In function 'int main()':
a.cc:30:35: error: expected '}' at end of input
   30 |         else cout << " 0" << endl;
      |                                   ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int a,b,x,y;
	scanf("%d%d%d%d",&a,&b,&c,&d);
	printf("%d 0",a*b/2);
    return 0;
}

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

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

int main() {
  long long double W, H, x, y;
  cin >> W >> H >> x >> y;
  long long double ans = W * H / 2;
  if ( x == W / 2 && y == H / 2 ) {
    cout << ans << " " << 1;
  } else {
    cout << ans << " " << 0;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'long long' specified with 'double'
    6 |   long long double W, H, x, y;
      |        ^~~~
a.cc:6:8: error: 'long long' specified with 'double'
a.cc:6:8: error: 'long long' specified with 'double'
a.cc:6:8: error: 'long long' specified with 'double'
a.cc:8:8: error: 'long long' specified with 'double'
    8 |   long long double ans = W * H / 2;
      |        ^~~~
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
int main(){
int w,h,x,y,ans;
cin>>w>>h>>x>>y;
int a=min(x*h,(w-x)*h),b=min(y*w;(h-y)*w);
cout<<max(a,b);
if(a==b)cout<<'1';
else cout<<'0';
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:33: error: expected ')' before ';' token
    7 | int a=min(x*h,(w-x)*h),b=min(y*w;(h-y)*w);
      |                             ~   ^
      |                                 )
a.cc:7:41: error: expected ';' before ')' token
    7 | int a=min(x*h,(w-x)*h),b=min(y*w;(h-y)*w);
      |                                         ^
      |                                         ;
Language: C++

#include <iostream>
#include <cmath>

int main(){
  int W, H, x, y;
  cin >> W >> H >> x >> y;
  cout << W*H/2 << " ";
  if((x == W/2 || y == H/2) && !(x == W/2 && y == H/2)) cout << 0;
  else cout << 1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> W >> H >> x >> y;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout << W*H/2 << " ";
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 double w,h,x,y;
  cin>>w>>h>>x>>y;
  int m=0;
  if (x==w/2 && y==h/2){
    m=1}
  
  cout<<w*h/2<<m<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: expected ';' before '}' token
    9 |     m=1}
      |        ^
      |        ;
Language: C++

#include <bits/stdc++.h>

using namespace std;

static const int INF = 1e9 + 7;

template<typename T>
using Vec = vector<T>;

template<typename T, typename T2>
using P = pair<T, T2>;

template<typename... Args>
using Tup = tuple<Args...>;

template<typename T>
using qp = priority_queue<T, Vec<T>, greater<T> >;

template<typename T>
using pq = priority_queue<T>;

using llong = long long;
using ullong = unsigned long long;
using uint = unsigned int;

template<typename T>
T gcd(T x, T y)
{
	return y ? gcd(y, x % y) : x;
}

int w, h, x, y;

void hawawa()
{
	cin >> w >> h >> x >> y;
	if (x == 0) x = w;
	if (y == 0) y = h;
	double size = w * h;
	double ans = 0, sm = 0, big = w;
	for (int i = 0; i < 10000; i++) {
		double mid = (sm + big) / 2;
		double score = (mid + ((mid - x) / y) * h) * h / 2;
		if (score <= size / 2) {
			sm = mid;
			ans = max(ans, score);
		}
		else {
			big = mid; 2 3 1 2
		}
	}
	int check = (x * 2 == w && y * 2 == h);
	cout << fixed << setprecision(10) << ans << " " << check << "\n";
}


int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	hawawa();
}


Compiler output:
a.cc: In function 'void hawawa()':
a.cc:49:37: error: expected ';' before numeric constant
   49 |                         big = mid; 2 3 1 2
      |                                     ^~
      |                                     ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int w,h,x,y;
	cin>>w>>h>>x>>y;
	cout<<w*h/2<<".000000 ";
	if (x=w/2&&y=h/2) cout<<1;
	else cout<<0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: lvalue required as left operand of assignment
    8 |         if (x=w/2&&y=h/2) cout<<1;
      |               ~~~^~~
Language: C++

#include <iostream>
#include <math.h>
#include <algorithm>
#include <string>
#include <string.h>
#include <queue>
#include <vector>
#include <set>
using namespace std;

int main() {
	long double H, W, x, y;
	cin >> H >> W >> x >> y;
	cout << long double(H*W / 2)<<" ";
	int W2 = W, H2 = H;
	if (W / 2 == x&&H / 2 == y/*&&W2 % 2 == 0 && H2 % 2 == 0*/) {
		cout << 1;
	}
	else cout << 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: expected primary-expression before 'long'
   14 |         cout << long double(H*W / 2)<<" ";
      |                 ^~~~
Language: C++

#include<stdio.h>
int main(void){
  double w,h,x,y;
  scanf("%lf %lf %lf %lf",&w,&h,&x,&y);
  double q=w*h/2;
  if(x=w/2&&y=h/2){
    printf("%lf 1",q);
  }
  else{
    printf("%lf 0",q);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: lvalue required as left operand of assignment
    6 |   if(x=w/2&&y=h/2){
      |        ~~~^~~
Language: C++

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

int main()
{
  double w, h, x, y;
  int b;
  cin >> w >> h >> x >> y;
  double a;
  if ((x==(w/2))&&(y==(h/2)))	b=1;
  else b=0;
  else  cout << a <<' '<< b;
  return 0;
}

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

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

int main(){
  int w,h,x,y;
  
  cin >> w >> h >> x >> y;
  
  int min,c=0,a,b;
	a=(w-x)*h;
  	b=w*(h-y);
  	min=min(a,b);
  	if(a==b) c=1;
  	cout << min << c << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: 'min' cannot be used as a function
   12 |         min=min(a,b);
      |             ~~~^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int w,h,x,y;
  cin>>w>>h>>x>>y;
  cout<<max(h*min(x,(w-x)),w*min(y,h-y))<<endl;
  cout<<(2x==w&&2y==h?1:0);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: unable to find numeric literal operator 'operator""x'
    7 |   cout<<(2x==w&&2y==h?1:0);
      |          ^~
a.cc:7:17: error: unable to find numeric literal operator 'operator""y'
    7 |   cout<<(2x==w&&2y==h?1:0);
      |                 ^~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#include<cstdio>
using namespace std;

int main(){
  long long int W,H,x,y;
  cin>>W>>H>>x>>y;
  
  int a=0;
  if(x*2==W && y*2==H) a=1;
  
  long long double ans=1;
  cout<<fixed<<setprecision(9)<<ans*W*H/2;
  cout<<" "<<a<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:8: error: 'long long' specified with 'double'
   18 |   long long double ans=1;
      |        ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
    int W,H,x,y;
    cin>>W>>H>>x>>y;
    cout<<(double)(W*H/2)<<" ";
    if(2x==W&&2y==H) cout<<1<<endl;
     else cout<<0<<endl;;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: unable to find numeric literal operator 'operator""x'
    7 |     if(2x==W&&2y==H) cout<<1<<endl;
      |        ^~
a.cc:7:15: error: unable to find numeric literal operator 'operator""y'
    7 |     if(2x==W&&2y==H) cout<<1<<endl;
      |               ^~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#include<cstdio>
using namespace std;

double main(){
  long long int W,H,x,y;
  cin>>W>>H>>x>>y;
  
  int a=0;
  if(x*2==W && y*2==H) a=1;
  
  long long double ans=W*H/2;
  cout<<fixed<<setprecision(9)<<ans;
  cout<<" "<<a<<endl;
}


Compiler output:
a.cc:11:1: error: '::main' must return 'int'
   11 | double main(){
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:18:8: error: 'long long' specified with 'double'
   18 |   long long double ans=W*H/2;
      |        ^~~~
Language: Java

import java.util.*;
import java.math.*;
 
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// 整数の入
		int w = sc.nextInt();
		int h = sc.nextInt();
		int x = sc.nextInt();
		int y = sc.nextInt();

		double s = w *h;

		System.out.println(s/2);

		if(w/2 == x && w%2==0 && h/2 ==y && h/2%==0){
		System.out.println(1);

	}else{
				System.out.println(0);

	}




	}
}


Compiler output:
Main.java:17: error: illegal start of expression
		if(w/2 == x && w%2==0 && h/2 ==y && h/2%==0){
		                                         ^
1 error
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#include<cstdio>
using namespace std;

int main(){
  long long int W,H,x,y;
  cin>>W>>H>>x>>y;
  
  int a=0;
  if(x*2==W && y*2==H) a=1;
  
  long long double ans=W*H/2;
  cout<<fixed<<setprecision(9)<<ans;
  cout<<" "<<a<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:8: error: 'long long' specified with 'double'
   18 |   long long double ans=W*H/2;
      |        ^~~~
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<iostream>
#include <iomanip>
#include<queue>
#include<algorithm>
#include <functional>
#include<vector>
#include <math.h>
#include <numeric>
#include <stack>
#include <map>
using namespace std;

const int n_max = 100001;
long long W, H, x, y;
int ismany = 0;

int main() {
	cin >> W >> H >> x >> y;
	if ((x == W / 2) && (y == H / 2)) ismany = 1;
	cout << long long(W * H / 2.0) << ismany << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:17: error: expected primary-expression before 'long'
   25 |         cout << long long(W * H / 2.0) << ismany << endl;
      |                 ^~~~
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(Sytem.in);
      	int width = scan.nextInt();	
      	int height = scan.nextInt();
      	int x = scan.nextInt();
      	int y = scan.nextInt();
      	float yoko = 0;//y
      	float tate = 0;//x
        yoko = Math.min(width * (height - y), width * y);
      	tate = Math.min(height * (width - x), height * x);
      	System.out.print(Math.max(tate,yoko));
      	int mi = 0;
      	if(yoko == tate) {
        	mi = 1;
        }
      	System.out.print(" " + mi);
    
    }


}

Compiler output:
Main.java:5: error: cannot find symbol
    	Scanner scan = new Scanner(Sytem.in);
    	                           ^
  symbol:   variable Sytem
  location: class Main
1 error
Language: Java

import java.util.*;
import java.text.*;

public class Test{
	
	public static void main(String [] args) {
		Scanner sc = new Scanner(System.in);
		DecimalFormat df = new DecimalFormat("0.00000000000");
		long H = sc.nextLong(), W = sc.nextLong(), x = sc.nextLong(), y = sc.nextLong();
		double half = H/2.0*W;
		if(H/2.0 == x && W/2.0 == y) {
			System.out.println(df.format(half) + " " + 1);
		}
		else {
			System.out.println(df.format(half) + " " + 0);
		}
	}
	
}

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

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

int main(){
  double W,H,x,y;
  cin >> W >> H >> x >> y;
  double ans=W/2.0*H;
  int f;
  if(W/x==2.0 and H/y==2.0) f=1;
  else f=0
  cout << ans << f << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: expected ';' before 'cout'
   12 |   else f=0
      |           ^
      |           ;
   13 |   cout << ans << f << endl;
      |   ~~~~
Language: C++

using namespace std;
const int N=101;
long double W,H,x,y;
int main(){
    cin>>W>>H>>x>>y;
    printf("%.6Lf\n",1.0*W*H/2);
    if(x==W/2&&y==H/2)  puts("1");
    else    puts("0");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>>W>>H>>x>>y;
      |     ^~~
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:6:5: error: 'printf' was not declared in this scope
    6 |     printf("%.6Lf\n",1.0*W*H/2);
      |     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | using namespace std;
a.cc:7:25: error: 'puts' was not declared in this scope
    7 |     if(x==W/2&&y==H/2)  puts("1");
      |                         ^~~~
a.cc:8:13: error: 'puts' was not declared in this scope
    8 |     else    puts("0");
      |             ^~~~
Language: C++

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

int main(void)
{
	int W, H, x, y;
	cin >> W >> H >> x >> y;
	long long area = 1LL * W * H;
	int a = 0;
	if (x + x == W && y + y == H) a = 1;
	cout << area / 2;
	if (area % 2) cout << ".5";
	cout << " " << a << endl
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:33: error: expected ';' before 'return'
   14 |         cout << " " << a << endl
      |                                 ^
      |                                 ;
   15 |         return 0;
      |         ~~~~~~
Language: C++

int main(void)｛
double W,H,x,y;
cin>>W>>H>>x>>y;
cout<<W*H/2<<endl;
if(x==W/2&&y==H/2) cout<<1<<endl;
else cout<<0<<endl;

return 0;
｝

Compiler output:
a.cc:1:15: error: expected initializer before '\U0000ff5b'
    1 | int main(void)｛
      |               ^~
a.cc:3:1: error: 'cin' does not name a type
    3 | cin>>W>>H>>x>>y;
      | ^~~
a.cc:4:1: error: 'cout' does not name a type
    4 | cout<<W*H/2<<endl;
      | ^~~~
a.cc:5:1: error: expected unqualified-id before 'if'
    5 | if(x==W/2&&y==H/2) cout<<1<<endl;
      | ^~
a.cc:6:1: error: expected unqualified-id before 'else'
    6 | else cout<<0<<endl;
      | ^~~~
a.cc:8:1: error: expected unqualified-id before 'return'
    8 | return 0;
      | ^~~~~~
a.cc:9:1: error: '\U0000ff5d' does not name a type
    9 | ｝
      | ^~
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
#define lli long long int
#define REP(i,s,l) for(lli i=s;i<l;i++)
#define DEBUG 0
#define INF (1LL<<50)

signed main(){

	lli w,h,x,y;
	cin>>w>>h>>x>>y;

	/*x=XXで分ける場合*/
	double ans1 = h * min(x,w-x);
	double ans2 = w * min(y,h-y);

	cout<<max(ans1,ans2)<<" "
	if(ans1==ans2)cout<<1<<endl;
	else cout<<0<<endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:34: error: expected ';' before 'if'
   19 |         cout<<max(ans1,ans2)<<" "
      |                                  ^
      |                                  ;
   20 |         if(ans1==ans2)cout<<1<<endl;
      |         ~~                        
a.cc:21:9: error: 'else' without a previous 'if'
   21 |         else cout<<0<<endl;
      |         ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#pragma region atcoder
#include <atcoder/modint>
using namespace atcoder;
using mint = modint1000000007;
//These are for segment tree
/*int op(int a, int b){return max(a, b);}
int e(){return -1;}
bool f(int v){ return v < target;}
*/
#pragma endregion
#pragma region macros
using ll = long long;
using vi = vector<int>;
using vs = vector<string>;
using vl = vector<ll>;
using vb = vector<bool>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
#define rep(i, n) for(int i = 0; i < n; i++)
#define rrep(i, n) for(int i = n - 1; i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#pragma endregion
#pragma region debug for var, v, vv
#define debug(var)  do{std::cout << #var << " : ";view(var);}while(0)
template<typename T> void view(T e){std::cout << e << std::endl;}
template<typename T> void view(const std::vector<T>& v){for(const auto& e : v){ std::cout << e << " "; } std::cout << std::endl;}
template<typename T> void view(const std::vector<std::vector<T> >& vv){cout << endl;int cnt = 0;for(const auto& v : vv){cout << cnt << "th : "; view(v); cnt++;} cout << endl;}
#pragma endregion

const ll mod = 1000000007;
const int inf = 1001001001;
const ll INF = 1001001001001001001;
const int MAX = 2000005;

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; }
ll modpow(ll a, ll p){ll ret = 1; while(p){if(p & 1){ret = ret * a % mod;} a = a * a % mod; p >>= 1;} return ret;}

int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

/*-----------------------------------------------------------------------------------------------------*/
mint dp[2002][2002];

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n, m; cin >> n >> m;
	vi a(n), b(m);
	rep(i,n) cin >> a[i];
	rep(i,m) cin >> b[i];
	for(int i = 0; i <= n ; i++) dp[i][0] = 1;
	for(int i = 0; i <= m; i++) dp[0][i] = 1;
	for(int i = 0; i < n; i++){
		for(int j = 0; j < m; j++){
			if(a[i] == b[j]) dp[i + 1][j + 1] = dp[i][j + 1] + dp[i + 1][j];
			else dp[i + 1][j + 1] = dp[i][j + 1] + dp[i + 1][j] - dp[i][j];
		}
	}
	cout << dp[n][m].val() << endl;
}

Compiler output:
a.cc:4:10: fatal error: atcoder/modint: No such file or directory
    4 | #include <atcoder/modint>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std;
int main(){
    int n, m;
    cin>>n>>m;
    int a[n], b[m];
    for(int i=0; i<n; i++)
        cin>>a[i];
    for(int i=0; i<m; i++)
        cin>>b[i];
    long long t[n+1][m+1];
    t[0][0]=1;
    for(int i=1; i<n+1; i++){
        t[i][0]=t[i-1][0]+(b[0]==a[i-1]);
        //cout<<t[i][0]<<" "<<t[i-1][0]<<" "<<(b[0]==a[i-1])<<"\n";
    }
    for(int i=1; i<m+1; i++){
        t[0][i]=t[0][i-1]+(b[i-1]==a[0]);
        //cout<<t[0][i]<<" "<<t[0][i-1]<<" "<<(b[i-1]==a[0])<<"\n";
    }

    for(int i=1; i<=n; i++){
        for(int j=1; j<=m; j++){
            t[i][j]=t[i-1][j]+t[i][j-1]-t[i-1][j-1];
            if(a[i]==b[j])
                t[i][j]+=t[i-1][j-1];
            t[i][j]%=1000000007;
        }
    }
    /*for(int i=0; i<=n; i++){
        for(int j=0; j<=m; j++){
            cout<<t[i][j]<<" ";
        }
        cout<<"\n";
    }*/
    cout<<t[i+1][j+1];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:13: error: 'i' was not declared in this scope
   36 |     cout<<t[i+1][j+1];
      |             ^
a.cc:36:18: error: 'j' was not declared in this scope
   36 |     cout<<t[i+1][j+1];
      |                  ^
Language: C++

#include <bits/stdc++.h>

#include <atcoder/all>

// #LIB#

using namespace std;
using namespace atcoder;
using ll = long long;
#define double long double
#define rep(i, n) for (long long i = 0; i < (n); ++i)
#define repr(i, a, b) for (auto i = (a); i < (b); ++i)
#define itr(x, c) for (auto&& x : (c))
#define updatemax(t, v) ((t) = std::max((t), (v)))
#define updatemin(t, v) ((t) = std::min((t), (v)))
#ifdef ONLINE_JUDGE
#define endl _endl
const char _endl = (cin.tie(0), cout.tie(0), ios::sync_with_stdio(0), cout.precision(16), '\n');
#endif

using mint = static_modint<1000000007>;

struct T {
  mint val;
  int size;
};
T st_op(T a, T b) {
  return T{a.val + b.val, a.size + b.size};
}
T st_e() {
  return T{0, 0};
}
T st_map(mint x, T a) {
  return T{a.val + x * a.size, a.size};
}
mint st_comp(mint x, mint y) {
  return x + y;
}
mint st_id() {
  return 0;
}

int main() {
  ll n, m;
  cin >> n >> m;
  vector<ll> s(n);
  rep(i, n) cin >> s[i];
  vector<ll> t(m);
  rep(i, m) cin >> t[i];
  lazy_segtree<T, st_op, st_e, mint, st_map, st_comp, st_id> st(vector<T>(m + 1, T{1, 1}));
  rep(i, n) {
    auto v = s[i];
    for (int j = m - 1; j >= 0; --j) {
      if (t[j] != v) continue;
      st.apply(j + 1, m + 1, st.get(j).val);
    }
  }
  cout << st.get(m).val.val() << endl;
}


Compiler output:
a.cc:3:10: fatal error: atcoder/all: No such file or directory
    3 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
///Welcome to Nasif's Code
#define bug printf("bug\n");
#define bug2(var) cout<<#var<<" "<<var<<endl;
#define co(q) cout<<q<<endl;
#define all(q) (q).begin(),(q).end()
typedef long long int ll;
typedef unsigned long long int ull;
const int MOD = (int)1e9+7;
const int MAX = 1e6;
#define pi acos(-1)
#define inf 1000000000000000LL
#define FastRead    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int dp[2005][2005];
int a[2005],b[2005];
int n,m;
vector<int>index[MAX];
int recur(int l,int r)
{
    if(l>=n)
        return 0;
    int &ret=dp[l][r];
    if(~ret)
        return ret;
    ret=0;
    int cur=a[l];
    int sz=index[cur].size();
  //  cout<<l<<" "<<r<<endl;
    for(int i=0; i<sz; i++)
    {
        if(index[cur][i]>=r)
        {

            ret+=recur(l+1,index[cur][i]+1)+1;
            ret%=MOD;

        }
    }

    ret+=recur(l+1,r);
    ret%=MOD;
    return ret;
}
int main()
{
    FastRead
    //freopen("output.txt", "w", stdout);
    cin>>n>>m;
    for(int i=0; i<n; i++)
        cin>>a[i];
    for(int i=0; i<m; i++)
    {
        cin>>b[i];
        index[b[i]].push_back(i);
    }
    memset(dp,-1,sizeof(dp));
    cout<<(recur(0,0)+1)%MOD<<endl;





    return 0;
}


Compiler output:
a.cc:18:21: error: 'std::vector<int> index [1000000]' redeclared as different kind of entity
   18 | vector<int>index[MAX];
      |                     ^
In file included from /usr/include/string.h:462,
                 from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/strings.h:50:20: note: previous declaration 'const char* index(const char*, int)'
   50 | extern const char *index (const char *__s, int __c)
      |                    ^~~~~
a.cc: In function 'int recur(int, int)':
a.cc:28:17: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   28 |     int sz=index[cur].size();
      |                 ^
a.cc:32:17: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   32 |         if(index[cur][i]>=r)
      |                 ^
a.cc:35:33: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   35 |             ret+=recur(l+1,index[cur][i]+1)+1;
      |                                 ^
a.cc: In function 'int main()':
a.cc:55:14: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   55 |         index[b[i]].push_back(i);
      |              ^
Language: C++

#include <boost/multiprecision/cpp_int.hpp>
namespace mp = boost::multiprecision;
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using INT = mp::cpp_int;
using namespace std;
using ll = long long;
#define loop(i, n) for (ll i = 0; i < n; i++)
#define Loop(i, m, n) for (ll i = m; i < n; i++)
#define mod 1000000007ll
#define all(v) v.begin(), v.end()
#define putout(a) cout << a << endl
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    ll N, M;
    cin >> N >> M;
    vector<INT> S(N), T(M);
    loop(i, N) cin >> S[i];
    loop(i, M) cin >> T[i];
    vector<vector<INT>> dp(N + 1, vector<INT>(M + 1));
    dp[0][0] = 1;
    Loop(i, -1, N)
    {
        Loop(j, -1, M)
        {
            if (i >= 0 && j >= 0 && S[i] == T[j])
                dp[i + 1][j + 1] += dp[i][j];
            if (i >= 0)
                dp[i + 1][j + 1] += dp[i][j + 1];
            if (j >= 0)
                dp[i + 1][j + 1] += dp[i + 1][j];
            if (i >= 0 && j >= 0)
                dp[i + 1][j + 1] -= dp[i][j];
        }
    }
    putout(dp[N][M] % mod);
    return 0;
}


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

#include <bits/stdc++.h>

using namespace std;

long lobg tab_1[2005], tab_2[2005], dp[2005][2005];

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n, m;
    cin >> n >> m;
    for (int i = 1; i <= n; i++)
        cin >> tab_1[i];
    for (int i = 1; i <= m; i++)
        cin >> tab_2[i];
    for (int i = 1; i <= n; i++)
        for (int j = 1; j <= m; j++){
            dp[i][j] = dp[i-1][j] + dp[i][j - 1] - dp[i - 1][j - 1];
            if (tab_1[i] == tab_2[j])
                dp[i][j] += dp[i - 1][j - 1] + 1;
        }
    cout << dp[n][m] + 1 << "\n";
    return 0;
}

Compiler output:
a.cc:5:11: error: expected initializer before 'tab_1'
    5 | long lobg tab_1[2005], tab_2[2005], dp[2005][2005];
      |           ^~~~~
a.cc: In function 'int main()':
a.cc:15:16: error: 'tab_1' was not declared in this scope
   15 |         cin >> tab_1[i];
      |                ^~~~~
a.cc:17:16: error: 'tab_2' was not declared in this scope
   17 |         cin >> tab_2[i];
      |                ^~~~~
a.cc:20:13: error: 'dp' was not declared in this scope; did you mean 'dup'?
   20 |             dp[i][j] = dp[i-1][j] + dp[i][j - 1] - dp[i - 1][j - 1];
      |             ^~
      |             dup
a.cc:21:17: error: 'tab_1' was not declared in this scope
   21 |             if (tab_1[i] == tab_2[j])
      |                 ^~~~~
a.cc:21:29: error: 'tab_2' was not declared in this scope
   21 |             if (tab_1[i] == tab_2[j])
      |                             ^~~~~
a.cc:24:13: error: 'dp' was not declared in this scope; did you mean 'dup'?
   24 |     cout << dp[n][m] + 1 << "\n";
      |             ^~
      |             dup
Language: C++

#pragma GCC optimize("O3")
#include <bits/stdc++.h>
/*
#include<algorithm>
#include<array>
#include<cassert>
#include<cmath>
#include<cstdlib>
#include<functional>
#include<iomanip>
#include<iostream>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<typeinfo>
#include<utility>
#include<vector>
*/
#define int long long int
#define double long double
using namespace std;
#define MOD 1000000007
#define INF 1000000000000000007
const int MAX_N = 1 << 17;
#define rep(i, n) for (int(i) = 0, i##_len = (n); (i) < i##_len; (i)++)
#define reps(i, x) for (int(i) = 1; (i) <= (int)(x); (i)++)
#define rrep(i, x) for (int(i) = ((int)(x)-1); (i) >= 0; (i)--)
#define rreps(i, x) for (int(i) = ((int)(x)); (i) > 0; (i)--)
#define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define pb push_back
#define mp make_pair
#define bit(n) ((int)(1) << (n))
#define all(x) (x).begin(), (x).end()
#define debug(x) std::cout << #x << ": " << (x) << std::endl
#define nint int
using namespace std;
 
int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};
typedef pair<int, int> pii;
typedef pair<double, double> dop;
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;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
struct aaa {
    aaa()
    {
        cin.tie(0);
        ios::sync_with_stdio(0);
        cout << fixed << setprecision(20);
    };
} aaaaaaa;
 
int n,m,s[2001],t[2001],sumarray[2001]={0};

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cin >> n >> m;
    for (int i = 0; i < n; i++) {
        cin >> s[i];
    }
    for (int i = 0; i < m; i++) {
        cin >> t[i];
    }
    int out = 1;
 
    for (int i = 0; i < m; i++) {
        int temp = 0;
        for (int j = 0; j < n; j++) {
            if(j){
                if (t[i] == s[j]) {
                    int prev = temp + sumarray[j];
                    sumarray[j] += (temp + 1);
                  	sumarray[j]%=MOD
                    temp = prev;
                } else {
                    temp += sumarray[j];
                }
            } else {
                temp += sumarray[j];
                if (t[i] == s[j]) {
                    sumarray[j] += 1;
                }
            }
        }
    }
    for (int i = 0; i < n; i++) {
        out += sumarray[i];
        out %= MOD;
    }
    cout << out << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:96:21: error: expected ';' before 'temp'
   96 |                     temp = prev;
      |                     ^~~~
Language: C++

#pragma GCC optimize("O3")
#include <bits/stdc++.h>
/*
#include<algorithm>
#include<array>
#include<cassert>
#include<cmath>
#include<cstdlib>
#include<functional>
#include<iomanip>
#include<iostream>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<typeinfo>
#include<utility>
#include<vector>
*/
#define int long long int
#define double long double
using namespace std;
#define MOD 1000000007
#define INF 1000000000000000007
const int MAX_N = 1 << 17;
#define rep(i, n) for (int(i) = 0, i##_len = (n); (i) < i##_len; (i)++)
#define reps(i, x) for (int(i) = 1; (i) <= (int)(x); (i)++)
#define rrep(i, x) for (int(i) = ((int)(x)-1); (i) >= 0; (i)--)
#define rreps(i, x) for (int(i) = ((int)(x)); (i) > 0; (i)--)
#define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define pb push_back
#define mp make_pair
#define bit(n) ((int)(1) << (n))
#define all(x) (x).begin(), (x).end()
#define debug(x) std::cout << #x << ": " << (x) << std::endl
#define nint int
using namespace std;
 
int dy[] = {0, 0, 1, -1, 0};
int dx[] = {1, -1, 0, 0, 0};
typedef pair<int, int> pii;
typedef pair<double, double> dop;
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;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
struct aaa {
    aaa()
    {
        cin.tie(0);
        ios::sync_with_stdio(0);
        cout << fixed << setprecision(20);
    };
} aaaaaaa;
 
int n,m,s[2001],t[2001],sumarray[2001]={0};

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cin >> n >> m;
    for (int i = 0; i < n; i++) {
        cin >> s[i];
    }
    for (int i = 0; i < m; i++) {
        cin >> t[i];
    }
    int out = 1;
 
    for (int i = 0; i < m; i++) {
        int temp = 0;
        for (int j = 0; j < n; j++) {
            if(j){
                if (t[i] == s[j]) {
                    int prev = temp + sumarray[j];
                    sumarray[j] += (temp + 1);
                    sumarray[j] %= MOD
                    temp = prev;
                } else {
                    temp += sumarray[j];
                }
            } else {
                temp += sumarray[j];
                if (t[i] == s[j]) {
                    sumarray[j] += 1;
                }
            }
        }
    }
    for (int i = 0; i < n; i++) {
        out += sumarray[i];
        out %= MOD;
    }
    cout << out << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:96:21: error: expected ';' before 'temp'
   96 |                     temp = prev;
      |                     ^~~~
Language: C++

//	ZapZu's code hohoho
//	#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define lb lower_bound
#define ub upper_bound
#define dfs_black 1
#define dfs_white -1
#define pr pair
#define vt vector
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

typedef double db;
typedef long long li;
typedef long double ld;

typedef pr<int, int> ii;
typedef pr<ld,ld> dd;

typedef vt<int> vi;
typedef vt<li> vli;
typedef vt<ld> vld;
typedef vt<ii> vii;

typedef map<int, int> mii;
typedef map<int, bool> mib;
typedef map<int, char> mic;

typedef set<int> s_i;
typedef set<char> s_c;

const int MOD = 1e9+7;
const li INF = 1e18;
const ld PI = 4*atan((ld)1);
int s[2005], t[2005];
li dp[2005][2005];
signed main()
{
//	freopen(".inp", "r", stdin);
//	freopen(".out", "w", stdout);
	int n, m;
	cin>>n>>m;
	dp[0][0]=1;
	for(int i=; i<=n; i++)
	{
		cin>>s[i];
		dp[i][0]=1;
	}
	for(int j=1; j<=m; j++)
	{
		cin>>t[j];
		dp[0][j]=1;
	}
	for(int i=1; i<=n; i++)
	{
		for(int j=1; j<=m; j++)
		{
			if(s[i]==t[j]) dp[i][j]=(dp[i-1][j]+dp[i][j-1])%MOD;
			else dp[i][j]=(dp[i][j-1]+dp[i-1][j]-dp[i-1][j-1]+MOD)%MOD;
//			cout<<i<<" "<<j<<dp[i][j]<<endl;
		}
	}
//	for(int i=0;i<=n;i++)
//	{
//		for(int j=0;j<=m;j++)
//		{
//			cout<<dp[i][j]<<" ";
//		}
//		cout<<endl;
//	}
	cout<<dp[n][m];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:50:19: error: expected primary-expression before ';' token
   50 |         for(int i=; i<=n; i++)
      |                   ^
Language: C

2#include <stdio.h>
#include <math.h>

int main(void) {
    int i, j, N, M, res, MOD = pow(10, 9) + 7, S[2010], T[2010], dp[2010][2010], total[2010][2010];
    dp[0][0] = 1;
    res = 1;
    scanf("%d %d", &N, &M);
    for (i = 1; i <= N; i++) {
        scanf("%d", &S[i]);
    }
    for (i = 1; i <= M; i++) {
        scanf("%d", &T[i]);
    }

    for (i = 1; i <= N; i++) {
        for (j = 1; j <= M; j++) {
            if (S[i] == T[j]) {
                dp[i][j] = total[i-1][j-1] + 1;
            } else {
                dp[i][j] = 0;
            }
            total[i][j] = total[i-1][j] + total[i][j-1] - total[i-1][j-1] + dp[i][j];
            total[i][j] %= MOD;
            res += dp[i][j];
            res %= MOD;
        }
    }
    printf("%d", res % MOD);
    return 0;
}

Compiler output:
main.c:1:1: error: expected identifier or '(' before numeric constant
    1 | 2#include <stdio.h>
      | ^
main.c:1:2: error: stray '#' in program
    1 | 2#include <stdio.h>
      |  ^
main.c: In function 'main':
main.c:8:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 |     scanf("%d %d", &N, &M);
      |     ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    2 | #include <math.h>
  +++ |+#include <stdio.h>
    3 | 
main.c:8:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 |     scanf("%d %d", &N, &M);
      |     ^~~~~
main.c:8:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:29:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   29 |     printf("%d", res % MOD);
      |     ^~~~~~
main.c:29:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:29:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:29:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
#define PI 3.14159265359
#define INF 1000100100
#define MOD 1000000007
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define PP pair<P,P>
using namespace std;

ll dp[2005][2005];
ll sum[2005][2005];

int main(){
int n,m; cin >> n >> m;
  int s[n]
  int t[m];
  rep(i,n) cin >> s[i];
  rep(i,m) cin >> t[i]; 
  rep(i,n+1) sum[i][0]=0;
  rep(i,m+1) sum[0][i]=0;

  for(int i=1; i<=n; i++){
    for(int j=1; j<=m; j++){
        sum[i][j]=sum[i-1][j]+sum[i][j-1]-sum[i-1][j-1]+dp[i-1][j-1];
        sum[i][j]%=MOD;
        if(s[i-1]==t[j-1]) dp[i][j]=sum[i][j]+1;
        else dp[i][j]=0;
        dp[i][j]%=MOD;
    }
  }
  /*
  rep(i,n+1){
      rep(j,m+1){
          printf("%2d ",dp[i][j]);
      }
      cout << endl;
  }
*/
  ll ans=1;
  rep(i,n+1)rep(j,m+1){
      ans+=dp[i][j];
      ans%=MOD;
  }
  cout << ans << endl;
return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:17:3: error: expected initializer before 'int'
   17 |   int t[m];
      |   ^~~
a.cc:18:19: error: 's' was not declared in this scope
   18 |   rep(i,n) cin >> s[i];
      |                   ^
a.cc:19:19: error: 't' was not declared in this scope
   19 |   rep(i,m) cin >> t[i];
      |                   ^
a.cc:27:12: error: 's' was not declared in this scope
   27 |         if(s[i-1]==t[j-1]) dp[i][j]=sum[i][j]+1;
      |            ^
a.cc:27:20: error: 't' was not declared in this scope
   27 |         if(s[i-1]==t[j-1]) dp[i][j]=sum[i][j]+1;
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define mod 1e9+7

int main() {
    ll n, m;
    vector<ll> a(n),b(m);
    vector<vector<ll>> dp(n+1, vector<ll>(m+1,1));
    for(ll i=0; i<n; i++) cin>>a[i];
    for(ll j=0; j<m; j++) cin>>b[j];

    for(ll i=0; i<n; i++){
        for(ll j=0; j<m; j++){
            dp[i+1][j+1]=dp[i+1][j] + dp[i][j+1] - dp[i][j];
            if(a[i]==b[j]) dp[i+1][j+1]+=dp[i][j];
            dp[i+1][j+1] += mod;
            dp[i+1][j+1] %= mod;
        }
    }
    cout<<dp[n][m]<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:26: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} and 'double' to binary 'operator%'
   18 |             dp[i+1][j+1] %= mod;
a.cc:18:26: note:   in evaluation of 'operator%=(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type {aka long long int}, double)'