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

#define _USE_NATH_DEFINES
#include<cstdio>
#include <iostream>
#include<sstream>
#include<fstream>
#include<iomanip>
#include<algorithm>
#include<cmath>
#include<complex>
#include <string>
#include<vector>
#include<list>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<bitset>
#include<numeric>
#include<limits>
#include<climits>
#include<cfloat>
#include<functional>
#include<iterator>
#define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i )
#define rep(i,n) REP(i,0,n)
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; ++n) {
		cin >> x[i];
	}
	for (int i = 0; i < m; ++m) {
		cin >> y[i];
	}
	int xmax = x;
	int ymin = y;
	for (int i = 0; i < n; ++i) {
		xmax = max(xmax, x[i]);
	}
	for (i = 0; i < m; ++i) {
		ymin = min(ymin, y[i]);
	}
	if (xmax < ymin) cout << "No War" << endl;
	else cout << "War" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:21: error: conflicting declaration 'std::vector<int> x'
   31 |         vector<int> x(n);
      |                     ^
a.cc:29:19: note: previous declaration as 'int x'
   29 |         int n, m, x, y;
      |                   ^
a.cc:32:21: error: conflicting declaration 'std::vector<int> y'
   32 |         vector<int> y(m);
      |                     ^
a.cc:29:22: note: previous declaration as 'int y'
   29 |         int n, m, x, y;
      |                      ^
a.cc:34:25: error: invalid types 'int[int]' for array subscript
   34 |                 cin >> x[i];
      |                         ^
a.cc:37:25: error: invalid types 'int[int]' for array subscript
   37 |                 cin >> y[i];
      |                         ^
a.cc:42:35: error: invalid types 'int[int]' for array subscript
   42 |                 xmax = max(xmax, x[i]);
      |                                   ^
