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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,c,d,g;
  cin >> a >> b >> c >> d;
  vector <int> e(a);
  vector <int> f(b);
  for (int i=0;i<a;i++)
    cin >> e.at(i);
  for (int i=0;i<b;i++)
    cin >> f.at(i);
  sort(e.begin(),e.end());
    sort(f.begin(),f.end());
  /*if(e.at(a)<g && g<=f.at(1) && a<g && g<=b)
    cout << "No War";
  else
    cout << "War"*/
  for (int i=a+1;i<=b;i++){
    if(e.at(a-1)<i && i<=g.at(1))
      cout << "No War";
    else
      cout << "War";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:28: error: request for member 'at' in 'g', which is of non-class type 'int'
   20 |     if(e.at(a-1)<i && i<=g.at(1))
      |                            ^~
Language: C++

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

int main(){
  int a,b,c,d,e=-100,f= 100,g;
  cin>>a>>b>>c>>d;
  for(int i=0;i<a;i++){
    cin>>g;
    e=max(e,g)
  }
  for(int i=0;i<b;i++){
    cin>>g;
    f=min(f,g);
  }
  for(int i=c+1;i<=d;i++){
    if(e<i&&i<=f){
      cout<<"No War"<<endl;
      break;
    }
    if(i==d)
      cout<<"War"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: expected ';' before '}' token
    9 |     e=max(e,g)
      |               ^
      |               ;
   10 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,c,d,g;
  cin >> a >> b >> c >> d;
  vector <int> e(a);
  vector <int> f(b);
  for (int i=0;i<a;i++)
    cin >> e.at(i);
  for (int i=0;i<b;i++)
    cin >> f.at(i);
  sort(a.begin(),a.end());
    sort(b.begin(),b.end());
  if(e.at(a)<g && g<=b.at(1) && a<g && g<=b)
    cout << "No War";
  else
    cout << "War";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: request for member 'begin' in 'a', which is of non-class type 'int'
   13 |   sort(a.begin(),a.end());
      |          ^~~~~
a.cc:13:20: error: request for member 'end' in 'a', which is of non-class type 'int'
   13 |   sort(a.begin(),a.end());
      |                    ^~~
a.cc:14:12: error: request for member 'begin' in 'b', which is of non-class type 'int'
   14 |     sort(b.begin(),b.end());
      |            ^~~~~
a.cc:14:22: error: request for member 'end' in 'b', which is of non-class type 'int'
   14 |     sort(b.begin(),b.end());
      |                      ^~~
a.cc:15:24: error: request for member 'at' in 'b', which is of non-class type 'int'
   15 |   if(e.at(a)<g && g<=b.at(1) && a<g && g<=b)
      |                        ^~
Language: C++

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

int main(){
  int a,b,c,d,e=-100,f= 100,g;
  cin>>a>>b>>c>>d;
  for(int i=0;i<a;i++){
    cin>>g;
    e=max(e,g)
  }
  for(int i=0;i<b;i++){
    cin>>g;
    f=min(e,f)
  }
  for(int i=c+1;i<=d;i++){
    if(e<i&&i<=f){
      cout<<"No War"<<endl;
      break;
    }
    if(i==d)
      cout<<"War"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: expected ';' before '}' token
    9 |     e=max(e,g)
      |               ^
      |               ;
   10 |   }
      |   ~            
a.cc:13:15: error: expected ';' before '}' token
   13 |     f=min(e,f)
      |               ^
      |               ;
   14 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,c,d,g;
  cin >> a >> b >> c >> d;
  vector <int> e(a);
  vector <int> f(b);
  for (int i=0;i<a;i++)
    cin >> e.at(i);
  for (int i=0;i<b;i++)
    cin >> f.at(i);
  sort(a.begin(),a.end());
    sort(b.begin(),b.end());
  if(e.at(a)<g && g<=b.at(1) && a<g && g<=b)
    cout << "No War";
  else
    cout << "War";
    

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: request for member 'begin' in 'a', which is of non-class type 'int'
   13 |   sort(a.begin(),a.end());
      |          ^~~~~
a.cc:13:20: error: request for member 'end' in 'a', which is of non-class type 'int'
   13 |   sort(a.begin(),a.end());
      |                    ^~~
a.cc:14:12: error: request for member 'begin' in 'b', which is of non-class type 'int'
   14 |     sort(b.begin(),b.end());
      |            ^~~~~
a.cc:14:22: error: request for member 'end' in 'b', which is of non-class type 'int'
   14 |     sort(b.begin(),b.end());
      |                      ^~~
a.cc:15:24: error: request for member 'at' in 'b', which is of non-class type 'int'
   15 |   if(e.at(a)<g && g<=b.at(1) && a<g && g<=b)
      |                        ^~
a.cc:18:19: error: expected '}' at end of input
   18 |     cout << "War";
      |                   ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
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];
  for(int i=0;i<n,i++) {
    cin >> x[i];
  }
  for(int i=0;i<m,i++) {
    cin >> y[i];
  }
　 if(X>=Y) {
  cout << "War" << endl;
}
else if(X<Y){
  cout << "No War" << endl;
}
return 0;
}

Compiler output:
a.cc:13:1: error: extended character 　 is not valid in an identifier
   13 | 　 if(X>=Y) {
      | ^
a.cc: In function 'int main()':
a.cc:7:22: error: expected ';' before ')' token
    7 |   for(int i=0;i<n,i++) {
      |                      ^
      |                      ;
a.cc:10:22: error: expected ';' before ')' token
   10 |   for(int i=0;i<m,i++) {
      |                      ^
      |                      ;
a.cc:13:1: error: '\U00003000' was not declared in this scope
   13 | 　 if(X>=Y) {
      | ^~
a.cc:16:1: error: 'else' without a previous 'if'
   16 | else if(X<Y){
      | ^~~~
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: C++

#include <bits/stdc++.h>
#define all(x) begin(x), end(x)
#define dbg(x) cerr << #x << " = " << x << endl
#define _ << ' ' <<
using namespace std;
using ll = long long;
using vi = vector<int>;
     
     
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int x, y;
    int mx = -1e9, my = 1e9, n, m;
    cin >> n >> m >> >> mx >> my;
    for (int i = 0; i < n; ++i)
    {
        cin >> x;
        mx = max(mx, x);
    }
    for (int i = 0; i < m; ++i)
    {
        cin >> y;
        my = min(my, y);
    }
    cout << (mx < my ? "No War" : "War");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:22: error: expected primary-expression before '>>' token
   16 |     cin >> n >> m >> >> mx >> my;
      |                      ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
    int N, M, X, Y;
    cin >> N >> M >> X >> Y;
    
    int maxX = -1000;
    for(int i = 0; i < N; i++) {
        int x;
        cin >> x;
        maxX = max(maxX, x);
    }
    
    int minY = 1000;
    for(int i = 0; i < M; i++) {
        int y;
        cin >> y;
        minY = min(minY, y);
    }
    
    (max(X, maxX) >= min(Y, minY))
    
    cout << ((max(X, maxX) >= min(Y, minY)) ? "War" : "No War") << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:35: error: expected ';' before 'cout'
   21 |     (max(X, maxX) >= min(Y, minY))
      |                                   ^
      |                                   ;
   22 | 
   23 |     cout << ((max(X, maxX) >= min(Y, minY)) ? "War" : "No War") << endl;
      |     ~~~~
Language: C++

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

int main(){
	int n,m,x,y;cin>>n>>m>>x>>y;
  vector<int> vx(n),vy(m);
  for(auto&& u:vx)cin>>u;
    for(auto&& u:vy)cin>>u;
  int tx=vx[0],ty=vy[0];
  for(auto&& u:vx)tx=max(tx,u);
    for(auto&& u:vy)ty=min(ty,u);
  if(tx<ty && tx<y && x<ty)cout<<"No War"<<endl;
  else cout<<"War"<<endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> vx(n),vy(m);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> vx(n),vy(m);
      |          ^~~
a.cc:8:16: error: 'vx' was not declared in this scope; did you mean 'x'?
    8 |   for(auto&& u:vx)cin>>u;
      |                ^~
      |                x
a.cc:9:18: error: 'vy' was not declared in this scope; did you mean 'y'?
    9 |     for(auto&& u:vy)cin>>u;
      |                  ^~
      |                  y
a.cc:10:10: error: 'vx' was not declared in this scope; did you mean 'tx'?
   10 |   int tx=vx[0],ty=vy[0];
      |          ^~
      |          tx
a.cc:12:18: error: 'vy' was not declared in this scope; did you mean 'y'?
   12 |     for(auto&& u:vy)ty=min(ty,u);
      |                  ^~
      |                  y
a.cc:12:21: error: 'ty' was not declared in this scope; did you mean 'tx'?
   12 |     for(auto&& u:vy)ty=min(ty,u);
      |                     ^~
      |                     tx
a.cc:13:9: error: 'ty' was not declared in this scope; did you mean 'tx'?
   13 |   if(tx<ty && tx<y && x<ty)cout<<"No War"<<endl;
      |         ^~
      |         tx
Language: C++

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

int main(){
	int n,m,x,y;cin>>n>>m>>x>>y;
  vector<int> vx(n),vy(m);
  for(auto&& u:vx)cin>>u;
    for(auto&& u:vy)cin>>u;
  int tx=vx[0],ty=vy[0];
  for(auto&& u:vx)tx=max(tx,u);
    for(auto&& u:vy)ty=min(ty,u);
  if(tx<ty && tx<y && x<ty)cout<<"No War"<<endl;
  else cout<<"War"<<endl;
  
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:21: error: 'cin' was not declared in this scope
    6 |         int n,m,x,y;cin>>n>>m>>x>>y;
      |                     ^~~
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> vx(n),vy(m);
      |   ^~~~~~
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> vx(n),vy(m);
      |          ^~~
a.cc:8:16: error: 'vx' was not declared in this scope; did you mean 'x'?
    8 |   for(auto&& u:vx)cin>>u;
      |                ^~
      |                x
a.cc:9:18: error: 'vy' was not declared in this scope; did you mean 'y'?
    9 |     for(auto&& u:vy)cin>>u;
      |                  ^~
      |                  y
a.cc:10:10: error: 'vx' was not declared in this scope; did you mean 'tx'?
   10 |   int tx=vx[0],ty=vy[0];
      |          ^~
      |          tx
a.cc:11:22: error: 'max' was not declared in this scope
   11 |   for(auto&& u:vx)tx=max(tx,u);
      |                      ^~~
a.cc:12:18: error: 'vy' was not declared in this scope; did you mean 'y'?
   12 |     for(auto&& u:vy)ty=min(ty,u);
      |                  ^~
      |                  y
a.cc:12:21: error: 'ty' was not declared in this scope; did you mean 'tx'?
   12 |     for(auto&& u:vy)ty=min(ty,u);
      |                     ^~
      |                     tx
a.cc:12:24: error: 'min' was not declared in this scope; did you mean 'main'?
   12 |     for(auto&& u:vy)ty=min(ty,u);
      |                        ^~~
      |                        main
a.cc:13:9: error: 'ty' was not declared in this scope; did you mean 'tx'?
   13 |   if(tx<ty && tx<y && x<ty)cout<<"No War"<<endl;
      |         ^~
      |         tx
a.cc:13:28: error: 'cout' was not declared in this scope
   13 |   if(tx<ty && tx<y && x<ty)cout<<"No War"<<endl;
      |                            ^~~~
a.cc:13:44: error: 'endl' was not declared in this scope
   13 |   if(tx<ty && tx<y && x<ty)cout<<"No War"<<endl;
      |                                            ^~~~
a.cc:14:8: error: 'cout' was not declared in this scope
   14 |   else cout<<"War"<<endl;
      |        ^~~~
a.cc:14:21: error: 'endl' was not declared in this scope
   14 |   else cout<<"War"<<endl;
      |                     ^~~~
Language: C++

include<bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<n;i++)
#define SFOR(i,a,b) for(int i=a;i<b;i++)
#define elif(a) else if(a)
#define INF INT_MAX
#define F first
#define S second
#define endl '\n'
using namespace std;
typedef long long ll;
typedef pair<int,int>P;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int n,m,X,Y,x,y,mx=-1,my=INF;
cin>>n>>m>>X>>Y;
FOR(i,n){
cin>>x;
mx=max(mx,x);
}
FOR(i,m){
cin>>y;
my=min(my,y);
}
mx=max(X,mx);
my=min(Y,my);
if(my-mx>0) cout<<"No War"<<endl;
else cout<<"War"<<endl;
return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc:11:9: error: 'pair' does not name a type
   11 | typedef pair<int,int>P;
      |         ^~~~
a.cc: In function 'int main()':
a.cc:13:1: error: 'cin' was not declared in this scope
   13 | cin.tie(0);
      | ^~~
a.cc:14:1: error: 'ios' has not been declared
   14 | ios::sync_with_stdio(false);
      | ^~~
a.cc:5:13: error: 'INT_MAX' was not declared in this scope
    5 | #define INF INT_MAX
      |             ^~~~~~~
a.cc:15:26: note: in expansion of macro 'INF'
   15 | int n,m,X,Y,x,y,mx=-1,my=INF;
      |                          ^~~
a.cc:1:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
  +++ |+#include <climits>
    1 | include<bits/stdc++.h>
a.cc:19:4: error: 'max' was not declared in this scope; did you mean 'mx'?
   19 | mx=max(mx,x);
      |    ^~~
      |    mx
a.cc:23:4: error: 'min' was not declared in this scope; did you mean 'main'?
   23 | my=min(my,y);
      |    ^~~
      |    main
a.cc:25:4: error: 'max' was not declared in this scope; did you mean 'mx'?
   25 | mx=max(X,mx);
      |    ^~~
      |    mx
a.cc:26:4: error: 'min' was not declared in this scope; did you mean 'main'?
   26 | my=min(Y,my);
      |    ^~~
      |    main
a.cc:27:13: error: 'cout' was not declared in this scope
   27 | if(my-mx>0) cout<<"No War"<<endl;
      |             ^~~~
a.cc:28:6: error: 'cout' was not declared in this scope
   28 | else cout<<"War"<<endl;
      |      ^~~~
Language: C

#include <stdio.h>

int main() {
  int number_n, number_m, point_x, point_y, max_x, min_y, temp;
  scanf("%d %d %d %d", &number_n, &number_m, &point_x, &point_y);
  max_x = point_x;
  min_y = point_y;
  for(i = 0; i < number_n; i++) {
    scanf("%d", &temp);
    if(max_x < temp) max_x = temp;
  }
  for(i = 0; i < number_m; i++) {
    scanf("%d", &temp);
    if(min_y > temp) min_y = temp;
  }
  if(max_x < min_y) {
    printf("No War\n");
  } else {
    printf("War\n");
  }
  return 0;
}


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

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

#define REP(i, n) for(int i=0; i<n;i++)
#define REPR(i, n) for(int i=n-1 ; i>=0; i--)
#define FOR(i, m, n) for(int i=m; i<n; i++)

#define INF 2e9
#define ll long long

int main(){
    int n, m, x, y;
    int a[n], b[m];

    int i, j, k;
    a_max = -1000;
    b_min = 1000;

    for(i=0; i<n; i++){
        cin>>a[i];
        if(a[i]>a_max){
            a_max = a[i]; 
        }
    }
    for(i=0; i<m; i++){
        cin>>b[i];
        if(b[i]<b_min){
            b_min = b[i];
        }
    }

    if(a_max<b_min){
        for(int z = a_max+1; z<=b_min; z++){
            if(x<z && z<=y){
                cout<<"No War"<<endl;
                return 0;
            }
        }
    }
    else{
        cout<<"War"<<endl;
        return 0;
    }

    cout<<"War"<<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'a_max' was not declared in this scope
   16 |     a_max = -1000;
      |     ^~~~~
a.cc:17:5: error: 'b_min' was not declared in this scope
   17 |     b_min = 1000;
      |     ^~~~~
Language: C++

N, M, X, Y = map(int, input().split())
x_list = list(map(int, input().split()))
y_list = list(map(int, input().split()))
if X < Y and max(x_list) < min(y_list):
    print('No War')
else:
    print('War')


Compiler output:
a.cc:5:11: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    5 |     print('No War')
      |           ^~~~~~~~
a.cc:7:11: warning: multi-character character constant [-Wmultichar]
    7 |     print('War')
      |           ^~~~~
a.cc:1:1: error: 'N' does not name a type
    1 | N, M, X, Y = map(int, input().split())
      | ^
Language: C++

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

int main(){
  int n,m,x,y;
  cin>>n >>m >>x >>y;
  string ans = "War";
  
  for(int i=0;i<n;i++,x=max(x,Xn)){
    int Xn; cin >> Xn;
  }
  for(int i=0;i<m;i++,y=min(y,Ym)){
    int Ym; cin >> Ym;
  }
  
  if(x < y){
    ans = "No War";
  }
  cout<<ans<<endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:9:31: error: 'Xn' was not declared in this scope; did you mean 'n'?
    9 |   for(int i=0;i<n;i++,x=max(x,Xn)){
      |                               ^~
      |                               n
a.cc:12:31: error: 'Ym' was not declared in this scope; did you mean 'm'?
   12 |   for(int i=0;i<m;i++,y=min(y,Ym)){
      |                               ^~
      |                               m
Language: Java

import java.util.*;
class Main{
  public static void main(String[] a ){
    Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int m=sc.nextInt();
int x=sc.nextInt();
int y=sc.nextInt();
int maxX=Integer.MIN_VALUE;
minY=Integer.MAX_VALUE;
for(int i=0;i<n;i++){
maxX=Math.max(maxX,sc.nextInt());
}
for(int i=0;i<m;i++){
minY=Math.min(minY,sc.nextInt());
}
if(maxX<minY&&(maxX<y||minY>x)){
System.out.println("No war");
}else{
System.out.println("War");
}}}

Compiler output:
Main.java:10: error: cannot find symbol
minY=Integer.MAX_VALUE;
^
  symbol:   variable minY
  location: class Main
Main.java:15: error: cannot find symbol
minY=Math.min(minY,sc.nextInt());
^
  symbol:   variable minY
  location: class Main
Main.java:15: error: cannot find symbol
minY=Math.min(minY,sc.nextInt());
              ^
  symbol:   variable minY
  location: class Main
Main.java:17: error: cannot find symbol
if(maxX<minY&&(maxX<y||minY>x)){
        ^
  symbol:   variable minY
  location: class Main
Main.java:17: error: cannot find symbol
if(maxX<minY&&(maxX<y||minY>x)){
                       ^
  symbol:   variable minY
  location: class Main
5 errors
Language: Java

import java.util.*;
class Main{
  public static void main(String[] a ){
    Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int m=sc.nextInt();
int x=sc.nextInt();
int y=sc.nextInt();
int maxX=Integer.MIN_VALUE;
minY=Integer.MAX_VALUE;
for(int i=0;i<n;i++){
maxX=Math.max(maxX,sc.nextInt());
}
for(int i=0;i<m;i++){
minY=Math.min(minY,sc.nextInt());
}
if(maxX<minY&&(maxX<y||minY>x){
System.out.println("No war");
}else{
System.out.println("War");
}}}

Compiler output:
Main.java:17: error: ')' expected
if(maxX<minY&&(maxX<y||minY>x){
                              ^
1 error
Language: C++

#include<iostream>
using namespace std ;

int max(int*,int) ;

int main()
{
  int N,M,X,Y ;
  cin>>N>>M>>X>>Y ;
  int x[N],y[M] ;
  int i ;
  for(i=0;i<N;i++) cin>>x[i] ;
  for(i=0;i<M;i++) cin>>y[i] ;
  
  for(int Z=X+1;Z<=Y;Z++){
    if(Z<=max(x,N)||Z>-max(-y,M)){
      cout<<"War"<<endl ;
      return 0 ;
    }
  }
  
  cout<<"No War"<<endl ;
  
  return 0 ;
}

int max(int arr[],int n){
  int Max=arr[n-1] ;
  for(;n>0;n--) if(arr[n-1]>Max) Max=arr[n-1] ;
  
  return Max ;
}
   


Compiler output:
a.cc: In function 'int main()':
a.cc:16:29: error: wrong type argument to unary minus
   16 |     if(Z<=max(x,N)||Z>-max(-y,M)){
      |                             ^
Language: C++

#include<iostream>
using namespace std ;

int max(int,int) ;

int main()
{
  int N,M,X,Y ;
  cin>>N>>M>>X>>Y ;
  int x[N],y[M] ;
  int i ;
  for(i=0;i<N;i++) cin>>x[i] ;
  for(i=0;i<M;i++) cin>>y[i] ;
  
  for(int Z=X+1;Z<=Y;Z++){
    if(Z<=max(x,N)||Z>-max(-y,M)){
      cout<<"War"<<endl ;
      return 0 ;
    }
  }
  
  cout<<"No War"<<endl ;
  
  return 0 ;
}

int max(int arr[],int n){
  int Max=arr[n-1] ;
  for(;n>0;n--) if(arr[n-1]>Max) Max=arr[n-1] ;
  
  return Max ;
}
   

Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: no matching function for call to 'max(int [N], int&)'
   16 |     if(Z<=max(x,N)||Z>-max(-y,M)){
      |           ~~~^~~~~
a.cc:4:5: note: candidate: 'int max(int, int)' (near match)
    4 | int max(int,int) ;
      |     ^~~
a.cc:4:5: note:   conversion of argument 1 would be ill-formed:
a.cc:16:15: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   16 |     if(Z<=max(x,N)||Z>-max(-y,M)){
      |               ^
      |               |
      |               int*
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:16:14: note:   variable-sized array type 'int [N]' is not a valid template argument
   16 |     if(Z<=max(x,N)||Z>-max(-y,M)){
      |           ~~~^~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
a.cc:16:29: error: wrong type argument to unary minus
   16 |     if(Z<=max(x,N)||Z>-max(-y,M)){
      |                             ^
Language: C++

#include <iostream> 
#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);
  int xmax= -1000;
  int xmin= 1000;
  int ymax= -1000;
  int ymin= 1000;
  for(int i=0;i<N;i++)｛
    cin>>x.at(i);
    xmax=max(xmax,x.at(i));
    xmin=min(xmin,x.at(i));
  ｝ 
  for(int i=0;i<M;i++)｛
    cin>>y.at(i);
    ymax=max(ymax,y.at(i));
    ymin=min(ymin,y.at(i));
  ｝
  if(max(X,xmax)<=min(Y,ymin)||min(X,xmin)>=max(Y,ymax))｛
    cout<<"No War"<<endl;
   ｝
   else｛
   cout<<"War"<<endl;
  ｝
｝


Compiler output:
a.cc:4:11: error: expected initializer before '\U0000ff5b'
    4 | int main()｛
      |           ^~
a.cc:6:3: error: 'cin' does not name a type
    6 |   cin>>N>>M>>X>>Y;
      |   ^~~
a.cc:7:17: error: 'N' was not declared in this scope
    7 |   vector<int> x(N);
      |                 ^
a.cc:8:17: error: 'M' was not declared in this scope
    8 |   vector<int> y(M);
      |                 ^
a.cc:13:3: error: expected unqualified-id before 'for'
   13 |   for(int i=0;i<N;i++)｛
      |   ^~~
a.cc:13:15: error: 'i' does not name a type
   13 |   for(int i=0;i<N;i++)｛
      |               ^
a.cc:13:19: error: 'i' does not name a type
   13 |   for(int i=0;i<N;i++)｛
      |                   ^
a.cc:15:5: error: 'xmax' does not name a type
   15 |     xmax=max(xmax,x.at(i));
      |     ^~~~
a.cc:16:5: error: 'xmin' does not name a type
   16 |     xmin=min(xmin,x.at(i));
      |     ^~~~
a.cc:17:3: error: '\U0000ff5d' does not name a type
   17 |   ｝
      |   ^~
a.cc:18:15: error: 'i' does not name a type
   18 |   for(int i=0;i<M;i++)｛
      |               ^
a.cc:18:19: error: 'i' does not name a type
   18 |   for(int i=0;i<M;i++)｛
      |                   ^
a.cc:20:5: error: 'ymax' does not name a type
   20 |     ymax=max(ymax,y.at(i));
      |     ^~~~
a.cc:21:5: error: 'ymin' does not name a type
   21 |     ymin=min(ymin,y.at(i));
      |     ^~~~
a.cc:22:3: error: '\U0000ff5d' does not name a type
   22 |   ｝
      |   ^~
a.cc:25:4: error: '\U0000ff5d' does not name a type
   25 |    ｝
      |    ^~
a.cc:28:3: error: '\U0000ff5d' does not name a type
   28 |   ｝
      |   ^~
Language: C++

#include <bits/stdc++.h>
int main()｛
  int N,M,X,Y;
  cin>>N>>M>>X>>Y;
  vector<int> x(N);
  vector<int> y(M);
  int xmax= -1000;
  int xmin= 1000;
  int ymax= -1000;
  int ymin= 1000;
  for(int i=0;i<N;i++)｛
    cin>>x.at(i);
    xmax=max(xmax,x.at(i));
    xmin=min(xmin,x.at(i));
  ｝ 
  for(int i=0;i<M;i++)｛
    cin>>y.at(i);
    ymax=max(ymax,y.at(i));
    ymin=min(ymin,y.at(i));
  ｝
  if(max(X,xmax)<=min(Y,ymin)||min(X,xmin)>=max(Y,ymax))｛
    cout<<"No War"<<endl;
   ｝
   else｛
   cout<<"War"<<endl;
  ｝
｝

Compiler output:
a.cc:2:11: error: expected initializer before '\U0000ff5b'
    2 | int main()｛
      |           ^~
a.cc:4:3: error: 'cin' does not name a type
    4 |   cin>>N>>M>>X>>Y;
      |   ^~~
a.cc:5:3: error: 'vector' does not name a type
    5 |   vector<int> x(N);
      |   ^~~~~~
a.cc:6:3: error: 'vector' does not name a type
    6 |   vector<int> y(M);
      |   ^~~~~~
a.cc:11:3: error: expected unqualified-id before 'for'
   11 |   for(int i=0;i<N;i++)｛
      |   ^~~
a.cc:11:15: error: 'i' does not name a type
   11 |   for(int i=0;i<N;i++)｛
      |               ^
a.cc:11:19: error: 'i' does not name a type
   11 |   for(int i=0;i<N;i++)｛
      |                   ^
a.cc:13:5: error: 'xmax' does not name a type
   13 |     xmax=max(xmax,x.at(i));
      |     ^~~~
a.cc:14:5: error: 'xmin' does not name a type
   14 |     xmin=min(xmin,x.at(i));
      |     ^~~~
a.cc:15:3: error: '\U0000ff5d' does not name a type
   15 |   ｝
      |   ^~
a.cc:16:15: error: 'i' does not name a type
   16 |   for(int i=0;i<M;i++)｛
      |               ^
a.cc:16:19: error: 'i' does not name a type
   16 |   for(int i=0;i<M;i++)｛
      |                   ^
a.cc:18:5: error: 'ymax' does not name a type
   18 |     ymax=max(ymax,y.at(i));
      |     ^~~~
a.cc:19:5: error: 'ymin' does not name a type
   19 |     ymin=min(ymin,y.at(i));
      |     ^~~~
a.cc:20:3: error: '\U0000ff5d' does not name a type
   20 |   ｝
      |   ^~
a.cc:23:4: error: '\U0000ff5d' does not name a type
   23 |    ｝
      |    ^~
a.cc:26:3: error: '\U0000ff5d' does not name a type
   26 |   ｝
      |   ^~
Language: Java

import java.io.*;
import java.util.*;
class Program{
    int solve(int i, int size){
        int temp = i;
        for(int j=1;j<size;j++){
            temp=temp*10+i;
        }
        return temp;
    }
}
class Main{
    public static void main(String[] args) {
        Program obj = new Program();
        Scanner in = new Scanner(System.in);
        int n = in.nextInt(), m = in.nextInt(), x = in.nextInt(), y = in.nextInt();
        int X[] = new int[n]; int Y[] = new int[m];
        for(int i=0;i<n;i++) X[i] = in.nextInt();
        for(int i=0;i<m;i++) Y[i] = in.nextInt();
        Arrays.sort(X); Arrays.sort(Y);
        //System.out.println(Arrays.toString(X)+" "+Arrays.toString(Y));
        if(y-x>1){
            if (Y[0]-X[n-1]>1) {
                    if(Y[0]-x>1 && y-X[n-1]>1) System.out.println("No War");
                    else System.out.println("War");
                }
                else System.out.println("War");
            }
            else System.out.println("War");

        }
        else System.out.println("War");
    }
}

Compiler output:
Main.java:32: error: illegal start of type
        else System.out.println("War");
        ^
Main.java:32: error: <identifier> expected
        else System.out.println("War");
                               ^
Main.java:32: error: illegal start of type
        else System.out.println("War");
                                ^
Main.java:34: error: class, interface, enum, or record expected
}
^
4 errors
Language: C++

#include "bits/stdc++.h"
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define mFOR(i, a, b) for (int i = a; i > b; i--)
#define MP make_pair
#define PB push_back
#define ALL(v) v.begin(), v.end()
#define N 100007
#define INF 1000000007
using namespace std;

typedef long long ll;

ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); }

int main()
{
   int n, m, x[101] = {}, y[101] = {};
   cin >> n >> m >> x[0] >> y[0];
   FOR(i, 1, n + 1)
   cin >> x[i];
   FOR(i, 1, m + 1)
   cin >> y[i];

   sort(x, x + n + 1);
   sort(y, y + m + 1);

   if (x[n] < y[0])
      cout << "War" << endl;
   else
      cout << "No War" << endl;
   return 0:
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:12: error: expected ';' before ':' token
   31 |    return 0:
      |            ^
      |            ;
a.cc:31:12: error: expected primary-expression before ':' token
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(auto& xi : x){
    cin >> xi;
  }
  for(auto& yi : y){
    cin >> yi;
  }
  
  int max_xi = *max_element(x.beign(), x.end());
  int min_yi = *min_element(y.beign(), y.end());
  
  if((min_yi <= X) ||(min_yi <= max_xi) || (Y <= max_xi)){
    cout << "War" << endl;
    return 0;
  }
  cout << "No War" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:31: error: 'class std::vector<int>' has no member named 'beign'; did you mean 'begin'?
   17 |   int max_xi = *max_element(x.beign(), x.end());
      |                               ^~~~~
      |                               begin
a.cc:18:31: error: 'class std::vector<int>' has no member named 'beign'; did you mean 'begin'?
   18 |   int min_yi = *min_element(y.beign(), y.end());
      |                               ^~~~~
      |                               begin
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(auto& xi : x){
    cin >> xi;
  }
  for(auto& yi : y){
    cin >> yi;
  }
  
  int max_xi = *max_element(x.beign(), x.end());
  int min_yi = *min_element(x.beign(), x.end());
  
  if((min_yi <= X) ||(min_yi <= max_xi) || (Y <= max_xi)){
    cout << "War" << endl;
    return 0;
  }
  cout << "No War" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:31: error: 'class std::vector<int>' has no member named 'beign'; did you mean 'begin'?
   17 |   int max_xi = *max_element(x.beign(), x.end());
      |                               ^~~~~
      |                               begin
a.cc:18:31: error: 'class std::vector<int>' has no member named 'beign'; did you mean 'begin'?
   18 |   int min_yi = *min_element(x.beign(), x.end());
      |                               ^~~~~
      |                               begin
Language: C

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

int main() {
    int n=0, m=0, x=0, y=0;
    scanf("%d %d %d %d\n", &n, &m, &x, &y);
    int x_max = -1000, y_min = 1000;
    for (int i=0; i<n; i++) {
        int buf = 0;
        scanf("%d", &buf);
        if (buf > x_max) x_max = buf;
    }
    for (int i=0; i<m; i++) {
        int buf = 0;
        scanf("%d", &buf);
        if (buf < y_min) y_min = buf;
    }
    for (int i=x+1; i<=y; i++) {
        if (i>x_max && i<=y_min) {
            printf("No War\n");
            return 0;
    }
    printf("War\n");
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:27:1: error: expected declaration or statement at end of input
   27 | }
      | ^
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[i];
  }
  for(int i=0;i<M;i++){
    cin >> y[i];
  }
  sort(x.begin(),x.end());
  sort(y.begin(),y.end());
  string ans;
  if(Z>X && Y>=Z && x.end()<Z && y.begin()>=Z){
    ans="No War";
  }
  else{
    ans="War";
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:6: error: 'Z' was not declared in this scope
   17 |   if(Z>X && Y>=Z && x.end()<Z && y.begin()>=Z){
      |      ^
Language: C++

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

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



Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: 'class std::vector<int>' has no member named 'ar'; did you mean 'at'?
   17 |  if(a.at(n-1) >= x || b.ar(0) < y){
      |                         ^~
      |                         at
Language: C++

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

int main() {
  int n,m,x,y;
  cin >> n >> m >> x >> y;
  vector<int> a(n),b(m);
  for(int i = 0; i<n;i++){
    cin >> a.at(i);
  }
  for(int i = 0; i<m;i++){
    cin >> b.at(i);
  }
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  bool y = true;
  
  if(a.at(n-1) >= b.at(0)){
    cout << "War" << endl;
  }
  else {
    for(int i = x ; i <= y ; i++){
      if(a.at(n-1) >=  i || b.at(0) < i){
        cout << "War" << endl;
        y = false;
        break;
      }
    }
    if(y){
      cout << "No War" << endl;
    }
  }
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: conflicting declaration 'bool y'
   16 |   bool y = true;
      |        ^
a.cc:5:13: note: previous declaration as 'int y'
    5 |   int n,m,x,y;
      |             ^
Language: Java

import java.util.*;

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[] a=new int[n];
    int[] b=new int[m];
    int temp,flag=0;
    for(int i=0;i<n;++i){
      temp=a[i]>temp?a[i]:temp;
    }
    for(int j=0;j<m;++j){
      flag+=b[j]<temp?1:0;
    }
    System.out.println(flag>0?"War":"No War");
  }
}

Compiler output:
Main.java:14: error: variable temp might not have been initialized
      temp=a[i]>temp?a[i]:temp;
                ^
Main.java:17: error: variable temp might not have been initialized
      flag+=b[j]<temp?1:0;
                 ^
2 errors
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
inline ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
inline ll lcm(ll a, ll b) { return a / gcd(a, b)*b; }
template<class S,class T> ostream& operator << (ostream& out,const pair<S,T>& o){ out << "(" << o.first << "," << o.second << ")"; return out; }
template<class T> ostream& operator << (ostream& out,const vector<T> V){ for(int i = 0; i < V.size(); i++){ out << V[i]; if(i!=V.size()-1) out << " ";} return out; }
template<class T> ostream& operator << (ostream& out,const vector<vector<T> > Mat){ for(int i = 0; i < Mat.size(); i++) { if(i != 0) out << endl; out << Mat[i];} return out; }
template<class S,class T> ostream& operator << (ostream& out,const map<S,T> mp){ out << "{ "; for(auto it = mp.begin(); it != mp.end(); it++){ out << it->first << ":" << it->second; if(mp.size()-1 != distance(mp.begin(),it)) out << ", "; } out << " }"; return out; }

/*
 <url:>
 問題文============================================================
 =================================================================
 解説=============================================================
 ================================================================
 */


template<class Type>
Type solve(Type res = Type()){
    int N,M,X,Y; cin >> N >> M >> X >> Y;
    vector<int> x(N),y(M);
    for(auto& in:x) cin >> in;
    for(auto& in:y) cin >> in;
    sort(x.begin(),x.end());
    sort(y.begin(),y.end());
    int lx = x.back();
    int uy = x.front();
    
    if(uy > lx) return "No War";
    else return "War";
    
    return res;
}
int main(void) {
    cin.tie(0); ios_base::sync_with_stdio(false);
    //test();
    //solve<ll>();
    cout << fixed << setprecision(15) << solve<ll>() << endl;
    return 0;
}



Compiler output:
a.cc: In instantiation of 'Type solve(Type) [with Type = long long int]':
a.cc:44:51:   required from here
   44 |     cout << fixed << setprecision(15) << solve<ll>() << endl;
      |                                          ~~~~~~~~~^~
a.cc:35:24: error: invalid conversion from 'const char*' to 'long long int' [-fpermissive]
   35 |     if(uy > lx) return "No War";
      |                        ^~~~~~~~
      |                        |
      |                        const char*
a.cc:36:17: error: invalid conversion from 'const char*' to 'long long int' [-fpermissive]
   36 |     else return "War";
      |                 ^~~~~
      |                 |
      |                 const char*
Language: C++

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

int main() {
  int N,M,X,Y;
  cin>>N>>M>>X>>Y;
  
  // 100要素の配列で初期化
  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());
  int ans=0;
  int tmp=0;
  for(i=X;i<Y+1;i++){
    if(x.at(N-1)<tmp&&y.at(0)>=tmp){
      cout<<"No War"<<endl;
      ans=1;
      break;
    }
    tmp++;
  }
  if(ans==0)
    cout<<"War"<<endl;
}
  



Compiler output:
a.cc: In function 'int main()':
a.cc:19:7: error: 'i' was not declared in this scope
   19 |   for(i=X;i<Y+1;i++){
      |       ^
Language: C++

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

int main() {
  int N,M,X,Y;
  cin>>N>>M>>X>>Y;
  
  // 100要素の配列で初期化
  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());
  int ans=0;
  for(i=X;i<Y+1;i++){
    if(x(N-1)<i&&y(0)>=i){
      cout<<"No War"<<endl;
      ans=1;
      break;
    }
  }
  if(ans==0)
    cout<<"War"<<endl;
}
  



Compiler output:
a.cc: In function 'int main()':
a.cc:18:7: error: 'i' was not declared in this scope
   18 |   for(i=X;i<Y+1;i++){
      |       ^
a.cc:19:9: error: no match for call to '(std::vector<int>) (int)'
   19 |     if(x(N-1)<i&&y(0)>=i){
      |        ~^~~~~
a.cc:19:19: error: no match for call to '(std::vector<int>) (int)'
   19 |     if(x(N-1)<i&&y(0)>=i){
      |                  ~^~~
Language: C++

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

int main(){
  int N,M,X,Y;
  cin >> N >> M >> X >> Y;
  int x[N];
  int y[M];
  int xmax;
  int ymin;
  for (int i=0;i<N;i++){
    cin >>x[i];
    xmax=i==0+x[i]:max(xmax,x[i]);
  }
  for (int i=0;i<M;i++){
    cin >>y[i];
    ymin=i==0+y[i]:min(xmax,y[i]);
  }
  if (xmax<ymin and (xmax<Y or ymin>X)){
    cout << "No ";
  }
  cout << "War" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: expected ';' before ':' token
   13 |     xmax=i==0+x[i]:max(xmax,x[i]);
      |                   ^
      |                   ;
a.cc:17:19: error: expected ';' before ':' token
   17 |     ymin=i==0+y[i]:min(xmax,y[i]);
      |                   ^
      |                   ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long mod = pow(10, 9) + 7;
const long long INF = 1LL << 60;
template <class T> bool chmin(T& a, T b){if (a > b) {a = b; return true;} return false;}
template <class T> bool chmax(T& a, T b){if (a < b) {a = b; return true;} return false;}
int divCeil(int A, int B) {return (A + (B - 1)) / B;}
long long divCeil(long long A, int B) {return (A + (B - 1)) / B;}
long long divCeil(int A, long long B) {return (A + (B - 1)) / B;}
long long divCeil(long long A, long long B) {return (A + (B - 1)) / B;}

int main()
{
  int N, M, X, Y;
  cin >> N >> M >> X >> Y;
  int Mx = -1000, My = -1000, mx = 1000, my = 1000;
  for (int i = 0; i < N; i++) 
  {
    int x;
    cin >> x;
    chmax(Mx, x);
    //chmin(mx, x);
  }
  for (int i = 0; i < M; i++) 
  {
    int y;
    cin >> y;
    //chmax(My, y);
    chmin(my, y);
  }
  
  string ans = "War";
  if (Mx < my)
  {
    int Mz = my;
    int mz = Mx + 1;
    if !((X > Mz || Y < mz)) ans = "No War";
  }
  
  //cout << mx << " " << Mx << " " << my << " " << My << endl;
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:8: error: expected '(' before '!' token
   37 |     if !((X > Mz || Y < mz)) ans = "No War";
      |        ^
      |        (
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: cannot convert 'std::vector<int>' to 'int' in assignment
   20 |   xmax = max({X});
      |          ~~~^~~~~
      |             |
      |             std::vector<int>
a.cc:21:13: error: cannot convert 'std::vector<int>' to 'int' in assignment
   21 |   ymin = min({Y});
      |          ~~~^~~~~
      |             |
      |             std::vector<int>
Language: C++

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

int main() {
  int N, M, x, y, i;
  cin >> N >> M >> x >> y;
  
  vector<int> x(N + 1);
  vector<int> y(M + 1);
  x.at(0) = x;
  y.at(0) = y;
  for(i = 1; i <= N; i++){
    cin >> x.at(i);
  }
  for(i = 1; i <= M; i++){
    cin >> y.at(i);
  }
  
  int xmax, ymin;
  xmax = max({x});
  ymin = min({y});
  
  if(xmax < ymin){
    cout << "No War" << endl;
  }
  else{
    cout << "War" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: conflicting declaration 'std::vector<int> x'
    8 |   vector<int> x(N + 1);
      |               ^
a.cc:5:13: note: previous declaration as 'int x'
    5 |   int N, M, x, y, i;
      |             ^
a.cc:9:15: error: conflicting declaration 'std::vector<int> y'
    9 |   vector<int> y(M + 1);
      |               ^
a.cc:5:16: note: previous declaration as 'int y'
    5 |   int N, M, x, y, i;
      |                ^
a.cc:10:5: error: request for member 'at' in 'x', which is of non-class type 'int'
   10 |   x.at(0) = x;
      |     ^~
a.cc:11:5: error: request for member 'at' in 'y', which is of non-class type 'int'
   11 |   y.at(0) = y;
      |     ^~
a.cc:13:14: error: request for member 'at' in 'x', which is of non-class type 'int'
   13 |     cin >> x.at(i);
      |              ^~
a.cc:16:14: error: request for member 'at' in 'y', which is of non-class type 'int'
   16 |     cin >> y.at(i);
      |              ^~
Language: C++

#include <bits/stdc++.h>
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef long long int64;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define all(x) (x).begin(),(x).end()
#define SORT(x) sort(all(x))
#define GSORT(x) sort(all(x), greater<int>())
#define MIN(x) *min_element(all(x))
#define MAX(x) *max_element(all(x))
#define in(x) cin >> x
#define co(x) cout << x
#define el  cout << endl
#define dump(x)  cout << #x << " = " << (x) << endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

using namespace std;

int main() {
  int N, M, X, Y, Z, i, num, xmax=-100, ymin=100, ans;
  cin >> N >> M >> X >> Y;


  REP(i, N) {
    in(num);
    chmax(xmax, num);
  }
  REP(i, M) {
    in(num);
    chmin(ymin, num);
  }
  Z = ymin;
  if(xmax < Z && X < Z && Z <= Y ){
    co("No War");
  }else{
    co("War");
  }

  return 0;
}


Compiler output:
a.cc:2:9: error: 'vector' does not name a type
    2 | typedef vector<int> VI;
      |         ^~~~~~
a.cc:3:9: error: 'vector' does not name a type
    3 | typedef vector<VI> VVI;
      |         ^~~~~~
a.cc:4:9: error: 'vector' does not name a type
    4 | typedef vector<string> VS;
      |         ^~~~~~
a.cc:5:9: error: 'pair' does not name a type
    5 | typedef pair<int, int> PII;
      |         ^~~~
Language: C++

n,m,X,Y = map(int,input().split())
x = list(map(int,input().split()))
y = list(map(int,input().split()))
x.sort()
y.sort()
if x[n-1] < y[0] and X < y[0] and Y < x[n-1]:
    print('No War')
else:
    print('War')

Compiler output:
a.cc:7:11: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    7 |     print('No War')
      |           ^~~~~~~~
a.cc:9:11: warning: multi-character character constant [-Wmultichar]
    9 |     print('War')
      |           ^~~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n,m,X,Y = map(int,input().split())
      | ^
Language: C++

#include<iostream>
#include<algorithm>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
int N,M,X,Y;
cin>>N>>M>>X>>Y;
  int x[N];
  int y[M];
  rep(i,N){
	cin>>x[i];
  }
  rep(i,M){
	cin>>y[i];
  }
  int mx = max({x});
  int my = min({y});
  if(mx<my&&X<my&&my<Y){
	cout<<"War"<<endl;
  }else{
	cout<<"No War"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   16 |   int mx = max({x});
      |            ~~~^~~~~
      |               |
      |               int*
a.cc:17:15: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   17 |   int my = min({y});
      |            ~~~^~~~~
      |               |
      |               int*
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];
3
}
if (is_war(x, y)) {
cout << "War" << endl;
}
else {
cout << "No War" << endl;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:2: error: expected ';' before '}' token
   26 | 3
      |  ^
      |  ;
   27 | }
      | ~
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];
3
}
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.