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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m,x,y,v[105],o[105];
  cin>>n>>m>>x>>y;
  for(int i=0;i<n;i++)
    cin>>v[i];
  for(int j=0;j<m;j++)
    cin>>o[i];
  for(int i=0;i<101;i++){
    if(x<i&&i<=y){
      bool pp=false;
      for(int j=0;j<n;j++)
        if(v[j]>=i)
          pp=true;
      for(int j=0;j<n;j++)
        if(v[j]>=i)
          pp=true;
      if(pp==false){
        cout<<"not war"<<endl;
        return 0;
      }
    }
  }
  cout<<"war"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'i' was not declared in this scope
    9 |     cin>>o[i];
      |            ^
Language: C++

#include<iostream>
#include<vector>
 using namespace std;
int main(){
  int n, m;
  cin >> n >> m ;

  string res = "War";
  vector<int> x(n), y(m);
  cin >> x[0] >> y[0];
  for (int i = 1; i < n+1; i++) {
    cin >> x[i];
  }
  for (int i = 1; i < m+1; i++) {
    cin >> y[i];
  }

  int mx = *max_element(x.begin(), x.end());
  int my = *min_element(y.begin(), y.end());
  if (mx < my) {
    res = "No War";
  }
    cout << res << "\n";

}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: 'max_element' was not declared in this scope
   18 |   int mx = *max_element(x.begin(), x.end());
      |             ^~~~~~~~~~~
a.cc:19:13: error: 'min_element' was not declared in this scope
   19 |   int my = *min_element(y.begin(), y.end());
      |             ^~~~~~~~~~~
Language: C++

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

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

    vector<int> x(N);
    vecror<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());
    bool flag = false;
    for(int z=X+1;z<=Y;Z++){
        if(x[N-1] > z && z <= y[0] ){
            cout << "No War" << endl;
            flag = true;
            break;
        }
    }
    if(flag){
        cout << "War" << endl;
    }


}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'vecror' was not declared in this scope; did you mean 'perror'?
    9 |     vecror<int> y(M);
      |     ^~~~~~
      |     perror
a.cc:9:12: error: expected primary-expression before 'int'
    9 |     vecror<int> y(M);
      |            ^~~
a.cc:13:16: error: 'y' was not declared in this scope
   13 |         cin >> y[i];
      |                ^
a.cc:19:24: error: 'Z' was not declared in this scope
   19 |     for(int z=X+1;z<=Y;Z++){
      |                        ^
a.cc:31:2: error: expected '}' at end of input
   31 | }
      |  ^
a.cc:4:11: 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;
  vector<int> x(n);
  vector<int> y(m);
  string ans = "War";
  int x_a =0;
  int y_a =0;
  for(int i=0;i<n;i++){
    cin >> x[i];
    if(x[i]<z){
      x_a += 1;
    }
  }
  for(int i=0;i<m;i++){
    cin >> y[i];
    if(y_a>=z){
      y_a +=1;
    }
  }
  if(x<z&&z<=y&&x_a>0&&y_a>0){
    ans = "No War";
  }
  cout << ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: conflicting declaration 'std::vector<int> x'
    7 |   vector<int> x(n);
      |               ^
a.cc:5:11: note: previous declaration as 'int x'
    5 |   int n,m,x,y;
      |           ^
a.cc:8:15: error: conflicting declaration 'std::vector<int> y'
    8 |   vector<int> y(m);
      |               ^
a.cc:5:13: note: previous declaration as 'int y'
    5 |   int n,m,x,y;
      |             ^
a.cc:13:13: error: invalid types 'int[int]' for array subscript
   13 |     cin >> x[i];
      |             ^
