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

#include <iostream>
#include <iomanip>
#include <vector>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <set>
#include <map>
#include <unordered_map>
#include <queue>
#include <cassert>
#define PB push_back
#define MP make_pair
#define sz(v) (ll((v).size()))
#define forn(i,n) for(ll i = 0; i < (n); ++i)
#define rng(i,l,r) for(ll i = (l); i < (r); ++i)
#define down(i,r,l) for(ll i = (r); i >= (l); --i)
#define forv(i,v) forn(i,sz(v))
#define fors(i,s) for(auto i=(s).begin();i!=(s).end();++i)
#define all(v) (v).begin(), (v).end()

using namespace std;

typedef long long ll;
typedef pair<ll, ll> pii;
typedef vector<ll> vi;
typedef vector<vi> vvi;

#define X first
#define Y second

const int N = 1001;
int board[N][N];
int h, w, a, b;

bool try_place(int nA, int nB) {
    vi row(h, 0);
    for (int i = 0; i < h; i++) {
        row[i] = (i < nA) ? a : (w - a);
    }
    memset(board, 0, sizeof(board));
    for (int j = 0; j < w; j++) {
        int coln = (j < nB) ? b : (h - b);
        // find max row
        int maxh = 0, pos = 0;
        for (int i = 0; i < h; i++) {
            if (row[i] > maxh) {
                maxh = row[i];
                pos = i;
            }
        }
        for (int t = 0; t < coln; t++) {
            if (row[pos] == 0) {
                return false;
            }
            board[pos][j] = 1;
            row[pos]--;
            pos = (pos + 1) % h;
        }
    }
    return true;
}
int main() {
    ios::sync_with_stdio(0); cin.tie(0);
    cin >> h >> w >> a >> b;
    for (int i = 0; i < h; i++) {
        for (int j = 0; j < w; j++) {
            int as = (i * a) + (h - i) * (w - a);
            int bs = (j * b) + (w - j) * (h - b);
            if (as == bs) {
                if (try_place(i, j)) {
                    for (int ii = 0; ii < h; ii++) {
                        for (int j1 = 0; j1 < w; j1++) {
                            cout << board[ii][j1] << " ";
                        }
                        cout << endl;
                    }
                    return 0;
                }
            }
        }
    }
    cout << -1 << endl;
        return 0;
}





Compiler output:
a.cc: In function 'bool try_place(int, int)':
a.cc:41:5: error: 'memset' was not declared in this scope
   41 |     memset(board, 0, sizeof(board));
      |     ^~~~~~
a.cc:12:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   11 | #include <cassert>
  +++ |+#include <cstring>
   12 | #define PB push_back
Language: C++

#map(int, input().split())
H,W,A,B=map(int, input().split())
for i in range(W):
    s=''
    for j in range(H):
        s=s+'1' if(i<B)^(j>A) else s+'0'
    print(s)

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #map
    1 | #map(int, input().split())
      |  ^~~
a.cc:4:7: error: empty character constant
    4 |     s=''
      |       ^~
a.cc:2:1: error: 'H' does not name a type
    2 | H,W,A,B=map(int, input().split())
      | ^
Language: C++

h, w, a, b = map(int, input().split())

ans = []

if a == 0:
    ans.append((['0'] * w) * b)
    ans.append((['1'] * w) * (h - b))
elif b == 0:
    ans.append((['0'] * a + ['1'] * (w - a)) * h)
