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

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
#define chmax(x,y) x = max(x,y);
#define chmin(x,y) x = min(x,y);
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
const int INF = 1001001001;



int main() {
    int n, m, x, y;
    cin >> n >> m >> X >> Y;
    vector<int> x(n), y(m);
    rep(i,n) cin >> x[i];
    rep(i,m) cin >> y[i];
    sort(x.rbegin(), x.rend());
    sort(y.begin(), y.end());
    if (x[0] >= y[0]) {
        cout << "War" << endl;
        return 0;
    }
    for (int z = X+1; z <= Y; z++) {
        if (x[0] < z && y[0] >= z) {
            cout << "No War" << endl;
            return 0;
        }
    }
    cout << "War" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:22: error: 'X' was not declared in this scope
   16 |     cin >> n >> m >> X >> Y;
      |                      ^
a.cc:16:27: error: 'Y' was not declared in this scope
   16 |     cin >> n >> m >> X >> Y;
      |                           ^
a.cc:17:17: error: conflicting declaration 'std::vector<int> x'
   17 |     vector<int> x(n), y(m);
      |                 ^
a.cc:15:15: note: previous declaration as 'int x'
   15 |     int n, m, x, y;
      |               ^
a.cc:17:23: error: conflicting declaration 'std::vector<int> y'
   17 |     vector<int> x(n), y(m);
      |                       ^
a.cc:15:18: note: previous declaration as 'int y'
   15 |     int n, m, x, y;
      |                  ^
a.cc:18:22: error: invalid types 'int[int]' for array subscript
   18 |     rep(i,n) cin >> x[i];
      |                      ^
a.cc:19:22: error: invalid types 'int[int]' for array subscript
   19 |     rep(i,m) cin >> y[i];
      |                      ^
a.cc:20:12: error: request for member 'rbegin' in 'x', which is of non-class type 'int'
   20 |     sort(x.rbegin(), x.rend());
      |            ^~~~~~
a.cc:20:24: error: request for member 'rend' in 'x', which is of non-class type 'int'
   20 |     sort(x.rbegin(), x.rend());
      |                        ^~~~
a.cc:21:12: error: request for member 'begin' in 'y', which is of non-class type 'int'
   21 |     sort(y.begin(), y.end());
      |            ^~~~~
a.cc:21:23: error: request for member 'end' in 'y', which is of non-class type 'int'
   21 |     sort(y.begin(), y.end());
      |                       ^~~
a.cc:22:10: error: invalid types 'int[int]' for array subscript
   22 |     if (x[0] >= y[0]) {
      |          ^
a.cc:22:18: error: invalid types 'int[int]' for array subscript
   22 |     if (x[0] >= y[0]) {
      |                  ^
a.cc:27:14: error: invalid types 'int[int]' for array subscript
   27 |         if (x[0] < z && y[0] >= z) {
      |              ^
a.cc:27:26: error: invalid types 'int[int]' for array subscript
   27 |         if (x[0] < z && y[0] >= z) {
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
  ll a;
  cin>>a;
  ll b;
  cin>>b;
  ll c=0;
  ll d=100;
  ll e,f;
  cin>>e>>f;
  for(ll i=; i<a;i++){
    ll g;
    cin>>g;
    c=max(g,c);
  }
  for(ll i=0;i<b;i++){
    ll h;
    cin>>h;
    d=min(h,d);
  }
  if(c+1>d){
    cout<<"War"<<endl;
    return 0;
  }
    for(ll i=e;i<=f;i++){
      if(c+1<=i&&i<d){
        cout<<"No War"<<endl;
        return 0;
      }
    }
    cout<<"War"<<endl;
  return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = 1; i < (int)(n+1); i++)
const long long INF = 1LL << 60;
int main(){
    int N,M,X,Y;
    cin>>N>>M>>X>>Y;
    vector<int>x(N);
    vector<int>y(M);
    int X=-1000;
    int Y=1000;
    rep(i,N){
        cin>>x[i];
        if(X<x[i]){
            X=x[i];
        }
    }
    rep(i,M){
        cin>>y[i];
        if(y[i]<Y){
            Y=y[i];
        }
    }
    bool ans=false;
    for(int i=X; i<Y+1; i++){
        if(X<i&&i<=Y){
            ans=true;
        }
    }
    if(ans==false){
        cout<<"War"<<endl;
    }
    else{
        cout<<"No War"<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: redeclaration of 'int X'
   13 |     int X=-1000;
      |         ^
a.cc:9:13: note: 'int X' previously declared here
    9 |     int N,M,X,Y;
      |             ^
a.cc:14:9: error: redeclaration of 'int Y'
   14 |     int Y=1000;
      |         ^
a.cc:9:15: note: 'int Y' previously declared here
    9 |     int N,M,X,Y;
      |               ^
Language: C++

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

int main(){
  int N,M,X,Y;cin>>N>>M>>X>>Y;
  vector<int> x(N),y(M);
  for(int i=0;i<N;i++) cin>>x.at(i);
  for(int i=0;i<M;i++) cin>>y.at(i);
  sort(x.begin(),x.end());
  sort(y.begin(),y.end());
  int minx=x.at(N-1);
  int maxy=y.at(0);
  bool conflict=false;
  if(X>=Y) conflict=true;
  if(minx>=maxy) conflict=true;
  cout<<(conflict?"War":"No War"<<endl;
  
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:16:33: error: invalid operands of types 'const char [7]' and '<unresolved overloaded function type>' to binary 'operator<<'
   16 |   cout<<(conflict?"War":"No War"<<endl;
      |                         ~~~~~~~~^~~~~~
a.cc:16:39: error: expected ')' before ';' token
   16 |   cout<<(conflict?"War":"No War"<<endl;
      |         ~                             ^
      |                                       )
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)n;i++)
int main(){
	int n,m,x,y;cin>>n>>m>>x>>y;
	vector<int> xs(n),ys(m);
	rep(i,n)cin>>xs[i];
	rep(i,m)cin>>ys[i];
	sort(xs.begin(),xs.end());
	sort(ys.begin(),ys.end());
	if(xs[n-1]<ys[0]&&xs[n-1]<y&&x<y&&x<y[0])cout<<"No ";
	cout<<"War"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:46: error: invalid types 'int[int]' for array subscript
   11 |         if(xs[n-1]<ys[0]&&xs[n-1]<y&&x<y&&x<y[0])cout<<"No ";
      |                                              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
#define FAST ios_base::sync_with_stdio(0); cin.tie(); cout.tie();
 
#define MAXX 100005
 
#define PI 3.14159265358979323846264338327950
 
#define F first
#define S second
 
#define ll 	 long long int
 
#define mod  1000000007

 
int main()
{
	FAST;
	ll n, m, x, y;
	cin >> n >> m >> x >> y;
	ll a1= 100, a2 = 100; ll f;
	for(ll i = 0; i < n; i ++){
		cin >> f;
		a1 = max(a1, f);
	}
	for(ll i = 0; i < m; i ++){
		cin >> f;
		a2 = min(a2, f);
	}
	if(a1 <= a2 && a2 = x && a1 != y){
		cout << "No War";
		return 0;
	}
	cout << "War";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:21: error: lvalue required as left operand of assignment
   32 |         if(a1 <= a2 && a2 = x && a1 != y){
      |            ~~~~~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
#define FAST ios_base::sync_with_stdio(0); cin.tie(); cout.tie();
 
#define MAXX 100005
 
#define PI 3.14159265358979323846264338327950
 
#define F first
#define S second
 
#define ll 	 long long int
 
#define mod  1000000007

 
int main()
{
	FAST;
	ll n, m, x, y;
	cin >> n >> m >> x >> y;
	ll a1= 100, a2 = 100; ll f
	for(ll i = 0; i < n; i ++){
		cin >> f;
		a1 = min(a1, f);
	}
	for(ll i = 0; i < m; i ++){
		cin >> f;
		a2 = min(a2, f);
	}
	if(a1 < a2){
		cout << "No War";
		return 0;
	}
	cout << "War";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:9: error: expected initializer before 'for'
   24 |         for(ll i = 0; i < n; i ++){
      |         ^~~
a.cc:24:23: error: 'i' was not declared in this scope
   24 |         for(ll i = 0; i < n; i ++){
      |                       ^
a.cc:29:24: error: 'f' was not declared in this scope
   29 |                 cin >> f;
      |                        ^
Language: C++


#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<cmath>
#include<queue>
#include<stack>
#include<map>
#include<numeric>

using namespace std;

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

template<typename A, typename B> bool chmin(A &a, const B &b){ return b < a && (a = b, true); }
template<typename A, typename B> bool chmax(A &a, const B &b){ return a < b && (a = b, true); }

int main () {
  int n,m,X,Y,cnt = 0,cnt2 = 0;
  cin >> n >> m >> X >> Y;
  vector<int> x(n),y(m);
  for (int i = 0; i < n; i++){
    cin >> x[i];
  }
  for (int i = 0; i < m; i++){
    cin >> y[i];
  }
  for (int i = X+1; i  Y; i++){
    cnt = 0;
    cnt2 = 0;
    for (int j = 0; j < n; j++){
      if (x[i] < i){
        cnt++;
      }
    }
    if (cnt == n){
      cnt2++;
    }
    cnt = 0;
    for (int j = 0; j < m; j++){
      if (y[j] >= i){
        cnt++;
      }
    }
    if (cnt == m && cnt2 == 1 && i > X && i <= Y){
      cout << "No War\n";
      return 0;
    }
  }
  cout << "War\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:22: error: expected ';' before 'Y'
   29 |   for (int i = X+1; i  Y; i++){
      |                      ^ ~
      |                      ;
a.cc:29:25: error: expected ')' before ';' token
   29 |   for (int i = X+1; i  Y; i++){
      |       ~                 ^
      |                         )
a.cc:29:27: error: 'i' was not declared in this scope
   29 |   for (int i = X+1; i  Y; i++){
      |                           ^
Language: C++

# include < iostream >
# include < vector >
using namespace std ;
bool is_war ( const vector <int >& x , const vector <int >& y ) {
for ( int Z = -100; Z <= 100; ++ Z ) {
bool is_ok = true ;
for ( int i = 0; i < x . size (); ++ i ) {
if ( x [ i ] >= Z ) is_ok = false ;
}
for ( int i = 0; i < y . size (); ++ i ) {
if ( y [ i ] < Z ) is_ok = false ;
}
if ( is_ok ) return false ;
}
return true ;
}
int main () {
int N , M ; cin >> N >> M ;
vector <int > x ( N +1) , y ( M +1);
cin >> x [0] >> y [0];
for ( int i = 0; i < N ; ++ i ) {
cin >> x [ i +1];
}
for ( int i = 0; i < M ; ++ i ) {
cin >> y [ i +1];
}
if ( is_war (x , y )) {
cout << " War " << endl ;
}
else {
cout << "No War " << endl ;
}
}

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

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

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int X = sc.nextInt();
		int Y = sc.nextInt();
		int x[] = new int[N];
		int y[] = new int[M];
		for (int i=0;i<N;i++) {
			x[i] = sc.nextInt();
		}
		for (int i=0;i<M;i++) {
			y[i] = sc.nextInt();
		}
		Arrays.parallelSort(x);
		Arrays.parallelSort(y);
		for (int i=X+1;i<=Y;i++) {
			if (x[N-1]<i&&y[0]>=i) {
				System.out.println("No War");
				return ;
			}
		}
		System.out.println("War");
	}

Compiler output:
Main.java:29: error: reached end of file while parsing
	}
	 ^
1 error
Language: C

#include <stdio.h>

int main(){
  int N, M, X, Y;
  scanf("%d %d %d %d", &N, &M, &X, &Y);
  
  int x[N];
  int y[M];
  int xMax = 0;
  int yMin = 0;
  for(i = 0; i < N; i ++){
    scanf("%d", &x[i]);
    if(x[i] < xMax){
      xMax = x[i];
    }
  }
  
  for(i = 0; i < M; i ++){
    scanf("%d", &y[i]);
    if(y[i] > yMin){
      yMin = y[i];
    }
  }
  
  if(x <= y){
    printf("No war");
  } else {
    printf("War");
  }
}



Compiler output:
main.c: In function 'main':
main.c:11:7: error: 'i' undeclared (first use in this function)
   11 |   for(i = 0; i < N; i ++){
      |       ^
main.c:11:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(){
  int N, M, X, Y;
  scanf("%d %d %d %d", &N, &M, &X, &Y);
  
  int x[N];
  int y[M];
  int xMax = 0;
  int yMin = 0;
  for(i = 0; i < N; i ++){
    if(x[i] < xMax){
      scanf("%d", &x[i]);
      xMax = x[i];
    }
  }
  
  for(i = 0; i < M; i ++){
    if(y[i] > yMin){
      scanf("%d", &y[i]);
      yMin = y[i];
    }
  }
  
  if(x <= y){
    printf("No war");
  } else {
    printf("War");
  }
}



Compiler output:
main.c: In function 'main':
main.c:11:7: error: 'i' undeclared (first use in this function)
   11 |   for(i = 0; i < N; i ++){
      |       ^
main.c:11:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(){
  int N, M, X, Y;
  scanf("%d %d %d %d", &N, &M, &X, &Y);
  
  int x[N];
  int y[M];
  
  int i;
  for(i = 0; i < N; i ++){
    scanf("%d", &x[i]);
  }
  
  for(i = 0; i < M; i ++){
    scanf("%d", &y[i]);
  }
  
  int xMax = 0;
  int yMin = 0;
  for(i = 0; i < N; i ++){
    if(x[i] < xMax){
      xMax = x[i];
    }
  }
  
  for(i = 0; i < M; i ++){
    if(y[i] > yMin){
      xMin = y[i];
    }
  }
  
  if(xMax <= Y && yMin >= X){
    printf("No war");
  } else {
    printf("War");
  }
}



Compiler output:
main.c: In function 'main':
main.c:29:7: error: 'xMin' undeclared (first use in this function); did you mean 'yMin'?
   29 |       xMin = y[i];
      |       ^~~~
      |       yMin
main.c:29:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

using namespace std;
#define rep(i, c) for (int i = 0; i < (int)c; i++)
#define all(v) v.begin(), v.end()
int main()
{
    int n, m, x, y;
    scanf("%d%d%d%d", &n, &m, &x, &y);
    vector<int> xl(n), yl(m);
    rep(i, n) scanf("%d", &xl[i]);
    xl.push_back(x);
    rep(i, m) scanf("%d", &yl[i]);
    yl.push_back(y);
    int x_max = *max_element(xl.begin(), xl.end());
    int y_min = *min_element(yl.begin(), yl.end());
    for (int z = x_max + 1; z <= y_min; z++)
    {
        if (z)
        {
            printf("No War\n");
            return 0;
        }
    }
    printf("War\n");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'scanf' was not declared in this scope
    7 |     scanf("%d%d%d%d", &n, &m, &x, &y);
      |     ^~~~~
a.cc:8:5: error: 'vector' was not declared in this scope
    8 |     vector<int> xl(n), yl(m);
      |     ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | using namespace std;
a.cc:8:12: error: expected primary-expression before 'int'
    8 |     vector<int> xl(n), yl(m);
      |            ^~~
a.cc:9:28: error: 'xl' was not declared in this scope; did you mean 'x'?
    9 |     rep(i, n) scanf("%d", &xl[i]);
      |                            ^~
      |                            x
a.cc:10:5: error: 'xl' was not declared in this scope; did you mean 'x'?
   10 |     xl.push_back(x);
      |     ^~
      |     x
a.cc:11:28: error: 'yl' was not declared in this scope; did you mean 'y'?
   11 |     rep(i, m) scanf("%d", &yl[i]);
      |                            ^~
      |                            y
a.cc:12:5: error: 'yl' was not declared in this scope; did you mean 'y'?
   12 |     yl.push_back(y);
      |     ^~
      |     y
a.cc:13:18: error: 'max_element' was not declared in this scope
   13 |     int x_max = *max_element(xl.begin(), xl.end());
      |                  ^~~~~~~~~~~
a.cc:14:18: error: 'min_element' was not declared in this scope
   14 |     int y_min = *min_element(yl.begin(), yl.end());
      |                  ^~~~~~~~~~~
a.cc:19:13: error: 'printf' was not declared in this scope
   19 |             printf("No War\n");
      |             ^~~~~~
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:23:5: error: 'printf' was not declared in this scope
   23 |     printf("War\n");
      |     ^~~~~~
a.cc:23:5: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, c) for (int i = 0; i < (int)c; i++)
int main()
{
    int n, m, x, y;
    scanf("%d%d%d%d", &n, &m, &x, &y);
    vector<int> xl(n), yl(m);
    rep(i, n) scanf("%d", &xl[i]);
    xl.push_back(x);
    rep(i, m) scanf("%d", &yl[i]);
    yl.push_back(y);
    int x_max = *max_element(xl.begin(), xl.end());
    int y_min = *min_element(yl.begin(), yl.end());
    for (int z = x_max + 1; z <= y_min; i++)
    {
        if (z)
        {
            printf("No War\n");
            return 0;
        }
    }
    printf("War\n");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:41: error: 'i' was not declared in this scope
   15 |     for (int z = x_max + 1; z <= y_min; i++)
      |                                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n, m, x, y;
    scanf("%d%d%d%d", &n, &m, &x, &y);
    vector<int> xl(n), yl(m);
    rep(i, n) scanf("%d", &xl[i]);
    xl.push_back(x);
    rep(i, m) scanf("%d", &yl[i]);
    yl.push_back(y);
    int x_max = *max_element(xl.begin(), xl.end());
    int y_min = *min_element(yl.begin(), yl.end());
    for(int i = x_max + 1; i <= y_min; i++) {
        if(i) printf("No War\n");
        return 0;
    }
    printf("War\n");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'i' was not declared in this scope
    8 |     rep(i, n) scanf("%d", &xl[i]);
      |         ^
a.cc:8:5: error: 'rep' was not declared in this scope
    8 |     rep(i, n) scanf("%d", &xl[i]);
      |     ^~~
Language: C++

def resolve():
	n, m, x, y = map(int, input().split())
	xp = list(map(int, input().split()))
	yp = list(map(int, input().split()))
	for i in range(-99, y+1):
		ok = True
		if i <= x or i > y:
			continue
		for cx in xp:
			if cx >= i:
				ok = False
				break
		for cy in yp:
			if cy < i:
				ok = False
				break
		if ok:
			print('No War')
			return
	print('War')
resolve()

Compiler output:
a.cc:18:31: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   18 |                         print('No War')
      |                               ^~~~~~~~
a.cc:20:15: warning: multi-character character constant [-Wmultichar]
   20 |         print('War')
      |               ^~~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def resolve():
      | ^~~
Language: C

#include<stdio.h>

int main(){
	
	int N, M, X, Y;
	
	scanf("%d %d %d %d", &N, &M, &X, &Y);
	
	int kotaX[100000];
	int kotaY[100000];
	int maxX = -123456;
	int minY = 2 << 29;
//	printf("%d\n", minY);
	for(int i = 0; i < N; i++){
		scanf("%d", &kotaX[i]);
		if(kotaX[i] > maxX){
			maxX = kotaX[i];
		}
	}
	for(int i = 0; i < M; i++){
		scanf("%d", &kotaY[i]);
		if(kotaY[i] < minY){
			minY = kotaY[i];
		}
	}
	
	bool isFalse = false;
	
	if(minY <= X || minY > Y){
		isFalse = true;
	}
	for(int i = 0; i < N; i++){
		if(kotaX[i] >= minY){
			isFalse = true;
		}
	}
	
	if(isFalse == true){
		printf("War\n");
	}
	else{
		printf("No War\n");
	}
	
//	printf("%d %d", maxX, minY);
	
	
	
	return 0;
}

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

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

int main() {
  int n, m, x, y;
  cin >> n >> m >> x >> y;
  int xmax = -1;
  int ymin = 10000;
  int a, b;
  for (int i = 0; i < n; i++) {
    cin >> a;
    xmax = max(a, xmax);
  }
  for (int i = 0, i < m; i++) {
    cin >> b;
    ymin = min(b, ymin);
  }
  if (xmax <= ymin) {
    cout << "No War" << endl;
  }
  else {
    cout << "War" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: expected ';' before '<' token
   14 |   for (int i = 0, i < m; i++) {
      |                    ^~
      |                    ;
a.cc:14:21: error: expected primary-expression before '<' token
   14 |   for (int i = 0, i < m; i++) {
      |                     ^
Language: C++

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

int main(){
  int n,m,X,Y;
  cin >> n,m,X,Y;
  vector<int> x(n);
  vector<int> y(m);
  for(int i=0;i<n;i++)cin >> x.at(i);
  for(int i=0;i<m;i++)cin >> y.at(i);
  
  sort(x.begin(),x.end());
  sort(y.begin(),t.end());
  
  if(x.at(n-1)>=y.at(0)) cout << "No ";
  
  cout << "War" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: 't' was not declared in this scope
   13 |   sort(y.begin(),t.end());
      |                  ^
Language: C++

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

int main()
{
    int N, M, X, Y;
    cin >> N >> M >> X >> Y;
    vector<int> xs(N + 1);
    vector<int> ys(M + 1);
    for (int i = 0; i < N; i++)
        cin >> xs[i];
    xs[N] = X;
    for (int i = 0; i < M; i++)
        cin >> ys[i];
    ys[M] = Y;
    sort(xs.begin(), xs.end());
    sort(ys.begin(), ys.end());
    if (*max_element(xs.begin(), xs.end()) >= *min_element(ys.begin(), ys.end())
    {
        cout << "War" << endl;
        return 0;
    }
    cout << "No War" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:81: error: expected ';' before '{' token
   19 |     if (*max_element(xs.begin(), xs.end()) >= *min_element(ys.begin(), ys.end())
      |                                                                                 ^
      |                                                                                 ;
   20 |     {
      |     ~                                                                            
a.cc:24:29: error: expected ')' before ';' token
   24 |     cout << "No War" << endl;
      |                             ^
      |                             )
a.cc:19:8: note: to match this '('
   19 |     if (*max_element(xs.begin(), xs.end()) >= *min_element(ys.begin(), ys.end())
      |        ^
Language: C

#include<stdio.h>
int main()
{
	int n,m,X,Y,x[100],y[100],i,tx=-1000,ty=1000;

	scanf("%d%d%d%d",&n,&m,&X,&Y);
	for(i=0;i<n;i++)
		scanf("%d",&x[i]);
	for(i=0;i<m;i++)
		scanf("%d",&y[j]);

	for(i=0;i<n;i++){
		if(x[i]+1>=X){
			printf("War\n");
			return 0;
		}
		if(tx<x[i])
			tx=x[i];
	}
	for(i=0;i<m;i++){
		if(y[i]-1<Y){
			printf("War\n");
			return 0;
		}
		if(ty>y[i])
			ty=y[i];
	}
	if(tx+1>=ty){
		printf("War\n");
		return 0;
	}
	printf("No War\n");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:31: error: 'j' undeclared (first use in this function)
   10 |                 scanf("%d",&y[j]);
      |                               ^
main.c:10:31: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main()
{
	int n,m,X,Y,x[100],y[100],i,j,tx=-1000,ty=1000;

	scanf("%d%d%d%d",&n,&m,&X,&Y);
	for(i=0;i<n;i++)
		scanf("%d",&x[i]);
	for(j=0;j<m;j++)
		scanf("%d",&y[j]);

	for(i=0;i<n;i++){
		if(x[i]>X){
			printf("War\n");
			return 0;
		}
		for(j=0;j<m;j++){
			if((x[i]>y[j])){
				printf("War\n");
				return 0;
			}
			if(y[j]<=Y){
				printf("War\n");
				return 0;
			}
			if(tx<x[i])
				tx=x[i];
			if(ty>y[j])
				ty=y[j];
		}
	if(tx+1>=ty){
		printf("War\n");
		return 0;
	}
	printf("No War\n");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:37:1: error: expected declaration or statement at end of input
   37 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
///////////////////////////////////////////
const long long int INF = 1LL<<60;
const long long int Mod = 1000000007;
using ll = long long int; using ci = const int;
using vi = vector<int>;  using Vi = vector<long long int>;
using P = pair<int, int>;  using PLL = pair<ll, ll>;
using matrix = vector<vector<ll>>;
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define rp(i,N) for(ll i = 0; i < (ll)N; i++)
#define repi(i,a,b) for(ll i = ll(a); i < ll(b); ++i)
template<class T>bool chmax(T &former, const T &b) { if (former<b) { former=b; return true; } return false; }
template<class T>bool chmin(T &former, const T &b) { if (b<former) { former=b; return true; } return false; }
template<class T>T sqar(T x){ return x*x; }//sqrt(x)は平方根;
#define Sort(v) std::sort(v.begin(), v.end(), std::greater<decltype(v[0])>()) //降順でVをソート
#define p_queue(v) priority_queue<v, vector<v>, greater<v> >
template<class T> inline void princ(T x){cout<<x<<" ";}; 
template<class T> inline void print(T x){cout<<x<<"\n";};
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
///////////////////////////////////////////////////////////////////////////////////

int main(){
    int n,m,x,y;
    cin >> n >> m >> x >> y;
    int maxx=x;
    int miny=y;
    rp(i,n){
        int a;
        cin >> a;
        chmax(maxx,a);
    }
    rp(i,m){
        int b;
        cin >> b;
        chmin(miny,b);
    }
    if(maxx<y&&miny>x&&maxx<miny){
        print("No War");
    }
    else print("War");
    return 0;
}

Compiler output:
a.cc:46:2: error: stray '\16' in program
   46 | }<U+000E>
      |  ^~~~~~~~
Language: C++

#include<iostream>
#include<vector>
using namespace std;
bool is_war(const vector<int>&x,const vector<int>&y){
  for(int i=0;i<x.size();++i){
    bool is_ok=true;
    if(x[i]>=z) is_ok=false;
  }
  for(int i=0;i<y.size();++i){
    if(y[i]<z) is_ok=false;
  }
  if(is_ok) return false;
}
return true;
}
int main(){
  int n,m;
  cin>>n>>m;
  vector<int>x(n+1),y(m+1);
  cin>>x[0]>>y[0];
  for(int i=0;i<n;i++){
    cin>>x[i+1];
  }
  for(int i=0;i<m;i++){
    cin>>y[i+1];
  }
  if(is_war(x,y)){
    cout<<"War"<<endl;
  }
  else{
    cout<<"No War"<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'bool is_war(const std::vector<int>&, const std::vector<int>&)':
a.cc:7:14: error: 'z' was not declared in this scope
    7 |     if(x[i]>=z) is_ok=false;
      |              ^
a.cc:10:13: error: 'z' was not declared in this scope
   10 |     if(y[i]<z) is_ok=false;
      |             ^
a.cc:10:16: error: 'is_ok' was not declared in this scope
   10 |     if(y[i]<z) is_ok=false;
      |                ^~~~~
a.cc:12:6: error: 'is_ok' was not declared in this scope
   12 |   if(is_ok) return false;
      |      ^~~~~
a.cc: At global scope:
a.cc:14:1: error: expected unqualified-id before 'return'
   14 | return true;
      | ^~~~~~
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
a.cc: In function 'bool is_war(const std::vector<int>&, const std::vector<int>&)':
a.cc:13:1: warning: control reaches end of non-void function [-Wreturn-type]
   13 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
vector<int> input(int N) {
  vector<int> vec(N);
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  return vec;
}

int main() {
  int n,m,x,y;
  cin >> n >>m >> X >> Y;
  vector<int> x=input(n);
  vector<int> y=input(m);
  
  sort(x.begin(),x.end());
  sort(y.begin(),y.end());
  int xmax=max(X,x[n-1]),ymin=min(Y,y[0]);
  if(xmax<ymin){
    cout << "NO WAR" << endl;
  }else{
    cout << "WAR" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: 'X' was not declared in this scope
   14 |   cin >> n >>m >> X >> Y;
      |                   ^
a.cc:14:24: error: 'Y' was not declared in this scope
   14 |   cin >> n >>m >> X >> Y;
      |                        ^
a.cc:15:15: error: conflicting declaration 'std::vector<int> x'
   15 |   vector<int> x=input(n);
      |               ^
a.cc:13:11: note: previous declaration as 'int x'
   13 |   int n,m,x,y;
      |           ^
a.cc:16:15: error: conflicting declaration 'std::vector<int> y'
   16 |   vector<int> y=input(m);
      |               ^
a.cc:13:13: note: previous declaration as 'int y'
   13 |   int n,m,x,y;
      |             ^
a.cc:18:10: error: request for member 'begin' in 'x', which is of non-class type 'int'
   18 |   sort(x.begin(),x.end());
      |          ^~~~~
a.cc:18:20: error: request for member 'end' in 'x', which is of non-class type 'int'
   18 |   sort(x.begin(),x.end());
      |                    ^~~
a.cc:19:10: error: request for member 'begin' in 'y', which is of non-class type 'int'
   19 |   sort(y.begin(),y.end());
      |          ^~~~~
a.cc:19:20: error: request for member 'end' in 'y', which is of non-class type 'int'
   19 |   sort(y.begin(),y.end());
      |                    ^~~
a.cc:20:19: error: invalid types 'int[int]' for array subscript
   20 |   int xmax=max(X,x[n-1]),ymin=min(Y,y[0]);
      |                   ^
a.cc:21:11: error: 'ymin' was not declared in this scope; did you mean 'fmin'?
   21 |   if(xmax<ymin){
      |           ^~~~
      |           fmin
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,M,X,Y;
  cin>>N>>M>>X>>Y;
  int a=-100;
  int b=100;
  for(int i=0;i<N;i++){
  cin>>x;
    a=max(a,x);
  }
  for(int j=0;j<M;j++){
  cin>>y;
    b=min(b,y);
  }
  if(a<b&&X<=a&&Y>=b){
  cout<<"No War"<<endl;
  }
  else{
  cout<<"War"<<endl;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'x' was not declared in this scope
    9 |   cin>>x;
      |        ^
a.cc:13:8: error: 'y' was not declared in this scope
   13 |   cin>>y;
      |        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,M,X,Y;
  cin>>N>>M>>X>>Y;
  int a=-100;
  int b=100;
  for(int i=0;i<N;i++){
  cin>>x;
    a=max(a,x);
  }
  for(int j=0;j<M;j++){
  cin>>y;
    b=min(b,y);
  }
  if(a<b&&X<=a&&Y>=y){
  cout<<"No War"<<endl;
  }
  else{
  cout<<"War"<<endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'x' was not declared in this scope
    9 |   cin>>x;
      |        ^
a.cc:13:8: error: 'y' was not declared in this scope
   13 |   cin>>y;
      |        ^
a.cc:16:20: error: 'y' was not declared in this scope
   16 |   if(a<b&&X<=a&&Y>=y){
      |                    ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,M;
  cin>>N>>M;
  vector<int> x(N);
  vector<int> y(M);
  for(int i=0;i<N;i++){
  cin>>x[i];
  }
  for(int j=0;j<M;j++){
  cin>>y[j];
  }
  int a=0;
         int b=0;
  for(int k=N+1;k<=M;k++){
    for(int i=0;i<N;i++){
       for(int j=0;j<M;j+ int a=0;
 
    if(k>x[i]){
    a++;
      if(y[j]>=k){
      b++;
        if(a==N&&b==M){
        cout<<"No"<<" "<<"War"<<endl;
          return 0;
        }
        else{
        cout<<"War"<<endl;
          return 0;
        }
      }
    }
    
       }
    }
  
  
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:27: error: expected primary-expression before 'int'
   18 |        for(int j=0;j<M;j+ int a=0;
      |                           ^~~
a.cc:18:26: error: expected ')' before 'int'
   18 |        for(int j=0;j<M;j+ int a=0;
      |           ~              ^~~~
      |                          )
a.cc:22:12: error: 'j' was not declared in this scope
   22 |       if(y[j]>=k){
      |            ^
a.cc: At global scope:
a.cc:41:1: error: expected declaration before '}' token
   41 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;

int main(){
    int n,m,X,Y;
    cin >> n >> m >> X >> Y;
    vector<int> x(n), y(m);
    for(int i=0;i<n;i++){
        cin >> x[i];
    } 
    for(int i=0;i<m;i++){
        cin >> y[i];
    }
    sort(x.begin(),x.end());
    sort(y.begin(),y.end());
    int z1 = max(X,x[n-1]);
    int z2 = min(Y,y[0]);
    if(z1<z2){
        cout << "No War"<< endl;
    }else{
        cout << "War"
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:23:22: error: expected ';' before '}' token
   23 |         cout << "War"
      |                      ^
      |                      ;
   24 |     }
      |     ~                 
a.cc:24:6: error: expected '}' at end of input
   24 |     }
      |      ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

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

int main(){
  int N, M, X, Y;
  cin >> N >> M >> X >> Y;
  vector<int> x(N+1), y(M+1);
  for(int i=0; i<N; i++){
    cin >> x.at(i);
  }
  for(int i=0; i<M; i++){
    cin >> y.at(i);
  }
  x.at(N)=X;
  y.at(M)=Y;
  sort(x.begin(), x.end());
  sort(y.begin(), y.end());
  if(x.at(N)<Y.at(0)){
    cout << "No War" << endl;
  }
  else{
    cout << "War" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: request for member 'at' in 'Y', which is of non-class type 'int'
   18 |   if(x.at(N)<Y.at(0)){
      |                ^~
Language: C++

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

int main(){
  int N, M, X, Y;
  vector<int> x(N+1), y(M+1);
  for(int i=0; i<N; i++){
    cin >> x.at(i);
  }
  for(int i=0; i<M; i++){
    cin >> y.at(i);
  }
  x.at(N)=X;
  y.at(M)=Y;
  sort(x.begin(), x.end());
  sort(y.begin(), y.end());
  if(x.at(N)<Y.at(0)){
    cout << "No War" << endl;
  }
  else{
    cout << "War" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: request for member 'at' in 'Y', which is of non-class type 'int'
   17 |   if(x.at(N)<Y.at(0)){
      |                ^~
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<set>
#include<map>
#define bye return 0
#define speedOne ios::sync_with_stdio(false)
#define speedtwo cin.tie(0)
typedef long long int lli;
typedef long long ll;
using namespace std;
int main()
{
    speedOne;
    speedtwo;
	int t, a, b, c,m,n, x, y;
	vector<int> v1;
	vector<int> v2;
	int cnt=0;
	cin >> n >> m >> x >> y;
	
	for(int i=0; i<n; ++i){
	    cin >> a;
	    if(a>x && a<=y){
	        v1.push_back(a);
	    }else{
	        v1.push_back(0);
	    }
	}
	
	for(int i=0; i<m; ++i){
	    cin >> b;
	    if(b>x && b<=y){
	        v2.push_back(b);
	    }else{
	        v2.push_back(0);
	    }
	}
	
	sort(v1.begin(), v1.end());
	sort(v2.rbegin(), v2.rend());
	/*
	for(auto i:v1)
	cout<<i<<" ";
	cout << endl;
	for(auto i:v2)
	cout << i << " ";
	*/
	int len = v1.size();

	if(v1[len-1] < v2[0])
	    cout<<"No War" << endl;
	else cout<<"War"<<endl;

	
	bye;
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
int N,M,X,Y;
  cin>>N>>M>>X>>Y;
  vector<int>x(N);
  vector<int>y(M);
  for(int i=0;i<N;i++)
    cin>>x.at(i);
  for(int i=0;i<m;i++)
    cin>>y.at(i);
  sort(x.begin(),x.end());
  sort(y.begin(),y.end());
  if(x.at(N-1)<Y && X<y.at(0) && x.at(N-1)<y.at(i))
    cout<<"No War"<<endl;
  else
    cout<<"War"<<endl;
  

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'm' was not declared in this scope
   10 |   for(int i=0;i<m;i++)
      |                 ^
a.cc:14:49: error: 'i' was not declared in this scope
   14 |   if(x.at(N-1)<Y && X<y.at(0) && x.at(N-1)<y.at(i))
      |                                                 ^
Language: C

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

int comp_int(const void *x, const void *y){
  return *(int*)x - *(int*)y;
}

int main(){
  int = N, M, X, Y;
  scanf("%d %d %d %d", &N, &M, &X, &Y);
  int x[N], y[M];
  for(int i = 0; i < N; i++) scanf("%d", &x[i]);
  for(int i = 0; i < M; i++) scanf("%d", &y[i]);
  qsort(x, N, sizeof(int), comp_int);
  qsort(y, M, sizeof(int), comp_int);
  int flag = 0;
  for(int i = X + 1; i < Y + 1, i++){
    if(x[N - 1] < i && i <= y[0]) flag = 1;
  }
  if(flag) printf("No War");
  else printf("War");
}

Compiler output:
main.c: In function 'main':
main.c:9:7: error: expected identifier or '(' before '=' token
    9 |   int = N, M, X, Y;
      |       ^
main.c:10:25: error: 'N' undeclared (first use in this function)
   10 |   scanf("%d %d %d %d", &N, &M, &X, &Y);
      |                         ^
main.c:10:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:29: error: 'M' undeclared (first use in this function)
   10 |   scanf("%d %d %d %d", &N, &M, &X, &Y);
      |                             ^
main.c:10:33: error: 'X' undeclared (first use in this function)
   10 |   scanf("%d %d %d %d", &N, &M, &X, &Y);
      |                                 ^
main.c:10:37: error: 'Y' undeclared (first use in this function)
   10 |   scanf("%d %d %d %d", &N, &M, &X, &Y);
      |                                     ^
main.c:17:36: error: expected ';' before ')' token
   17 |   for(int i = X + 1; i < Y + 1, i++){
      |                                    ^
      |                                    ;
Language: C

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

int comp_int(const void *x, const void *y){
  return *(int*)x - *(int*)y
}

int main(){
  int = N, M, X, Y;
  scanf("%d %d %d %d", &N, &M, &X, &Y);
  int x[N], y[M];
  for(int i = 0; i < N; i++) scanf("%d", &x[i]);
  for(int i = 0; i < M; i++) scanf("%d", &y[i]);
  qsort(x, N, sizeof(int), comp_int);
  qsort(y, M, sizeof(int), comp_int);
  int flag = 0;
  for(int i = X + 1; i < Y + 1, i++){
    if(x[N - 1] < i && i <= y[0]) flag = 1;
  }
  if(flag) printf("No War");
  else printf("War");
}

Compiler output:
main.c: In function 'comp_int':
main.c:5:29: error: expected ';' before '}' token
    5 |   return *(int*)x - *(int*)y
      |                             ^
      |                             ;
    6 | }
      | ~                            
main.c: In function 'main':
main.c:9:7: error: expected identifier or '(' before '=' token
    9 |   int = N, M, X, Y;
      |       ^
main.c:10:25: error: 'N' undeclared (first use in this function)
   10 |   scanf("%d %d %d %d", &N, &M, &X, &Y);
      |                         ^
main.c:10:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:29: error: 'M' undeclared (first use in this function)
   10 |   scanf("%d %d %d %d", &N, &M, &X, &Y);
      |                             ^
main.c:10:33: error: 'X' undeclared (first use in this function)
   10 |   scanf("%d %d %d %d", &N, &M, &X, &Y);
      |                                 ^
main.c:10:37: error: 'Y' undeclared (first use in this function)
   10 |   scanf("%d %d %d %d", &N, &M, &X, &Y);
      |                                     ^
main.c:17:36: error: expected ';' before ')' token
   17 |   for(int i = X + 1; i < Y + 1, i++){
      |                                    ^
      |                                    ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod=1e9+7;
 
int main()
{
    int n,m,x,y,i,j; cin>>n>>m>>x>>y;
    int a[n],b[m];
    for(i=0;i<n;i++) cin>>a[i];
    for(i=0;i<m;i++) cin>>b[i];
    sort(a,a+n); sort(b,b+m);
    bool f=true;
    if(a[n-1]>=b[0]) f=false;
    int z=min(y,b[0]);
    if(z<=x || z<=a[n-1]) f=false;
    cout<<(f ? "No War" : "War");


Compiler output:
a.cc: In function 'int main()':
a.cc:17:34: error: expected '}' at end of input
   17 |     cout<<(f ? "No War" : "War");
      |                                  ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: C++


#include <bits/stdc++.h>
#include <math.h>
#define REP(i, n) for(int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1001001001;
const int mINF = -1001001001;


int main() {
int n,m,x,y;
cin >> n >> m >> x >> y;
int xn[n],ym[m];
int x_max=mINF,y_min=INF;
REP(i,n) {
  cin >> xn[i];
  x_max = max(x_max,xn[i]);
}
REP(i,m) {
  cin >> ym[i];
  y_min = min(y_min,ym[i]);
}
if(x_max<y_min) {
  cout << "No War" << endl;
} else {
  cou << "War" << endl;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:3: error: 'cou' was not declared in this scope; did you mean 'cos'?
   29 |   cou << "War" << endl;
      |   ^~~
      |   cos
Language: Java

import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    List<Integer> list1 = new ArrayList<>();
    List<Integer> list2 = new ArrayList<>();
    int n = sc.nextInt();
    int m = sc.nextInt();

    int x = sc.nextInt();
    int y = sc.nextInt();

    int max=-100;
    int min=100;


    for(int i = 0; i < n; i++){
        list1.add(sc.nextInt());
    }

    for(int i = 0; i < n ; i++){
        if(list1.get(i) >= max){
            max = list1.get(i);
        }else{}
    }

    for(int i = 0; i < m; i++){
        list2.add(sc.nextInt());
    }

    for(int i = 0; i < m; i++){
        if(list2.get(i) <= min){
            min = list2.get(i);
        }else{}
    }
    if(max >= x && max < min){
        System.out.println("No War");
    }else if(min <= y && max < min){
        System.out.println("No War");
    }else{
        System.out.println("War")
    }




    
    
    
	}
}

Compiler output:
Main.java:48: error: ';' expected
        System.out.println("War")
                                 ^
1 error
Language: C++

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

using namespace std;

int main()
{
  int N, M, X, Y;
  cin >> N >> M >> X >> Y;

  int x_max = 0;
  for (int i = 0; i < N; ++i)
  {
    int x;
    cin >> x;
    if (x_max < x) x_max = x;
  }

  //x_maxより1でも大きくしておけばいい
  int y_min = x_max+1;
  for (int i = 0; i < M; ++i)
  {
    int y;
    cin >> y;
    if (y_min > y) y_min = y;
  }

  if (x_max < y_min)
  {
    if (y_min > X && y_min <= Y)
    {
      cout << "No War" << endl;
      return;
    }
  }
  cout << "War" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   38 |       return;
      |       ^~~~~~
Language: C++

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

using namespace std;

void B_110()
{
  int N, M, X, Y;
  cin >> N >> M >> X >> Y;

  int x_max = 0;
  for (int i = 0; i < N; ++i)
  {
    int x;
    cin >> x;
    if (x_max < x) x_max = x;
  }

  //x_maxより1でも大きくしておけばいい
  int y_min = x_max+1;
  for (int i = 0; i < M; ++i)
  {
    int y;
    cin >> y;
    if (y_min > y) y_min = y;
  }

  if (x_max < y_min)
  {
    if (x_max > X && x_max <= Y)
    {
      cout << "No War" << endl;
      return 0;
    }
  }
  cout << "War" << endl;
}


Compiler output:
a.cc: In function 'void B_110()':
a.cc:38:14: error: return-statement with a value, in function returning 'void' [-fpermissive]
   38 |       return 0;
      |              ^
Language: C++

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

using namespace std;

int main()
{
  int N, M, X, Y;
  cin >> N >> M >> X >> Y;

  int x_max = 0;
  for (int i = 0; i < N; ++i)
  {
    int x;
    cin >> x;
    if (x_max < x) x_max = x;
  }

  //x_maxより1でも大きくしておけばいい
  int y_min = x_max+1;
  for (int i = 0; i < M; ++i)
  {
    int y;
    cin >> y;
    if (y_min > y) y_min = y;
  }

  if (x_max < y_min)
  {
    if (x_max > X && x_max <= Y)
    {
      cout << "No War" << endl;
      return;
    }
  }
  cout << "War" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   38 |       return;
      |       ^~~~~~
Language: C++

//#define _GLIBCXX_DEBUG

#include<bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int INF= 1e9+5;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>>vvi;

int main(){
  int n,m,X,Y;
  cin>>n>>m>>X>>Y;
  vector<int>x(n);
  vector<int>y(m);
  rep(i,n)cin>>x[i];
  rep(i,m)cin>>y[i];
  int maxx=x[0];
  int miny=y[0];
  rep(i,n)maxx=max(maxx,x[i]);
  maxx(maxx,X);
  rep(i,m)miny=min(miny,y[i]);
  miny(miny,Y);
  if(maxx<miny)cout<<"War"<<endl;
  else cout<<"No War"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:7: error: 'maxx' cannot be used as a function
   22 |   maxx(maxx,X);
      |   ~~~~^~~~~~~~
a.cc:24:7: error: 'miny' cannot be used as a function
   24 |   miny(miny,Y);
      |   ~~~~^~~~~~~~
Language: C++

//#define _GLIBCXX_DEBUG

#include<bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int INF= 1e9+5;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>>vvi;

int main(){
  int n,m,x,y;
  cin>>n>>m>>x>>y;
  vector<int>x(n);
  vector<int>y(m);
  rep(i,n)cin>>x[i];
  rep(i,m)cin>>y[i];
  int maxx=x[0];
  int miny=y[0];
  rep(i,n)maxx=max(maxx,x[i]);
  rep(i,m)miny=min(miny,y[i]);
  if(x[i]<y[i])cout<<"War"<<endl;
  else cout<<"No War"<<endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: conflicting declaration 'std::vector<int> x'
   15 |   vector<int>x(n);
      |              ^
a.cc:13:11: note: previous declaration as 'int x'
   13 |   int n,m,x,y;
      |           ^
a.cc:16:14: error: conflicting declaration 'std::vector<int> y'
   16 |   vector<int>y(m);
      |              ^
a.cc:13:13: note: previous declaration as 'int y'
   13 |   int n,m,x,y;
      |             ^
a.cc:17:17: error: invalid types 'int[int]' for array subscript
   17 |   rep(i,n)cin>>x[i];
      |                 ^
a.cc:18:17: error: invalid types 'int[int]' for array subscript
   18 |   rep(i,m)cin>>y[i];
      |                 ^
a.cc:19:13: error: invalid types 'int[int]' for array subscript
   19 |   int maxx=x[0];
      |             ^
a.cc:20:13: error: invalid types 'int[int]' for array subscript
   20 |   int miny=y[0];
      |             ^
a.cc:21:26: error: invalid types 'int[int]' for array subscript
   21 |   rep(i,n)maxx=max(maxx,x[i]);
      |                          ^
a.cc:22:26: error: invalid types 'int[int]' for array subscript
   22 |   rep(i,m)miny=min(miny,y[i]);
      |                          ^
a.cc:23:8: error: 'i' was not declared in this scope
   23 |   if(x[i]<y[i])cout<<"War"<<endl;
      |        ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <map>
#include <numeric>
using namespace std;
typedef long long ll;

int main(){
    int n,m,a,b;
    cin>>n>>m>>a>>b;
    vector<int> v(n),vv(m);
    for(int i=0;i<n;i++)cin>>v[i];
    for(int i=0;i<m;i++)cin>>vv[i];
    int yay=*find_max_element(v.begin(),v.end()),wow=*find_min_element(vv.begin(),vv.end());
    if(yay>=wow){cout<<"No";return 0;}
    for(int i=yay;i<=wow;i++){
        if(i>a&&i<=b){cout<<"Yes";return 0;}
    }
    cout<<"No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: 'find_max_element' was not declared in this scope
   17 |     int yay=*find_max_element(v.begin(),v.end()),wow=*find_min_element(vv.begin(),vv.end());
      |              ^~~~~~~~~~~~~~~~
a.cc:18:13: error: 'wow' was not declared in this scope; did you mean 'pow'?
   18 |     if(yay>=wow){cout<<"No";return 0;}
      |             ^~~
      |             pow
a.cc:19:22: error: 'wow' was not declared in this scope; did you mean 'pow'?
   19 |     for(int i=yay;i<=wow;i++){
      |                      ^~~
      |                      pow