a.cc:44:14: error: 'i' was not declared in this scope
   44 |         for (i = 0; i < m; ++i) {
      |              ^
Language: C++

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <cmath>
#include <vector>
#include <cstdlib>
using namespace std;

int main() {
	int N, M, X, Y,i,buf;
	vector<int> x, y;
	cin >> N >> M >> X >> Y;
	for (i = 0; i < N; i++) {
		cin >> buf;
		x.push_back(buf);
	}
	for (i = 0; i < M; i++) {
		cin >> buf;
		y.push_back(buf);
	}
	sort(x.begin(), x.end());
	sort(y.begin(), y.end());
	if ((x[N - 1] < y[0])%%(x[N-1] < Y)&&(y[0] > X))cout << "No War";
	else cout << "War";
	return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:31: error: expected primary-expression before '%' token
   24 |         if ((x[N - 1] < y[0])%%(x[N-1] < Y)&&(y[0] > X))cout << "No War";
      |                               ^
Language: C

#include <stdio.h>

int main(){
    int n,m,X,Y;
    scanf("%d %d %d %d",&n,&m,&X,&Y);
    int x[n],y[n];
    int xmax=-1e9;
    int ymin=1e9;
    for(int i=0;i<n;i++){
        scanf("%d",&x[i]);
        if(xmax<x[i]) xmax=x[i];
    }   
    for(int i=0;i<m;i++){
        scanf("%d",&y[i]);
        if(ymin>y[i]) ymin=y[i];
        if(ymin<=xmax){printf("War\n");return 0;}
    }   
    if(X<ymin&&ymin<=Y){
        printf("No War\n");
    }else{
        printf("War\n");
    }   
    return 0;
                                                              1,5           Top


Compiler output:
main.c: In function 'main':
main.c:24:66: error: expected ';' before 'Top'
   24 |                                                               1,5           Top
      |                                                                  ^          ~~~
      |                                                                  ;
main.c:24:63: error: expected declaration or statement at end of input
   24 |                                                               1,5           Top
      |                                                               ^
Language: C++

#include <bits/stdc++.h>

using namespace std;
using llong = long long;
using P = pair<llong, llong>;

#define BE(x) x.begin(), x.end()

const llong inf = llong(1e18)+7;
const llong mod = 1e9+7;

int main(){
	llong N,M,X,Y;
	vector<llong> x,y;

	cin >> N >> M >> X >> Y;
	x.resize(N);
	y.resize(M);
	for(int i = 0; i < N; i++)
		cin >> x[i];
	for(int i = 0; i < M; i++)
		cin >> y[i];

	sort(BE(x), greater<llong>());
	sort(BE(y));

	if(x[0] < Z && y[0] >= Z)
		cout << "No War" << endl;
	else
		cout << "War" << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:19: error: 'Z' was not declared in this scope
   27 |         if(x[0] < Z && y[0] >= Z)
      |                   ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:59: error: expected ']' before '}' token
   15 |         if(X < Y && x[N - 1] < y[0] && X < y[0] && x[N - 1} < Y)cout << "No War" << endl;
      |                                                           ^
      |                                                           ]
a.cc:15:59: error: expected ')' before '}' token
   15 |         if(X < Y && x[N - 1] < y[0] && X < y[0] && x[N - 1} < Y)cout << "No War" << endl;
      |           ~                                               ^
      |                                                           )
a.cc:15:59: error: expected primary-expression before '}' token
a.cc: At global scope:
a.cc:15:61: error: expected unqualified-id before '<' token
   15 |         if(X < Y && x[N - 1] < y[0] && X < y[0] && x[N - 1} < Y)cout << "No War" << endl;
      |                                                             ^
a.cc:16:9: error: expected unqualified-id before 'else'
   16 |         else cout << "War" << endl;
      |         ^~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

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

int main()
{
  int n, m, x, y;
  cin >> n >> m >> x >> y;
  vector<int> x_city(n), y_city(m);
  for(auto& i : x_city) cin >> i;
  for(auto& i : y_city) cin >> i;
  
  sort(x_city.begin(), x_city.end(), greater<int>());
  sort(y_city.begin(), y_city.end());
  for(int i = x + 1; i <= y; ++i)
  {
    if(x_city[0] < i && y_city >= i)
    {
      cout << "No War" << endl;
      return 0;
    }
  }
  
  cout << "War" << endl;
}

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

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

#define FOR(i,n) for(int (i)=0;(i)<(n);(i)++)
#define SORT(i) sort((i).begin(),(i).end())
#define INF 1000000000

int main() {
	
	int n, m, x, y, z;
	cin >> n >> m >> x >> y;
	vector<int> X(n), Y(m);
	FOR(i, n)cin >> X[i];
	FOR(i, m)cin >> Y[i];

	SORT(X);
	SORT(Y);
	int z = min(y, Y[0]);
	bool ans = true;
	if (x >= z)ans = false;
	FOR(i, n) {
		if (X[i] >= z)ans = false;
	}

	if (ans)cout << "No War" << endl;
	else cout << "War" << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:13: error: redeclaration of 'int z'
   21 |         int z = min(y, Y[0]);
      |             ^
a.cc:13:25: note: 'int z' previously declared here
   13 |         int n, m, x, y, z;
      |                         ^
Language: C

#include <stdio.h>
int main(){
int n,m,x,y;
int i=0;
int j=0;
int max=0;
int min=0;
scanf("%d%d%d%d",&n,&m,&x,&y);
for(i=1; i<n; i++){
scanf("%d",&i);
if(max<i) max=i;
}

for(j=1; j<m; j++){
scanf("%d",&j);
if(j<min) min=j;
}

if(max>min) printf("War");
else if(min>=max){
if(min<x)  printf("War");
else(min>x)  printf("No War");
}


return 0;
}


Compiler output:
main.c: In function 'main':
main.c:22:12: error: expected ';' before 'printf'
   22 | else(min>x)  printf("No War");
      |            ^ ~~~~~~
      |            ;
Language: C

#include <stdio.h>
int main (){
int i,j,n,m,x,y,a,b,max=-100,min=100;
  scanf ("%d%d%d%d",&n,&m,&x,&y);
for (i=0;i<n;i++){
scanf ("%d",&a);
  if (max<a){
 max=a; 
  }
}
for (i=0;i<m;i++){
  scanf ("%d",&b);
 if (min>b){
 min=b; 
  }
}
  printf ("%d ",max);
  printf ("%d ",min);
if (max>x && max<min && min<y+1){
printf ("No War");
}
  else {
  printf ("War");
  }
return 0;
}#include <stdio.h>
int main (){
int i,j,n,m,x,y,a,b,max=-100,min=100;
  scanf ("%d%d%d%d",&n,&m,&x,&y);
for (i=0;i<n;i++){
scanf ("%d",&a);
  if (max<a){
 max=a; 
  }
}
for (i=0;i<m;i++){
  scanf ("%d",&b);
 if (min>b){
 min=b; 
  }
}
if (max>x && max<min && min<y+1){
printf ("No War");
}
  else {
  printf ("War");
  }
return 0;
}

Compiler output:
main.c:26:2: error: stray '#' in program
   26 | }#include <stdio.h>
      |  ^
main.c:26:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   26 | }#include <stdio.h>
      |           ^
Language: C

N,M,X,Y=map(int,input().split())
x_array = list(map(int,input().split()))
y_array = list(map(int,input().split()))
x_array.sort()
y_array.sort()
if y_array[0] - x_array[N-1] <=0:print("War")
else: print("No War")

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | N,M,X,Y=map(int,input().split())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'M' [-Wimplicit-int]
    1 | N,M,X,Y=map(int,input().split())
      |   ^
main.c:1:5: error: type defaults to 'int' in declaration of 'X' [-Wimplicit-int]
    1 | N,M,X,Y=map(int,input().split())
      |     ^
main.c:1:7: error: type defaults to 'int' in declaration of 'Y' [-Wimplicit-int]
    1 | N,M,X,Y=map(int,input().split())
      |       ^
main.c:1:9: error: implicit declaration of function 'map' [-Wimplicit-function-declaration]
    1 | N,M,X,Y=map(int,input().split())
      |         ^~~
main.c:1:13: error: expected expression before 'int'
    1 | N,M,X,Y=map(int,input().split())
      |             ^~~
main.c:2:1: error: expected ',' or ';' before 'x_array'
    2 | x_array = list(map(int,input().split()))
      | ^~~~~~~
Language: C

#include<stdio.h>
int main(){
  int N,M,X,Y,max_x = 0,min_y = 1000;
  scanf("%d %d %d %d",&N,&M,&X,&Y);
  int x[N],y[M];
  for(int i = 0;i < N;i++){
    scanf("%d",&x[i]);
    if(min_x > x[i]){
      min_x = x[i];
    }
  }
  for(int i = 0;i < M;i++){
    scanf("%d",&y[i]);
    if(max_x < x[i]){
      max_y = x[i];
    }
  }
  if(X <= min_y && max_x <= Y){
    printf("No War\n");
  }else{
    printf("War\n");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:8: error: 'min_x' undeclared (first use in this function); did you mean 'min_y'?
    8 |     if(min_x > x[i]){
      |        ^~~~~
      |        min_y
main.c:8:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:7: error: 'max_y' undeclared (first use in this function); did you mean 'max_x'?
   15 |       max_y = x[i];
      |       ^~~~~
      |       max_x
Language: C

#include<stdio.h>
int main(){
  int N,M,X,Y,min_x = 1000,min_y = 1000;
  scanf("%d %d %d %d",&N,&M,&X,&Y);
  int x[N],y[M];
  for(int i = 0;i < N;i++){
    scanf("%d",&x[i]);
    if(min_x > x[i]){
      min = x[i];
    }
  }
  for(int i = 0;i < M;i++){
    scanf("%d",&y[i]);
    if(min_x > x[i]){
      min = x[i];
    }
  }
  if(X <= min_y && min_x <= Y){
    printf("No War\n");
  }else{
    printf("War\n");
  }
  return 0;
}

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

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

int main() {
  int n,m,x,y;
  cin >> n >> m >> x >> y;
  vector<int> xP(n),yP(m);
  for(int i = 0;i < n;i++){
    cin >> xP.at(i);
  }
  for(int i = 0;i < m;i++){
    cin >> yP.at(i);
  }
  sort(xP.begin(),xP.end());
  sort(yP.begin(),yP.end());
  
  int N = n-1;
  if(xP.at(N) < yP.at(0) && x < yP.at(0)){
   if(xP.at(N) < y && xP(N) != yP(0)){
    cout << "No War" << endl;
   }
  }else{
    cout << "War" << endl;
  }


  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:25: error: no match for call to '(std::vector<int>) (int&)'
   19 |    if(xP.at(N) < y && xP(N) != yP(0)){
      |                       ~~^~~
a.cc:19:34: error: no match for call to '(std::vector<int>) (int)'
   19 |    if(xP.at(N) < y && xP(N) != yP(0)){
      |                                ~~^~~
Language: C++

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

using namespace std;

bool ifwar(int war1[], int war2[], int size, int X, int Y){
  for(int i = X + 1; i <= Y; i++){
    if( (*max_element(war1, war1 + N) < i) && (*min_element(war2, war2 + N) >= i) ){
      return true;
    }
  }
  return false;
}

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

  int war1[N];
  int war2[M];
  for(int i = 0; i < N; i++){
    cin >> war1[i];
  }
  for(int i = 0; i < M; i++){
    cin >> war2[i];
  }

  bool war = ifwar(war1, war2, N, X, Y);
  if(war){
    cout << "No War" << endl;
  } else if(!war){
    cout << "War" << endl;
  }

}


Compiler output:
a.cc: In function 'bool ifwar(int*, int*, int, int, int)':
a.cc:11:36: error: 'N' was not declared in this scope
   11 |     if( (*max_element(war1, war1 + N) < i) && (*min_element(war2, war2 + N) >= i) ){
      |                                    ^
Language: C++

#include <algorithm>
#include <cstdlib>
#include<iostream>
#include<vector>
#include<map>
#include<cmath>
using namespace std;
int N,M,X,Y;
int main(int argc, char const *argv[])
{
    cin>>N>>M>>X>>Y;
    bool flag_central=false;
    bool flag_region=false;
    bool flag_z=false;
    std::vector<int> x(N);
    std::vector<int> y(M);
    for(int i=0;i<N;i++){
        cin>>x[i];
    }
    for(int i=0;i<M;i++){
        cin>>y[i];
    }
    int x_max = *std::max_element(x.begin(), x.end());
    int y_min = *std::min_element(y.begin(), y.end());
    flag_central=(X<Y);
    flag_region=(x_max<y_min);
    flag_z=(X<y_min||y_max<X);
    if(flag_central&&flag_region&&flag_z){
        cout<<"No War"<<endl;
    }else{
        cout<<"War"<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:27:22: error: 'y_max' was not declared in this scope; did you mean 'x_max'?
   27 |     flag_z=(X<y_min||y_max<X);
      |                      ^~~~~
      |                      x_max
Language: C++

#include <iostream>
#include <string>
#include <cstring>
#include <vector>
#include <algorithm>
#include <set>
#include <stack>
#include <deque>
#include <cmath>
#include <map>
using namespace std;
typedef long long LL;

int main() {
    int n, m, x, y;
    cin >> n >> m >> x >> y;
    vector<int> x(n), y(m);
    //int x[101], int y[101];
    for (int i = 0; i < n; i++) cin >> x[i];
    for (int i = 0; i < m; i++) cin >> y[i];

    int mx = 1, my = 100;
    for (int i = 0; i < n; i++) mx = max(mx, x[i]);
    for (int i = 0; i < m; i++) my = min(my, y[i]);
    if(mx <= my) cout << "No War" << endl;
    else cout << "War" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: conflicting declaration 'std::vector<int> x'
   17 |     vector<int> x(n), y(m);
      |                 ^
a.cc:15:15: note: previous declaration as 'int x'
   15 |     int n, m, x, y;
      |               ^
a.cc:17:23: error: conflicting declaration 'std::vector<int> y'
   17 |     vector<int> x(n), y(m);
      |                       ^
a.cc:15:18: note: previous declaration as 'int y'
   15 |     int n, m, x, y;
      |                  ^
a.cc:19:41: error: invalid types 'int[int]' for array subscript
   19 |     for (int i = 0; i < n; i++) cin >> x[i];
      |                                         ^
a.cc:20:41: error: invalid types 'int[int]' for array subscript
   20 |     for (int i = 0; i < m; i++) cin >> y[i];
      |                                         ^
a.cc:23:47: error: invalid types 'int[int]' for array subscript
   23 |     for (int i = 0; i < n; i++) mx = max(mx, x[i]);
      |                                               ^
a.cc:24:47: error: invalid types 'int[int]' for array subscript
   24 |     for (int i = 0; i < m; i++) my = min(my, y[i]);
      |                                               ^
Language: C++

#include <iostream>
#include <string>
#include <cstring>
#include <vector>
#include <algorithm>
#include <set>
#include <stack>
#include <deque>
#include <cmath>
#include <map>
using namespace std;
typedef long long LL;

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

    int mx = 1, my = 100;
    for (int i = 0; i < n; i++) mx = max(mx, x[i]);
    for (int i = 0; i < m; i++) my = min(my, y[i]);
    if(mx <= my) cout << "No War" << endl;
    else cout << "War" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: conflicting declaration 'int x [n]'
   17 |     int x[n];
      |         ^
a.cc:15:15: note: previous declaration as 'int x'
   15 |     int n, m, x, y;
      |               ^
a.cc:18:9: error: conflicting declaration 'int y [m]'
   18 |     int y[m];
      |         ^
a.cc:15:18: note: previous declaration as 'int y'
   15 |     int n, m, x, y;
      |                  ^
a.cc:19:41: error: invalid types 'int[int]' for array subscript
   19 |     for (int i = 0; i < n; i++) cin >> x[i];
      |                                         ^
a.cc:20:41: error: invalid types 'int[int]' for array subscript
   20 |     for (int i = 0; i < m; i++) cin >> y[i];
      |                                         ^
a.cc:23:47: error: invalid types 'int[int]' for array subscript
   23 |     for (int i = 0; i < n; i++) mx = max(mx, x[i]);
      |                                               ^
a.cc:24:47: error: invalid types 'int[int]' for array subscript
   24 |     for (int i = 0; i < m; i++) my = min(my, y[i]);
      |                                               ^
Language: C++

#include <iostream>
#include <algorithm>
using naespace std;
int main(){
  int n,m,x,y;
  cin >> n >> m >> x >> y;
  int a[n],b[m];
  for (int i=0;i<n;i++){
    cin >> a[i];
  }
  for (int i=0;i<m;i++){
    cin >> b[i];
  }
  int p=-101;
  int q=101;
  for (int i=0;i<n;i++){
    p=max(p,a[i]);
  }
  for (int i=0;i<m;i++){
    q=min(q,b[i]);
  }
  if (p<q&&x<=q-1&&y>=p+1){
    cout << "War" << endl;
  }
  else{
    cout << "No War" << endl;
  }
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'naespace'
    3 | using naespace std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> n >> m >> x >> y;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:17:7: error: 'max' was not declared in this scope; did you mean 'std::max'?
   17 |     p=max(p,a[i]);
      |       ^~~
      |       std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:20:7: error: 'min' was not declared in this scope; did you mean 'std::min'?
   20 |     q=min(q,b[i]);
      |       ^~~
      |       std::min
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:23:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   23 |     cout << "War" << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:23:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   23 |     cout << "War" << endl;
      |                      ^~~~
      |                      std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:26:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   26 |     cout << "No War" << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:26:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   26 |     cout << "No War" << endl;
      |                         ^~~~
      |                         std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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


int main(){
    int n,m,x,y;
    cin>>n>>m>>x>>y;
    vector<int> xn(n);
    for(int i=0;i<n;++i)cin>>xn[i];
    vector<int> ym(m);
    for(int i=0;i<m;++i)cin>>ym[i];
    int maxx=-1111111;
    for(int i=0;i<n;++i){
        maxx=max(maxx,xn[i]);
    }
    int miny=100000000;
    for(int i=0.;i<m;++i){
        miny=min(miny,ym[i]);
    }

    if(max(x, maxx) < min(y,miny){
        cout<<"No War"<<endl;
    }else{
        cout<<"War"<<endl;
    }
    
    
}

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

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


int main(){
    int n,m,x,y;
    cin>>n>>m>>x>>y;
    vector<int> xn(n);
    for(int i=0;i<n;++i)cin>>xn[i];
    vector<int> ym(m);
    for(int i=0;i<m;++i)cin>>ym[i];
    int maxx=-1111111;
    for(int i=0;i<n;++i){
        maxx=max(maxx,xn[i]);
    }
    int miny=100000000;
    for(int i=0.;i<m;++i){
        miny=min(miny,ym[i]);
    }

    if(max(x, maxx)) < min(y,miny){
        cout<<"No War"<<endl;
    }else{
        cout<<"War"<<endl;
    }
    
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:22: error: expected primary-expression before '<' token
   24 |     if(max(x, maxx)) < min(y,miny){
      |                      ^
Language: C++

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


int main(){
    int n,m,x,y;
    cin>>n>>m>>x>>y;
    vector<int> xn(n);
    for(int i=0;i<n;++i)cin>>xn[i];
    vector<int> ym(m);
    for(int i=0;i<m;++i)cin>>ym[i];
    int maxx=-1111111;
    for(int i=0;i<n;++i){
        maxx=max(maxx,xn[i]);
    }
    int miny=100000000;
    for(int i=0.;i<m;++i){
        miny=min(miny,ym[i];)
    }

    if(max(x, maxx)) < min(y,miny){
        cout<<"No War"<<endl;
    }else{
        cout<<"War"<<endl;
    }
    
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:28: error: expected ')' before ';' token
   21 |         miny=min(miny,ym[i];)
      |                 ~          ^
      |                            )
a.cc:21:29: error: expected primary-expression before ')' token
   21 |         miny=min(miny,ym[i];)
      |                             ^
a.cc:24:22: error: expected primary-expression before '<' token
   24 |     if(max(x, maxx)) < min(y,miny){
      |                      ^
Language: C++

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


int main(){
    int n,m,x,y;
    cin>>n>>m>>x>>y;
    vector<int> xn(n);
    for(int i=0;i<n;++i)cin>>xn[i];
    vector<int> ym(m);
    for(int i=0;i<m;++i)cin>>ym[i];
    int maxx=max(xn.begin(),xn.end());
    int miny=min(ym.begin(),ym.end());
    if(max(x, maxx*)) < min(y,miny*){
        cout<<"No War"<<endl;
    }else{
        cout<<"War"<<endl;
    }
    
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: cannot convert 'const __gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in initialization
   15 |     int maxx=max(xn.begin(),xn.end());
      |              ~~~^~~~~~~~~~~~~~~~~~~~~
      |                 |
      |                 const __gnu_cxx::__normal_iterator<int*, std::vector<int> >
a.cc:16:17: error: cannot convert 'const __gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in initialization
   16 |     int miny=min(ym.begin(),ym.end());
      |              ~~~^~~~~~~~~~~~~~~~~~~~~
      |                 |
      |                 const __gnu_cxx::__normal_iterator<int*, std::vector<int> >
a.cc:17:20: error: expected primary-expression before ')' token
   17 |     if(max(x, maxx*)) < min(y,miny*){
      |                    ^
a.cc:17:23: error: expected primary-expression before '<' token
   17 |     if(max(x, maxx*)) < min(y,miny*){
      |                       ^
a.cc:17:36: error: expected primary-expression before ')' token
   17 |     if(max(x, maxx*)) < min(y,miny*){
      |                                    ^
Language: C++

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


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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: cannot convert 'const __gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in initialization
   15 |     int maxx=max(xn.begin(),xn.end());
      |              ~~~^~~~~~~~~~~~~~~~~~~~~
      |                 |
      |                 const __gnu_cxx::__normal_iterator<int*, std::vector<int> >
a.cc:16:17: error: cannot convert 'const __gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in initialization
   16 |     int miny=min(ym.begin(),ym.end());
      |              ~~~^~~~~~~~~~~~~~~~~~~~~
      |                 |
      |                 const __gnu_cxx::__normal_iterator<int*, std::vector<int> >
a.cc:17:22: error: expected primary-expression before '<' token
   17 |     if(max(x, maxx)) < min(y,miny){
      |                      ^
Language: C++

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


int main(){
    int n,m,x,y;
    cin>>n>>m>>x>>y;
    vector<int> xn(n);
    for(int i=0;i<n;++i)cin>>xn[i];
    vector<int> ym(m);
    for(int i=0;i<m;++i)cin>>ym[i];

    if(max(xn.begin(),xn.end())<min(ym.begin(),ym.end())){
        cout<<"No War"<<endl;
    }else{
        cout<<"War"<<endl;
    }

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

#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<string>
#include<algorithm>
#include<queue>
#include<cmath>
#include<iomanip>
#include<iostream>
#include<stack>
#include<set>
#include<map>
#include<vector>
#define pi 3.1415926536
const int maxn = 1e5 + 5;
using namespace std;

int X,Y,n,m;
int x[105],y[105];
bool flag = 1;
int main()
{
	scanf("%d %d %d %d", &n, &m, &X, &Y);
	for(int i = 1; i <= n; i++){
		scanf("%d", &x[i]);
	}
	for(int i = 1; i <= m; i++){
		scanf("%d", &y[i]);
	}
	sort(x + 1, x + n + 1);
	sort(y + 1, y + m + 1);
	printf("%d %d %d %d\n",X,Y,x[n],y[1]);
	if(X >= Y && x[n] >= y[1]){
		flag = 0; 
	//	printf("%d 1\n",flag);
	}
	else{
		if(x[n] >= y[1]) {flag = 0;
	//	printf("%d 2\n",flag);}
		else if(X >= y[1] || x[n] >= Y) {flag = 0;
	//	printf("%d 3\n",flag);}
	}
	if(flag) printf("No War\n");
	else printf("War\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:17: error: expected '}' before 'else'
   40 |                 else if(X >= y[1] || x[n] >= Y) {flag = 0;
      |                 ^~~~
a.cc:38:34: note: to match this '{'
   38 |                 if(x[n] >= y[1]) {flag = 0;
      |                                  ^
a.cc:46:2: error: expected '}' at end of input
   46 | }
      |  ^
a.cc:22:1: note: to match this '{'
   22 | {
      | ^
Language: C++

#include <iostream >
#include <vector >
using namespace std;
bool is_war(const vector <int >& x, const vector <int >& y) {
 }
for (int Z = bool is_ok for (int i
if (x[i] for (int i
if (y[i]
-100; Z <= 100; ++Z) {
= true;
= 0; i < x.size(); ++i) { >= Z) is_ok = false;
= 0; i < y.size(); ++i) { < Z) is_ok = false;
return false;
} }
}
if (is_ok)
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.
Language: C++


#include <iostream > #include <vector >
using namespace std;
bool is_war(const vector <int >& x, const vector <int >& y) {
 }
for (int Z = bool is_ok for (int i
if (x[i] for (int i
if (y[i]
-100; Z <= 100; ++Z) {
= true;
= 0; i < x.size(); ++i) { >= Z) is_ok = false;
= 0; i < y.size(); ++i) { < Z) is_ok = false;
return false;
} }
}
if (is_ok)
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:2:22: warning: extra tokens at end of #include directive
    2 | #include <iostream > #include <vector >
      |                      ^
a.cc:2:10: fatal error: iostream : No such file or directory
    2 | #include <iostream > #include <vector >
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

	for(int j = 1;j <= m;j++){
		scanf("%d",&b[j]);
		y1 = min(y1,b[j]);
		}
		for(x = x+1;x <= y;x++){
			if(x > x1&&x <= y1)
			{
				cnt = 1;
				printf("No War");
				break;
				}
			}
			if(cnt == 0) printf("War");
	return 0;
	}

Compiler output:
a.cc:1:9: error: expected unqualified-id before 'for'
    1 |         for(int j = 1;j <= m;j++){
      |         ^~~
a.cc:1:23: error: 'j' does not name a type
    1 |         for(int j = 1;j <= m;j++){
      |                       ^
a.cc:1:30: error: 'j' does not name a type
    1 |         for(int j = 1;j <= m;j++){
      |                              ^
a.cc:5:17: error: expected unqualified-id before 'for'
    5 |                 for(x = x+1;x <= y;x++){
      |                 ^~~
a.cc:5:29: error: 'x' does not name a type
    5 |                 for(x = x+1;x <= y;x++){
      |                             ^
a.cc:5:36: error: 'x' does not name a type
    5 |                 for(x = x+1;x <= y;x++){
      |                                    ^
a.cc:13:25: error: expected unqualified-id before 'if'
   13 |                         if(cnt == 0) printf("War");
      |                         ^~
a.cc:14:9: error: expected unqualified-id before 'return'
   14 |         return 0;
      |         ^~~~~~
a.cc:15:9: error: expected declaration before '}' token
   15 |         }
      |         ^
Language: C++

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

using namespace std;

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


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:24:27: error: expected '}' at end of input
   24 |     cout << "War" << endl;
      |                           ^
a.cc:23:7: note: to match this '{'
   23 |   else{
      |       ^
a.cc:24:27: error: expected '}' at end of input
   24 |     cout << "War" << endl;
      |                           ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: C

#include <stdio.h>

int main(){
  int n,m,X,Y,x[n],y[m],i,j;
  scanf("%d%d%d%d", &n,&m,&X,&Y);
  
  for(i=0;i<n;i++){
    scanf("%d", &x[i]);
  }
  for(j=0;j<m;j++){
    scanf("%d", &y[j]);
  }
  
  int max=x[0];
  for(i=1;i<n;i++){
    if(x[i]>max){
		max=x[i];
    }
  }
  
  int min=y[0];
  for(i=1;i<m;i++){
    if(y[i]<min){
		min=y[i];
    }
  }
  
  int flag=0;
  if(max<min){
  for(i=X+1;i<=Y;i++){
   	if(i>max && i<=min　&& i>X && i<=Y){
		flag=1;
      	break;
    }
  }
  }
  
  if(flag==0){
	printf("War");
  }else{
    printf("No War");
  }
}
  


Compiler output:
main.c: In function 'main':
main.c:31:27: error: stray '\343' in program
   31 |         if(i>max && i<=min<U+3000>&& i>X && i<=Y){
      |                           ^~~~~~~~
Language: Java

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

class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();
        int[] x = new int[N];
        int[] y = new int[M];

        for (int i = 0; i < x.length; i++) {
            x[i] = sc.nextInt();
        }
        for (int i = 0; i < y.length; i++) {
            y[i] = sc.nextInt();
        }
        Arrays.sort(x);
        Arrays.sort(y);

        boolean requirement1 = Math.signum(Math.abs(Y) - Math.abs(X)) == 1 || Math.signum(Math.abs(Y) - Math.abs(X)) == 0;
        boolean requirement2 = Math.signum(y[0] - x[x.length-1]) == 1;
        if (requirement1 && requirement2) {
            System.out.println("No War");
        } else {
            System.out.println("War");
        }
    }

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

#include <vector>
using namespace std;

int main(){
    int n, m;
    vector<int> x, y;
    cin >> n >> m;
    for(int i = 0; i <= n; i++){
        int val;
        cin >> val;
        x.push_back(val);
    }
    for(int i = 0; i <= m; i++){
        int val;
        cin >> val;
        y.push_back(val);
    }
    sort(x.begin(), x.end());
    sort(y.begin(), y.end());
    int a = x.back();
    int b = y.front();
    if(a >= b){
        cout << "War" << endl;
    }else{
        cout << "No War" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> n >> m;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <vector>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:18:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 |     sort(x.begin(), x.end());
      |     ^~~~
      |     short
a.cc:23:9: error: 'cout' was not declared in this scope
   23 |         cout << "War" << endl;
      |         ^~~~
a.cc:23:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:23:26: error: 'endl' was not declared in this scope
   23 |         cout << "War" << endl;
      |                          ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <vector>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:25:9: error: 'cout' was not declared in this scope
   25 |         cout << "No War" << endl;
      |         ^~~~
a.cc:25:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:25:29: error: 'endl' was not declared in this scope
   25 |         cout << "No War" << endl;
      |                             ^~~~
a.cc:25:29: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

int main(){
  int N,M,X,Y;
  cin>>N>>M>>X>>Y;
  for(int uuu=0;uuu<N;uuu++) cin>>x[uuu];
  for(int rrr=0;rrr<N;rrr++) cin>>y[rrr];
  
  xmax=-20000;
  for(int i=0;i<N;i++) xmax=max(xmax,x[i]);
  ymin=20000;
  for(int j=0;j<M;j++) ymin=min(ymin,y[j]);
  int lx=max(X,xmax);
  int ly=min(Y,ymin);
  if(ly-lx>=1) cout<<"No War"<<endl;
  else cout<<"War"<<endl;
  
 return 0; 
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #incude; did you mean #include?
    2 | #incude <algorithm>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:8:35: error: 'x' was not declared in this scope
    8 |   for(int uuu=0;uuu<N;uuu++) cin>>x[uuu];
      |                                   ^
a.cc:9:35: error: 'y' was not declared in this scope
    9 |   for(int rrr=0;rrr<N;rrr++) cin>>y[rrr];
      |                                   ^
a.cc:11:3: error: 'xmax' was not declared in this scope
   11 |   xmax=-20000;
      |   ^~~~
a.cc:12:38: error: 'x' was not declared in this scope
   12 |   for(int i=0;i<N;i++) xmax=max(xmax,x[i]);
      |                                      ^
a.cc:13:3: error: 'ymin' was not declared in this scope
   13 |   ymin=20000;
      |   ^~~~
a.cc:14:38: error: 'y' was not declared in this scope
   14 |   for(int j=0;j<M;j++) ymin=min(ymin,y[j]);
      |                                      ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'max_element' was not declared in this scope
   13 |         if(*max_element(x.begin(),x.end())>=*min_element(y.begin(),y.end())) cout<<"War"<<endl;
      |             ^~~~~~~~~~~
a.cc:13:46: error: 'min_element' was not declared in this scope
   13 |         if(*max_element(x.begin(),x.end())>=*min_element(y.begin(),y.end())) cout<<"War"<<endl;
      |                                              ^~~~~~~~~~~
Language: C++

#include <iostream>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <cstring>
using namespace std;

int main(int argc, char *argv[])
{
	int i;
	int n, m, x, y;
	int tmp;
    cin >> n >> m >> x >> y;
	vector<int> x_val;
    vector<int> y_val;

	for (i = 0; i < n; i++) {
		cin >> tmp;
		x_val.push_back(tmp);
	}
	for (i = 0; i < m; i++) {
		cin >> tmp;
		y_val.push_back(tmp);
	}

	sort(x_val.begin(), x_val.end());
	sort(y_val.begin(), y_val.end());

    if (x[n - 1] >= y[0]) 
		cout << "War" << endl;
	else
		cout << "No War" << endl;
   
	return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:29:10: error: invalid types 'int[int]' for array subscript
   29 |     if (x[n - 1] >= y[0])
      |          ^
a.cc:29:22: error: invalid types 'int[int]' for array subscript
   29 |     if (x[n - 1] >= y[0])
      |                      ^
Language: C++

// #include<iostream>
// using namespace std;
// // int 2^31-1
//
// // factorial
// int f(int n){
//   int i,fact;
//   fact = 1;
//    i = n;
//    while (i >= 1) {
//  fact = fact * i;
//  --i;
//    }
//   return fact;
// }
//
// // permutation
// int p(int n,int m){
//   int i,perm;
//   i=n;
//   while(i>=m){
//     perm=i*perm;
//     --i;
//   }
//   return perm;
// }
// // combination
//
// int main(){
//   int n,k;
//   cin>>n>>k;
//   int y,z;
//   if(n>=k){
//     y=f(n)/f(k);
//     z=y*k;
//   }else if(n<k){
//     z=p(k,n);
//   }
//   cout<<z;
//   return 0;
// }

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

bool is_war(const vector<int>& x, const vetor<int>& y){
  for(int Z=-1000; 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(x[i]<Z)is_ok=false;
    }
    if(is_lk)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:47:41: error: 'vetor' does not name a type
   47 | bool is_war(const vector<int>& x, const vetor<int>& y){
      |                                         ^~~~~
a.cc:47:46: error: expected ',' or '...' before '<' token
   47 | bool is_war(const vector<int>& x, const vetor<int>& y){
      |                                              ^
a.cc: In function 'bool is_war(const std::vector<int>&, int)':
a.cc:53:19: error: 'y' was not declared in this scope
   53 |     for(int i=0;i<y.size();i++){
      |                   ^
a.cc:56:8: error: 'is_lk' was not declared in this scope; did you mean 'is_ok'?
   56 |     if(is_lk)return false;
      |        ^~~~~
      |        is_ok
a.cc: In function 'int main()':
a.cc:70:15: error: cannot convert 'std::vector<int>' to 'int'
   70 |   if(is_war(x,y)){
      |               ^
      |               |
      |               std::vector<int>
a.cc:47:35: note:   initializing argument 2 of 'bool is_war(const std::vector<int>&, int)'
   47 | bool is_war(const vector<int>& x, const vetor<int>& y){
      |                                   ^~~~~~~~~~~
Language: C++

// #include<iostream>
// using namespace std;
// // int 2^31-1
//
// // factorial
// int f(int n){
//   int i,fact;
//   fact = 1;
//    i = n;
//    while (i >= 1) {
//  fact = fact * i;
//  --i;
//    }
//   return fact;
// }
//
// // permutation
// int p(int n,int m){
//   int i,perm;
//   i=n;
//   while(i>=m){
//     perm=i*perm;
//     --i;
//   }
//   return perm;
// }
// // combination
//
// int main(){
//   int n,k;
//   cin>>n>>k;
//   int y,z;
//   if(n>=k){
//     y=f(n)/f(k);
//     z=y*k;
//   }else if(n<k){
//     z=p(k,n);
//   }
//   cout<<z;
//   return 0;
// }

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

bool is_war(const vector<int>& x, const vetor<int>& y){
  for(int Z=-1000; 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(x[i]<Z)is_ok=false;
    }
    if(is_lk)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<N;i++){
    cin>>y[i+1];
  }
  if(is_war(x,y)){
    cout<<"War"<<endl;
  }else{
    cout<<"No War"<<endl;
  }
}


Compiler output:
a.cc:47:41: error: 'vetor' does not name a type
   47 | bool is_war(const vector<int>& x, const vetor<int>& y){
      |                                         ^~~~~
a.cc:47:46: error: expected ',' or '...' before '<' token
   47 | bool is_war(const vector<int>& x, const vetor<int>& y){
      |                                              ^
a.cc: In function 'bool is_war(const std::vector<int>&, int)':
a.cc:53:19: error: 'y' was not declared in this scope
   53 |     for(int i=0;i<y.size();i++){
      |                   ^
a.cc:56:8: error: 'is_lk' was not declared in this scope; did you mean 'is_ok'?
   56 |     if(is_lk)return false;
      |        ^~~~~
      |        is_ok
a.cc: In function 'int main()':
a.cc:70:15: error: cannot convert 'std::vector<int>' to 'int'
   70 |   if(is_war(x,y)){
      |               ^
      |               |
      |               std::vector<int>
a.cc:47:35: note:   initializing argument 2 of 'bool is_war(const std::vector<int>&, int)'
   47 | bool is_war(const vector<int>& x, const vetor<int>& y){
      |                                   ^~~~~~~~~~~
Language: C++

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

bool is_war(const vector<int>& x, const vetor<int>& y){
  for(int Z=-1000; 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(x[i]<Z)is_ok=false;
    }
    if(is_lk)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<n;i++){
    cin>>y[i+1];
  }
  if(is_war(x,y)){
    cout<<"War"<<endl;
  }else{
    cout<<"No War"<<endl;
  }
}


Compiler output:
a.cc:5:41: error: 'vetor' does not name a type
    5 | bool is_war(const vector<int>& x, const vetor<int>& y){
      |                                         ^~~~~
a.cc:5:46: error: expected ',' or '...' before '<' token
    5 | bool is_war(const vector<int>& x, const vetor<int>& y){
      |                                              ^
a.cc: In function 'bool is_war(const std::vector<int>&, int)':
a.cc:11:19: error: 'y' was not declared in this scope
   11 |     for(int i=0;i<y.size();i++){
      |                   ^
a.cc:14:8: error: 'is_lk' was not declared in this scope; did you mean 'is_ok'?
   14 |     if(is_lk)return false;
      |        ^~~~~
      |        is_ok
a.cc: In function 'int main()':
a.cc:22:17: error: 'n' was not declared in this scope
   22 |   for(int i=0;i<n;i++){
      |                 ^
a.cc:25:17: error: 'n' was not declared in this scope
   25 |   for(int i=0;i<n;i++){
      |                 ^
a.cc:28:15: error: cannot convert 'std::vector<int>' to 'int'
   28 |   if(is_war(x,y)){
      |               ^
      |               |
      |               std::vector<int>
a.cc:5:35: note:   initializing argument 2 of 'bool is_war(const std::vector<int>&, int)'
    5 | bool is_war(const vector<int>& x, const vetor<int>& y){
      |                                   ^~~~~~~~~~~
Language: C++

#include <vector>
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
string solveMeFirst(vector<int>x,vector<int>y){
    int x_max = *max_element(x.begin(), x.end());
    int y_min = *min_element(y.begin(), y.end());
    if (xmax < ymin){
        return "No War";
    }else{
        return "War";
    }
}

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

Compiler output:
a.cc: In function 'std::string solveMeFirst(std::vector<int>, std::vector<int>)':
a.cc:9:9: error: 'xmax' was not declared in this scope; did you mean 'x_max'?
    9 |     if (xmax < ymin){
      |         ^~~~
      |         x_max
a.cc:9:16: error: 'ymin' was not declared in this scope; did you mean 'y_min'?
    9 |     if (xmax < ymin){
      |                ^~~~
      |                y_min
a.cc:8:48: warning: control reaches end of non-void function [-Wreturn-type]
    8 |     int y_min = *min_element(y.begin(), y.end());
      |                                                ^