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

#include<iostream>
#include<algorithm>
using namespace std;
int main(int argc,char *argv[]){
int n,m,x,y;
while(cin >> n >> m >> x >> y){
int i;
int a[110],b[110];
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);

int flag = 0;
if(x < y){
for(i = x + 1;i<y;i++){
if(i <= b[0]&&i>a[n - 1]){
flag =1;
}
}
}
else{
for(i = y + 1;i<=x;i++){
if(i <=a[0]&&i>b[n - 1]){
flag=1;
}
}
}
if(flag){
cout << "No War"<< endl;
}
else{
cout << "War" << endl;
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:13:12: error: expected ';' before ':' token
   13 | cin >> b[i]:
      |            ^
      |            ;
Language: C++

#include <vector>
#include <iostream>
#include <string>
using namespace std;
string solveMeFirst(vector<int>x,vector<int>y,int xlen,int ylen){
    int xmax= -101;
    int ymin= 101;
    for(int i = 0;i<xlen;i++){
       if(x.at(i)> xmax){
             xmax = x.at(i);
       }
    }
    for(int i = 0;i<ylen;i++){
       if(y.at(i) < ymin){
             ymin = y.at(i);
       }
    }
    if (xmax < ymin){
        return "No War";
    }else{
        return "War";
    }
}

int main(){
    int n,m;
    cin >> n  >>m;
    vector<int> xs,ys;
    int s;
    for(int i = 0; i<n;i++){
        cin >>s;
        xs.push_back(s);
    }
    for(int i = 0; i<m;i++){
        cin >>s;
        ys.push_back(s);
    }
    xs.push_back(x);
    ys.push_back(y);
    string d = solveMeFirst(xs,ys,n,m);
    cout << d;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:18: error: 'x' was not declared in this scope
   38 |     xs.push_back(x);
      |                  ^
a.cc:39:18: error: 'y' was not declared in this scope
   39 |     ys.push_back(y);
      |                  ^
Language: C++

#include <vector>
#include <iostream>
#include <string>
using namespace std;
string solveMeFirst(vector<int>x,vector<int>y,int xlen,int ylen){
    int xmax= 0;
    int ymin= 101;
    for(int i = 0;i<xlen;i++){
       if(x.at[i] > xmax){
             xmax = x.at[i];
       }
    }
    for(int i = 0;i<ylen;i++){
       if(y.at[i] < ymin){
             ymin = y.at[i];
       }
    }
    if (xmax < ymin){
        return "No War"
    }else{
        return "War"
    }
}

int main(){
    int n,m,x,y;
    cin >> n  >>m >> x >> y;
    vector<int> xs,ys;
    int s;
    for(int i = 0; i<n;i++){
        cin >>s;
        xs.push_back(s);
    }
    for(int i = 0; i<m;i++){
        cin >>s;
        ys.push_back(s);
    }
    xs.push_back(x);
    ys.push_back(y);
    string d = solveMeFirst(xs,ys,n,m);
    cout << d;
    return 0;
}

Compiler output:
a.cc: In function 'std::string solveMeFirst(std::vector<int>, std::vector<int>, int, int)':
a.cc:9:15: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
    9 |        if(x.at[i] > xmax){
      |               ^
a.cc:10:25: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   10 |              xmax = x.at[i];
      |                         ^
a.cc:14:15: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   14 |        if(y.at[i] < ymin){
      |               ^
a.cc:15:25: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   15 |              ymin = y.at[i];
      |                         ^
a.cc:19:24: error: expected ';' before '}' token
   19 |         return "No War"
      |                        ^
      |                        ;
   20 |     }else{
      |     ~                   
a.cc:21:21: error: expected ';' before '}' token
   21 |         return "War"
      |                     ^
      |                     ;
   22 |     }
      |     ~
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:10: fatal error: iostream : No such file or directory
    1 | #include <iostream >
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

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

using namespace std;
bool jg(vector<int>a,vector<int> b) {
    bool ans = true;
    for (int i = -100; i <= 100; i++) {
        for (int j = 0; j < a.size(); j++) {
            if (a[j] >= i)ans = false;
        }
        for (int j = 0; j < b.size(); j++) {
            if (b[j] >= i)ans = false;
        }
        if (ans)return false;
    }
    return true;
    
}

int main() {
    int n, m;
    cin >> n >> m;
    vector<int >a(n + 1), b(m + 1);
    cin >> a[0] >> b[0];
    for (int i = 0; i < n; i++) {
        cin >> a[i++];
    }
    for (int i = 0; i < m; i++) {
        cin >> b[i++];
    }
    if (jg(a, b)) {
        cout << "War" << endl;
    }
    else cout << "No War" << endl;
    return 0}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:13: error: expected ';' before '}' token
   37 |     return 0}
      |             ^
      |             ;
Language: C

#include<stdio.h>

int main()
{
	int i, Z, min_y, temp;
	int N, M, X, Y;
	scanf("%d%d%d%d", &N, &M, &X, &Y);
	int Ary_x[N], Ary_y[M];
	for(i = 0; i < N; ++i) scanf("%d", &Ary_x[i]);
	for(i = 0; i < M; ++i) scanf("%d", &Ary_y[i]);
	min_y = Ary_y[0];
	for(i = 1; i < M; ++i) min_y = (min_y > Ary_y[i]) ? Ary_y[i]: min_y;
	Z = min_y;
	for(i = 0; i < N; ++i){
		temp = Ary_x[i];
		if(Z >= Ary_x[i]){
			printf("War\n");
			break;
		}else if{
			if(temp == Ary_x[M-1]) printf("No War\n");
		}
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:25: error: expected '(' before '{' token
   19 |                 }else if{
      |                         ^
      |                         (
Language: C++

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

int main() {
  int N, M, X, Y;
  cin >> N >> M >> X >> Y;
  int x[N], y[M];
  int XMAX = X;
  int YMIN = Y;
  for (int i = 0; i < N; i++) {
    cin >> x[i];
    XMAX = max(XMAX, x[i]);
  }
  for (int i = 0; i < M; i++) {
    cin >> y[i];
    XMIN = mim(YMIN, y[i]);
  }
  if (XMAX < YMIN)
    cout << "No War" << endl;
  else
    cout << "War" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'XMIN' was not declared in this scope; did you mean 'YMIN'?
   16 |     XMIN = mim(YMIN, y[i]);
      |     ^~~~
      |     YMIN
a.cc:16:12: error: 'mim' was not declared in this scope
   16 |     XMIN = mim(YMIN, y[i]);
      |            ^~~
Language: C++

#include <iostream>
using namespace std;

int main(int argc, char const *argv[])
{
    int n, m, x, y;
    cin >> n >> m >> x >> y;

    int xs[101];
    int ys[101];

    for (int i=0; i<n; i++) cin >> xs[i];
    for (int i=0; i<m; i++) cin >> ys[i];
    
    sort(xs, xs+n);
    sort(ys, ys+m);

    bool war = true;
    for (int i=x; i<y; i++) {
        if (xs[n-1] < i && i < ys[0]) {
            war = false;
            break;
        }
    }
    if (war) cout << "War" << endl;
    else cout << "No War" << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   15 |     sort(xs, xs+n);
      |     ^~~~
      |     short
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 = Integer.parseInt(sc.next());
        int m = Integer.parseInt(sc.next());
        int x = Integer.parseInt(sc.next());
        int y = Integer.parseInt(sc.next());

        int[] xAr = new int[n];
        int[] yAr = new int[m];
        for (int i=0;i < n ;i++ ) {
            xAr[i] = Integer.parseInt(sc.next());
        }
        for (int i=0;i < m ;i++ ) {
            yAr[i] = Integer.parseInt(sc.next());
        }
        Arrays.sort(xAr);
        Arrays.sort(yAr);

        if(yAr[0] <= x){
            System.out.println("War");
        }else if(xAr[n-1] >= y){
            System.out.println("War");
        }else if(xAr[n-1]> = yAr[0] ) {
            System.out.println("War");
        }else{
            System.out.println("No War");
        }
    }
}


Compiler output:
Main.java:29: error: illegal start of expression
        }else if(xAr[n-1]> = yAr[0] ) {
                           ^
1 error
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        System.out.print(n+" ");
        System.out.print(m+" ");
        System.out.print(x+" ");
        System.out.println(y);

        int[] xAr = new int[n];
        int[] yAr = new int[m];
        for (int i=0;i < n ;i++ ) {
            xAr[i] = Integer.parseInt(sc.next());
        }
        for (int i=0;i < m ;i++ ) {
            yAr[i] = Integer.parseInt(sc.next());
        }
        Arrays.sort(xAr);
        Arrays.sort(yAr);
        
        if(yAr[0] <= x){
            System.out.println("War");
        }else if(xAr[n-1] >= y){
            System.out.println("War");
        }else if(xAr[n-1]>yAr[0] ) {
            System.out.println("War");
        }else{
            System.out.println("No War");
        }
    }
}

Compiler output:
Main.java:7: error: cannot find symbol
        System.out.print(n+" ");
                         ^
  symbol:   variable n
  location: class Main
Main.java:8: error: cannot find symbol
        System.out.print(m+" ");
                         ^
  symbol:   variable m
  location: class Main
Main.java:9: error: cannot find symbol
        System.out.print(x+" ");
                         ^
  symbol:   variable x
  location: class Main
Main.java:10: error: cannot find symbol
        System.out.println(y);
                           ^
  symbol:   variable y
  location: class Main
Main.java:12: error: cannot find symbol
        int[] xAr = new int[n];
                            ^
  symbol:   variable n
  location: class Main
Main.java:13: error: cannot find symbol
        int[] yAr = new int[m];
                            ^
  symbol:   variable m
  location: class Main
Main.java:14: error: cannot find symbol
        for (int i=0;i < n ;i++ ) {
                         ^
  symbol:   variable n
  location: class Main
Main.java:17: error: cannot find symbol
        for (int i=0;i < m ;i++ ) {
                         ^
  symbol:   variable m
  location: class Main
Main.java:23: error: cannot find symbol
        if(yAr[0] <= x){
                     ^
  symbol:   variable x
  location: class Main
Main.java:25: error: cannot find symbol
        }else if(xAr[n-1] >= y){
                     ^
  symbol:   variable n
  location: class Main
Main.java:25: error: cannot find symbol
        }else if(xAr[n-1] >= y){
                             ^
  symbol:   variable y
  location: class Main
Main.java:27: error: cannot find symbol
        }else if(xAr[n-1]>yAr[0] ) {
                     ^
  symbol:   variable n
  location: class Main
12 errors
Language: C

#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
  int n,m,x,y,z;
  scanf("%d %d %d %d",&n,&m,&x,&y);
  z=x+1;
  for(int i=0;i<n;i++){
    scanf("%d",&x);
    z=max(z,x+1);
  }
  if(z>y){
    printf("War\n");
    return 0;
  }
  for(int i=0;i<m;i++){
    scanf("%d",&y);
    if(z>y){
      printf("War\n");
      return 0;
    }
  }
  printf("No War\n");
}

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

#include<cstdio>
#include<algprithm>
using namespace std;
int main(){
  int n,m,x,y,z;
  scanf("%d %d %d %d",&n,&m,&x,&y);
  z=x+1;
  for(int i=0;i<n;i++){
    scanf("%d",&x);
    z=max(z,x+1);
  }
  if(z>y){
    printf("War\n");
    return 0;
  }
  for(int i=0;i<m;i++){
    scanf("%d",&y);
    if(z>y){
      printf("War\n");
      return 0;
    }
  }
  printf("No War\n");
}

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

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

#define REP(i, a, b) for (int i = (a), _end_ = (b); i < _end_; ++i)
#define debug(...) fprintf(stderr, __VA_ARGS__)
#define X first
#define Y second
#define mp make_pair
#define eb emplace_back
#define SZ(x) (int((x).size()))
#define ALL(x) (x).begin(), (x).end()

template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }

typedef long long LL;
typedef long double LD;
typedef pair<int, int> pii;
typedef unsigned long long uLL;

template <typename T> inline void Read(T &x) {
    char c = getchar();
    bool f = false;
    for (x = 0; !isdigit(c); c = getchar()) {
        if (c == '-') {
            f = true;
        }
    }
    for (; isdigit(c); c = getchar()) {
        x = x * 10 + c - '0';
    }
    if (f) {
        x = -x;
    }
}

const int MAX_N = 1e5 + 5;
const int INF = 0x3f3f3f3f;

int n, a[MAX_N];


int main()
{
    int n,m,x,y;
    int a[101],b[101];
    scanf("%d%d%d%d\n",&n,&m,&x,&y );
    for (int i = 0; i < n; i++) {
        scanf("%d\n",&a[i] );
    }
    for (int i = 0; i < m; i++) {
        scanf("%d\n",&b[i] );
    }
    sort(a,a+n);
    sort(b,b+m);
    bool f=false;
    if ( x < y ) {
            for (int i = x+1; i < y+1; i++) {
                if ( a[n-1]<i and i<=b[0]) f=true break;
    //            printf("%d\n",i);
            }
    }

    f ? printf("No War") : printf("War");
    //printf("%d %d %d %d\n",x,y,a[n-1],b[0]);

}


Compiler output:
a.cc: In function 'int main()':
a.cc:60:50: error: expected ';' before 'break'
   60 |                 if ( a[n-1]<i and i<=b[0]) f=true break;
      |                                                  ^~~~~~
      |                                                  ;
Language: C

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

int main() {
	int i;
	int n, m, x, y;
	int X[200], Y[200];
	int xmax = -100, ymin = 100;

	scanf("%d%d%d%d", &n, &m, &x, &y);

	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 && x < ymin && xmax < y && xmax < ymin) {
		printf("No War\n");
	}
	else {
		printf("War\n");
	}

	

	return 0;
}

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

#include "pch.h"
#include <iostream>
#include<algorithm>
#include<vector>
using namespace std;
void question1();
void question2();
bool checkWar(int, int, vector<int>, vector<int>);

int main()
{
	question2();
}
void question2() {
	int N, M, X, Y,temp;
	cin >> N >> M >> X >> Y;
	vector<int> x;
	vector<int> y;
	for (int i = 0; i < N; i++) {
		cin >> temp;
		x.push_back(temp);
	}
	for (int i = 0; i < M; i++) {
		cin >> temp;
		y.push_back(temp);
	}
	if (checkWar(X, Y, x, y)) {
		printf("War\n");
	}
	else {
		printf("No War");
	}
}
bool checkWar(int X,int Y,vector<int> x,vector<int> y){
	int Z = 0;
	int max_x = *max_element(x.begin(), x.end());
	int max_y = *max_element(y.begin(), y.end());
	while (Z <= 100) {
		if (X < Z && Z <= Y) {
			if (max_x < Z && max_y >= Z) {
				printf("%d", Z);
				return false;
			}
		}
		else if (Z == 100) {
			printf("%d", Z);
			return true;
		}
		Z++;
	}
}

Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C++

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


using namespace std;

int main() {

	int n, m, x, y;
	cin >> n >> m >> x >> y;

	vector<int> xx(n);
	vector<int> yy(m);

	for (int i = 0; i < n; i++) {
		cin >> xx[i];
	}

	for (int i = 0; i < m; i++) {
		cin >> yy[i];
	}

	sort(xx.beign(), xx.end());
	sort(yy.begin(), yy.end());


	bool hh = false;

	for (int z = x + 1; z <= y; z++) {
		if (xx[n - 1] < z && z <= yy[0]) {
			hh = true;
		}
	}

	if (hh) {
		cout << "No War" << endl;
	}
	else {
		cout << "War" << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:17: error: 'class std::vector<int>' has no member named 'beign'; did you mean 'begin'?
   25 |         sort(xx.beign(), xx.end());
      |                 ^~~~~
      |                 begin
Language: C++

#include <stdio.h>

int main()
{
    int N, M;
    int X, Y;
    int x[101], y[101];
    scanf("%d%d%d%d", &N, &M, &X, &Y);

    for(int i=0; i<N; i++){
        scanf("%d", x[i]);
    }
    for(int i=0; i<M; i++){
        scanf("%d", y[i]);
    }

    int max = x[0], min = y[0];

    for(int i=1; i<N; i++){
        if(x[i] > max){
            max = x[i];
        }
    }
    for(int i=1; i<M; i++){
        if(y[i] < min){
            min = y[i];
        }
    }

    int z;
    if(X < Z && Z < Y && Z > max && Z <= min){
        printf("War\n");
    }else{
        printf("No War\n");
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:12: error: 'Z' was not declared in this scope
   31 |     if(X < Z && Z < Y && Z > max && Z <= min){
      |            ^
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int n, m;
    int x, y;
    int x[101], y[101];
    cin >> n >> m >> x >> y;

    for(int i=0; i<n; i++){
        cin >> x[i];
    }
    for(int i=0; i<m; i++){
        cin >> x[i];
    }

    int max = x[0], min = y[0];

    for(int i=1; i<n; i++){
        if(x[i] > max){
            max = x[i];
        }
    }
    for(int i=1; i<m; i++){
        if(y[i] < min){
            min = y[i];
        }
    }

    int z;
    if(x < z && z < y && z > max && z <= min){
        cout << "War";
    }else{
        cout << "No War"
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: conflicting declaration 'int x [101]'
    9 |     int x[101], y[101];
      |         ^
a.cc:8:9: note: previous declaration as 'int x'
    8 |     int x, y;
      |         ^
a.cc:9:17: error: conflicting declaration 'int y [101]'
    9 |     int x[101], y[101];
      |                 ^
a.cc:8:12: note: previous declaration as 'int y'
    8 |     int x, y;
      |            ^
a.cc:13:17: error: invalid types 'int[int]' for array subscript
   13 |         cin >> x[i];
      |                 ^
a.cc:16:17: error: invalid types 'int[int]' for array subscript
   16 |         cin >> x[i];
      |                 ^
a.cc:19:16: error: invalid types 'int[int]' for array subscript
   19 |     int max = x[0], min = y[0];
      |                ^
a.cc:22:13: error: invalid types 'int[int]' for array subscript
   22 |         if(x[i] > max){
      |             ^
a.cc:23:20: error: invalid types 'int[int]' for array subscript
   23 |             max = x[i];
      |                    ^
a.cc:27:13: error: invalid types 'int[int]' for array subscript
   27 |         if(y[i] < min){
      |             ^
a.cc:28:20: error: invalid types 'int[int]' for array subscript
   28 |             min = y[i];
      |                    ^
a.cc:33:39: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<='
   33 |     if(x < z && z < y && z > max && z <= min){
      |                                     ~~^~~~~~
a.cc:36:25: error: expected ';' before '}' token
   36 |         cout << "No War"
      |                         ^
      |                         ;
   37 |     }
      |     ~
Language: C++

#include<iostream>
#include<algorithm>
#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+!), y(M+!);
  cin >> x[0] >> y[0];
  for(int i = 0; i < N; ++i){
    cin >> x[i+1];
  }
  for (int i = 0; i < N; ++i){
    cin >>y[i + 1];
  }
  if(is_war(x, y)){
    cout << "War" << endl;
  }
  else {
    cout << "No War" <<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:20: error: expected primary-expression before ')' token
   24 |   vector<int> x(N+!), y(M+!);
      |                    ^
a.cc:24:28: error: expected primary-expression before ')' token
   24 |   vector<int> x(N+!), y(M+!);
      |                            ^
Language: C++

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

int main() {
    int N, M, X, Y;
    cin >> N >> M >> X >> Y;
    int x, y;
    int maxX = -1000;
    int minY = 1000;
    for (int i = 0; i < N; i++){
        cin >> x;
        maxX = max(maxX, x);
    }

    for (int i = 0; i < M; i++){
        cin >> y;
        minY = min(minY, y);
    }

    bool flag = false;
    if (maxX < minY){
        for(int i = maxX + 1; i <= minY; i++){
            if (X < i && i <= Y){
                flag = true;
                break
            }
        }
    }

    if (flag)cout << "No War" << endl;
    else cout << "War" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:22: error: expected ';' before '}' token
   26 |                 break
      |                      ^
      |                      ;
   27 |             }
      |             ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,M,X,Y;
  cin >>N>>M>>X>>Y;
  int max = X;
  int min = Y;
  for(int i=0;i<N;i++){
    int a_i;
    cin >>a_i;
    max = max(max,a_i);
  }
  for(int i=0;i<M;i++){
    int b_i;
    cin >>b_i;
    min = min(min,b_i);
  }
  if(max<min) cout <<"No War" << endl;
  else cout << "War" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: 'max' cannot be used as a function
   12 |     max = max(max,a_i);
      |           ~~~^~~~~~~~~
a.cc:17:14: error: 'min' cannot be used as a function
   17 |     min = min(min,b_i);
      |           ~~~^~~~~~~~~
Language: C

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

int compare_int(const void *a, const void *b)
{
    return *(int*)a - *(int*)b;
}

int main()
{
	int N, M, X, Y;
	int x[N];
	int y[M];
	int rep;
	
	scanf ("%d %d %d %d", &N,&M,&X,&Y);
	for(rep=0; rep<N; rep++) scanf("%d", &x[rep]);
	for(rep=0; rep<M, rep++) scanf("%d", &y[rep]);
	
	qsort(x, N, sizeof(int), compare_int);
	
	for (rep = 0; rep < N; rep++){
		printf("%3d", x[rep]);
	}
	
	qsort(y, M, sizeof(int), compare_int);
	for (rep = 0; rep < M; rep++){
		printf("%3d", y[rep]);
	}

if (y[1]-x[N-1] >= 2)
{
printf ("No War");
}

else{
printf("War");
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:32: error: expected ';' before ')' token
   18 |         for(rep=0; rep<M, rep++) scanf("%d", &y[rep]);
      |                                ^
      |                                ;
Language: C++

import java.util.Scanner;
class abc110b {
    public static void main(String args[]) {
        Scanner stdIn = new Scanner(System.in);
        int n, m, xcap, ycap;
        n = stdIn.nextInt();
        m = stdIn.nextInt();
        xcap = stdIn.nextInt();
        ycap = stdIn.nextInt();

        int i;
        int x[] = new int[n];
        for(i=0; i<n; i++) {
            x[i] = stdIn.nextInt();
        }

        int j;
        int y[] = new int[m];
        for(j=0; j<m; j++) {
            y[j] = stdIn.nextInt();
        }

        if(xcap > ycap) {
            System.out.println("War");
            return;
        }
        for(i=0; i<n; i++) {
            for(j=0; j<m; j++) {
                if(x[i] > y[j]) {
                    System.out.println("War");
                    return;
                }
            }
        }

        System.out.println("No war");
    }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:11: error: expected ':' before 'static'
    3 |     public static void main(String args[]) {
      |           ^~~~~~~
      |           :
a.cc:3:29: error: 'String' has not been declared
    3 |     public static void main(String args[]) {
      |                             ^~~~~~
a.cc:38:2: error: expected ';' after class definition
   38 | }
      |  ^
      |  ;
a.cc: In static member function 'static void abc110b::main(int*)':
a.cc:4:9: error: 'Scanner' was not declared in this scope
    4 |         Scanner stdIn = new Scanner(System.in);
      |         ^~~~~~~
a.cc:6:13: error: 'stdIn' was not declared in this scope; did you mean 'std'?
    6 |         n = stdIn.nextInt();
      |             ^~~~~
      |             std
a.cc:12:19: error: initializer fails to determine size of 'x'
   12 |         int x[] = new int[n];
      |                   ^~~~~~~~~~
a.cc:12:19: error: array must be initialized with a brace-enclosed initializer
a.cc:18:19: error: initializer fails to determine size of 'y'
   18 |         int y[] = new int[m];
      |                   ^~~~~~~~~~
a.cc:18:19: error: array must be initialized with a brace-enclosed initializer
a.cc:24:13: error: 'System' was not declared in this scope
   24 |             System.out.println("War");
      |             ^~~~~~
a.cc:30:21: error: 'System' was not declared in this scope
   30 |                     System.out.println("War");
      |                     ^~~~~~
a.cc:36:9: error: 'System' was not declared in this scope
   36 |         System.out.println("No war");
      |         ^~~~~~
Language: C++

// last.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
2.//
3.#include<iostream>
4.#include<math.h>
5.#include <algorithm>
6.using namespace::std;
7.int main(){
8. 
9.int N;
10.int M;
11.int X;
12.int Y;
13. 
14.cin>>N;
15.cin>>M;
16.cin>>X;
17.cin>>Y;
18. 
19. 
20.int *xi = new int[N];
21.int *yi = new int[M];
22.for(int i=0;i<N;i++){
23.	cin>>xi[i];
24.}
25.for(int i=0;i<M;i++){
26.	cin>>yi[i];
27.}
28. 
29.int min = xi[0];
30.int max = yi[0];
31. 
32.for(int i=0;i<N;i++){
33.	if(min>xi[i]){
34.		min=xi[i];
35.	}
36.}
37.for(int i=0;i<M;i++){
38.	if(max<yi[i]){
39.		max=yi[i];
40.	}
41.}
42. 
43. 
44.if(max>min){
45.	cout<<"No War";
46.}else{
47.	cout<<"War";
48.}
49.}


Compiler output:
a.cc:3:3: error: stray '#' in program
    3 | 3.#include<iostream>
      |   ^
a.cc:4:3: error: stray '#' in program
    4 | 4.#include<math.h>
      |   ^
a.cc:5:3: error: stray '#' in program
    5 | 5.#include <algorithm>
      |   ^
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2.//
      | ^~
a.cc:7:1: error: expected unqualified-id before numeric constant
    7 | 7.int main(){
      | ^~~~~
Language: C++

// last.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
2.//
3.#include<iostream>
4.#include<math.h>
5.#include <algorithm>
6.using namespace::std;
7.int main(){
8. 
9.int N;
10.int M;
11.int X;
12.int Y;
13. 
14.cin>>N;
15.cin>>M;
16.cin>>X;
17.cin>>Y;
18. 
19. 
20.int *xi = new int[N];
21.int *yi = new int[M];
22.for(int i=0;i<N;i++){
23.	cin>>xi[i];
24.}
25.for(int i=0;i<M;i++){
26.	cin>>yi[i];
27.}
28. 
29.int min = xi[0];
30.int max = yi[0];
31. 
32.for(int i=0;i<N;i++){
33.	if(min>xi[i]){
34.		min=xi[i];
35.	}
36.}
37.for(int i=0;i<M;i++){
38.	if(max<yi[i]){
39.		max=yi[i];
40.	}
41.}
42. 
43. 
44.if((max-min)-1){
45.	cout<<"No War";
46.}else{
47.	cout<<"War";
48.}
49.}


Compiler output:
a.cc:3:3: error: stray '#' in program
    3 | 3.#include<iostream>
      |   ^
a.cc:4:3: error: stray '#' in program
    4 | 4.#include<math.h>
      |   ^
a.cc:5:3: error: stray '#' in program
    5 | 5.#include <algorithm>
      |   ^
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2.//
      | ^~
a.cc:7:1: error: expected unqualified-id before numeric constant
    7 | 7.int main(){
      | ^~~~~
Language: Java

import java.util.*;

class atCoder_110_B {
	public static void main (String[] args) {
		Scanner scanner1 = new Scanner(System.in);
		int numN = scanner1.nextInt();
		int numM = scanner1.nextInt();
		int numX = scanner1.nextInt();
		int numY = scanner1.nextInt();
		
		/*
		System.out.println("N = " + numN);
		System.out.println("M = " + numM);
		System.out.println("X = " + numX);
		System.out.println("Y = " + numY);
		*/
		
		Scanner scanner2 = new Scanner(System.in);
		List<Integer> xlist = new ArrayList();
		for (int i = 1; i <= numN; i++) {
			int x_i = scanner2.nextInt();
			
			if (x_i != numX) {
				xlist.add(new Integer(x_i));
				//System.out.println("x" + i + " = " + xlist.get(i-1));
			}
		}
		
		Scanner scanner3 = new Scanner(System.in);
		List<Integer> ylist = new ArrayList();
		for (int j = 1; j <= numM; j++) {
			int y_j = scanner3.nextInt();
			
			if (y_j != numY) {
				ylist.add(new Integer(y_j));
				//System.out.println("y" + j + " = " + ylist.get(j-1));
			}
		}
		
		//System.out.println("xlist max = " + Collections.max(xlist));
		//System.out.println("ylist max = " + Collections.min(ylist));
		
		int z = Collections.max(xlist);
		if (Collections.min(ylist) >= z) {
			if (numX < z && z <= numY) {
				System.out.println("No War");
			} else {
				System.out.println("War");
			}
		} else {
			System.out.println("War");
		}
	}
}

Compiler output:
Main.java:24: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
				xlist.add(new Integer(x_i));
				          ^
Main.java:35: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
				ylist.add(new Integer(y_j));
				          ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 warnings
Language: C++

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <math.h>
using namespace std;
typedef long long int LL;
const double PI = acos(-1.0);
const int N = 1e2 + 10;
LL n, l, r;
int main()
{
//    freopen("/Users/wangjiaolv/Desktop/test/in.txt", "r", stdin);
    int n, m, x, y, a[N], b[N];
    scanf("%d%d%d%d", &n, &m, &x, &y);
    for(int i=1;i<=n;i++) scanf("%d", &a[i]);
    for(int i=1;i<=m;i++) scanf("%d", &b[i]);
    sort(a+1, a+1+n); sort(b+1, b+1+m);
    if(a[n] >= b[1]) puts("War");
    else {
        if(y<=a[n] || x>=b[1]) puts("War");
        else puts("No war");
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   17 |     sort(a+1, a+1+n); sort(b+1, b+1+m);
      |     ^~~~
      |     sqrt
Language: C

#include<stdio.h>

int main(){
int m,n,X,Y,ix,iy,xmax = -101,ymin = 101,i;
scanf("%d %d %d %d",&n,&m,&X,&Y);
for(i = 0;i < n;i++){
scanf("%d",&ix);
if(xmax < ix){xmax = ix;}
}for(i = 0;i < m;i++){
scanf("%d",&iy;
if(ymin > iy){ymin = iy;}
}
if(xmax < ymin &&  xmax < Y && X < ymin){printf("No War\n");}
else{printf("War\n");}
return 0;
}



Compiler output:
main.c: In function 'main':
main.c:10:15: error: expected ')' before ';' token
   10 | scanf("%d",&iy;
      |      ~        ^
      |               )
main.c:11:26: error: expected ';' before '}' token
   11 | if(ymin > iy){ymin = iy;}
      |                          ^
      |                          ;
   12 | }
      | ~
Language: C++

#include <iostream>
#include <vector>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)

using namespace std;

int main(){
  int N,M,X,Y;
  scanf("%d %d %d %d",&N,&M,&X,&Y);

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

  vector<int> x;
  vector<int> y;

  rep(i, N){
    int xs;
    scanf("%d",&xs);
    x.push_back(xs);
  }
  x.push_back(X);

  rep(i, M){
    int ys;
    scanf("%d",&ys);
    y.push_back(ys);
  }
  y.push_back(Y);

  if(*max_element(x.begin(),x.end()) >= *min_element(y.begin(),y.end())){
    cout << "War" << endl;
    return 0;
  }

  cout << "No War" << endl;
  return 1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:7: error: 'max_element' was not declared in this scope
   33 |   if(*max_element(x.begin(),x.end()) >= *min_element(y.begin(),y.end())){
      |       ^~~~~~~~~~~
a.cc:33:42: error: 'min_element' was not declared in this scope
   33 |   if(*max_element(x.begin(),x.end()) >= *min_element(y.begin(),y.end())){
      |                                          ^~~~~~~~~~~
Language: Java

public class Main {

  public static void main(String[] args) {
    String result = "War";
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int M = scanner.nextInt();
    int X = scanner.nextInt();
    int Y = scanner.nextInt();

    int xMax = -100;
    int yMin = 100;
    for (int i = 0; i < N; i++) {
      int x = scanner.nextInt();
      if ( x > xMax ) {
        xMax = x;
      }
    }
    for (int i = 0; i < M; i++) {
      int y = scanner.nextInt();
      if ( yMin > y) {
        yMin = y;
      }
    }

    for (int Z = X + 1; Z <= Y; Z++) {
      if (xMax < Z && Z <= yMin) {
        result = "No War";
        break;
      }
    }

    System.out.println(result);
  }

}


Compiler output:
Main.java:5: error: cannot find symbol
    Scanner scanner = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
    Scanner scanner = new Scanner(System.in);
                          ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include <bits/stdc++.h>
int main()
{
  int N, M, X, Y;std::cin >> N >> M >> X >> Y;
  std::vector<int> x(N),y(M);
  for(auto& e:X){std::cin >> e;}
  for(auto& e:Y){std::cin >> e;}
  std::sort(x.begin(),x.end()),std::sort(y.begin(),y.end());
  const bool ok = x.back()<y.front() and y.front()>X and y.front()<=Y;
  std::cout << (ok?"No War":"War") << std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'begin' was not declared in this scope
    6 |   for(auto& e:X){std::cin >> e;}
      |               ^
a.cc:6:15: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
                 from a.cc:1:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:6:15: error: 'end' was not declared in this scope
    6 |   for(auto& e:X){std::cin >> e;}
      |               ^
a.cc:6:15: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
a.cc:7:15: error: 'begin' was not declared in this scope
    7 |   for(auto& e:Y){std::cin >> e;}
      |               ^
a.cc:7:15: note: suggested alternatives:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:7:15: error: 'end' was not declared in this scope
    7 |   for(auto& e:Y){std::cin >> e;}
      |               ^
a.cc:7:15: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
Language: C++

#include <iostream>
using namespace std;
int main() {
	cin >> N >> M >> X >> Y;
	int A[N], B[M];
	int a, b;
	for (int i = 0; i < N; i++) {
		cin >> A[i];
	}
	for (int i = 0; i < M; i++) {
		cin >> B[i];
	}
	a = A[0];
	b = B[0];

	for (int i = 0; i < N; i++) {
		a= max(a, A[i]);
	}
	for (int i = 0; i < M; i++) {
		b = min(b, B[i]);
	}
	if (X < Y) {
		if (a < b) {
			if (X < b) {
				cout << "No War" << endl;

			}
			else cout << "War" << endl;
		}
		else cout << "War" << endl;
	}
	else {
		cout << "War" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:16: error: 'N' was not declared in this scope
    4 |         cin >> N >> M >> X >> Y;
      |                ^
a.cc:4:21: error: 'M' was not declared in this scope
    4 |         cin >> N >> M >> X >> Y;
      |                     ^
a.cc:4:26: error: 'X' was not declared in this scope
    4 |         cin >> N >> M >> X >> Y;
      |                          ^
a.cc:4:31: error: 'Y' was not declared in this scope
    4 |         cin >> N >> M >> X >> Y;
      |                               ^
a.cc:8:24: error: 'A' was not declared in this scope
    8 |                 cin >> A[i];
      |                        ^
a.cc:11:24: error: 'B' was not declared in this scope
   11 |                 cin >> B[i];
      |                        ^
a.cc:13:13: error: 'A' was not declared in this scope
   13 |         a = A[0];
      |             ^
a.cc:14:13: error: 'B' was not declared in this scope
   14 |         b = B[0];
      |             ^
Language: C++

#include <iostream>
using namespace std;
int main() {
	cin >> N >> M >> X >> Y;
	int A[N], B[M];
	int a, b;
	for (int i = 0; i < N; i++) {
		cin >> A[i];
	}
	for (int i = 0; i < M; i++) {
		cin >> B[i];
	}
	a = A[0];
	b = B[0];

	for (int i = 0; i < N; i++) {
		a= max(a, A[i]);
	}
	for (int i = 0; i < M; i++) {
		b = min(b, B[i]);
	}
	if (X < Y) {
		if (a < b) {
			cout << "No War" << endl;
		}
		else cout << "War" << endl;
	}
	else {
		cout << "War" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:16: error: 'N' was not declared in this scope
    4 |         cin >> N >> M >> X >> Y;
      |                ^
a.cc:4:21: error: 'M' was not declared in this scope
    4 |         cin >> N >> M >> X >> Y;
      |                     ^
a.cc:4:26: error: 'X' was not declared in this scope
    4 |         cin >> N >> M >> X >> Y;
      |                          ^
a.cc:4:31: error: 'Y' was not declared in this scope
    4 |         cin >> N >> M >> X >> Y;
      |                               ^
a.cc:8:24: error: 'A' was not declared in this scope
    8 |                 cin >> A[i];
      |                        ^
a.cc:11:24: error: 'B' was not declared in this scope
   11 |                 cin >> B[i];
      |                        ^
a.cc:13:13: error: 'A' was not declared in this scope
   13 |         a = A[0];
      |             ^
a.cc:14:13: error: 'B' was not declared in this scope
   14 |         b = B[0];
      |             ^
Language: C++

int main() {
	int x[100] , y[100] ,X,Y, n, m,i;
	scanf("%d %d %d %d", &n, &m, &X,&Y);
	int max = X, min = Y;
	for (i = 0; i < n; i++){
		scanf("%d", &x[i]);
		if(max < x[i])  max = x[i];
	}
	for (i = 0; i < m; i++) {
		scanf("%d", &y[i]);
		if (min > x[i])  min = y[i];
	}
	max < min ? printf("No War"):printf("War") ;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
    3 |         scanf("%d %d %d %d", &n, &m, &X,&Y);
      |         ^~~~~
a.cc:13:21: error: 'printf' was not declared in this scope
   13 |         max < min ? printf("No War"):printf("War") ;
      |                     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main() {
Language: C++

int main() {
	int x1[100] , y1[100] ,X,Y, n, m, z,i,flg=0;
	scanf("%d %d %d %d", &n, &m, &X,&Y);
	for (i = 0; i < n; i++)scanf("%d", &x1[i]);
	for (i = 0; i < m; i++)scanf("%d", &y1[i]);
	z = X + 1;
	while (z <= Y) {
		for (i = 0; i < n; i++) {
			if (x1[i] >= z) { flg = 1; break; }
		}
		for (i = 0; i < m; i++) {
			if (y1[i] < z) { flg = 1; break; }
		}
		z++;
		i++;
	}
	flg == 1? printf"war\n": printf"no war\n";

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
    3 |         scanf("%d %d %d %d", &n, &m, &X,&Y);
      |         ^~~~~
a.cc:17:19: error: 'printf' was not declared in this scope
   17 |         flg == 1? printf"war\n": 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 | int main() {
a.cc:17:25: error: expected ':' before string constant
   17 |         flg == 1? printf"war\n": printf"no war\n";
      |                         ^~~~~~~
      |                         :
Language: C++

int main() {
	int x1[100] , y1[100] ,X,Y, n, m, z,i,flg=0;
	scanf("%d %d %d %d", &n, &m, &X,&Y);
	for (i = 0; i < n; i++)scanf("%d", &x1[i]);
	for (i = 0; i < m; i++)scanf("%d", &y1[i]);
	z = X + 1;
	while (z <= Y) {
		for (i = 0; i < n; i++) {
			if (x1[i] >= z) { flg = 1; break; }
		}
		for (i = 0; i < m; i++) {
			if (y1[i] < z) { flg = 1; break; }
		}
		z++;
		i++;
	}
	flg == 1? printf("war\n"): printf("no war\n");

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
    3 |         scanf("%d %d %d %d", &n, &m, &X,&Y);
      |         ^~~~~
a.cc:17:19: error: 'printf' was not declared in this scope
   17 |         flg == 1? printf("war\n"): 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 | int main() {
Language: C++

#include<iostream>
using namespace std;

int main(){
    int n,m,X,Y;
    cin>>n>>m>>X>>Y;
    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,x+n);
    sort(y,y+m);
    if(x[n-1]>X)X = x[n];
    if(y[0]<Y)Y = y[0];
    if(Y>X)cout<<"No War";
    else cout<<"War";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   10 |     sort(x,x+n);
      |     ^~~~
      |     short
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
 
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[i];
  for(int i = 0; i < M; i++) cin >> y[i];
  sort(all(x));
  sort(all(y));
  if (x.back() < y[0] && X < y[0] && y[0] <= Y) {
	cout << "No War" << endl;
  } else {
	cout << "War" << endl;
  }
  return 0;
}

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

#include <iostream<
#include <algorithm>
#include <vector>

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[i];
  for(int i = 0; i < M; i++) cin >> y[i];
  sort(all(x));
  sort(all(y));
  if (x.back() < y[0] && X < y[0] && y[0] <= Y) {
  	cout << "No War" << endl;
  } else {
    cout << "War" << endl;
  }
  return 0;
}

Compiler output:
a.cc:1:20: error: missing terminating > character
    1 | #include <iostream<
      |                    ^
a.cc:1:10: fatal error: iostream<: No such file or directory
    1 | #include <iostream<
      |          ^
compilation terminated.
Language: C++

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

int main() {
  int n, m, X, Y;
  cin >> n >> m >> X >> Y;
  int xs[n], ys[m];
  for (auto &x : xs) {
    cin >> x;
  }
  for (auto &y : ys) {
    cin >> y;
  }
  int l = *max_element(xs, xs + n);
  int r = *min_element(ys, ys + m);
  cout << (l < r && X <= l && r <= Y) ? "No War" : "War") << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:57: error: expected ';' before ')' token
   16 |   cout << (l < r && X <= l && r <= Y) ? "No War" : "War") << endl;
      |                                                         ^
      |                                                         ;
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[i];
  }
  for(int i=0; i <m; ++i){
    cin>>y[i];
  }
  sort(x.begin(),x.end());
  sort(y.begin(),y.end());
  if(max(x[n-1], X)<min(y[0], Y)) cout<<“No War\n”;
  else cout<<“War\n”;
  return 0;
}


Compiler output:
a.cc:16:41: error: extended character “ is not valid in an identifier
   16 |   if(max(x[n-1], X)<min(y[0], Y)) cout<<“No War\n”;
      |                                         ^
a.cc:16:48: error: stray '\' in program
   16 |   if(max(x[n-1], X)<min(y[0], Y)) cout<<“No War\n”;
      |                                                ^
a.cc:16:49: error: extended character ” is not valid in an identifier
   16 |   if(max(x[n-1], X)<min(y[0], Y)) cout<<“No War\n”;
      |                                                 ^
a.cc:17:14: error: extended character “ is not valid in an identifier
   17 |   else cout<<“War\n”;
      |              ^
a.cc:17:18: error: stray '\' in program
   17 |   else cout<<“War\n”;
      |                  ^
a.cc:17:19: error: extended character ” is not valid in an identifier
   17 |   else cout<<“War\n”;
      |                   ^
a.cc: In function 'int main()':
a.cc:16:41: error: '\U0000201cNo' was not declared in this scope
   16 |   if(max(x[n-1], X)<min(y[0], Y)) cout<<“No War\n”;
      |                                         ^~~
a.cc:17:14: error: '\U0000201cWar' was not declared in this scope
   17 |   else cout<<“War\n”;
      |              ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<cstdio>
#include<algorithm>
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[i];
	}
	for (int i = 0; i < M; i++)
	{
		cin >> y[i];
	}
	x.push_back(X);
	y.push_back(Y);

	int XMAX = max(x.begin(), x.end());
	int YMIN = min(y.begin(), y.end());

	if (XMAX < YMIN) cout << "No War" << endl;
	else cout << "War" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:23: error: cannot convert 'const __gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in initialization
   24 |         int XMAX = max(x.begin(), x.end());
      |                    ~~~^~~~~~~~~~~~~~~~~~~~
      |                       |
      |                       const __gnu_cxx::__normal_iterator<int*, std::vector<int> >
a.cc:25:23: error: cannot convert 'const __gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in initialization
   25 |         int YMIN = min(y.begin(), y.end());
      |                    ~~~^~~~~~~~~~~~~~~~~~~~
      |                       |
      |                       const __gnu_cxx::__normal_iterator<int*, std::vector<int> >