#　全要素が1の小行列を対角線に埋めて行くイメージ
elif w % a == 0 and h % b == 0 and w // a == h // b:
    for i in range(h // b):
        ans.append((['0'] * (a * i) + ['1'] * a + ['0'] * (w - (a * (i + 1))) * b))
        # print(ans)
else:
    print("No")
    exit()

for v in ans:
    print(''.join(v))


Compiler output:
a.cc:10:2: error: extended character 　 is not valid in an identifier
   10 | #　全要素が1の小行列を対角線に埋めて行くイメージ
      |  ^
a.cc:10:2: error: invalid preprocessing directive #\U00003000\U00005168\U00008981\U00007d20\U0000304c1\U0000306e\U00005c0f\U0000884c\U00005217\U00003092\U00005bfe\U000089d2\U00007dda\U0000306b\U000057cb\U00003081\U00003066\U0000884c\U0000304f\U000030a4\U000030e1\U000030fc\U000030b8
   10 | #　全要素が1の小行列を対角線に埋めて行くイメージ
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:14:11: error: invalid preprocessing directive #print
   14 |         # print(ans)
      |           ^~~~~
a.cc:20:11: error: empty character constant
   20 |     print(''.join(v))
      |           ^~
a.cc:1:1: error: 'h' does not name a type
    1 | h, w, a, b = map(int, input().split())
      | ^
Language: C++

#incrude<iostream>
using namespace std;

int main(){
  int h,w,a,b;
  cin>>h>>w>>a>>b;
  for(int i;i<h;i++){
    for(int j;j<w;j++){
      cout<< (j<a)==(i<b);
    }
    cout<<endl
  }
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incrude; did you mean #include?
    1 | #incrude<iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>h>>w>>a>>b;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incrude<iostream>
a.cc:9:7: error: 'cout' was not declared in this scope
    9 |       cout<< (j<a)==(i<b);
      |       ^~~~
a.cc:9:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout<<endl
      |     ^~~~
a.cc:11:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:11: error: 'endl' was not declared in this scope
   11 |     cout<<endl
      |           ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incrude<iostream>
Language: C++

#include <iostream>

using namespace std;

template <size_t N>
struct Eratosthenes
{
    bool is_prime[N + 1];
    constexpr Eratosthenes() : is_prime()
    {
        for (size_t i = 2; i <= N; i++)
        {
            is_prime[i] = true;
        }
        is_prime[0] = false;
        is_prime[1] = false;

        for (size_t p = 2; p <= N; p++)
        {
            if (is_prime[p])
            {
                for (size_t q = p * 2; q <= N; q += p)
                {
                    is_prime[q] = false;
                }
            }
        }
    }
};

int main()
{
    constexpr int M = 1000000;
    constexpr auto sieve = Eratosthenes<M>();
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:44:   in 'constexpr' expansion of 'Eratosthenes<1000000>()'
a.cc:11:9: error: 'constexpr' loop iteration count exceeds limit of 262144 (use '-fconstexpr-loop-limit=' to increase the limit)
   11 |         for (size_t i = 2; i <= N; i++)
      |         ^~~
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main(){
  int h,w,a,b;
  cin>>h>>w>>a>>b;
  vector<vector<int>> grid(h,vector<int> w);
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      if(i<a&&j<b) grid[i][j]=0;
      if(i<a&&j>=b) grid[i][j]=1;
      if(i>=a&&j<b) grid[i][j]=1;
      if(i>=a&&j>=b) grid[i][j]=0;
    }
  }
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      cout<<grid[i][j];
    }
    cout<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:42: error: expected primary-expression before 'w'
    7 |   vector<vector<int>> grid(h,vector<int> w);
      |                                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(long long i=0;i<n;++i)

signed main() {
    int H,W,A,B;
    cin >> H >> W >> A >> B;
    int ans[H][W] = {};
    REP(i,B) REP(j,A) ans[i][j] = 1;
    REPP(i,B,H) REPP(j,A,W) ans[i][j] = 1;
    REP(i,H) REP(j,W) cout << ans[i][j] << ' ';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: 'i' was not declared in this scope
   10 |     REPP(i,B,H) REPP(j,A,W) ans[i][j] = 1;
      |          ^
a.cc:10:5: error: 'REPP' was not declared in this scope; did you mean 'REP'?
   10 |     REPP(i,B,H) REPP(j,A,W) ans[i][j] = 1;
      |     ^~~~
      |     REP
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
	int h, w, a, b;
  	cin >> h >> w >> a >> b;
  	for(int i = 0; i < h; i++){
    	for(int j = 0; j < w; j++){
        	int x = (j < a) ^ (i < b)
            cout << x;
        }
      	cout << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: expected ',' or ';' before 'cout'
   11 |             cout << x;
      |             ^~~~
Language: C++

#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#include<string>
#include<iostream>
#include<vector>
#include<cstdlib>
using namespace std;
 
template <class T> using V = vector<T>;
 
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
 
const long long INF = 1LL << 60;
 
using ll = long long;
using db = double;
using st = string;
using ch = char;
using bl = bool;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
using vbl = V<bl>;

 
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define rFOR(i,a,b) for(ll i=(a);i>=(b);i--)
#define oFOR(i,a,b) for(ll i=(a);i<(b);i+=2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn,(a).en)
#define REV(a) reverse((a).bgn,(a).en)
#define M(a,b) max(a,b)
#define rM(a,b) min(a,b)
#define fi first
#define se second
#define sz size()
#define gcd(a,b) __gcd(a,b)
#define co(a) cout<<a<<endl;
#define ci(a) cin>>a;
  
 

ll sum(ll n) {
ll m=0;
  while(n){
    m+=n%10;
    n/=10;
  }
  return m;
}
 
 
const int MAX = 510000;
const int MOD = 1000000007;
 
long long fac[MAX], finv[MAX], inv[MAX];
 
void Comuse() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}
 
 
#define comuse Comuse()
 
ll combi(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
 
 
 
 
ll lcm(ll a,ll b){
  ll n;
  n=a/gcd(a,b)*b;
  return n;
}




 
/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/
 
 
signed main() {
  signed main() {
  long long h,w,a,b;
    cin>>h>>w>>a>>b;
  for(int i=0;i<h;i++){
    if(i<b){
    	string s(a,'0');
    	string t(w-a,'1');
    	s+=t;
    	cout<<s<<endl;
    }
    else{
      string s(a,'1');
    	string t(w-a,'0');
    	s+=t;
    	cout<<s<<endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:116:14: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
  116 |   signed main() {
      |              ^~
a.cc:116:14: note: remove parentheses to default-initialize a variable
  116 |   signed main() {
      |              ^~
      |              --
a.cc:116:14: note: or replace parentheses with braces to value-initialize a variable
a.cc:116:17: error: a function-definition is not allowed here before '{' token
  116 |   signed main() {
      |                 ^
a.cc:133:2: error: expected '}' at end of input
  133 | }
      |  ^
a.cc:115:15: note: to match this '{'
  115 | signed main() {
      |               ^
Language: C++

#include <bits/stdc++.h>
#define fr first
#define sc second
#define ll long long
#define pi pair<int,int>
#define pl pair<ll,ll>
#define pd pair<double,double>
#define ld long double
#define pld pair<ld,ld>
#define lg length()
#define sz size()
#define vi vector<int>
#define vl vector<ll>
#define vp vector<pi>
#define vpl vector<pl>
#define pb push_back
#define rc(s) return cout<<s,0
#define INF 1000000005
#define LINF 1000000000000000005
using namespace std;
int h, w, a, b;
int main(){
    ios_base :: sync_with_stdio(0); cin.tie(); cout.tie();
    cin >> h >> w >> a >> b;
    for(int i=1; i<=n; ++i){
        for(int j=1; j<=m; j++){
            if((i<=a && j<=b) || (i>a && j>b) ) cout<<1;
            else cout<<0;
        }
        cout<<"\n";
    }

}



Compiler output:
a.cc: In function 'int main()':
a.cc:25:21: error: 'n' was not declared in this scope
   25 |     for(int i=1; i<=n; ++i){
      |                     ^
a.cc:26:25: error: 'm' was not declared in this scope
   26 |         for(int j=1; j<=m; j++){
      |                         ^
Language: C++

#include <stdio.h>

long long mdc(long long x, long long y) {
    int mod = 998244353;
    if (y==0) 
        return x%mod;
    else
        return mdc(y,x % y)%mod;
}

long long mmc(long long x, long long y) {
    int mod = 998244353;
    long long divi;
    if(y == 0) 
        return x;
    else
        divi = (x*y)/(mdc(x,y));
    return divi%mod; 
}   

long long int acumula(int n, int v[], int operacao()) {
    int mod = 998244353;
    long long acumulado = 0;
    for (int i=0; i<n; ++i) {
        if (i == n-1) {
            break;
        }
        for (int j=i+1; j<n; ++j) {
            acumulado += operacao((v[i]%mod), (v[j]%mod));
            acumulado = acumulado%mod;
        }
    }
    return acumulado%mod;
}

int main() {

    int n;
    scanf("%d", &n);
    int v[n];
    for (int i=0; i<n; ++i)
        scanf("%d", &v[i]);
        
    printf("%lld\n", acumula(n, v, mmc));
    return 0;
}

Compiler output:
a.cc: In function 'long long int acumula(int, int*, int (*)())':
a.cc:29:34: error: too many arguments to function
   29 |             acumulado += operacao((v[i]%mod), (v[j]%mod));
      |                          ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:44:36: error: invalid conversion from 'long long int (*)(long long int, long long int)' to 'int (*)()' [-fpermissive]
   44 |     printf("%lld\n", acumula(n, v, mmc));
      |                                    ^~~
      |                                    |
      |                                    long long int (*)(long long int, long long int)
a.cc:21:43: note:   initializing argument 3 of 'long long int acumula(int, int*, int (*)())'
   21 | long long int acumula(int n, int v[], int operacao()) {
      |                                       ~~~~^~~~~~~~~~
Language: Java

import java.util.*;
 
public class Main {
    public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int N = sc.nextInt();
      int K = sc.nextInt();
      
      int P[] = new int[N];
        
      for (int i = 0; i < N; i++) {
        P[i] = sc.nextInt();
      }
      
      int same_count = 0;
      int motionless_count = 0;
      boolean order = true;
      
      for (int i = 0; i < N - K + 1; i++) {
        order = true;
        
        if (i == N - K) {
          for (int j = 0; j < K - 1; j++) {
            if (P[i + j] > P[i + j + 1]) {
              break;
            }
            if (j == K - 2) {
              System.out.println("i:" + i);
              System.out.println("j:" + j);            
              motionless_count += 1;
            }
          break;
        }
        
        for (int j = 0; j < K + 1; j++) {
          
          if (P[i] > P[i + j]) {
            break;
          }
          if (P[i + K] < P[i + j]) {
            break;
          }
          if (j == K) {
            same_count += 1;
          }
          
          if (order && j < K - 1 && P[i + j] > P[i + j + 1]) {
            order = false;
          }
          if (order && j == K - 2) {
            System.out.println("i:" + i);
            System.out.println("j:" + j);
            motionless_count += 1;
          }          
        }
      }
      System.out.println(motionless_count);
      if (motionless_count > 1) {
        motionless_count = 1;
      } else {
        motionless_count = 0;
      }
      System.out.print(N - K + 1 - same_count - motionless_count);
    }
}


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

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

int main() {
  int x,y,a,b;
  scanf("%d%d%d%d",&x,&y,&a,&b);
  for(int i = 0;i < b;i++){
  	for(int j = 0;j < a;j++) printf("0");
    for(int j = a;j < y;j++) printf("1");
  }
  for(int i = b;i < x;i++){
    for(int j = 0;j < a;j++) printf("1");
    for(int j = a;j < y;j++) printf("0");
  }
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'scanf' was not declared in this scope
    6 |   scanf("%d%d%d%d",&x,&y,&a,&b);
      |   ^~~~~
a.cc:8:34: error: 'printf' was not declared in this scope
    8 |         for(int j = 0;j < a;j++) printf("0");
      |                                  ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | include<bits/stdc++.h>
a.cc:9:30: error: 'printf' was not declared in this scope
    9 |     for(int j = a;j < y;j++) printf("1");
      |                              ^~~~~~
a.cc:9:30: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:12:30: error: 'printf' was not declared in this scope
   12 |     for(int j = 0;j < a;j++) printf("1");
      |                              ^~~~~~
a.cc:12:30: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:13:30: error: 'printf' was not declared in this scope
   13 |     for(int j = a;j < y;j++) printf("0");
      |                              ^~~~~~
a.cc:13:30: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

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

int main()
{
	ll w, h, a, b;
  	cin>>h>>w>>a>>b;
  
	if(b> h - b || a > w - a)
    {
      cout<<-1<<endl;
      return 0;
    }
  	
  	for(int i = 0; i < h; i++)
    {
      for(int j = 0; j < w; j++)
      {
        if((j<A && i < B) || (j >=A && i >=B)
          cout<<0;
        else
           cout<<1;
      }
           cout<<endl;
           }
      return 0;
           }          
           

Compiler output:
a.cc: In function 'int main()':
a.cc:20:15: error: 'A' was not declared in this scope
   20 |         if((j<A && i < B) || (j >=A && i >=B)
      |               ^
a.cc:20:24: error: 'B' was not declared in this scope
   20 |         if((j<A && i < B) || (j >=A && i >=B)
      |                        ^
a.cc:22:9: error: expected primary-expression before 'else'
   22 |         else
      |         ^~~~
a.cc:21:19: error: expected ')' before 'else'
   21 |           cout<<0;
      |                   ^
      |                   )
   22 |         else
      |         ~~~~       
a.cc:20:11: note: to match this '('
   20 |         if((j<A && i < B) || (j >=A && i >=B)
      |           ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); i++) 
#define FOR(i, a, b) for(int (i) = a; (i) < (int)b; i++)
#define RREP(i, n) for(int (i)=((int)(n)-1); (i)>=0; i--)
#define RFOR(i, a, b) for(int (i) =((int)(b)-1); (i)>=(int)a; i--)
#define ALL(v) (v).begin(),(v).end()
#define MOD 1000000007
#define FI first
#define SE second
#define MP make_pair
#define PB push_back
#define SZ(x)  (int)x.size()
#define SP(x)  setprecision((int)x)


using namespace std ;
typedef long long ll;
typedef vector<int> vint;
typedef vector<vint> vvint;
typedef vector<string> vstr;
typedef pair<int, int> pii;
const int INF = 1e9;
const ll LINF = 1e18;
const double EPS = 1e-9;
ll gcd(ll a, ll b) {return b ? gcd(b, a % b) : a;} //最大公約数
ll lcm(ll a, ll b) {return a / gcd(a, b) * b;} //最小公倍数


int main()
{
  int h, w, a, b ;
  cin >> h >> w >> a >> b ;
  
  vector<vector<int>> num(h,vector<int>(w)) ;
  
  REP(i,a){
    REP(j,b){
      num.at(i).at(j) = 1 ;
    }
    FOR(j,b,h){
      num.at(i).at(j) = 0 ;
    }
  }
  FOR(i,a,w){
    REP(j,b){
      num.at(i).at(j) = 0 ;
    }
    FOR(j,b,h){
      num.at(i).at(j) = 1 ;
    }
  }
  
  REP(i,h){
    REP(i,w){
      cout << num.at(i).at(j) ;
    }
    cout << endl ;
  }
    
  
    


  return 0 ;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:55:28: error: 'j' was not declared in this scope
   55 |       cout << num.at(i).at(j) ;
      |                            ^
Language: C++

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

const int MAX_N = 1006;
int N, M, A, B;
int g[MAX_N][MAX_N];

void solve()
{
	for(int i=0;i<N;++i){
		for(int j=0;j<M;++j){
			if(i<B && j<A) cout << 0 << " ";
			else if(i>=B && j<A) cout << 1 << " ";
			else if(i<B && j>=A) cout << 1 << " ";
			else cout << 0 << " ";
		}
		cout << "\n";
	}
}

int main()
{
	cin >> N >> M >> A >> B;
	solve()
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:16: error: expected ';' before 'return'
   25 |         solve()
      |                ^
      |                ;
   26 |         return 0;
      |         ~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define repone(i,n) for(int i=1;i<(int)(n);++i)
#define repo(i,o,n) for(int i=o;i<(int)(n);++i)
#define Rep(j,n) for(int j=0;j<(int)(n);++j)
#define Repo(j,o,n) for(int j=o;j<(int)(n);++j)
#define Repone(j,n) for(int j=1;j<(int)(n);++j)
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define int long long
#define pb(a) push_back(a)
#define eraser(v,i) (v).erase(v.begin()+(i))
#define pbpair(a,b) push_back(make_pair(a,b))
#define MOD 1000000007
#define INF 9223372036854775807
#define pairint pair<int,int>
int num[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
bool uru(int checkyear){if(checkyear%4==0){if(checkyear%100!=0||checkyear%400==0)return true;}return false;}
int gcd( int x, int y ){return y ? gcd(y, x%y) : x;}
signed main()
{
int x=0,y=0,z=0,w=0,n=0,m=0;
std::cin >> x>>y>>z>>w;
int a[x][y];
  rep(i,x){
    Rep(j,y){
            a[i][j]=0;
      if(i<w  ^ j<a)a[i][j]=1;
    }
  }

rep(i,x){
  Rep(j,y){
    std::cout << a[i][j];
  }
  std::cout  << '\n';
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   29 |       if(i<w  ^ j<a)a[i][j]=1;
      |                 ~^~
Language: Java

//第 4 問: ABC 087 B - Coins (200 点)
     
    import java.util.Scanner;
     
    public class TEST1{
     
    	public static void main(String[] args){
     
    		Scanner scan = new Scanner(System.in);
     
    		int H,W,A,B = 0;
     
    		H = scan.nextInt();
    		W = scan.nextInt();
    		A = scan.nextInt();
    		B = scan.nextInt();
     
    		scan.close();
     
    		for(int i=0; i < H; i++)
    		{
    			for(int j=0; j < W; j++)
    			{
    				if( (j<A && i<B) || (j>=A && i>=B) ){
    					System.out.print(1);
    				}
     
    				/*
    				else if(j>=A && i>=B) {
    					System.out.print(1);
    				}
    				*/
     
    				else
    				{
    					System.out.print(0);
    				}
    			}
    			 System.out.println();
    		}
    	}
    }
     


Compiler output:
Main.java:5: error: class TEST1 is public, should be declared in a file named TEST1.java
    public class TEST1{
           ^
1 error
Language: C++

//第 4 問: ABC 087 B - Coins (200 点)

import java.util.Scanner;

public class TEST1{

	public static void main(String[] args){

		Scanner scan = new Scanner(System.in);

		int H,W,A,B = 0;

		H = scan.nextInt();
		W = scan.nextInt();
		A = scan.nextInt();
		B = scan.nextInt();

		scan.close();

		for(int i=0; i < H; i++)
		{
			for(int j=0; j < W; j++)
			{
				if( (j<A && i<B) || (j>=A && i>=B) ){
					System.out.print(1);
				}

				/*
				else if(j>=A && i>=B) {
					System.out.print(1);
				}
				*/

				else
				{
					System.out.print(0);
				}
			}
			 System.out.println();
		}
	}
}



Compiler output:
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.Scanner;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: expected unqualified-id before 'public'
    5 | public class TEST1{
      | ^~~~~~
Language: C

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


int main(void){

int sort=0;
int min,max;
int Min,Max;
int min_bef=-1;
int Def;
int x;
int k_n;
int *k_p;
int n;
int i,j,k;
int *p;
int *p_s;

(void)scanf("%d %d",&n,&k_n);
p = malloc((sizeof(*p)*n);
p_s = p;
	for(i=0;i<n;i++,p++){
	(void)scanf("%d",p);
	}
k_p = p_s;

	for(i=0;i<n-k_n+1;i++){
		for(j=0;j<k_n-1;j++){
		min = k_p[0];
		max = k_p[k_n-1];
			if(k_p[i]<k_p[i+1]){
			Min=k_p[i];
			Max=k_p[i+1];
			sort++;
			}else{

			Min=k_p[i+1];
			Max=k_p[i];
			}
		if(min>Min)	
		min=-1;

		if(max<Max)
		max=-1;
		}

		if(sort+1 == k_n){
		x++;
			if(Def==0){
			Def=-1;	
			}else {
			x--;
			}
		}else if((min_bef!=-1) && (Max != -1)){
		x--;
		}
	min_bef=min;
	}
printf("%d",x);

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:21:26: error: expected ')' before ';' token
   21 | p = malloc((sizeof(*p)*n);
      |           ~              ^
      |                          )
main.c:62:10: error: expected ';' before '}' token
   62 | return 0;
      |          ^
      |          ;
   63 | 
   64 | }
      | ~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int h, w, a, b;
  cin >> h >> w >> a >> b;
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      int x = (j < a) ^ (i < b);
      cout << x;
    }
    cout << '\n';
  }
  return 0;
}
/**
 *    author:  tourist
 *    created: 21.09.2019 15:49:47       
**/
#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int h, w, a, b;
  cin >> h >> w >> a >> b;
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      int x = (j < a) ^ (i < b);
      cout << x;
    }
    cout << '\n';
  }
  return 0;
}


Compiler output:
a.cc:27:5: error: redefinition of 'int main()'
   27 | int main() {
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main() {
      |     ^~~~
Language: C++

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

int main() {
	int H, W, A, B;
	cin >> H >> W >> A >> B;
	int mat[H][W] = { { 0 }; };

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:32: error: expected '}' before ';' token
    7 |         int mat[H][W] = { { 0 }; };
      |                         ~      ^
a.cc: At global scope:
a.cc:9:1: error: expected declaration before '}' token
    9 | }
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define lli long long int
#define REP(i,s,n) for(int i=s;i<n;i++)
#define MOD 1000000007
#define NUM 2520
#define INF (1LL<<50)
#define DEBUG 0
#define mp(a,b) make_pair(a,b)
#define SORT(V) sort(V.begin(),V.end())

signed main(){

	lli h,w,a,b;
	cin>>h>>w>>a>>b;

	for(lli i=0;i<h;i++){
		for(lli j=0;j<w;j++){
			bool s0 = (i<h-b);
			bool s1 = (j>=w-a);

			if(s0^s1)cout<<1
			else cout<<0;
			if(j!=w-1)cout<<" ";
		}
		cout<<endl;
	}


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:41: error: expected ';' before 'else'
   24 |                         if(s0^s1)cout<<1
      |                                         ^
      |                                         ;
   25 |                         else cout<<0;
      |                         ~~~~
Language: C

#include<stdio.h>

int main(void){

int h,w,a,b;
int i,j,k,m;

scanf("%d%d%d%d",&h&w&a&b);

	while(1){
		if(!(1<=h)){
				printf("NO");
				continue;
			   }

		if(!(w<=1000)){
				printf("NO");
				continue;
			      }
		if(!(0<=a)){
				printf("NO");
				continue;
			   }
		if(!((2*a)<=w)){
				printf("NO");
				continue;
			       }
		if(!(0<b)){
				printf("NO");
				continue;

			  }
		if(!((2*b)<=h)){
				printf("NO");
				continue;
			       }
		for(i=0;i<b;i++){
				for(j=0;j<w;j++){
						for(k=0;k<a;k++)
						printf("0");
						
						for(k=0;k<(w-a);k++)
						printf("1");
						printf("\n");
						}
				}
		for(i=0;i<(h-b);i++){
					for(j=0;j<w;j++){
							for(k=0;k<a;k++)
							printf("1");

							for(k=0;k<(w-a);k++)
							printf("0");
							printf("\n");
							}
				    }
		}
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:20: error: invalid operands to binary & (have 'int *' and 'int')
    8 | scanf("%d%d%d%d",&h&w&a&b);
      |                  ~~^
      |                  |
      |                  int *
Language: C

#include<stdio.h>

int main(void){

unsigned int h,w,a,b;
int i,j,k,m;

scanf("%d%d%d%d",&h&w&a&b);

	while(1){
		if(!(1<=h)){
				printf("NO");
				continue;
			   }

		if(!(w<=1000)){
				printf("NO");
				continue;
			      }
		if(!(0<=a)){
				printf("NO");
				continue;
			   }
		if(!((2*a)<=w)){
				printf("NO");
				continue;
			       }
		if(!(0<b)){
				printf("NO");
				continue;

			  }
		if(!((2*b)<=h)){
				printf("NO");
				continue;
			       }
		for(i=0;i<b;i++){
				for(j=0;j<w;j++){
						for(k=0;k<a;k++)
						printf("0");
						
						for(k=0;k<(w-a);k++)
						printf("1");
						printf("\n");
						}
				}
		for(i=0;i<(h-b);i++){
					for(j=0;j<w;j++){
							for(k=0;k<a;k++)
							printf("1");

							for(k=0;k<(w-a);k++)
							printf("0");
							printf("\n");
							}
				    }
		}
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:20: error: invalid operands to binary & (have 'unsigned int *' and 'unsigned int')
    8 | scanf("%d%d%d%d",&h&w&a&b);
      |                  ~~^
      |                  |
      |                  unsigned int *
Language: C

#include<stdio.h>

int main(void){

unsigned int h,w,a,b;
int i,j,k,m

scanf("%d%d%d%d",&h&w&a&b);

	while(1){
		if(!(1<=h)){
				printf("NO");
				continue;
			   }

		if(!(w<=1000)){
				printf("NO");
				continue;
			      }
		if(!(0<=a)){
				printf("NO");
				continue;
			   }
		if(!((2*a)<=w)){
				printf("NO");
				continue;
			       }
		if(!(0<b)){
				printf("NO");
				continue;

			  }
		if(!((2*b)<=h)){
				printf("NO");
				continue;
			       }
		for(i=0;i<b;i++){
				for(j=0;j<w;j++){
						for(k=0;k<a;k++)
						printf("0");
						
						for(k=0;k<(w-a);k++)
						printf("1");
						printf("\n");
						}
				}
		for(i=0;i<(h-b);i++){
					for(j=0;j<w;j++){
							for(k=0;k<a;k++)
							printf("1");

							for(k=0;k<(w-a);k++)
							printf("0");
							printf("\n");
							}
				    }
		}
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    8 | scanf("%d%d%d%d",&h&w&a&b);
      | ^~~~~
Language: C

#include<stdio.h>

int main(void){

unsigned int h,w,a,b;
int i,j,k,m

scanf("%d%d%d%d",&h,&w,&a,&b);

	while(1){
		if(!(1<=h)){
				printf("NO");
				continue;
			   }

		if(!(w<=1000)){
				printf("NO");
				continue;
			      }
		if(!(0<=a)){
				printf("NO");
				continue;
			   }
		if(!((2*a)<=w)){
				printf("NO");
				continue;
			       }
		if(!(0<b)){
				printf("NO");
				continue;

			  }
		if(!((2*b)<=h)){
				printf("NO");
				continue;
			       }
		for(i=0;i<b;i++){
				for(j=0;j<w;j++){
						for(k=0;k<a;k++)
						printf("0");
						
						for(k=0;k<(w-a);k++)
						printf("1")
						printf("\n");
						}
				}
		for(i=0;i<(h-b);i++){
					for(j=0;j<w;j++){
							for(k=0;k<a;k++)
							printf("1");

							for(k=0;k<(w-a);k++)
							printf("0");
							printf("\n");
							}
				    }
		}
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    8 | scanf("%d%d%d%d",&h,&w,&a,&b);
      | ^~~~~
main.c:43:60: error: expected ';' before 'printf'
   43 |                                                 printf("1")
      |                                                            ^
      |                                                            ;
   44 |                                                 printf("\n");
      |                                                 ~~~~~~
Language: C++

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

int main() {
  int H,W,A,B;
  cin>>H>>W>>A>>B;
  rep(i,H){
    if(i<A){
      rep(j,W){
        if(j<B) cout<<0;
        else cout<<1;
      }
    }
    else {
     rep(j,W){
      if(j<B) cout<<1;
      else cout<<0;
    }
  }     
  return 0;
}


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

//#include <bits/stdc++.h>
#include <iostream>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define inf 1e+9
#define rep(i, n) REP(i, 0, n)
#define all(v) v.begin(), v.end()
#define msg(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
#define pri(a) cout << a << endl;

int main(){
  cin.tie(nullptr);
	ios::sync_with_stdio(false);

  int h,w,a,b;
  cin >> h >> w >> a >> b;

  rep(i,h){
    rep(j,w){
      if(i<a && j<b){
        cout << "0";
      }
      else if(i>=a && j>=b){
        cout << "0";
      }
      else{
        cout << "1";
      }
    }
    cout << endl;
  }
}


Compiler output:
a.cc:6:9: error: 'vector' does not name a type
    6 | typedef vector<int> vint;
      |         ^~~~~~
Language: C++

#include <bits/stdc++.h>
#define l_ength size
const int inf = (1<<30);
const int mod = 1000000007;
using ll = long long;
using namespace std;

int no(){
  cout << "No" << endl;
  return 0;
}

int main(){
  int h, w, c, d; cin >> h >> w >> c >> d;
  if( c > w/2 || d > h/2 ) return no();
  if( c == 0 && d == 0 ){
    for( int i = 0; i < h; ++i ){
      for( int j = 0; j < w; ++j ){
        cout << 1;
      } cout << endl;
    }
  } else if( c == 0 ){
    if( w != 1 ) return no();
    for( int i = 0; i < h; ++i ){
      if( i < d ) cout << 0 << endl;
      else cout << 1 << endl;
    }
  } else if( d == 0 ){
    if( h != 1 ) return no();
    for( int i = 0; i < w; ++i ){
      if( i < d ) cout << 0;
      else cout << 1;
    } cout << endl;
  } else if( a != 0 || c != d ){
    return no();
  } else {
    int cnt = 0;
    for( int i = 0; i < h; ++i ){
        for( int k = 0; k < cnt; ++k ){
          cout << 1;
        }
        for( int k = 0; k < i-cnt; ++k ){
          cout << 0;
        }
        int s = 0;
        for( int k = w-c+cnt; k < w & s < c; ++k ){
          ++s;
          cout << 1;
        }
        for( int k = i+c-cnt; k < w; ++k ) cout << 0;
        if( i >= h-c ) ++cnt;
        cout << endl;
      }
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:34:14: error: 'a' was not declared in this scope
   34 |   } else if( a != 0 || c != d ){
      |              ^
Language: C++

#include<string>
using namespace std;
signed main() {
  int h,w,a,b;
    cin>>h>>w>>a>>b;
  for(int i=0;i<h;i++){
    if(i<b){
    	string s(a,'0');
    	string t(w-a,'1');
    	s+=t;
    	cout<<s<<endl;
    }
    else{
      string s(a,'1');
    	string t(w-a,'0');
    	s+=t;
    	cout<<s<<endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>>h>>w>>a>>b;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<string>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout<<s<<endl;
      |         ^~~~
a.cc:11:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:18: error: 'endl' was not declared in this scope
   11 |         cout<<s<<endl;
      |                  ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<string>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:17:9: error: 'cout' was not declared in this scope
   17 |         cout<<s<<endl;
      |         ^~~~
a.cc:17:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:18: error: 'endl' was not declared in this scope
   17 |         cout<<s<<endl;
      |                  ^~~~
a.cc:17:18: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<bits/stdc++.h>
#include<string>
using namespace std;
signed main() {
  ll h,w,a,b;
    cin>>h>>w>>a>>b;
  for(int i=0;i<h;i++){
    if(i<b){
    	string s(a,'0');
    	string t(w-a,'1');
    	s+=t;
    	cout<<s<<endl;
    }
    else{
      string s(a,'1');
    	string t(w-a,'0');
    	s+=t;
    	cout<<s<<endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'll' was not declared in this scope
    5 |   ll h,w,a,b;
      |   ^~
a.cc:6:10: error: 'h' was not declared in this scope
    6 |     cin>>h>>w>>a>>b;
      |          ^
a.cc:6:13: error: 'w' was not declared in this scope
    6 |     cin>>h>>w>>a>>b;
      |             ^
a.cc:6:16: error: 'a' was not declared in this scope
    6 |     cin>>h>>w>>a>>b;
      |                ^
a.cc:6:19: error: 'b' was not declared in this scope
    6 |     cin>>h>>w>>a>>b;
      |                   ^
Language: C++

#include<string>
using namespace std;
signed main() {
  ll h,w,a,b;
    cin>>h>>w>>a>>b;
  for(int i=0;i<h;i++){
    if(i<b){
    	string s(a,'0');
    	string t(w-a,'1');
    	s+=t;
    	cout<<s<<endl;
    }
    else{
      string s(a,'1');
    	string t(w-a,'0');
    	s+=t;
    	cout<<s<<endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'll' was not declared in this scope
    4 |   ll h,w,a,b;
      |   ^~
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>>h>>w>>a>>b;
      |     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<string>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:5:10: error: 'h' was not declared in this scope
    5 |     cin>>h>>w>>a>>b;
      |          ^
a.cc:5:13: error: 'w' was not declared in this scope
    5 |     cin>>h>>w>>a>>b;
      |             ^
a.cc:5:16: error: 'a' was not declared in this scope
    5 |     cin>>h>>w>>a>>b;
      |                ^
a.cc:5:19: error: 'b' was not declared in this scope
    5 |     cin>>h>>w>>a>>b;
      |                   ^
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout<<s<<endl;
      |         ^~~~
a.cc:11:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:18: error: 'endl' was not declared in this scope
   11 |         cout<<s<<endl;
      |                  ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<string>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:17:9: error: 'cout' was not declared in this scope
   17 |         cout<<s<<endl;
      |         ^~~~
a.cc:17:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:18: error: 'endl' was not declared in this scope
   17 |         cout<<s<<endl;
      |                  ^~~~
a.cc:17:18: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
int sz[200001], par[200001];
int find(int idx){
    while(idx!=par[idx]){
        idx=par[idx];
    }
    return idx;
}
void join(int x, int y){
    if(x==y) return;
    if(sz[x]<sz[y]){
        swap(x,y);
    }
    sz[x]+=sz[y];
    sz[y]=0;
    par[y]=x; 
}
int main() {
	// your code goes her
	int n, k,cnt[200001],p[200001],ans=0; 
	cin>>n>>k;
  cnt[1]=0;
	for(int i=1; i<=n; i++){
	    cin>>p[i]; 
	    if(i<=n-k+1) sz[i]=1,par[i]=i; 
	    if(i>1&&p[i]>p[i-1])cnt[i]=cnt[i-1];
	    cnt[i]++;
	    //ans-=(cnt>=k); 
	}
	set<int> s; 
	for(int i=1; i <=k; i++){
	    s.insert(p[i]);
	}
	for(int i=k+1;i<=n;i++){
	    s.erase(p[i-k]);
	    if(p[i-k]< *s.begin() && *s.rbegin() < p[i]) join(find(i-k),find(i-k+1)); 
	    s.insert(p[i]);
	}
	for(int i=1;i<=n-k+1;i++) ans+=(sz[i]!=0 && cnt[i+k-1]<k)
	cout<<ans<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:66: error: expected ';' before 'cout'
   40 |         for(int i=1;i<=n-k+1;i++) ans+=(sz[i]!=0 && cnt[i+k-1]<k)
      |                                                                  ^
      |                                                                  ;
   41 |         cout<<ans<<endl;
      |         ~~~~
Language: C++

#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#include<string>
#include<iostream>
#include<vector>
#include<cstdlib>
using namespace std;
 
template <class T> using V = vector<T>;
 
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
 
const long long INF = 1LL << 60;
 
using ll = long long;
using db = double;
using st = string;
using ch = char;
using bl = bool;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
using vbl = V<bl>;

 
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define rFOR(i,a,b) for(ll i=(a);i>=(b);i--)
#define oFOR(i,a,b) for(ll i=(a);i<(b);i+=2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn,(a).en)
#define REV(a) reverse((a).bgn,(a).en)
#define M(a,b) max(a,b)
#define rM(a,b) min(a,b)
#define fi first
#define se second
#define sz size()
#define gcd(a,b) __gcd(a,b)
#define co(a) cout<<a<<endl;
#define ci(a) cin>>a;
  
 

ll sum(ll n) {
ll m=0;
  FOR(i,0,20){
    m+=n%10;
    n/=10;
    if(n==0){
      break;
    }
  }
  return m;
}
 
 
const int MAX = 510000;
const int MOD = 1000000007;
 
long long fac[MAX], finv[MAX], inv[MAX];
 
void Comuse() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}
 
 
#define comuse Comuse()
 
ll combi(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
 
 
 
 
ll lcm(ll a,ll b){
  ll n;
  n=a/gcd(a,b)*b;
  return n;
}




 
/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/
 
 
signed main() {
  ll h,w,a,b;
    ci(h>>w>>a>>b);

  FOR(i,0,h){
    FOR(j,0,w){
      st s="";
      if(i<b&&j<a){
        s+='0';
      }

      else if(i>=b&&j>=a){
        s+='0';
      }

      else{
        s+='1';
      }
    }
    cout<<s<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:137:11: error: 's' was not declared in this scope
  137 |     cout<<s<<endl;
      |           ^
Language: Java

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

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int K = sc.nextInt();
    int[] P = new int[N];
    Arrays.setAll(P, i -> sc.nextInt());
    int result = 1;
    TreeSet<Integer> ts = new TreeSet<Integer>();
    int over = 0;
    int count = 1;
    for (int i = 0; i < N; i++) {
      ts.add(P[i]);
      if (i >= K) {
        if (ts.first() != P[i - K] || ts.last() != P[i])
          result++;
        ts.remove(P[i - K]);
      }
      if (i >= 1) {
        if (P[i - 1] < P[i]) {
          count++;
          if (count => K)
            over++;
        } else
          count = 1;
      }
    }
    System.out.println(result - (over >= 2 ? over - 1 : 0));
  }
}

Compiler output:
Main.java:26: error: illegal start of expression
          if (count => K)
                     ^
1 error
Language: C++

#include "bits/stdc++.h"
using namespace std;
int main(){
    int H, W, A, B;
    cin >> H >> W >> A >> B;
    vector<vector <int> >table(H, vector<int>(W));
    if(A == 0){
        for(int i = 0; i < B; i++){
            for(int j = 0; j < W; j++)
            table.at(i).at(j) = 1;
        }
        for(int i = 0; i < H; i++){
        for(int j = 0; j < W; j++){
            if(j != W - 1)
            cout << table.at(i).at(j);
            else 
            cout << table.at(i).at(j) << endl;
        }
    }
    }
    else if(B == 0 && A != 0){
         for(int j = 0; j < A; j++){
            for(int i = 0; i < H; i++)
            table.at(i).at(j) = 1;
        }      
        for(int i = 0; i < H; i++){
        for(int j = 0; j < W; j++){
            if(j != W - 1)
            cout << table.at(i).at(j);
            else 
            cout << table.at(i).at(j) << endl;
        }
    }
    }
    else{
    for(int i = 0; i < H; i++){
        for(int j = 0; j < B; j++){
            table.at(i).at((A * (i + 1) + j) % W) = 1;
            }
        }
    if(H * A != W * B && H * A != W * (H - B))
    cout << "No" << endl;
    else if((W * A < H && W * (H - A) < H)|| (H * B < W && H * (W - B))
    cout << "No" << endl;
    else if(H * A % W != 0 && H * A % (W - B) != 0)
    cout << "No" << endl;
    else{
    for(int i = 0; i < H; i++){
        for(int j = 0; j < W; j++){
            if(j != W - 1)
            cout << table.at(i).at(j);
            else 
            cout << table.at(i).at(j) << endl;
        }
    }
    }
    }
    return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:72: error: expected ';' before 'cout'
   43 |     else if((W * A < H && W * (H - A) < H)|| (H * B < W && H * (W - B))
      |                                                                        ^
      |                                                                        ;
   44 |     cout << "No" << endl;
      |     ~~~~                                                                
a.cc:45:5: error: expected primary-expression before 'else'
   45 |     else if(H * A % W != 0 && H * A % (W - B) != 0)
      |     ^~~~
a.cc:44:26: error: expected ')' before 'else'
   44 |     cout << "No" << endl;
      |                          ^
      |                          )
   45 |     else if(H * A % W != 0 && H * A % (W - B) != 0)
      |     ~~~~                  
a.cc:43:12: note: to match this '('
   43 |     else if((W * A < H && W * (H - A) < H)|| (H * B < W && H * (W - B))
      |            ^
Language: C++

def main():
    h, w, a, b = map(int, input().split())
    r = [w - a] * h
    c = [h - b] * w
    t = [[0] * w for _ in range(h)]
    for y in range(w, -1, -1):
        x = (b * y + (h - b) * (w - y) - h * (w - a)) / (2 * a - w)
        if int(x) == x and 0 <= x <= h:
            x = int(x)
            break
    else:
        print("No")
        exit()
    for i in range(x):
        r[h - 1 - i] = a
    for i in range(y):
        c[w - 1 - i] = b
    for i in range(h):
        j = 0
        while r[i] > 0:
            if c[j] == 0:
                j += 1
                continue
            t[i][j] = 1
            r[i] -= 1
            c[j] -= 1
            j += 1
    for x in t:
        print(*x, sep="")

main()


Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def main():
      | ^~~