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

#include <iostream>
using namespace std;

int abs(a,b){
  if(a>b){
    return a-b;
  }else{
    return b-a;
  }
}

int main(){
  int n;
  cin>>n;
  int a[n];
  for(int i=0;i<n;i++){
    cin>>a[i];
  }
  int pre;
  int ans=0;
  for(int i=1;i<n;i++){
    pre=0;
    for(int j=1;j<n;j++){
      if(j==i){
	continue;
      }
      ans+=a[j]-a[pre];
      pre=j;
    }
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc:4:9: error: 'int abs' redeclared as different kind of entity
    4 | int abs(a,b){
      |         ^
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdlib.h:980:12: note: previous declaration 'int abs(int)'
  980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
      |            ^~~
a.cc:4:9: error: 'a' was not declared in this scope
    4 | int abs(a,b){
      |         ^
a.cc:4:11: error: 'b' was not declared in this scope
    4 | int abs(a,b){
      |           ^
Language: C++

#include <cstdio>
#include <iostream>
#include <cstdlib>
using namespace std;

int main(){
  long long a[100001];
  int n;
  cin >> n;
  a[0] = 0;
  for (int i = 1; i <= n; i++){
    scanf("%lld", &a[i]);
  }
  for (int i = 1; i <= n; i++){
    long long ans = 0;
    for (int j = 0; j <= n; j++){
      if (j + 1 == i){
        ans += abs(a[j] - a[(j+2)%(n+1)]);
        j++;
      } else {
        ans += abs(a[j] - a[(j+1)%(n+1)]);
      }
    }
      cout << ans << "\n";
  }



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

import java.io.*;
import java.util.*;

public class Solution {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int W = sc.nextInt(), B = sc.nextInt(); 
    char ans[][] = new char[105][105]; 
    for(int i = 0; i<=49; i++){
      for(int j = 0; j<100; j++){
        ans[i][j] = '#';
      }
    }
    for(int i = 50; i<=99; i++){
      for(int j = 0; j<100; j++){
        ans[i][j] = '.'; 
      }
    }
    W--; 
    B--;
    for(int i = 0; i<=49; i++){
      for(int j = 0; j<100; j++){
        if(i%2 == 0 && j%2 == 0 && W > 0){
          ans[i][j] = '.'; 
          W--; 
        }
      }
    }
    for(int i = 99; i>=50; i--){ 
      for(int j = 0; j<100; j++){ 
        if(i%2 == 1 && j%2 == 0 && B > 0){
          ans[i][j] = '#';
          B--;
        }
      }
    }
    System.out.println(100 + " " + 100);
    for(int i = 0; i<100; i++){
      for(int j = 0; j<100; j++){
        System.out.print(ans[i][j]); 
      }
      System.out.println();
    }
  }
}


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

#include <bits/stdc++.h>
using namespace std;
int main(void)
{
	int a, b;
	cin >> a >> b;
	int maxv = max(a, b);
	int minv = min(a, b);
	int c = minv - 1;
	int d = maxv - c;

	int count = 0;
	bool da[100][100];
	fill(da[0], da[0]+100*100, false);
	for (int i = 0; i < 25; i++) {
		for (int j = 0; j < 25; j++) {
			if (!(count < c))
				goto end;
			int ox = j*4;
			int oy = i*4;
			da[oy+0][ox+0] = true;
			da[oy+0][ox+1] = true;
			da[oy+0][ox+2] = true;
			da[oy+1][ox+0] = true;
			da[oy+1][ox+2] = true;
			da[oy+2][ox+0] = true;
			da[oy+2][ox+1] = true;
			da[oy+2][ox+2] = true;
			count++;
		}
	}
end:

	count = 0;
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 50; j++) {
			if (!(count < d))
				goto end2;
			int oy = 80+i*2;
			int ox = j*2;
			da[oy][ox] = true;
			count++;
		}
	}
end2:

  
  	cout << 100 < " " << 100 << endl;
	for (int y = 0; y < 100; y++) {
		for (int x = 0; x < 100; x++) {
			if (minv == maxv) {
				if (da[y][x])
					putchar('#');
				else
					putchar('.');
			} else {
				if (maxv == b) {
					if (da[y][x])
						putchar('#');
					else
						putchar('.');
				} else {
					if (da[y][x])
						putchar('.');
					else
						putchar('#');
				}
			}
		}
		cout << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:27: error: invalid operands of types 'const char [2]' and 'int' to binary 'operator<<'
   48 |         cout << 100 < " " << 100 << endl;
      |                       ~~~ ^~ ~~~
      |                       |      |
      |                       |      int
      |                       const char [2]
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int, int>
#define mod 1000000007
using ll = long long;
using namespace std;
*/
int main(){
  int a,b;
  cin >> a >> b;
  a--;
  b--;
  vvi color(100, vi(100,0)); //0:black, 1: white
  for(int y = 50; y < 100; y++){
    rep(x, 100) color[y][x] = 1;
  }
  cout << "100 100" << endl;
  rep(y, 50){
    if(y % 2 == 0){
      for(int x = 0; x < 100; x++){
        if(a && x % 2 == 0){
          cout << '.';
          a--;
        }else cout << '#';
      }
    }else{
      rep(x, 100)
      cout << '#';
    }
    cout << endl;
  }
  for(int y = 99; y >= 50; y--){
    if(y % 2 == 0){
      for(int x = 0; x < 100; x += 2){
        if(b){
          //cout << '#';
          color[y][x] = 0;
          b--;
        }//else cout << '.';
      }
    }else{
      
    }
  }
  for(int y = 50; y < 100; y++){
    rep(x, 100){
      if(!color[y][x]) cout << '#';
      else cout << '.';
    }
    cout << endl;
  }
}

Compiler output:
a.cc:9:2: error: expected unqualified-id before '/' token
    9 | */
      |  ^
Language: C++

#include <cstdio>
#include <climits>
#include <cmath>
#include <iostream>
#include <iomanip>
#include <string>
#include <cstdio>
#include <climits>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <utility>
#include <queue>
#include <cstring>
#include <set>
#include <map>
#define rep(i, n) for (int i = 0; i < int(n); i++)
using namespace std;
long long MOD = 1000000007;
long long INF = 1000000000000000; //10^15
typedef long long ll;
typedef unsigned long long ull;

int main(void) {

  int b, w;
  cin >> b >> w;

  char s[110][30] = {};
  rep(i, 100) rep(j, 21) s[i][j] = '#';
  int wc = w - 1;
  for (int i = 1; i < 20; i++) {
    for (int j = 0; j < 100; j += 2) {
      if (wc > 0 && s[j][i - 1] == '#') {
	wc--;
	s[j][i] = '.';
      }
    }
  }

  char t[110][30] = {};
  rep(i, 100) rep(j, 21) t[i][j] = '.';
  int bc = b - 1;
  for (int i = 1; i < 20; i++) {
    for (int j = 0; j < 100; j += 2) {
      if (bc > 0 && t[j][i - 1] == '.') {
	bc--;
	t[j][i] = '#';
      }
    }
  }

  cout << 100 << " " 42 << endl;
  rep(i, 100) cout << s[i] << t[i] << endl;

  return 0;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:54:21: error: expected ';' before numeric constant
   54 |   cout << 100 << " " 42 << endl;
      |                     ^~~
      |                     ;
Language: C++

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

long long a,b,n;
string ss,l[100][100];
int main(){
    for (int i=0; i<100; i++){
        for (int j=0; j<100; j++){
            l[i][j]="."
        }
    }
    cin>>a>>b;
    if (abs(a-b)<2){
        if (b>=a){
            for (int i=0; i<a+b; i++){
                if (i%2==0){
                    cout<<"#";
                }
                else{
                    cout<<".";
                }
            }
        }
        else{
            for (int i=0; i<a+b; i++){
                if (i%2==0){
                    cout<<".";
                }
                else{
                    cout<<"#";
                }
            }

        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: expected ';' before '}' token
   10 |             l[i][j]="."
      |                        ^
      |                        ;
   11 |         }
      |         ~
Language: C++

/**
 *    This code has been written by YueGuang, feel free to ask me question. Blog: http://www.yx.telstudy.xyz
 *    created:
 */
#include <cstdio>
#include <iostream>
#include <set>
#include <map>
#include <algorithm>
#include <cstrin>
#include <string>
#include <cmath>
#define REP(i, a, b) for(int i = a; i < b; i++)
#define REP_(i, a, b) for(int i = a; i <= b; i++)
#define sl(n) scanf("%lld", &n);
#define si(n) scanf("%d", &n);
#define RepAll(a) for(auto x: a)
#define cout(ans) cout << ans << endl;
typedef long long ll;
using namespace std;
int main()
{
    int a, b;
    scanf("%d%d", &a, &b);
    cout<<"100 100\n";
    REP(i, 0, 100)
    {
        REP(j, 0, 100)
            i < 50 ? cout<< ( i%2 == 1 && j%2 == 1&& (--a) > 0 ? "." : "#" ) : cout << (i%2 == 1 && j%2 == 1&& (--b) > 0 ? "#" : ".");
        cout << '\n';
    }
}


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

/**
 *    This code has been written by YueGuang, feel free to ask me question. Blog: http://www.yx.telstudy.xyz
 *    created:
 */
#include <cstdio>
#include <iostream>
#include <set>
#include <map>
#include <algorithm>
#include <cstrin3 3g>
#include <string>
#include <cmath>
#define REP(i, a, b) for(int i = a; i < b; i++)
#define REP_(i, a, b) for(int i = a; i <= b; i++)
#define sl(n) scanf("%lld", &n);
#define si(n) scanf("%d", &n);
#define RepAll(a) for(auto x: a)
#define cout(ans) cout << ans << endl;
typedef long long ll;
using namespace std;
int main()
{
    int a, b;
    scanf("%d%d", &a, &b);
    cout<<"100 100\n";
    REP(i, 0, 100)
    {
        REP(j, 0, 100)
            i<50 ? cout<< ( i%2 == 1 && j%2 == 1&& (--a) > 0 ? "." : "#" ) : cout << (i%2 == 1 && j%2 == 1&& (--b) > 0 ? "#" : ".");
        cout << '\n';
    }
}


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

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i=0; i<(int)(n); ++i)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using Graph = vector<vi>;  // vi <=> vl
using vb = vector<bool>;
using boolGraph = vector<vb>;
using P = pair<int, int>;  // int <=> ll
const int MOD = 1e9+7;
const double EPS = 1e-9;

int main() {
  int A, B; cin >> A >> B;

  string white, black;
  rep(i,100) {
    white.push_back('.');
    black.push_back('#');
  }

  vector<string> W(50), B(50);
  rep(i,50) {
    W[i] = white;
    B[i] = black;
  }
  
  rep(i,A-1) B[i/50*2+1][i%50*2] = '.';
  rep(i,B-1) W[i/50*2][i%50*2] = '#';

  cout << "100 100" << endl;
  rep(i,50) cout << W[i] << endl;
  rep(i,50) cout << B[i] << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:25: error: conflicting declaration 'std::vector<std::__cxx11::basic_string<char> > B'
   25 |   vector<string> W(50), B(50);
      |                         ^
a.cc:17:10: note: previous declaration as 'int B'
   17 |   int A, B; cin >> A >> B;
      |          ^
a.cc:28:6: error: invalid types 'int[int]' for array subscript
   28 |     B[i] = black;
      |      ^
a.cc:31:15: error: invalid types 'int[int]' for array subscript
   31 |   rep(i,A-1) B[i/50*2+1][i%50*2] = '.';
      |               ^
a.cc:36:22: error: invalid types 'int[int]' for array subscript
   36 |   rep(i,50) cout << B[i] << endl;
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
#define rep(i,n) for (ll i=0;i<n;++i)
#define rep2(i,a,b) for (ll i=a;i<b;++i)
const ll MOD=1000000007;
string alp="abcdefghijklmnopqrstuvwxyz";

int main(){
    int A,B;
    cin >> A >> B;
    A--,B--;
    int a1=A/50,a2=A%50,b1=B/50,b2=B%50;
    int h=((A+49)/50+(B+49)/50+1)*2;
    cout << h << ' ' << 100 << endl;
    rep(i,a1){
        rep(j,100){
            cout << '#';
        }
        cout << endl;
        rep(j,50){
            cout << "#.";
        }
        cout << endl;
    }
    if (a2>0){
        rep(j,100){
            cout << '#';
        }
        cout << endl;
        rep(j,a2){
            cout << "#.";
        }
        rep(j,100-2*a2){
            cout << '#';
        }
        cout << endl;
    }
    rep(j,100){
        cout << '#';
    }
    cout << endl;
    rep(i,b1){
        rep(j,100){
            cout << '.';
        }
        cout << endl;
        rep(j,50){
            cout << ".#";
        }
        cout << endl;
    }
    if (b2>0){
        rep(j,100){
            cout << '.';
        }
        cout << endl;
        rep(j,b2){
            cout << ".#";
        }
        rep(j,100-2*b2){
            cout << '.';
        }
        cout << endl;
    }
    rep(j,100){
        cout << '.';
    }
    cout << endl;2
}

Compiler output:
a.cc: In function 'int main()':
a.cc:71:19: error: expected ';' before '}' token
   71 |     cout << endl;2
      |                   ^
      |                   ;
   72 | }
      | ~
Language: C++

#include <iostream> 
#include <string>

using  namespace std;

int main ()
{
  int a, b;
  cin >> a >> b;
  string s[ 100 ];
   for ( int i = 0 ; i < 100 ; i++) {
     for ( int j = 0 ; j < 100 ; j++) {
       if (i < 50 ) s[i].push_back ( '.' );
       else s[i].push_back ( '#' );
    }
  }
  int cnt = 0 ;
   for ( int i = 0 ; i < 50 ; i+= 2 ) {
     if (cnt == b- 1 ) break ;
     for ( int j = 0 ; j < 100 ; j+= 2 ) {
       if (cnt == b- 1 ) break ;
      s[i][j] = '#' ;
      cnt++;
    }
  }
  cnt = 0 ;
   for ( int i = 51 ; i < 100 ; i += 2 ) {
     if (cnt == a- 1 ) break ;
     for ( int j = 0 ; j < 100 ; j+ = 2 ) {
       if (cnt == a- 1 ) break ;
      s[i][j] = '.' ;
      cnt++;
    }
  }
  cout << 100 << "" <<   100 << endl;
   for ( int i = 0 ; i < 100 ; i++) {
    cout << s[i] << endl;
  }

  return  0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:37: error: expected primary-expression before '=' token
   29 |      for ( int j = 0 ; j < 100 ; j+ = 2 ) {
      |                                     ^
Language: C++

#include <iostream> 
#include <string>

using  namespace std;

int main ()
{
  int a, b;
  cin >> a >> b;
  string s [ 100 ];
   for ( int i = 0 ; i < 100 ; i ++) {
     for ( int j = 0 ; j < 100 ; j ++) {
       if (i < 50 ) s [i] .push_back ( '.' );
       else s [i] .push_back ( '#' );
    }
  }
  int cnt = 0 ;
   for ( int i = 0 ; i < 50 ; i + = 2 ) {
     if (cnt == b- 1 ) break ;
     for ( int j = 0 ; j < 100 ; j + = 2 ) {
       if (cnt == b- 1 ) break ;
      s [i] [j] = '#' ;
      cnt ++;
    }
  }
  cnt = 0 ;
   for ( int i = 51 ; i < 100 ; i + = 2 ) {
     if (cnt == a- 1 ) break ;
     for ( int j = 0 ; j < 100 ; j + = 2 ) {
       if (cnt == a- 1 ) break ;
      s [i] [j] = '.' ;
      cnt ++;
    }
  }
  cout << 100 << "" <<   100 << endl;
   for ( int i = 0 ; i < 100 ; i ++) {
    cout << s [i] << endl;
  }

  return  0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:35: error: expected primary-expression before '=' token
   18 |    for ( int i = 0 ; i < 50 ; i + = 2 ) {
      |                                   ^
a.cc:20:38: error: expected primary-expression before '=' token
   20 |      for ( int j = 0 ; j < 100 ; j + = 2 ) {
      |                                      ^
a.cc:27:37: error: expected primary-expression before '=' token
   27 |    for ( int i = 51 ; i < 100 ; i + = 2 ) {
      |                                     ^
a.cc:29:38: error: expected primary-expression before '=' token
   29 |      for ( int j = 0 ; j < 100 ; j + = 2 ) {
      |                                      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int A, B;
    cin >> A >> B;
    vector<vector<char> > G(80, vector<char>(80, '.'));
    for (int i = 0; i < 40; i++) {
        for (int j = 0; j < 80; j++) {
            G[i][j] = '#';
        }
    }
    for (int i = 0; i < A-1; i++) {
        G[i/40*2][i%40*2] = '.';
    }
    for (int i = 0; i < B-1; i++) {
        G[41+i/40*2][i%40*2] = '#';
    }
    puts("80 80")
    for (int i = 0; i<80; i++) {
        for (int j = 0; j<80; j++) {
            putchar(G[i][j]);
        }
        putchar('\n');
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:18: error: expected ';' before 'for'
   20 |     puts("80 80")
      |                  ^
      |                  ;
   21 |     for (int i = 0; i<80; i++) {
      |     ~~~           
a.cc:21:21: error: 'i' was not declared in this scope
   21 |     for (int i = 0; i<80; i++) {
      |                     ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1000000000000000
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
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;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}
// https://ykmaku.hatenablog.com/entry/2018/09/03/153250
int main() {
    int A, B;
    cin >> A >> B;
    //しろがA個の連結成分 less than 500
    //くろがB個の連結成分 less than 500
    string s[100];
    for(int i = 0; i < 100; i++) {
        for(int j = 0; j < 100; j++) {
            if(i < 50)
                s[i].push_back('.');
            else
                s[i].push_back('#');
        }
    }
    int cnt = 0;
    for(int i = 0; i < 50; i += 2) {
        for(int j = 0; j < 100; j = 2) {
            if(cnt == b - 1) {
                break;
            }
            s[i][j] = '#';
            cnt++;
        }
    }
    for(int i = 51; i < 100; i += 2) {
        for(int j = 0; j < 100; j = 2) {
            if(cnt == a - 1) {
                break;
            }
            s[i][j] = '.';
            cnt++;
        }
    }
    cout << 100 << " " << 100 << endl;
    for(int i = 0; i < 100; i++) {
        cout << s[i] << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:49:23: error: 'b' was not declared in this scope
   49 |             if(cnt == b - 1) {
      |                       ^
a.cc:58:23: error: 'a' was not declared in this scope
   58 |             if(cnt == a - 1) {
      |                       ^
Language: C++

#include <iostream>
#include <algorithm>
#include <climits>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
using namespace std;

int main() {
    int a,b;
    cin >> a >> b;
    int z[100][100];
    int p = 0;
    for (int j = 0; j < 100; ++j) {
        for (int i = 0; i < 100; ++i) {
            if(j < 50) z[j][i] = 0;
            else z[j][i] = 1;
        }
    }

    for (int i = 0; i < b-1; ++i) {
        z[p/50][p%50 + (p/50) % 2] = 1;
        p+=2;
    }
    p = 0;
    for (int i = 0; i < a-1; ++i) {
        z[p/50 + 51][p%50+ (p/50) % 2]] = 0;
        p+=2;
    }

    for (int k = 0; k < 100; ++k) {
        for (int i = 0; i < 100; ++i) {
            if(z[k][i]) cout << '#' ;
            else cout << '.';
            if(i==99) cout << endl;
        }

    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:39: error: expected ';' before ']' token
   29 |         z[p/50 + 51][p%50+ (p/50) % 2]] = 0;
      |                                       ^
      |                                       ;
Language: Java

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

public class Test {
    public static void main(String[] args) {
        int A = 5;
        int B = 2;
        String white = ".";
        String black = "#";
        // always let A denote the smaller value
        if(A>B){
            int C = A;
            A = B;
            B = C;
            white = "#";
            black = ".";
        }
        int line1 = (A-1)/50;
        int blackDone = 1;
        if(line1>=1) blackDone+=50*(line1-1);
        int blackRemain = B-blackDone;
        int line2 = (blackRemain-1)/50;

        int h = 0;
        if(line1>=1) h += line1-1;
        h += 3;
        h += 2*line2;
        h += 2;

        int w = 100;
        System.out.println(Integer.toString(h)+" "+Integer.toString(w));



        StringBuilder sbOdd= new StringBuilder();
        StringBuilder sbEven = new StringBuilder();
        for(int i=1;i<=50;i++){
            sbOdd.append(white);
            sbOdd.append(black);
            sbEven.append(black);
            sbEven.append(white);
        }
        String odd = sbOdd.toString();
        String even = sbEven.toString();
        String[] dic = new String[]{even,odd};
        for(int i=1;i<=line1-1;i++){
            System.out.println(dic[i%2]);
        }

        StringBuilder divide = new StringBuilder();
        StringBuilder divideWhite = new StringBuilder();
        for(int i=1;i<=100;i++) {
            divide.append(black);
            divideWhite.append(white);
        }
        System.out.println(divide.toString());

        StringBuilder sbLastWhite = new StringBuilder();
        for(int i=1;i<=A-50*line1-1;i++){
            sbLastWhite.append(black);
            sbLastWhite.append(white);
        }
        for(int i=(A-50*line1-1)*2+1;i<=100;i++) sbLastWhite.append(black);
        System.out.println(sbLastWhite.toString()); // here A-1 white has been finished
        System.out.println(divide.toString());

        for(int i=1;i<=line2;i++){
            System.out.println(divideWhite.toString());
            System.out.println(dic[0]);
        }
        System.out.println(divideWhite.toString());
        StringBuilder sbLastBlack = new StringBuilder();
        for(int i=1;i<=blackRemain-50*line2;i++){
            sbLastBlack.append(black);
            sbLastBlack.append(white);
        }
        for(int i=2*(blackRemain-50*line2)+1;i<=100;i++) sbLastBlack.append(white);
        System.out.println(sbLastBlack.toString());




        //System.out.println(ans);
    }
}

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

#include<iostream>
#include<string>
#include<complex>
#include<vector>
#include<algorithm>
#include<functional>
#include<array>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;


int main() {
	int a, b,wp,bp;
	cin >> a >> b;
	wp = a - 1; bp = b - 1;
	cout << 100 << " " << 100 << endl;
	vector<vector<int>> c(100);
	for (int i = 0;i < 100;i++) {
		c[i].resize(100);
	}
	for (int i = 0;i < 50;i++) {
		for (int j = 0;j < 100;j++) c[i][j] = '#';
	}
	for (int i = 50;i < 100;i++) {
		for (int j = 0;j < 100;j++) c[i][j] = '.';
	}

	int count = 0;
	for(int i=0;i<48&&count!=wp;i+=2)
		for (int j = 0;j < 100 && count != wp;j += 2) {
			c[i][j] = '.';
			count++;
		}

	int count = 0;
	for (int i = 51;i<48 && count != bp;i += 2)
		for (int j = 0;j < 100 && count != bp;j += 2) {
			c[i][j] = '#';
			count++;
		}

	for (int i = 0;i < 100;i++) {
		for (int j = 0;j < 100;j++) {
			cout << c[i][j];
		}
		cout << endl;
	}


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:13: error: redeclaration of 'int count'
   36 |         int count = 0;
      |             ^~~~~
a.cc:29:13: note: 'int count' previously declared here
   29 |         int count = 0;
      |             ^~~~~
Language: C++

using namespace std;

const int maxn = 105;
char g[maxn][maxn];

int main() {
    int a, b; cin >> a >> b;
    for (int i = 1; i <= 50; ++i) {
        for (int j = 1; j <= 100; ++j) g[i][j] = '.';
    } 
    for (int i = 51; i <= 100; ++i) {
        for (int j = 1; j <= 100; ++j) g[i][j] = '#';
    }
    int c = 1, d = 1;
    if (c < a) {
        for (int i = 100; i > 50 && c < a; --i) {
            for (int j = 1; j <= 100 && c < a; j += 2) g[i][j] = '.', ++c;
        }
    }
    if (d < b) {
        for (int i = 1; i <= 50 && d < b; ++i) {
            for (int j = 1; j <= 100 && d < b; j += 2) g[i][j] = '#', ++d;
        }
    }
    cout << 100 << ' ' << 100 << endl;
    for (int i = 1; i <= 100; ++i) {
        for (int j = 1; j <= 100; ++j) cout << g[i][j];
        cout << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'cin' was not declared in this scope
    7 |     int a, b; cin >> 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 | using namespace std;
a.cc:25:5: error: 'cout' was not declared in this scope
   25 |     cout << 100 << ' ' << 100 << endl;
      |     ^~~~
a.cc:25:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:25:34: error: 'endl' was not declared in this scope
   25 |     cout << 100 << ' ' << 100 << endl;
      |                                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include<iostream>
using namespace std;
 
main(){
    cout<<"100 100"<<endl;
    int a,b;
    cin>>a;
    cin>>b;
    int p[101][101]={{1}{1}};
    for(int i=1;i<51;i++){
        for(int j=1;j<101;j++)
        p[i][j]=0;//0:黒、1:白
    }
    a--;
    b--;
    int j;
    for(int i=1;i<22;i+=2){
        if(a>=50){
            for(j=1;j<101;j+=2){
                p[i][j]=1;
            }
            
        }
        else if(a>0){
            for(j=1;j<=(a*2-1);j+=2){
                p[i][j]=1;
            }
            
        }
        a-=50;
    }
    for(int i=100;i>61;i-=2){
        if(b>=50){
            for(j=1;j<101;j+=2){
                p[i][j]=0;
            }
            
        }
        else if(b>0){
            for(j=1;j<=(2*b-1);j+=2){
                p[i][j]=0;
            }
            
        }
        b-=50;
    }   
    for(int i=1;i<101;i++){
        for(j=1;j<101;j++){
            if(p[i][j]==0) cout<<"#";
            else cout<<".";
        }
        if(i!=100)
        cout<<endl;
    }
    return 0;
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:9:25: error: expected '}' before '{' token
    9 |     int p[101][101]={{1}{1}};
      |                     ~   ^
a.cc:9:25: error: expected ',' or ';' before '{' token
a.cc: At global scope:
a.cc:10:5: error: expected unqualified-id before 'for'
   10 |     for(int i=1;i<51;i++){
      |     ^~~
a.cc:10:17: error: 'i' does not name a type
   10 |     for(int i=1;i<51;i++){
      |                 ^
a.cc:10:22: error: 'i' does not name a type
   10 |     for(int i=1;i<51;i++){
      |                      ^
a.cc:14:5: error: 'a' does not name a type
   14 |     a--;
      |     ^
a.cc:15:5: error: 'b' does not name a type
   15 |     b--;
      |     ^
a.cc:17:5: error: expected unqualified-id before 'for'
   17 |     for(int i=1;i<22;i+=2){
      |     ^~~
a.cc:17:17: error: 'i' does not name a type
   17 |     for(int i=1;i<22;i+=2){
      |                 ^
a.cc:17:22: error: 'i' does not name a type
   17 |     for(int i=1;i<22;i+=2){
      |                      ^
a.cc:32:5: error: expected unqualified-id before 'for'
   32 |     for(int i=100;i>61;i-=2){
      |     ^~~
a.cc:32:19: error: 'i' does not name a type
   32 |     for(int i=100;i>61;i-=2){
      |                   ^
a.cc:32:24: error: 'i' does not name a type
   32 |     for(int i=100;i>61;i-=2){
      |                        ^
a.cc:47:5: error: expected unqualified-id before 'for'
   47 |     for(int i=1;i<101;i++){
      |     ^~~
a.cc:47:17: error: 'i' does not name a type
   47 |     for(int i=1;i<101;i++){
      |                 ^
a.cc:47:23: error: 'i' does not name a type
   47 |     for(int i=1;i<101;i++){
      |                       ^
a.cc:55:5: error: expected unqualified-id before 'return'
   55 |     return 0;
      |     ^~~~~~
a.cc:56:1: error: expected declaration before '}' token
   56 | }
      | ^
Language: C++

#include <string>
#include <vector>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <stack>
#include <queue>
#include <set>
#include <bitset>
#include <map>
#include <unordered_map>
#include <ctime>
#include <list>
#include <numeric>
#include <utility>

#define INF 1000000000
#define LINF 9000000000000000000
#define mod 1000000007


#define rep(i,n) for(int i=0;i<int(n);i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define REP(i,a,b) for(int i=(a);i<int(b);i++)
#define all(x) (x).begin(),x.end()
#define pb push_back
#define mp make_pair

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int,int> pi;

int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
int ddx[8]={-1,-1,0,1,1,1,0,-1};
int ddy[8]={0,1,1,1,0,-1,-1,-1};
bool debug=false;

/*---------------------------------------------------*/

char grid[100][100];

void init(){
  rep(i,100){
    rep(j,100){
      if(i>=50)grid[i][j]='.';
      else grid[i][j]='#';
    }
  }
}

int main(){
  init();
  int a,b;
  cin>>a>>b;
  a--;b--;
  for(int i=1;i<50;i+=2){
    for(int j=1;j<100;j+=2){
      if(!a)break;
      grid[i][j]='.';
      a--;
    }
    if(!a)break;
  }

  for(int i=51;i<100;i+=2){
    for(int j=1;j<100;j+=2){
      if(!b)break;
      grid[i][j]='#';
      b--;
    }
    if(!b)break;
  }

  rep(i,100){
    rep(j,100){
      if(j==0)cout<<grid[i][j];
      else cout<<" "<<grid[i][j];
    }
    cout<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:60:3: error: 'cin' was not declared in this scope
   60 |   cin>>a>>b;
      |   ^~~
a.cc:18:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   17 | #include <utility>
  +++ |+#include <iostream>
   18 | 
a.cc:82:15: error: 'cout' was not declared in this scope
   82 |       if(j==0)cout<<grid[i][j];
      |               ^~~~
a.cc:82:15: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:83:12: error: 'cout' was not declared in this scope
   83 |       else cout<<" "<<grid[i][j];
      |            ^~~~
a.cc:83:12: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:85:5: error: 'cout' was not declared in this scope
   85 |     cout<<endl;
      |     ^~~~
a.cc:85:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:85:11: error: 'endl' was not declared in this scope
   85 |     cout<<endl;
      |           ^~~~
a.cc:18:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
   17 | #include <utility>
  +++ |+#include <ostream>
   18 |
Language: C++

#include <algorithm>
#include <cstdio>
#include <queue>
#include <string>
#include <stack>
#include <set>
#include <deque>
using namespace std;
int a,b;
string x[1000000];
long long k;
int main()
{
	cin>>a>>b;
	if (a==b && a==1 && b==1)
	{
		cout<<"2 3"<<endl;
		cout<<"..."<<endl<<"###"<<endl;
		system("pause");
    	return 0;
	}
	k=2;
	while (a>1)
	{
		x[k]+="###";
		if (a>1)
		{
			a--;
			x[k-1]+="#.#";
		}
		else
			x[k-1]+="###";
		k+=2;
	}
	x[k-1]="...";
	k++;
	while (b>1)
	{
		x[k]+="...";
		if (b>1)
		{
			b--;
			x[k-1]+=".#.";
		}
		else
			x[k-1]+="...";
		k+=2;
	}
	k-=2;
	cout<<k<<" "<<99<<endl;
	for (int i=1;i<=k;i++)
		cout<<x[i]<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'cin' was not declared in this scope
   14 |         cin>>a>>b;
      |         ^~~
a.cc:7:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    6 | #include <set>
  +++ |+#include <iostream>
    7 | #include <deque>
a.cc:17:17: error: 'cout' was not declared in this scope
   17 |                 cout<<"2 3"<<endl;
      |                 ^~~~
a.cc:17:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:30: error: 'endl' was not declared in this scope
   17 |                 cout<<"2 3"<<endl;
      |                              ^~~~
a.cc:7:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    6 | #include <set>
  +++ |+#include <ostream>
    7 | #include <deque>
a.cc:50:9: error: 'cout' was not declared in this scope
   50 |         cout<<k<<" "<<99<<endl;
      |         ^~~~
a.cc:50:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:50:27: error: 'endl' was not declared in this scope
   50 |         cout<<k<<" "<<99<<endl;
      |                           ^~~~
a.cc:50:27: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <iostream>
using namespace std;

const char WHITE = '.';
const char BLACK = '#';
// とりあえず最大サイズで解答配列を用意
// Width, Height.
const int w = 100;
const int h = 100;
char ans[w][h];
void solve(int black, int white);
void answer();
int main()
{
	int a, b;
	cin >> a >> b;
	solve(a, b);
	answer();
	return 0;
}
void solve(int black, int white)
{
	// 配列を上半分黒、下半分白で初期化
	bool isBlack = true;
	for(int j = 0; j < h; j++){
		if(j == h/2) isBlack = false;
	for(int i = 0; i < w; i++){
		ans[i][j] = isBlack? BLACK: WHITE;
	}
	}
	// 黒と白は一つずつ島があるからそれを引く
	--black; --white;
	Loop: for(int j = 0; j < h; j+=2){
	for(int i = 0; i < w; i+=2){
		if(black | white) break Loop;
		// 白い島の中に点々と黒い孤島を置いていく
		if(black--){
			ans[i][h-j] = black;
		}
		// 黒い島の中に点々と白い孤島を置いていく
		if(white--){
			ans[i][j] = white;
		}
	}
	}
}
void answer()
{
	cout << w << " " << h << endl;
	for(int j = 0; j < h; j++){
	for(int i = 0; i < w; i++){
		cout << ans[i][j];
	}
		cout << endl;
	}
}

Compiler output:
a.cc: In function 'void solve(int, int)':
a.cc:35:40: error: expected ';' before 'Loop'
   35 |                 if(black | white) break Loop;
      |                                        ^~~~~
      |                                        ;
a.cc:35:41: error: 'Loop' was not declared in this scope
   35 |                 if(black | white) break Loop;
      |                                         ^~~~
Language: C++

#include <iostream>
using namespace std;

const char WHITE = '.';
const char BLACK = '#';
// とりあえず最大サイズで解答配列を用意
// Width, Height.
const int w = 100;
const int h = 100;
char ans[w][h];
void solve(int black, int white);
void answer();
int main()
{
	int a, b;
	cin >> a >> b;
	solve();
	answer();
	return 0;
}
void solve(int black, int white)
{
	// 配列を上半分黒、下半分白で初期化
	bool isBlack = true;
	for(int j = 0; j < h; j++){
		if(j == h/2) isBlack = false;
	for(int i = 0; i < w; i++){
		ans[i][j] = isBlack? BLACK: WHITE;
	}
	}
	// 黒と白は一つずつ島があるからそれを引く
	--black; --white;
	Loop: for(int j = 0; j < h; j+=2){
	for(int i = 0; i < w; i+=2){
		if(black | white) break Loop;
		// 白い島の中に点々と黒い孤島を置いていく
		if(black--){
			ans[i][h-j] = black;
		}
		// 黒い島の中に点々と白い孤島を置いていく
		if(white--){
			ans[i][j] = white;
		}
	}
	}
}
void answer()
{
	cout << w << " " << h << endl;
	for(int j = 0; j < h; j++){
	for(int i = 0; i < w; i++){
		cout << ans[i][j];
	}
		cout << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: too few arguments to function 'void solve(int, int)'
   17 |         solve();
      |         ~~~~~^~
a.cc:11:6: note: declared here
   11 | void solve(int black, int white);
      |      ^~~~~
a.cc: In function 'void solve(int, int)':
a.cc:35:40: error: expected ';' before 'Loop'
   35 |                 if(black | white) break Loop;
      |                                        ^~~~~
      |                                        ;
a.cc:35:41: error: 'Loop' was not declared in this scope
   35 |                 if(black | white) break Loop;
      |                                         ^~~~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main()
{
  //Aが白
  int A, B;
  cin >> A >> B;
  // # = black
  vector<char> M(10000);
  for (int i = 0; i < 5000; i++)
  {
    M[i] = '.';
  }
  for (int i = 5000; i < 10000; i++)
  {
    M[i] = '#';
  }
  if (A == 1 && B == 1)
  {
    cout << "1 2" << endl
         << ".#" << endl;
  }
  else
  {
    cout << "100 100";
    //白
    int count = 9999;
    while (A--)
    {
      M[count] = '.';
      count -= 2;
    }
    count 0;
    while (B--)
    {
      M[count] = '#';
      count += 2;
    }
    for (int i = 0; i < 9999; i++)
    {
      if (i / 100 == 0)
      {
        cout << endl;
      }
      cout << M[i];
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:10: error: expected ';' before numeric constant
   36 |     count 0;
      |          ^~
      |          ;
Language: C++

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

int main(){
  const string wl = "....................................................................................................";
  const string bl = "####################################################################################################";
  string Grid[100];
  for(int i=0; i<50; i++)Grid[i] = bl;
  for(int i=50; i<100; i++)Grid[i] = wl;
  int a, b;
  cin >> a >> b;
  a--;
  b--;
  while(a>0)

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: expected statement at end of input
   15 |   while(a>0)
      |             ^
a.cc:15:13: error: expected '}' at end of input
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: Java

import java.util.Scanner;

public class Main implements Runnable {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        new Thread(null, new Main(), "", 128 * 1024 * 1024).start();
    }

    public void run() {
        // w = . b = #
        int w = sc.nextInt(), b = sc.nextInt();
        int height = 1, width = 1;
        StringBuilder sb = new StringBuilder();
        int rowLength = 0;
        for (int i = 0; i < w - 1; i++) {
            if (rowLength == 100) {
                width = 100;
                sb.append("\n");
                height++;
                for (int j = 0; j < rowLength; j++) {
                    sb.append("#");
                }
                sb.append("\n");
                height++;
                rowLength = 0;
            }
            sb.append(".#");
            rowLength += 2;
            if (width != 100) {
                width += 2;
            }
        }
        if (rowLength != width) {
            for (int i = rowLength; i < width; i++) {
                sb.append("#");
            }
        }
        sb.append("\n");
        height++;
        for (int j = 0; j < width; j++) {
            sb.append("#");
        }
        sb.append("\n");
        height++;
        for (int j = 0; j < width; j++) {
            sb.append(".");
        }
        sb.append("\n");
        height++;
        rowLength = 0;
        for (int i = 0; i < b - 1; i++) {
            if (rowLength == Math.min(w * 2, 100)) {
                sb.append("\n");
                height++;
                for (int j = 0; j < rowLength; j++) {
                    sb.append(".");
                }
                sb.append("\n");
                height++;
                rowLength = 0;
            }
            sb.append(".#");
            rowLength += 2;
        }
        if (rowLength != width) {
            for (int i = rowLength; i < width; i++) {
                sb.append(".");
            }
        }
        System.out.println(height + " " + width);
        System.out.println(sb);
    }

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

#include <iostream>
#include <cstring>
#include <algorithm>
#include <cmath>
#include<cstdlib>
#define FOR(i,a,b) for(i=a;i<=b;i++)

using namespace std;

#define mp make_pair
#define pb push_back
#define ll long long


int A, B;
const int n = 100;

int main()
{
	cout << 100 << ' ' << 100 << endl;
	cin >> A >> B;
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			if (i < 50) {
				if (i % 2 == 0 && j % 2 == 0 && i * 25 + j / 2 < (A - 1))
					cout << '.';
				else cout << '#';
			}
			else if (i < 60) cout << '.';
			else if (i % 2 == 0 && j % 2 == 0 && (i - 60) * 25 + j / 2 < (B - 1))
				cout << '#';
			else cout << '.';

		}
		cout << endl;
	}



Compiler output:
a.cc: In function 'int main()':
a.cc:36:10: error: expected '}' at end of input
   36 |         }
      |          ^
a.cc:19:1: note: to match this '{'
   19 | {
      | ^
Language: C

z#include<stdio.h>
#include<math.h>
 
main(){
    int w, h;
    char s[101][101];
    int a, b;
    int i, j;
 
    // 整数の入力
    scanf("%d %d", &a, &b);
 
    w = (int)sqrt(a+b)+1;
    h = (int)sqrt(a+b)+1;    

    for(i=1; i<=w; i++){
        for(j=1; j<=h; j++){
          s[i][j] =  ((i+j)%2==0)? '.':'#';
        }
    }

    printf("%d %d¥n", w, h);
    for(i=1; i<=w; i++){
        for(j=1; j<=h; j++){
          printf("%c", s[i][j]);
        }
        printf("¥n");
    }
    
}

Compiler output:
main.c:1:2: error: stray '#' in program
    1 | z#include<stdio.h>
      |  ^
main.c:1:1: error: unknown type name 'z'
    1 | z#include<stdio.h>
      | ^
main.c:1:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | z#include<stdio.h>
      |          ^
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function 'main':
main.c:11:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   11 |     scanf("%d %d", &a, &b);
      |     ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    2 | #include<math.h>
  +++ |+#include <stdio.h>
    3 | 
main.c:11:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   11 |     scanf("%d %d", &a, &b);
      |     ^~~~~
main.c:11:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:22:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   22 |     printf("%d %d¥n", w, h);
      |     ^~~~~~
main.c:22:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:22:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

z#include<stdio.h>
#include<math.h>
 
main(){
    int w, h;
    char s[101][101];
    int a, b;
    int i, j;
 
    // 整数の入力
    scanf("%d %d", &a, &b);
 
    w = (int)sqrt(a+b)+1;
    h = (int)sqrt(a+b)+1;    

    for(i=1; i<=w; i++){
        for(j=1; j<=h; j++){
          s[i][j] = i+j%2==0? "."?"#";
        }
    }

    printf("%d %d¥n", w, h);
    for(i=1; i<=w; i++){
        for(j=1; j<=h; j++){
          printf("%c", s[i][j]);
        }
        printf("¥n");
    }
    
}

Compiler output:
main.c:1:2: error: stray '#' in program
    1 | z#include<stdio.h>
      |  ^
main.c:1:1: error: unknown type name 'z'
    1 | z#include<stdio.h>
      | ^
main.c:1:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | z#include<stdio.h>
      |          ^
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function 'main':
main.c:11:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   11 |     scanf("%d %d", &a, &b);
      |     ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    2 | #include<math.h>
  +++ |+#include <stdio.h>
    3 | 
main.c:11:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   11 |     scanf("%d %d", &a, &b);
      |     ^~~~~
main.c:11:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:18:38: error: expected ':' before ';' token
   18 |           s[i][j] = i+j%2==0? "."?"#";
      |                                      ^
      |                                      :
main.c:22:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   22 |     printf("%d %d¥n", w, h);
      |     ^~~~~~
main.c:22:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:22:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<cstring>
#include<string>
#include<math.h>
#include<vector>
using namespace std;
int main(){
    int A,B;
    cin>>A>>B;
    if(A==1&&B==1){
        cout<<1<<" "<<2<<"\n";
        cout<<".#";
    }else if(A==1){
        cout<<2<<" "<<B<<"\n";
        for(int i=0;i<B;i++)cout<<"..";
        cout<<"\n";
        for(int i=0;i<B;i++) cout<<".#";
    }
    else if(B==1){
        cout<<2<<" "<<B<<"\n";
        for(int i=0;i<A;i++)cout<<"##";
        cout<<"\n";
        for(int i=0;i<A;i++) cout<<"#.";
    }


    else{
        cout<<2<<" "<<A+B-2<<"\n";
        for(int i=0;i<A+B-2;i++){
            cout<<".#";
        }
        cout<<"\n";
        for(int i=0;i<A-1;i++){
            cout<<"##";
        }
        for(int i=0;i<B-1;i++){
            cout<<"..";

        }
    }


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

#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<string>
#include<map>
#include<vector>
#include<queue>
#include<set>
#include<stack>
#include<sstream>
#include<cmath>
#include<algorithm>
using namespace std;
typedef long long ll;
const int N=100+20;
int n,m;
char sz[N][N];
void init()
{
    for(int i=0;i<100;i++)
        for(int j=0;j<100;j++)
            sz[i][j]='.';
}
void ts(int x,int y)
{
    sz[x+1][y]='#';
    sz[x][y+1]='#';
    sz[x+1][y+1]='#';
}
int main()
{
    //freopen("out.txt","w",stdout);
    while(~scanf("%d%d",&n,&m))
    {
        init();
        n--;
        int x=0,y=0;
        if(n) m--;
        while(n)
        {
            n--;
            ts(x,y);
            y+=2;
            x+=(y/100);
            y%=100;
        }
        while(m)
        {
            sz[x+1][y+1]='#';
            y+=2;
            x+=(y/100);
            y%=100;
            m--;

        }
        printf("100 100\n")
        for(int i=0;i<100;i++)
        {
            for(int j=0;j<100;j++)
                printf("%c",sz[i][j]);
            printf("\n");
        }
    }


    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:57:28: error: expected ';' before 'for'
   57 |         printf("100 100\n")
      |                            ^
      |                            ;
   58 |         for(int i=0;i<100;i++)
      |         ~~~                 
a.cc:58:21: error: 'i' was not declared in this scope
   58 |         for(int i=0;i<100;i++)
      |                     ^