a.cc:14:9: error: invalid types 'int[int]' for array subscript
   14 |     if(x[i]<z){
      |         ^
a.cc:14:13: error: 'z' was not declared in this scope
   14 |     if(x[i]<z){
      |             ^
a.cc:19:13: error: invalid types 'int[int]' for array subscript
   19 |     cin >> y[i];
      |             ^
a.cc:20:13: error: 'z' was not declared in this scope
   20 |     if(y_a>=z){
      |             ^
a.cc:24:8: error: 'z' was not declared in this scope
   24 |   if(x<z&&z<=y&&x_a>0&&y_a>0){
      |        ^
Language: C++

#include <iostream>
#include <vector>
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 & in : x){
        cin >> in;
    }
    for(auto & in : y){
        cin >> in;
    }
    auto max_x = *max_element(x.begin(), x.end());
    auto min_y = *min_element(y.begin(), y.end());
    int iswar = 1;
    for(auto Z = X + 1; Z <= Y; ++Z){
        if(max_x < Z && Z <= min_y){
            cout << Z << endl;
            iswar = 0;
            break;
        }
    }
    if(iswar){
        cout << "War";
    } else {
        cout << "No War";
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: 'max_element' was not declared in this scope
   16 |     auto max_x = *max_element(x.begin(), x.end());
      |                   ^~~~~~~~~~~
a.cc:17:19: error: 'min_element' was not declared in this scope
   17 |     auto min_y = *min_element(y.begin(), y.end());
      |                   ^~~~~~~~~~~
Language: C++

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

int main() {

    int N,M,X,Y,maxa=0,minb=INF;
    cin >> N>>M>>X>>Y;
    vector<int>A(N),B(N);
    for (int i = 0; i < N; i++) { cin >> A[i]; if(maxa<A[i])maxa=A[i];}
    for (int i = 0; i < M; i++) { cin >> B[i];if(minb>B[i])minb=B[i]; }
    if(maxa=<minb)cout<<"No War"<<endl;
  else cout<<"War"<<endl;
    //cout<<
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: expected primary-expression before '<' token
   12 |     if(maxa=<minb)cout<<"No War"<<endl;
      |             ^
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:80:1: warning: missing terminating " character
   80 | "
      | ^
a.cc:80:1: error: missing terminating " character
a.cc:82:1: warning: missing terminating " character
   82 | "
      | ^
a.cc:82:1: error: missing terminating " character
a.cc:88:1: warning: missing terminating " character
   88 | "
      | ^
a.cc:88:1: error: missing terminating " character
a.cc:91:1: warning: missing terminating " character
   91 | "
      | ^
a.cc:91:1: error: missing terminating " character
a.cc:2:1: error: 'include' does not name a type
    2 | include
      | ^~~~~~~
a.cc:13:1: error: 'vector' does not name a type
   13 | vector <
      | ^~~~~~
a.cc:13:8: error: expected ',' or '...' before '<' token
   13 | vector <
      |        ^
a.cc: In function 'bool is_war(int)':
a.cc:31:12: error: 'x' was not declared in this scope
   31 | i = 0; i < x.size (); ++i) {
      |            ^
a.cc:40:12: error: 'y' was not declared in this scope
   40 | i = 0; i < y.size (); ++i) {
      |            ^
a.cc: In function 'int main()':
a.cc:59:7: error: 'cin' was not declared in this scope
   59 | N, M; cin  >> N >> M;
      |       ^~~
a.cc:60:1: error: 'vector' was not declared in this scope
   60 | vector <
      | ^~~~~~
a.cc:61:1: error: expected primary-expression before 'int'
   61 | int
      | ^~~
a.cc:63:9: error: 'x' was not declared in this scope
   63 | cin  >> x[0]  >> y[0];
      |         ^
a.cc:63:18: error: 'y' was not declared in this scope
   63 | cin  >> x[0]  >> y[0];
      |                  ^
a.cc:75:2: error: expected ';' before '}' token
   75 | 3
      |  ^
      |  ;
   76 | }
      | ~ 
a.cc:79:1: error: 'cout' was not declared in this scope
   79 | cout  <<
      | ^~~~
a.cc:81:1: error: 'War' was not declared in this scope
   81 | War
      | ^~~
a.cc:83:4: error: 'endl' was not declared in this scope
   83 | << endl;
      |    ^~~~
a.cc:87:1: error: 'cout' was not declared in this scope
   87 | cout  <<
      | ^~~~
a.cc:89:1: error: 'No' was not declared in this scope; did you mean 'N'?
   89 | No
      | ^~
      | N
Language: C++

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

int main(){
   int n, m;
   cin >> n >> m;

   vector<int> x(n+1);
   vector<int> y(m+1);

    cin >> x.at(0) >> y.at(0)

   for(int i = 1; i < n+1; i++){
       cin >> x.at(i);
   }
   for(int i = 1; i < m+1; i++){
       cin >> y.at(i);
   }


   sort(x.begin(),x.end());
   sort(y.begin(),y.end());

   if (y.at(0) > x.at(n)){
       cout << "No War" << endl;
   }
   else{
       cout << "War" << endl;
   }
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:30: error: expected ';' before 'for'
   11 |     cin >> x.at(0) >> y.at(0)
      |                              ^
      |                              ;
   12 | 
   13 |    for(int i = 1; i < n+1; i++){
      |    ~~~                        
a.cc:13:19: error: 'i' was not declared in this scope
   13 |    for(int i = 1; i < n+1; i++){
      |                   ^
Language: C++

#include <bits/stdc++.h>
#include <stdio.h>

#define INF 1e18
#define REP(i, n) for (int i=0; i<n; i++)
#define print(x) cout << x << endl
#define debug(x) cout << #x << " = "<< x << endl

const double PI=3.141592653589793238462643383279502884197169399375105820974944;

typedef long long ll;

using namespace std;

void solve() {
    int N, M, X, Y;
    cin >> N >> M >> X >> Y;
    vector<int> x(N), y(M);
    REP(i, N) cin >> x[i];
    REP(i, M) cin >> y[i];

    int z = X + 1;
    bool ans = false;
    while (z <= Y) {
        bool ok = true;
        REP(i, N) {
            if (x[i] < z) {
                continue
            } else {
                ok = false;
            }
        }

        REP(i, M) {
            if (y[i] >= Z) {
                continue;
            } else {
                ok = false;
            }
        }
        if (ok) {
            ans = true;
            break;
        }
    }

    if (ans) {
        print("No War");
    } else {
        print("War");
    }
}

signed main() {
    solve();
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:28:25: error: expected ';' before '}' token
   28 |                 continue
      |                         ^
      |                         ;
   29 |             } else {
      |             ~            
a.cc:35:25: error: 'Z' was not declared in this scope
   35 |             if (y[i] >= Z) {
      |                         ^
Language: C++

NMXY = list(map(int,input().split()))
N=NMXY[0]
M=NMXY[1]
X=NMXY[2]
Y=NMXY[3]
x=list(map(int,input().split()))
y=list(map(int,input().split()))
flag1=[]
flag2=[]

Z=list(range(X+1,Y))

for k in Z:
    flag1.append(all([i<k for i in x]))
    flag2.append(all([j>=k for j in y]))
print(flag1)
print(flag2)
if any(flag1) and any(flag2):
    print('No War')
else:
    print('War')


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

#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)n; i++)
#define all(x) (x).begin(),(x).end()
typedef long long int ll;
using namespace std;
int main()
{
  int N, M, X, Y;
  cin >> N>>M>> X>> Y;
  int maxx, minx;
  int maxy, miny;
  maxx = maxy =0;
  minx = miny =1000;
  int tmpx, tmpy;
  REP(i, N){
    cin >> tmpx;
    maxx = max(maxx, tmpx);
    minx = min(minx, tmpx);

  }
  REP(i, M){
    cin >> tmpy;
    maxy = max(maxy, tmpy);
    miny = min(miny, tmpy);
  }
  // cout << minx << " " << maxx <<endl;
  // cout << miny << " " << maxy <<endl;
    
  if(max(maxx,X)<min(miny, Y){
    cout << "No War" << endl;
  }else{
    cout << "War" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:30: error: expected ')' before '{' token
   29 |   if(max(maxx,X)<min(miny, Y){
      |     ~                        ^
      |                              )
a.cc:34:1: error: expected primary-expression before '}' token
   34 | }
      | ^
Language: C++

#include<stdio.h>
#include<algorithm>
int main()
{
	int n,m,X,Y,x[201],y[201],i;
	scanf("%d%d%d%d",&n,&m,&X,&Y);
	for(i=0;i<n;i++){
		scanf("%d",&x[i]);
	}
	for(i=0;i<m;i++){
		scanf("%d",&y[i]);
	}
	std::sort(x,x+n);
	std::sort(y,y+m);
	int z,a=0;
	for(z=x[n-1]+1;z<=y[0];z++){
		if(x<z && z<=y)
			a=1;
	}
	if(a==1){
		printf("No War");
	}
	else{
		printf("War");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |                 if(x<z && z<=y)
      |                    ~^~
a.cc:17:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |                 if(x<z && z<=y)
      |                           ~^~~
Language: C

#include<stdio.h>
#include<algorithm>
int main()
{
	int n,m,X,Y,x[201],y[201],i;
	scanf("%d%d%d%d",&n,&m,&X,&Y);
	for(i=0;i<n;i++){
		scanf("%d",&x[i]);
	}
	for(i=0;i<m;i++){
		scanf("%d",&y[i]);
	}
	std::sort(x,x+n);
	std::sort(y,y+m);
	int z,a=0;
	for(z=x[0];z<y[0];z++){
		if(x[0]<z&&z<=y[0]){
			for(i=0;i<Y;i++){
				if(x[0]<z&&y[0]>=z){
					a=1;
				}
				else{
					a=2;
				}
			}
		}
	}
	if(a==1){
		printf("No War");
	}
	else{
		printf("War");
	}
	return 0;
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: expected '}' at end of input
   14 |   else cout<<"War";
      |                    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
#include <string>
#include<time.h>
using namespace std;
typedef unsigned long long ull;

int main(void) {
	int n, m, x, y;
	int a, b, a_m = -200, b_m = 100#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
#include <string>
#include<time.h>
using namespace std;
typedef unsigned long long ull;

int main(void) {
	int n, m, x, y;
	int a, b, a_m = -200, b_m = 200;
	cin >> n >> m >> x >> y;
	for (int i = 0; i < n; ++i) {
		cin >> a;
		if (a > a_m) {
			a_m = a;
		}
	}
	for (int i = 0; i < m; ++i) {
		cin >> b;
		if (b < b_m) {
			b_m = b;
		}
	}
	if (a_m < b_m && a_m<y && b_m>x) {
		cout << "No War";
		return 0;
	}
	cout << "War";
	return 0;
}

/*
*/;
	cin >> n >> m >> x >> y;
	for (int i = 0; i < n; ++i) {
		cin >> a;
		if (a > a_m) {
			a_m = a;
		}
	}
	for (int i = 0; i < m; ++i) {
		cin >> b;
		if (b < b_m) {
			b_m = b;
		}
	}
	if (a_m < b_m) {
		cout << "No War";
		return 0;
	}
	cout << "War";
	return 0;
}

/*
*/

Compiler output:
a.cc:13:40: error: stray '#' in program
   13 |         int a, b, a_m = -200, b_m = 100#include <stdio.h>
      |                                        ^
a.cc: In function 'int main()':
a.cc:13:41: error: expected ',' or ';' before 'include'
   13 |         int a, b, a_m = -200, b_m = 100#include <stdio.h>
      |                                         ^~~~~~~
a.cc:23:16: error: a function-definition is not allowed here before '{' token
   23 | int main(void) {
      |                ^
Language: C++

#include<iostream>
using namespace std;
int main(){
	
	int n, m, x, y, a, b;
	cin >>n >>m >>x >>y;
	
	for(int i=0; i<n; i++){
		
		cin >>a;
		if(a>x) x=a;
		
	}
	for(int i=0; i<m; i++){
		
		cin >>b;
		if(b<y) y=b
		
	}
	
	cout <<(x<y?"No ":"") <<"War" <<endl;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:28: error: expected ';' before '}' token
   17 |                 if(b<y) y=b
      |                            ^
      |                            ;
   18 | 
   19 |         }
      |         ~
Language: C++

#include <stdafx.h>
#include<iostream>
#include<vector>
#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];
	}

	sort(x.begin(), x.end());
	sort(y.begin(), y.end());

	int xMax = x[N - 1];
	int yMin = y[0];

	if (xMax < yMin && xMax > X && yMin <= Y){
		cout << "No War";
	}
	else{
		cout << "War";
	}

	return 0;
}

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

#include<iostream>
#include<vector>
//#include<bits/stdc++.h>

using namespace std;

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

int main (void){

    int N,M,X,Y;
    
    cin >> N>>M>>X>>Y;

    vector<int> x(N);
    vector<int> y(M);

    rep(i,N){
        cin >> x[i];
    }
    rep(i,M){
        cin >> y[i];
    }
    
    sort(x.begin(),x.end());
    sort(y.begin(),y.end());

    int max_x = x[x.size()-1];
    int min_y = y[0];

   if(max_x >= Y || min_y <= X){
       cout << "War";
   }else if(min_y <= max_x){
       cout << "War";
   }else if(max_x < X || min_y > Y){
       cout << "War";
   }else{
       cout << "No War";
   }

}

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

//#include<iostream>
//#include<vector>
#include<bits/stdc++.h>

using namespace std;

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

int main (void){

    int N,M,X,Y;
    
    cin >> N>>M>>X>>Y;

    vector<int> x(N);
    vector<int> y(M);

    rep(i,N){
        cin >> x[i];
    }
    rep(i,M){
        cin >> y[i];
    }
    
    sort(x.begin(),x.end());
    sort(y.begin(),y.end());

    int max_x = x[x.size()-1];
    int min_y = y[0];

    if(max_x > min_y-1){
        cout <<"War"<<endl;
    }else if(max_x < min_y){
        if(max_x >= Y || min_y < X){
            cout <<"War"<<endl;
        }//#include<iostream>
//#include<vector>
#include<bits/stdc++.h>

using namespace std;

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

int main (void){

    int N,M,X,Y;
    
    cin >> N>>M>>X>>Y;

    vector<int> x(N);
    vector<int> y(M);

    rep(i,N){
        cin >> x[i];
    }
    rep(i,M){
        cin >> y[i];
    }
    
    sort(x.begin(),x.end());
    sort(y.begin(),y.end());

    int max_x = x[x.size()-1];
    int min_y = y[0];

    if(max_x > min_y-1){
        cout <<"War"<<endl;
    }else if(max_x < min_y && min_y <= X){
        if(max_x >= Y){
            cout <<"War"<<endl;
        }else{
            cout <<"No War"<<endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:16: error: a function-definition is not allowed here before '{' token
   44 | int main (void){
      |                ^
a.cc:75:2: error: expected '}' at end of input
   75 | }
      |  ^
a.cc:33:28: note: to match this '{'
   33 |     }else if(max_x < min_y){
      |                            ^
a.cc:75:2: error: expected '}' at end of input
   75 | }
      |  ^
a.cc:9:16: note: to match this '{'
    9 | int main (void){
      |                ^
Language: C++

#include<iostream>
#include<vector>

using namespace std;

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

int main (void){

    int N,M,X,Y;
    
    cin >> N>>M>>X>>Y;

    vector<int> x(N);
    vector<int> y(M);

    rep(i,N){
        cin >> x[i];
    }
    rep(i,M){
        cin >> y[i];
    }
    
    sort(x.begin(),x.end());
    sort(y.begin(),y.end());

    int max_x = x[x.size()-1];
    int min_y = y[0];

    if(max_x > min_y){
        cout << "War";
    }else if(max_x < min_y && min_y <= X){
        if(max_x >= Y){
            cout << "War";
        }else{
            cout << "War";
        }
    }else{
        cout << "No War";
    }



}

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

#include <iostream>
using namespace std;

int main(){
  int a,b,c,d,e[110],f[110];
    cin>>a>>b>>c>>d;
 
  for(int i=0;i<a;i++)
    cin >> e[i];
  for(int i=0;i<b;i++)
    cin >>f[i];
  
  sort(e,e+a,greater<int>());
  sort(f,f+b);
  
  for(int g=-100;g<=100;g++){
  if((c<g)&&(g<d)&&(e[0] <=g)&&(f[0] >=g){
    cout << "No War" << endl;
    
    return 0;
  }
     }
     cout <<"War" <<endl;
     
     return 0;
     }

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |   sort(e,e+a,greater<int>());
      |   ^~~~
      |   short
a.cc:17:42: error: expected ')' before '{' token
   17 |   if((c<g)&&(g<d)&&(e[0] <=g)&&(f[0] >=g){
      |     ~                                    ^
      |                                          )
a.cc:22:6: error: expected primary-expression before '}' token
   22 |      }
      |      ^
Language: C++

#include <bits/stdc++.h>
#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;
  
  vector<int>A(n);
  rep(i,n)cin>>A[i];
  sort(A.rbegin(),A.rend());
  int AMax=A.pop();
  int AMax2=max(AMax,x);
  
  vector<int>B(n);
  rep(i,m)cin>>B[i];
  sort(B.begin(),B.end());
  int BMin=B.pop();
  int BMin2=min(BMin,y);
  
  if (AMax2<BMin2)cout<<"War"<<endl;
  else cout<<"No War"<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: 'class std::vector<int>' has no member named 'pop'
   12 |   int AMax=A.pop();
      |              ^~~
a.cc:18:14: error: 'class std::vector<int>' has no member named 'pop'
   18 |   int BMin=B.pop();
      |              ^~~
Language: C++

#include <bits/stdc++.h>
#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;
  vector<int>A(n);
  rep(i,n)cin>>A[i];
  sort(A.rbegin(),A.rend());
  int AMax=A.front();
  int AMax2=max(AMax,x);
  vector<int>A(n);
  rep(i,m)cin>>B[i];
  sort(B.begin(),B.end());
  int BMin=B.front();
  int BMin2=min(BMin,y);
  if (AMax2<BMin2)cout<<"War"<<endl;
  else cout<<"No War"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: redeclaration of 'std::vector<int> A'
   13 |   vector<int>A(n);
      |              ^
a.cc:8:14: note: 'std::vector<int> A' previously declared here
    8 |   vector<int>A(n);
      |              ^
a.cc:14:16: error: 'B' was not declared in this scope
   14 |   rep(i,m)cin>>B[i];
      |                ^
a.cc:15:8: error: 'B' was not declared in this scope
   15 |   sort(B.begin(),B.end());
      |        ^
Language: C++

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

int main() {
    int N, M, X, Y, xmin = 101, ymax = -101;
    cin >> N >> M >> X >> Y;
    for (int i = 0; i < N; i++) {
        int a;
        cin >> a;
        xmin = min(xmin, a);
    }
    for (int i = 0; i < M; i++) {
        int a;
        cin >> a;
        ymax = max(ymax, a);
    }
    if (xmin >= ymax) {
        cout << "War" << endl;
        return 0;
    }
    for (int i = xmin + 1; i < ymax + 1) {
        if (X < i && i <= Y) {
            cout << "No War" << endl;
            return 0;
        }
        if (i == ymax) {
            cout << "War" << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:40: error: expected ';' before ')' token
   21 |     for (int i = xmin + 1; i < ymax + 1) {
      |                                        ^
      |                                        ;
Language: C++

#include <bits/stdc++.h>

#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[100],y[100];
	rep(i,n) cin>>x[i];
	rep(i,m) cin>>y[i];

	for(int z=x+1;z<=y;z++){
		bool ok=true;
		rep(i,n) if(x[i]>=z) ok=false;
		rep(i,m) if(y[i]< z) ok=false;
		if(ok){ cout<<"No War"<<endl; return 0; }
	}
	cout<<"War"<<endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: conflicting declaration 'int x [100]'
    9 |         int x[100],y[100];
      |             ^
a.cc:8:17: note: previous declaration as 'int x'
    8 |         int n,m,x,y; cin>>n>>m>>x>>y;
      |                 ^
a.cc:9:20: error: conflicting declaration 'int y [100]'
    9 |         int x[100],y[100];
      |                    ^
a.cc:8:19: note: previous declaration as 'int y'
    8 |         int n,m,x,y; cin>>n>>m>>x>>y;
      |                   ^
a.cc:10:24: error: invalid types 'int[int]' for array subscript
   10 |         rep(i,n) cin>>x[i];
      |                        ^
a.cc:11:24: error: invalid types 'int[int]' for array subscript
   11 |         rep(i,m) cin>>y[i];
      |                        ^
a.cc:15:30: error: invalid types 'int[int]' for array subscript
   15 |                 rep(i,n) if(x[i]>=z) ok=false;
      |                              ^
a.cc:16:30: error: invalid types 'int[int]' for array subscript
   16 |                 rep(i,m) if(y[i]< z) ok=false;
      |                              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n,m,x,y;
  cin>>n>>m>>x>>y;
  int a[100],b[100];
  for(int i=0;i<n;i++) cin>>a[i];
  for(int i=0;i<m;i++) cin>>b[i];
  sort(a,a+n);
  sort(b,b+m);
  int z=min(y,b[0]);
  if(max(x,a[n-1])<z) cout<<"No War";
  else cour<<"War";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: 'cour' was not declared in this scope
   13 |   else cour<<"War";
      |        ^~~~
Language: C

#include<stdio.h>

int main() {
	int war=0,warX=0,warY=0;
	int N,M,X,Y;
	scanf("%d", &N);
	scanf("%d", &M);
	scanf("%d", &X);
	scanf("%d", &Y);
	int x[100],y[100];
	for (int i=0; i < N; i++) {
		scanf("%d", &x[i]);

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

	}
	for (int Z = X+1; Z < =Y; Z++) {
		for (int a = 0; a < N; a++) {
			if (x[a] <= Z) {
				warX++;
			}
		}
		for (int b = 0; b < M; b++) {
			if (y[b] >= Z) {
				warY++;
			}
		}
		if (warY ==M && warX == N) {
			war = 1;
		}

	}
	if (war == 1) {
		printf("No War");
	}
	else {
		printf("War");
	}
}

Compiler output:
main.c: In function 'main':
main.c:19:31: error: expected expression before '=' token
   19 |         for (int Z = X+1; Z < =Y; Z++) {
      |                               ^
main.c:20:33: error: 'a' undeclared (first use in this function)
   20 |                 for (int a = 0; a < N; a++) {
      |                                 ^
main.c:20:33: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main() {
	int war=0,warX=0,warY=0;
	int N,M,X,Y;
	scanf_s("%d", &N);
	scanf_s("%d", &M);
	scanf_s("%d", &X);
	scanf_s("%d", &Y);
	int x[100],y[100];
	for (int i=0; i < N; i++) {
		scanf_s("%d", &x[i]);

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

	}
	for (int Z = X+1; Z < Y; Z++) {
		for (int a = 0; a < N; a++) {
			if (x[a] < Z) {
				warX++;
			}
		}
		for (int b = 0; b < M; b++) {
			if (y[b] > Z) {
				warY++;
			}
		}
		if (warY ==M && warX == N) {
			war = 1;
		}

	}
	if (war == 1) {
		printf("No War");
	}
	else { printf("War");
	}
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |         scanf_s("%d", &N);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>
using namespace std;

int main() {
    
    int n,m,x,y;
    cin>>n>>m>>x>>y;
    
    int arr[n],brr[m];
    
    
    for(int i=0;i<n;++i)
        cin>>arr[i];
    
    for(int i=0;i<m;++i)
        cin>>brr[i];
    
    
    sort(arr,arr+n);
    sort(brr,brr+m);
    
    int xxx = arr[n-1] + 1;
    
    if(xxx>x&&xxx<=y)
    {
       if(xxx<=brr[0])
       {
           cout<<"No War";
       }
        else
            cout<<"War";
    }
    else
    {
        cout<<"War";
    }
	  
	return 0;
}


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

#include <algorithm>
#include <iostream>
#include <vector>
#include <map>
#include <cstdio>
#include <string>
#include <cmath>
#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,i0,n) for(int (i)=(i0);(i)<(n);(i)++)
#define rn return
typedef std::pair<int,int> P;
using namespace std;
using ll = long long;



int main(){
    int N,M,X,Y; cin >> N >> M >> X >> Y;
    vector<int> x(N);
    vector<int> y(M);
    rep(i,N) cin >> x[i];
    rep(i,M) cin >> y[i];
    sort(x.begin(),x.end());
    sort(y.begin(),y.end());
    
    if (min(y[0],Y)<max(x[N-1],X){
        cout << "War" << endl;
        rn 0;
    }
    else{
        cout << "No war" << endl;
        rn 0;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:34: error: expected ')' before '{' token
   27 |     if (min(y[0],Y)<max(x[N-1],X){
      |        ~                         ^
      |                                  )
a.cc:35:1: error: expected primary-expression before '}' token
   35 | }
      | ^
Language: C++

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

int main(){
  int N,M,X,Y;
  cin>>N>>M>>X>>Y;
  vector<int> x(N);
  vector<int> y(M);
  int x_min=100;
  int x_max=-100;
  for(int i=0;i<N;i++){
    cin>>x.at(i);
    if(x_min>x.at(i))x_min=x.at(i);
    if(x_max<x.at(i))x_max=x.at(i);
  }
  int y_min=100;
  int y_max=-100;
  for(int i=0;i<M;i++){
    cin>>y.at(i);
    if(y_min>y.at(i))y_min=y.at(i);
    if(y_max<y.at(i))y_max=y.at(i);
  }
  string ans="War";
  int z_min,z_max;
  if(y_min-x_max>0){  
    z_min=x_max+1;
    z_max=y_min;
    if(z_max>x_max&&z_min<ymin)ans="No War";
  }
  
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:27: error: 'ymin' was not declared in this scope; did you mean 'y_min'?
   29 |     if(z_max>x_max&&z_min<ymin)ans="No War";
      |                           ^~~~
      |                           y_min
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int n,m,x,y;
  cin >> n >> m >> X >> Y;
  int max_x = Y;
  int min_y = X;
  int x;
  for(int i = 0;i < m;i++) {
    cin >> x;
    if(x > max_x) {
      max_x = x;
    }
  }
  int y;
  for(int i = 0;i < m;i++) {
    cin >> y;
    if(y < min_y) {
      min_y = y;
    }
  }
  if(max_x < min_y) {
    cout << "No War" << endl;
  }else {
    cout << "War" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:20: error: 'X' was not declared in this scope
    5 |   cin >> n >> m >> X >> Y;
      |                    ^
a.cc:5:25: error: 'Y' was not declared in this scope
    5 |   cin >> n >> m >> X >> Y;
      |                         ^
a.cc:8:7: error: redeclaration of 'int x'
    8 |   int x;
      |       ^
a.cc:4:11: note: 'int x' previously declared here
    4 |   int n,m,x,y;
      |           ^
a.cc:15:7: error: redeclaration of 'int y'
   15 |   int y;
      |       ^
a.cc:4:13: note: 'int y' previously declared here
    4 |   int n,m,x,y;
      |             ^
Language: C++

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

int main(){
  int N,M,X,Y;
  cin >>N>>M>>X>>Y;
  
  map<int,int> mp;
  int x;
  rep(i,0,N){
    cin >> x;
    mp[x]++;
  }
  
  string ans = "No War";
  int y;
  rep(i,0,M){
    cin >> y;
    if(mp[y]==1) ans = "War"
  } 
  
  cout <<ans<< endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:29: error: expected ';' before '}' token
   20 |     if(mp[y]==1) ans = "War"
      |                             ^
      |                             ;
   21 |   }
      |   ~
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];
  }
  sort(x.begin(),x.end());
  sort(y.begin(),y.end());
  int a=x[N-1],b=y[0];
  if (a<b&&a<Y&&X<b){
    cout << "No War" << endl;
  }
  else {
    cout << "War" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: request for member 'begin' in 'x', which is of non-class type 'int [N]'
   14 |   sort(x.begin(),x.end());
      |          ^~~~~
a.cc:14:20: error: request for member 'end' in 'x', which is of non-class type 'int [N]'
   14 |   sort(x.begin(),x.end());
      |                    ^~~
a.cc:15:10: error: request for member 'begin' in 'y', which is of non-class type 'int [M]'
   15 |   sort(y.begin(),y.end());
      |          ^~~~~
a.cc:15:20: error: request for member 'end' in 'y', which is of non-class type 'int [M]'
   15 |   sort(y.begin(),y.end());
      |                    ^~~
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main(){
  int n, m , x, y, xi, yi;
  int xmax = 0;
  string result = "No War";

  cin >> n >> m >> x >> y;
  
  for(int i = 0; i < n; i++){
    cin >>  xi;
    if(xi > x)result = "War";
    if(xmax < xi) xmax = xi;
  }
  
  for(int i = 0; i < m; i++){
    cin >> yi;
    if(yi < y || yi > xmax)result = "War"
  }
  
  cout << result << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:42: error: expected ';' before '}' token
   20 |     if(yi < y || yi > xmax)result = "War"
      |                                          ^
      |                                          ;
   21 |   }
      |   ~
Language: C++

#iclude<bits/stdc++.h>

using namespace std;

int main(){
  int n, m , x, y, xi, yi;
  int xmax = 0;
  string result = "No War";

  cin >> n >> m >> x >> y;
  
  for(int i = 0; i < n; i++){
    cin >>  xi;
    if(xi > x)result = "War";
    if(xmax < xi) xmax = xi;
  }
  
  for(int i = 0; i < m; i++){
    cin >> yi;
    if(yi < y || yi > xmax)result = "War"
  }
  
  cout << result << endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #iclude; did you mean #include?
    1 | #iclude<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:8:3: error: 'string' was not declared in this scope
    8 |   string result = "No War";
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #iclude<bits/stdc++.h>
a.cc:10:3: error: 'cin' was not declared in this scope
   10 |   cin >> n >> m >> x >> y;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #iclude<bits/stdc++.h>
a.cc:14:15: error: 'result' was not declared in this scope
   14 |     if(xi > x)result = "War";
      |               ^~~~~~
a.cc:20:28: error: 'result' was not declared in this scope
   20 |     if(yi < y || yi > xmax)result = "War"
      |                            ^~~~~~
a.cc:23:3: error: 'cout' was not declared in this scope
   23 |   cout << result << endl;
      |   ^~~~
a.cc:23:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:23:11: error: 'result' was not declared in this scope
   23 |   cout << result << endl;
      |           ^~~~~~
a.cc:23:21: error: 'endl' was not declared in this scope
   23 |   cout << result << endl;
      |                     ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #iclude<bits/stdc++.h>
Language: C++

#include<iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <string>
#include<limits>
#include<cstdlib>
#include<functional>
#include<cassert>
#include <cstdio>
#include <stack>
#include <queue>
#define fi(p) for(int i=0;i<(p);i++)
using namespace std;
int N;
int L;
int P;
const int MAX_N = 100000;
const int MAX_W = 100000;


int A[MAX_N+1];
int B[MAX_N+1];

void solve() {
	int N,M,X,Y;
	cin >> N >> M >> X >> Y;
	vector<int> x;
	vector<int> y;
	bool res = false;

	fi(N) {
		int temp;
		cin >> temp;
		x.push_back(temp);
	}
	fi(M) {
		int temp;
		cin >> temp;
		y.push_back(temp);
	}
	int max_x = INT_MIN;
	for (int i = 0; i < (int)x.size(); ++i) {
		if (x[i] > max_x) {
			max_x = x[i];
		}
	}
	int min_y = INT_MAX;
	for (int i = 0; i < (int)y.size(); ++i) {
		if (y[i] < min_y) {
			min_y = y[i];
		}
	}
	for (int z = X + 1; z <= Y; z++) {
		if (z > max_x&&z <= min_y) {
			res = true;
		}
	}
	if (res == true) {
		cout << "No War" << endl;
	}
	else {
		cout << "War" << endl;
	}
}

int main()
{
	solve();

	int a;//止める用
	cin >> a;
	return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:42:21: error: 'INT_MIN' was not declared in this scope
   42 |         int max_x = INT_MIN;
      |                     ^~~~~~~
a.cc:13:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   12 | #include <queue>
  +++ |+#include <climits>
   13 | #define fi(p) for(int i=0;i<(p);i++)
a.cc:48:21: error: 'INT_MAX' was not declared in this scope
   48 |         int min_y = INT_MAX;
      |                     ^~~~~~~
a.cc:48:21: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
Language: C++

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <queue>
#include<algorithm>
using namespace std;
typedef unsigned int uint;
typedef long long ll;
typedef pair<int, int> P;
const int c_INF = 111111;
const int c_mINF = -1111111;
const int c_YET = -1;
const int c_Dx[4] = { 0,0,1,-1 };
const int c_Dy[4] = { 1,-1,0,0 };


int myMax(int num[], int length);
int myMin(int num[], int length);

int main() {
	int N,M,X,Y;
	scanf("%d%d%d%d", &N,&M,&X,&Y);
	int x[200], y[200];
	for (int i = 0; i < N; i++)scanf("%d", &x[i]);
	for (int i = 0; i < M; i++)scanf("%d", &y[i]);


	int m = myMax(x, N);
	int m2 = myMin(y, M);

	
	if (m<=Z &&  Z<=m2 && X<Z &&Z<=Y)printf("No War");
	else printf("War");
	

}

//---配列の最大値を求める---
int myMax(int num[], int length) {
	int temp = c_mINF;
	for (int i = 0; i < length; i++) {
		temp = max(temp, num[i]);
	}
	return temp;
}

//---配列の最小値を求める---
int myMin(int num[], int length) {
	int temp = c_INF;
	for (int i = 0; i < length; i++) {
		temp = min(temp, num[i]);
	}
	return temp;
}

/*         提出前の確認事項

・デバッグ用の関数は＜＜コメント化＞＞しているか？
・すべての＜＜入力例＞＞は試したか？
・＜＜限界値分析＞＞はしたか？
・＜＜出力の改行＞＞の有無は確認したか？
・文字列の＜＜スペル＞＞は確認したか？
・＜＜解の存在性＞＞は確認したか？
　　　　　　　　↓
	 ＜＜提出先＞＞に注意して提出！！
*/

Compiler output:
a.cc: In function 'int main()':
a.cc:33:16: error: 'Z' was not declared in this scope
   33 |         if (m<=Z &&  Z<=m2 && X<Z &&Z<=Y)printf("No War");
      |                ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:30: error: 'j' was not declared in this scope
    9 |   for(int i=0;i<m;i++)cin>>y[j];
      |                              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m,X,Y;
  cin>>n>>m>>X>>Y;
  vector<int> x;
  vector<int> y;
  for(int i=0;i<n;i++)cin>>x[i];
  rep(int j=0;j<m;j++)cin>>y[j];
  x.push_back(X);
  y.push_back(Y);
  sort(x.begin(),x.end());
  sort(y.begin(),y.end());
  if(x[n]<y[0]) cout<<"No"<<" "<<"War"<<endl;
  else cout<<"War"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: expected primary-expression before 'int'
    9 |   rep(int j=0;j<m;j++)cin>>y[j];
      |       ^~~
a.cc:9:15: error: 'j' was not declared in this scope
    9 |   rep(int j=0;j<m;j++)cin>>y[j];
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
int main(){
  int n,m,X,Y;
  cin>>n>>m>>x>>y;
  vector<int> x,y;
  rep(i,n)cin>>x[i];
  rep(i,m)cin>>y[i];
  bool a=false;
  for(int z=X+1;z<=Y;z++){
    
    int cnt=0;
      for(int i=0;i<n;i++){
        if(x[i]<z)cnt++;
        if(cnt==n)a=true;
        if(a)break;
      }
  } 
  bool b=false;
  for(int z=X+1;z<=Y;z++){
   
    int cnt=0;
      for(int i=0;i<m;i++){
        if(y[i]<z)cnt++;
        if(cnt==m)b=true;
        if(b)break;
      }
  }
  if(a&&b) cout << "No War" <<endl;
  else cout<<"War"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: 'x' was not declared in this scope
   14 |   cin>>n>>m>>x>>y;
      |              ^
a.cc:14:17: error: 'y' was not declared in this scope
   14 |   cin>>n>>m>>x>>y;
      |                 ^
Language: C

#include <stdio.h>

int main(void){
	
  int n,m,x,y,i;
  scanf("%d%d%d%d",&n,&m,&x,&y);
  int a[n],b[m];
  
	for(i=0;i<n;i++){
     scanf("%d",&a[i]);
    }
  	for(i=0;i<m;i++){
     scanf("%d",&b[i]);
    }
	int flag,x1,y1;
  	center = (x + y)/2 +1;
  	
  do{
    x1=0;
    y1=0;
    flag=5;
    for(i=0;i<n;i++){
      if(a[i] > center){
      flag--;  
      }else{
      x++;
      }
    }
  	for(i=0;i<m;i++){
     if(b[i] < center){
       flag--;
      }else{
       y1++;
      }
    }
    if(x1 > 0 && x2 > 0 ){
      break;
    }else if(x1 > 0){
    center--;
    }else if(y1 > 0){
     center++;
    }
    
  }while(!(flag == 0 || center == x || center == y));
  
  if(flag==0){
  	printf("No War");
  }else{
  	printf("War");
  }


return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:9: error: 'center' undeclared (first use in this function)
   16 |         center = (x + y)/2 +1;
      |         ^~~~~~
main.c:16:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:36:18: error: 'x2' undeclared (first use in this function); did you mean 'x1'?
   36 |     if(x1 > 0 && x2 > 0 ){
      |                  ^~
      |                  x1
Language: C

#include <stdio.h>

int main(){
  int N,M,X,Y;
  int i,j;
  int x[], y[];
  int a = -100;
	int b = 100;
  scanf("%d %d %d %d", &N, &M, &X, &Y);
  for(i = 0; i<N; i++){
    scanf("%d", x[i]);
    if (x[i] > a) {
			a = x[i];
		}
 
  }
  for(j = 0; j<M; j++){
    scanf("%d", y[j]);
    if (y[i] < b) {
			b = y[i];
		}
  }

  for (int i = X; i <= Y;i++) {
		if (a < i&&i<= b&&X<i&&i<=Y) {
			printf("No War");
			
		}
		else if (i == Y) {
			printf("War");
			
		}
		
	}
 
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: array size missing in 'x'
    6 |   int x[], y[];
      |       ^
main.c:6:12: error: array size missing in 'y'
    6 |   int x[], y[];
      |            ^
Language: C++

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

int main() {
  int n,m,X,Y;
  cin >> n >> m >> X >> Y;
  
  int maxx = -1e9;
  int miny = 1e9;
  
  vector<int> x(n);
  for (int i=0; i<n; i++){
    cin >> x.at(i);
  }
  
  vector<int> y(n);
  for (int i=0; i<m; i++){
    cin >> y.at(i);
  }
  
  sort(x.begin(),x.end());
  sort(y.begin(),y.end());
  
  for (int i=X+1; i<=Y; i++){
    if (x.back()<i&&y.front()>=i) {
      cout << "No War" << endl;
      break;
    }
    else if (i == d){
    cout << "War" << endl;
    }
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:19: error: 'd' was not declared in this scope
   29 |     else if (i == d){
      |                   ^
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);
  for (int i=0; i<n; i++){
    cin >> x.at(i);
  }
  
  vector<int> y(n);
  for (int i=0; i<m; i++){
    cin >> y.at(i);
  }
  
  int max_x;
  int max_y;
  
  max_x = max_element(x.begin(),x.end());
  min_y = min_element(y.begin(),y.end());
  
  max_x = max(max_x, X);
  min_y = min(min_y, Y);
  
  if (min_y - max_x > 0) cout << "No War" << endl;
  else cout << "War" << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:22: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in assignment
   21 |   max_x = max_element(x.begin(),x.end());
      |           ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      |                      |
      |                      __gnu_cxx::__normal_iterator<int*, std::vector<int> >
a.cc:22:3: error: 'min_y' was not declared in this scope
   22 |   min_y = min_element(y.begin(),y.end());
      |   ^~~~~
Language: C++

#include<bits/stdc++.h>
#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;
  
  vector<int> x(N);
  vector<int> y(M);
  
  rep(i,N) cin >> x[i];
  rep(i,M) cin >> y[i];
  
  sort(x.begin(),x.end());
  sort(y.begin(),y.end());
  
  if(x[N-1] < y[0]){
    if(X<y[0] && y[0]<=Y){
      cout << "No War" << endl;
      return 0;
    }
 
  cout << "War" << endl;
 
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:2: error: expected '}' at end of input
   27 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
#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;
  
  vector<int> x(N);
  vector<int> y(M);
  
  rep(i,N) cin >> x[i];
  rep(i,M) cin >> y[i];
  
  sort(x.begin(),x.end());
  sort(y.begin(),y.end());
  
  if(x(N-1) < y(0)){
    cout << "No War" << endl;
  }else{
    cout << "War" << endl;
  }

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:7: error: no match for call to '(std::vector<int>) (int)'
   18 |   if(x(N-1) < y(0)){
      |      ~^~~~~
a.cc:18:16: error: no match for call to '(std::vector<int>) (int)'
   18 |   if(x(N-1) < y(0)){
      |               ~^~~
Language: C++

#include<bits/stdc++.h>
#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;
  
  vector<int> x(N);
  vector<int> y(M);
  
  rep(i,N) cin >> x(i);
  rep(i,M) cin >> y(i);
  
  sort(x.begin(),x.end());
  sort(y.begin(),y.end());
  
  if(x(N-1) < y(0)){
    cout << "No War" << endl;
  }else{
    cout << "War" << endl;
  }

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: no match for call to '(std::vector<int>) (int&)'
   12 |   rep(i,N) cin >> x(i);
      |                   ~^~~
a.cc:13:20: error: no match for call to '(std::vector<int>) (int&)'
   13 |   rep(i,M) cin >> y(i);
      |                   ~^~~
a.cc:18:7: error: no match for call to '(std::vector<int>) (int)'
   18 |   if(x(N-1) < y(0)){
      |      ~^~~~~
a.cc:18:16: error: no match for call to '(std::vector<int>) (int)'
   18 |   if(x(N-1) < y(0)){
      |               ~^~~
Language: C++

#include<bits/stdc++.h>
#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;
  
  vector<int> x(N);
  vector<int> y(M);
  
  rep(i,N) cin >> x(i);
  rep(i,M) cin >> y(i);
  
  sort(x.begin(),x.end());
  sort(y.begin(),y.end());
  
  if(x(N-i) < y(0)){
    cout << "No War" << endl;
  }else{
    cout << "War" << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: no match for call to '(std::vector<int>) (int&)'
   12 |   rep(i,N) cin >> x(i);
      |                   ~^~~
a.cc:13:20: error: no match for call to '(std::vector<int>) (int&)'
   13 |   rep(i,M) cin >> y(i);
      |                   ~^~~
a.cc:18:10: error: 'i' was not declared in this scope
   18 |   if(x(N-i) < y(0)){
      |          ^
a.cc:18:16: error: no match for call to '(std::vector<int>) (int)'
   18 |   if(x(N-i) < y(0)){
      |               ~^~~