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

#include<stdio.h>

void main(void){

int num;

gets(&num);

printf("%d\n",num);

}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main(void){
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 | gets(&num);
      | ^~~~
      | getw
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(void){
    
    int n;
    int count[4][3][10] = {};
    
    int b;
    int f;
    int r;
    int v;
    
    for(int i = 0; i < 4; i++) {
        for(int j = 0; j < 3; j++) {
            for(int k = 0; k < 10; k++) {
                count[i][j][k] = 0;
            }
        }
    }
    
    while(1) {
        
        cin >> n;
    
        for(int i = 0; i < n; i++) {
            
            cin >> b >> f >> r >> v;
            
            if(v > 0 && count[b - 1][f - 1][r - 1] <= 9) {
                for(int j = 0; j < v; j++) {
                    if(count[b - 1][f - 1][r - 1] != 9) {
                        count[b - 1][f - 1][r - 1] += 1;
                    }
                }
            } else if(v < 0 && count[b - 1][f - 1][r - 1] > 0) {
                for(int j = 0; j < v; j++) {
                    if(count[b - 1][f - 1][r - 1] != 0) {
                        count[b - 1][f - 1][r - 1] -= 1;
                    }
                }
            }
        }
        
        for(int i = 0; i < 4; i++) {
            for(int j = 0; j < 3; j++) {
                for(int k = 0; k < 10; k++) {
                    cout << " " << count[i][j][k];
                }
                cout << endl;
            }
            for(int j = 0; j < 20; j++) {
                cout << "#";
            }
            cout << endl;
        }
        
    }
    

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

#include <iostream>
#include <string>

using namespace std;

int main(void){
    
    int n;
    int count[4][3][10] = {};
    
    int b;
    int f;
    int r;
    int v;
    
    for(int i = 0; i < 4; i++) {
        for(int j = 0; j < 3; j++) {
            for(int k = 0; k < 10; k++) {
                count[i][j][k] = 0;
            }
        }
    }
    

        
    cin >> n;

    for(int i = 0; i < n; i++) {
        
        cin >> b >> f >> r >> v;
        
        if(b > 0 && b < 5 && f > 0 && f < 4 && r > 0 &&r < 11) {
            
            if(v > 0 && count[b - 1][f - 1][r - 1] <= 9) {
                for(int j = 0; j < v; j++) {
                    if(count[b - 1][f - 1][r - 1] != 9) {
                        count[b - 1][f - 1][r - 1] += 1;
                    }
                }
            } else if(v < 0 && count[b - 1][f - 1][r - 1] > 0) {
                for(int j = 0; j < v; j++) {
                    if(count[b - 1][f - 1][r - 1] != 0) {
                        count[b - 1][f - 1][r - 1] -= 1;
                    }
                }
            }
        }
    }
    
    for(int i = 0; i < 4; i++) {
        for(int j = 0; j < 3; j++) {
            for(int k = 0; k < 10; k++) {
                cout << " " << count[i][j][k];
            }
            cout << endl;
        }
        for(int j = 0; j < 20; j++) {
            cout << "#";
        }
        cout << endl;
    }
    
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:63:14: error: expected '}' at end of input
   63 |     return 0;
      |              ^
a.cc:6:15: note: to match this '{'
    6 | int main(void){
      |               ^
Language: C++

cin >> n;

    for(int i = 0; i < n; i++) {
        
        cin >> b >> f >> r >> v;
        
        if(b > 0 && b < 5 && f > 0 && f < 4 && r > 0 && r < 11) {
            
            if(v > 0 && count[b - 1][f - 1][r - 1] <= 9) {
                for(int j = 0; j < v; j++) {
                    if(count[b - 1][f - 1][r - 1] != 9) {
                        count[b - 1][f - 1][r - 1] += 1;
                    }
                }
            } else if(v < 0 && count[b - 1][f - 1][r - 1] > 0) {
                for(int j = 0; j < v; j++) {
                    if(count[b - 1][f - 1][r - 1] != 0) {
                        count[b - 1][f - 1][r - 1] -= 1;
                    }
                }
            }
        }
    }
    
    for(int i = 0; i < 4; i++) {
        for(int j = 0; j < 3; j++) {
            for(int k = 0; k < 10; k++) {
                cout << " " << count[i][j][k];
            }
            cout << endl;
        }
        if(i != 3) {
            for(int j = 0; j < 20; j++) {
                cout << "#";
            }
            cout << endl;    
        }
        
    }

Compiler output:
a.cc:1:1: error: 'cin' does not name a type
    1 | cin >> n;
      | ^~~
a.cc:3:5: error: expected unqualified-id before 'for'
    3 |     for(int i = 0; i < n; i++) {
      |     ^~~
a.cc:3:20: error: 'i' does not name a type
    3 |     for(int i = 0; i < n; i++) {
      |                    ^
a.cc:3:27: error: 'i' does not name a type
    3 |     for(int i = 0; i < n; i++) {
      |                           ^
a.cc:25:5: error: expected unqualified-id before 'for'
   25 |     for(int i = 0; i < 4; i++) {
      |     ^~~
a.cc:25:20: error: 'i' does not name a type
   25 |     for(int i = 0; i < 4; i++) {
      |                    ^
a.cc:25:27: error: 'i' does not name a type
   25 |     for(int i = 0; i < 4; i++) {
      |                           ^
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(void){
    
    int count[4][3][10] = {};
    int b, f, r, v;
    int n;
    
    cin >> n;
 
    for (int i = 0; i < n; i++) {
        cin >> b >> f >> r >> v;
        cout[b - 1][f - 1][r - 1] += v;
    }
 
    for (int b = 0; b < 4; b++) {
        for (int f = 0; f < 3; f++) {
            for (int r = 0; r < 10; r++) {
                cout << " " << cout[b][f][r];
            }
            cout << endl;
        }
        if(i != 3) {
            for(int j = 0; j < 20; j++) {
                cout << "#";
            }
            cout << endl;    
        }
    }
    
    
    return 0;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: no match for 'operator[]' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
   16 |         cout[b - 1][f - 1][r - 1] += v;
      |             ^
a.cc:22:36: error: no match for 'operator[]' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
   22 |                 cout << " " << cout[b][f][r];
      |                                    ^
a.cc:26:12: error: 'i' was not declared in this scope
   26 |         if(i != 3) {
      |            ^
Language: C++

int main() {
	int i,j,k;
	int a[5][4][11];
	for(i=0;i<5;i++){
		for(j=0;j<4;j++){
			for(k=0;k<11;k++){
				a[i][j][k]=0;
			}
		}
	}
	int n,b,f,r,v;
	cin >> n;
	for(i=0;i<n;i++){
		cin >> b >> f >> r >> v;
		a[b][f][r] += v;
	}
	for(i=1;i<5;i++){
		for(j=1;j<4;j++){
			for(k=1;k<11;k++){
				cout << " " <<a[i][j][k] ;
			}
			cout << endl;
		}
		if(i<4)
			cout << "####################" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'cin' was not declared in this scope
   12 |         cin >> n;
      |         ^~~
a.cc:20:33: error: 'cout' was not declared in this scope
   20 |                                 cout << " " <<a[i][j][k] ;
      |                                 ^~~~
a.cc:22:25: error: 'cout' was not declared in this scope
   22 |                         cout << endl;
      |                         ^~~~
a.cc:22:33: error: 'endl' was not declared in this scope
   22 |                         cout << endl;
      |                                 ^~~~
a.cc:25:25: error: 'cout' was not declared in this scope
   25 |                         cout << "####################" << endl;
      |                         ^~~~
a.cc:25:59: error: 'endl' was not declared in this scope
   25 |                         cout << "####################" << endl;
      |                                                           ^~~~
Language: C++

include <iostream>
int main(){
    int b,f,r,v,n;
    int x[4][3][10] = {0};
    std::cin >> n;
    for(int a = 0;a < n;a++){
        std::cin >> b >> f >> r >> v;
        x[b - 1][f - 1][r - 1] = v;
    }
    for(int amatukaze = 0;amatukaze < 3;amatukaze++){
        for(int kagerou = 0;kagerou < 10;kagerou++){
            std::cout <<" ";
            std::cout << x[0][amatukaze][kagerou];
        }
        std::cout << std::endl;
    }
    std::cout <<"####################"<<std::endl;
    for(int yukikaze = 0;yukikaze < 3;yukikaze++){
        for(int siranui = 0;siranui < 10;siranui++){
            std::cout <<" ";
            std::cout << x[1][yukikaze][siranui];
        }
        std::cout << std::endl;
    }
    std::cout <<"####################"<<std::endl;
    for(int nowaki = 0;nowaki < 3;nowaki++){
        for(int kurosio = 0;kurosio < 10;kurosio++){
            std::cout <<" ";
            std::cout <<x[2][nowaki][kurosio];
        }
        std::cout << std::endl;
    }
    std::cout <<"####################"<<std::endl;
    for(int isokaze = 0;isokaze < 3;isokaze++){
        for(int arasi = 0;arasi < 10;arasi++){
            std::cout <<" ";
            std::cout <<x[3][isokaze][arasi];
        }
        std::cout << std::endl;
    }
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
Language: C++

#include <iostream>
int main(){
    int b,f,r,v,n;
    int x[4][3][10] = {0};
    std::cin >> n;
    for(int a = 0;a < n;a++){
        std::cin >> b >> f >> r >> v;
        x[b - 1][f - 1][r - 1]+v
    }
    for(int amatukaze = 0;amatukaze < 3;amatukaze++){
        for(int kagerou = 0;kagerou < 10;kagerou++){
            std::cout <<" ";
            std::cout << x[0][amatukaze][kagerou];
        }
        std::cout << std::endl;
    }
    std::cout <<"####################"<<std::endl;
    for(int yukikaze = 0;yukikaze < 3;yukikaze++){
        for(int siranui = 0;siranui < 10;siranui++){
            std::cout <<" ";
            std::cout << x[1][yukikaze][siranui];
        }
        std::cout << std::endl;
    }
    std::cout <<"####################"<<std::endl;
    for(int nowaki = 0;nowaki < 3;nowaki++){
        for(int kurosio = 0;kurosio < 10;kurosio++){
            std::cout <<" ";
            std::cout <<x[2][nowaki][kurosio];
        }
        std::cout << std::endl;
    }
    std::cout <<"####################"<<std::endl;
    for(int isokaze = 0;isokaze < 3;isokaze++){
        for(int arasi = 0;arasi < 10;arasi++){
            std::cout <<" ";
            std::cout <<x[3][isokaze][arasi];
        }
        std::cout << std::endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:33: error: expected ';' before '}' token
    8 |         x[b - 1][f - 1][r - 1]+v
      |                                 ^
      |                                 ;
    9 |     }
      |     ~
Language: C++

#include<iostream>
using namespace std;
int main(){
	int kousya[10][3][4] = {0};
	int n, b, f, r, v;
	cin >> n;
	for (int ba = 0; ba < n; ba++){
		cin >> b >> f >> r >> v;
		kousya[r-1][f-1][b-1] = v;
	}
	for (int aa = 0; aa < 4; aa++){
		for (int ab= 0; ab < 3; ab++){
			for (int ac = 0; ac < 10; ac++){
				cout << kousya[ac][ab][aa]<<" ";
			}cout << endl;

		}if (aa != 3){ cout << "####################";
		}cout<< endl;
	}
	return 0;

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

#define _CRT_SECURE_NO_WARNINGS

#include "stdafx.h"

#include <iostream>

#define NUMBER 20000

int main() {
	int A[4][3][10] = { 0 };
	int n;
	int b, f, r, v;
	std::cin >> n;
	for (int i = 0; i < n; i++) {
		std::cin >> b >> f >> r >> v;
		A[b - 1][f - 1][r - 1] += v;
	}

	for (int i = 0; i < 4; i++) {
		for (int j = 0; j < 3; j++) {
			for (int k = 0; k < 10; k++) {
				if (k < 9)
					std::cout << A[i][j][k] << " ";
				else
					std::cout << A[i][j][k];
			}
			std::cout << "\n";
		}
		if(i < 3)
			std::cout << "####################\n";
	}
	return 0;
}

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

//============================================================================
// Name        : ITP_1_6_C.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

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

int main() {
	int a[4][3]={0},n,b,f,r,v;
	cin >> n;
	for(int i=0; i<n; ++i) {
		cin >> b >> f >> r >> v;
		a[b-1][f-1]+=v*pow(10,r-1)
	}
	for(int i=0;i<4;++i) {
		for(int j=0;j<3;++j) {
			printf(" %d %d %d %d %d %d %d %d %d %d\n"
					,a[i][j]%10
					,(a[i][j]/10)%10
					,(a[i][j]/100)%10
					,(a[i][j]/1000)%10
					,(a[i][j]/10000)%10
					,(a[i][j]/100000)%10
					,(a[i][j]/1000000)%10
					,(a[i][j]/10000000)%10
					,(a[i][j]/100000000)%10
					,(a[i][j]/1000000000)%10);

		}
		if(i==3) break;
		printf("####################\n");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:43: error: expected ';' before '}' token
   19 |                 a[b-1][f-1]+=v*pow(10,r-1)
      |                                           ^
      |                                           ;
   20 |         }
      |         ~
Language: C++

// ConsoleApplication7.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//

#include <stdio.h>
#include <iostream>
#include <algorithm>

using namespace std;

int main(int argc, char* argv[])
{
	int i, j, k;
	int n;
	int b, f, r, v;
	int building[4][3][10];

	cin >> n;
	memset(building, 0, sizeof(building));

	for (i = 0; i < n; i++) {
		cin >> b;
		cin >> f;
		cin >> r;
		cin >> v;
		building[b - 1][f - 1][r - 1] = v;
	}

	for (i = 0; i < 4; i++) {
		for (j = 0; j < 3; j++) {
			for (k = 0; k < 10; k++) {
				if (k != 0) cout << " ";
				cout << building[i][j][k];
			}
			cout << endl;
		}
		if (i < 3) {
			cout << "####################" << endl;
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:18:9: error: 'memset' was not declared in this scope
   18 |         memset(building, 0, sizeof(building));
      |         ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <algorithm>
  +++ |+#include <cstring>
    7 |
Language: C++

#include <iostream>
using namespace std;

int main(){
	int A[5][4][11] , n;
	for (int i = 1; i <= 4 ; i++ )
		for ( int j = 1; j <= 3; j++ )
			for ( int k = 1; k <= 10; k++ ) A[i][j][k] = 0;

	cin >> n;
	for (int i = 0; i < n; i++ ){
		int b, f, r, v;
		cin >> b >> f >> r >> v;
		A[b][f][r] += v;
	}

	for ( int f = 1; f <= 4; f++ ){
		if ( f > 1 ) cout << "####################\n";
		for ( int b = 1; b < = 3; b++ ){
			for ( int r = 1; r <= 10; r++ ) {
				cout << " " << A[f][b][r];
		    }
		    cout << endl;
		} 
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:38: error: expected primary-expression before '=' token
   19 |                 for ( int b = 1; b < = 3; b++ ){
      |                                      ^
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
int a[4][3][10];
int i,j,k;
int b,f,r,v;
int n;
for(i=0;i<4;i++) for(j=0;j<3;j++) for(k=0;k<10;k++) a[i][j][k]=0;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf(" %d %d %d %d",b,f,r,v);
a[b][f][r]=v;
}
for(i=0;i<4i++)
{
for(j=0;j<3;j++)
{
for(k=0;k<10;k++)
{
printf("%d",a[k][j][i]);
}
printf("\n");
}
printf("####################\n");
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: lvalue required as increment operand
   16 | for(i=0;i<4i++)
      |             ^~
a.cc:16:15: error: expected ';' before ')' token
   16 | for(i=0;i<4i++)
      |               ^
      |               ;
Language: C++

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

int room[4][3][10];

int main(){
  int n; cin >> n;
  for(int i=0; i<n; i++){
    int b, f, r, v;
    cin >> b >> f >> r >> v;
    room[b-1][f-1][r-1] += v;
  }
  for(int i=0; i<4; i++){
    for(int j=0; j<3; j++){
      for(int k=0; k<10; k++){
        cout << " " << room[i][j][k];
      }
      cout << endl;
    }
    if(i!=3) cout << "####################" << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'cin' was not declared in this scope
    7 |   int n; cin >> n;
      |          ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | // #include <bits/stdc++.h>
a.cc:16:9: error: 'cout' was not declared in this scope
   16 |         cout << " " << room[i][j][k];
      |         ^~~~
a.cc:16:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:7: error: 'cout' was not declared in this scope
   18 |       cout << endl;
      |       ^~~~
a.cc:18:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:15: error: 'endl' was not declared in this scope
   18 |       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 | // #include <bits/stdc++.h>
a.cc:20:14: error: 'cout' was not declared in this scope
   20 |     if(i!=3) cout << "####################" << endl;
      |              ^~~~
a.cc:20:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:48: error: 'endl' was not declared in this scope
   20 |     if(i!=3) cout << "####################" << endl;
      |                                                ^~~~
a.cc:20:48: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<bits/stdc++.h>
using iostream std;
int main(){
 int room[4][3][10], n;
 for ( int i = 1; i <= 4; i++ );
 for ( int j = 1; j = 3; j++ );
 for ( int k = 1; k = 10; k++ ); room[i][j][k] = 0;
 cin >> n;
 for ( int i = 0; i < n; i++ ){
  int b, f, r, v;
  cin >> b >> f >> r >> v;
  room[b][f][r] += v;
 }
 for ( int f = 1; f <= 4; f++ ){
  if ( f > 1 ) cout "####################\n"
  for ( int b = 1; b <= 3; b++ ){
  for ( int r = 1; r <= 10; r++ ){
  cout << " " << room[f][b][r];
  }
  cout << endl;
  }
 }
 return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'iostream'
    2 | using iostream std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:39: error: 'i' was not declared in this scope
    7 |  for ( int k = 1; k = 10; k++ ); room[i][j][k] = 0;
      |                                       ^
a.cc:7:42: error: 'j' was not declared in this scope
    7 |  for ( int k = 1; k = 10; k++ ); room[i][j][k] = 0;
      |                                          ^
a.cc:7:45: error: 'k' was not declared in this scope
    7 |  for ( int k = 1; k = 10; k++ ); room[i][j][k] = 0;
      |                                             ^
a.cc:8:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |  cin >> n;
      |  ^~~
      |  std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:15:16: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |   if ( f > 1 ) cout "####################\n"
      |                ^~~~
      |                std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:20: error: 'b' was not declared in this scope
   16 |   for ( int b = 1; b <= 3; b++ ){
      |                    ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  int count[4][3][10] = {};
  int n;
  cin >> n;
  for(int i = 0; i < n; ++i) {
    int b, f, r, v;
    cin >> b >> f >> r >> v;

    count[b - 1][f - 1][r - 1] += v;
  }
  for(int i = 0; i < 4; ++i) {
    for(int j = 0; j < 3; ++j) {
      for(int k = 0; k < 10; ++k) {
        cout << " " << count[b][f][r] << endl;
      }
    }
    cout << "####################" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:30: error: 'b' was not declared in this scope
   17 |         cout << " " << count[b][f][r] << endl;
      |                              ^
a.cc:17:33: error: 'f' was not declared in this scope
   17 |         cout << " " << count[b][f][r] << endl;
      |                                 ^
a.cc:17:36: error: 'r' was not declared in this scope
   17 |         cout << " " << count[b][f][r] << endl;
      |                                    ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  int count[4][3][10] = {};
  int n;
  cin >> n;
  for(int i = 0; i < n; ++i) {
    int b, f, r, v;
    cin >> b >> f >> r >> v;

    count[b - 1][f - 1][r - 1] += v;
  }
  for(int i = 0; i < 4; ++i) {
    for(int j = 0; j < 3; ++j) {
      for(int k = 0; k < 10; ++k) {
        cout << " " << count[i][j][k] << flush;
      }
      cout << endl;
    }
    if(!(k == 9)) {
      cout << "####################" << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:10: error: 'k' was not declared in this scope
   21 |     if(!(k == 9)) {
      |          ^
Language: C++

#include<iostream>
using namespace std;

int main(){

int a[5][4][11],n;
for (int i=0;i<5;i++)
for (int j=0;j<4;j++)
for (int k=0;k<11;k++) a[i][j][k]=0;

cin >>n;
for(int i=0;i<n;i++){
int b,f,r,v;
cin >>b >>f >>r >>v;
a[b][f][r]+=v;
}

for (int f=1;f<=4;f++){
if(f>1)cout "####################\n";
for(int b=1;b<=3;b++){
for(int r=1;r<=10;r++){
cout <<" "<<a[f][b][r];
}
cout <<endl;
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: expected ';' before string constant
   19 | if(f>1)cout "####################\n";
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
      |            ;
Language: C++

box = [[[0]*10 for i in range(3)] for j in range(4)]
num = int(input())
for i in range(num):
    temp = list(map(int, input().split()))
    box[temp[0]-1][temp[1]-1][temp[2]-1] += temp[3]
    if box[temp[0]-1][temp[1]-1][temp[2]-1] < 0: box[temp[0]-1][temp[1]-1][temp[2]-1] = 0

for i in range(len(box)):
    [print(" "+" ".join( map(str, box[i][j])) ) for j in range(len(box[i]))]
    if i != 3:
        print("####################")

Compiler output:
a.cc:1:1: error: 'box' does not name a type
    1 | box = [[[0]*10 for i in range(3)] for j in range(4)]
      | ^~~
Language: C++

#include<cstdio>
#include<algorithm>
#include<cstring>
#include<iostream>
using namespace std;
int main() {
	int  tou[4+1][3+1][10+1] = { 0 };
	int n, b, f, r, v, i, j, h;
	cin >> n;
	for (i = 0; i < n; i++) {
		cin >> b >> f >> r >> v;
		if (v < 0) {
			tou[b][f][r] = 0;
		}
		else {
			tou[b][f][r] = v;
		}
	}
	for (i = 1; i < 5; i++) {
		for (j = 1; j < 4; j++) {
			for (h = 1; h < 11; h++) {
				if (h != 10) {
					cout << tou[i][j][h] << ' ';
				}
				else {
					cout << tou[i][j][h];
				}
				}
			}
			cout << endl;
		}
		if (i != 4) {
			cout << "####################" << endl;
		}
	}
}

Compiler output:
a.cc:36:1: error: expected declaration before '}' token
   36 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int a[4][3][10], n, b, f, r, v;

for(int q = 0; q < 4; q++)
 for(int w = 0; w < 3; w++)
  for(int s = 0; s < 10; s++) a[q][w][s] = 0;

cin >> n;
for( int i = 0; i < n, i++){
 cin >> b >> f >> r >> v;
 a[b][f][r] += v;
}
for(int q = 0; q < 4; q++){
 for(int w = 0; w < 3; w++){
  for(int s = 0; s < 10; s++){
   cout << " " << a[q][w][s];
}
cout << endl;
}
cout << "####################" << endl;
}
return 0;
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: expected ';' before ')' token
   11 | for( int i = 0; i < n, i++){
      |                           ^
      |                           ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int a[4][3][10], n, b, f, r, v;

for(int q = 0; q < 4; q++)
 for(int w = 0; w < 3; w++)
  for(int s = 0; s < 10; s++) a[q][w][s] = 0;

cin >> n;
for( int i = 0; i < n; i++){
 cin >> b >> f >> r >> v;
 a[b][f][r] += v;
}
for(int f = 0; f < 4; f++){
if(q > 0){
cout << "####################" << endl;
}
 for(int b = 0; b < 3; b++){
  for(int r = 0; r < 10; r++){
   cout << " " << a[q][w][s];
}
cout << endl;
}
}
return 0;
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:16:4: error: 'q' was not declared in this scope
   16 | if(q > 0){
      |    ^
a.cc:21:21: error: 'q' was not declared in this scope
   21 |    cout << " " << a[q][w][s];
      |                     ^
a.cc:21:24: error: 'w' was not declared in this scope
   21 |    cout << " " << a[q][w][s];
      |                        ^
a.cc:21:27: error: 's' was not declared in this scope
   21 |    cout << " " << a[q][w][s];
      |                           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int a[4][3][10], n, b, f, r, v;

for(int q = 0; q < 4; q++)
 for(int w = 0; w < 3; w++)
  for(int s = 0; s < 10; s++) a[q][w][s] = 0;

cin >> n;
for( int i = 0; i < n; i++){
 cin >> b >> f >> r >> v;
 a[b][f][r] += v;
}
for(int f = 0; f < 4; f++){
if(q > 0){
cout << "####################" << endl;
}
 for(int b = 0; b < 3; b++){
  for(int r = 0; r < 10; r++){
   cout << " " << a[f][b][r];
}
cout << endl;
}
}
return 0;
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:16:4: error: 'q' was not declared in this scope
   16 | if(q > 0){
      |    ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int a[4][3][10], n, b, f, r, v;

for(int q = 0; q < 4; q++)
 for(int w = 0; w < 3; w++)
  for(int s = 0; s < 10; s++) a[q][w][s] = 0;

cin >> n;
for( int i = 0; i < n; i++){
 cin >> b >> f >> r >> v;
 a[b][f][r] += v;
}
for(int b = 0; b < 4; b++){
if(q > 0){
cout << "####################" << endl;
}
 for(int f = 0; f < 3; f++){
  for(int r = 0; r < 10; r++){
   cout << " " << a[b][f][r];
}
cout << endl;
}
}
return 0;
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:16:4: error: 'q' was not declared in this scope
   16 | if(q > 0){
      |    ^
Language: C++

#include<cstdio>
#include<algorithm>
#include<cstring>
#include<iostream>
using namespace std;
int main() {
    int  tou[4 + 1][3 + 1][10 + 1] = { 0 };
    int n, b, f, r, v, i, j, h;
    cin >> n;
    for (i = 0; i < n; i++) {
        cin >> b >> f >> r >> v;
            tou[b][f][r] += v;
    
    }
    for (i = 1; i < 5; i++) {
        for (j = 1; j < 4; j++) {
            for (h = 1; h < 11; h++) {
                if (tou[i][j][h] < 0) {
                    tou[i][j][h] = 0
                }
           
                if (h != 10) {
                    cout << ' ' << tou[i][j][h];
                }
                else {
                    cout << ' ' << tou[i][j][h] << endl;
                }
            }
        }
        if (i != 4) {
            cout << "####################" << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:37: error: expected ';' before '}' token
   19 |                     tou[i][j][h] = 0
      |                                     ^
      |                                     ;
   20 |                 }
      |                 ~
Language: C++

#include <iostream>

using namespace std;

class HOUSE{
  int 

int main(void){
  
  int num;
  int house[4][3][10] = {0};
  
  cin >> num;

  for(int i=0; i<num; i++){
      int build,floor,number,person;
      cin >> build >> floor >> number >> person;

      house[build - 1][floor - 1][number - 1] =+ person;
  }

  for(int i=0; i<4; i++){
     for(int j=0; j<3; j++){
        for(int k=0; k<10; k++){
            cout << " " << house[i][j][k];
        }
        cout << endl;
     }
     for(int j=0; j<20; j++)
        cout << "#";
     cout << endl;
  }
  
  

  return 0;
}

Compiler output:
a.cc:6:3: error: two or more data types in declaration of 'main'
    6 |   int
      |   ^~~
a.cc:37:2: error: expected '}' at end of input
   37 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | class HOUSE{
      |            ^
a.cc:37:2: error: expected unqualified-id at end of input
   37 | }
      |  ^
Language: C++

//============================================================================
// Name        : AOL.cpp
// Author      : Akari Fujii
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;

int main() {
	int a[5][4][11];
	int n;
	int b;
	int f;
	int r;
	int v;
	cin>>n;
	for(int i=0;  i<5; i++){
		for(int j=0;  j<4; j++){
			for(int k=0;  k<11; k++){
				a[i][j][k]=0;
			}
		}
	}

	for(int i=0;  i<n; i++){
		cin>>b>>f>>r>>v;
		a[b][f][r]+=v;
	}
	for(int i=1;  i<4; i++){
		for(int j=1;  j<4; j++){
			for(int k=1;  k<10; k++){
				cout<<a[i][j][k]<<" ";
			}
			cout<<a[i][j][10]<<endl;
		}
		cout<<"####################"<<endl;
	}
	for(int j=1;  j<4; j++){
		for(int k=1;  k<10; k++){
			cout<<a[4][j][k]<<" ";
		}
		cout<<a[4][j][10]<<endl;
	}

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

#include <iostream>
using namespace std;
int main(){
  int n, b, f, r, a, v[4][3][10];
  int a = 0;
  bool x[4][3][10] = {};
  cin >> n;
  for(int i=0; i<n; i++){
   cin >> b >> f >> r >> a;
   if(x[b-1][f-1][r-1]){
    v[b-1][f-1][r-1] += a;
    break;
   }
   x[b-1][f-1][r-1] = true;
   v[b-1][f-1][r-1] = a;    
  }
  for(int s=0; s<4; s++){
   for(int j=0; j<3; j++){
    for(int t=0; t<10; t++){
      if(x[s][j][t])
       cout << ' ' << v[s][j][t];
      else
       cout << ' ' << 0;
    }
    cout << endl;
  }
  if(s == 3)
   break;
  cout << "####################" << endl;
 }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: redeclaration of 'int a'
    5 |   int a = 0;
      |       ^
a.cc:4:19: note: 'int a' previously declared here
    4 |   int n, b, f, r, a, v[4][3][10];
      |                   ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
    int???residence [4][3][10]={};//?£????????????¨?±?
    int InputSize=0;
    int b=0;//building??????
    int f=0;//floor??????
    int r=0;//room??????
    
    /*
    ???????????????
    ???????????????????????????????§?????????°??????????????????????????????????§??????£??????????????¨?????¨?????????
    ???????????????????????????????????£????????????
    */



    //??\?????????
    cin>>InputSize;
    for(int i=0;i<InputSize;i++)
    {
        cin>>b>>f>>r;
//b,f,r??????1????????°?????\????????????????????¢????????????????????¨????????????
        cin>>residence>>[b-1][f-1][r-1];
    }


    //????????????
    for(int b=0;b<4;i++)//?£?????????????
        {
            for (int j=0;j<3;j++)//???????????????
            {
                for(int k=0;k<10;k++)//??¨?±?????????????
                {
                    cout<<residence[i][j][k];
                }
                cout<<\b<<endl;
            }
        //?£??????????????????¨???????????£??????'#'???10??¨??????????????????????????????????¬?????£???¨????????????????????????
        //3??????????£???§???'#'?????¨?????????????????§if??§?????¶???????????????
        if(b<3)cout<<"####################"<<endl;
    }
    return 0;
}
//???????????¨???????????????????§???§???

Compiler output:
a.cc:39:23: error: stray '\' in program
   39 |                 cout<<\b<<endl;
      |                       ^
a.cc: In function 'int main()':
a.cc:6:8: error: expected unqualified-id before '?' token
    6 |     int???residence [4][3][10]={};//?£????????????¨?±?
      |        ^
a.cc:26:14: error: 'residence' was not declared in this scope
   26 |         cin>>residence>>[b-1][f-1][r-1];
      |              ^~~~~~~~~
a.cc:26:27: error: expected ',' before '-' token
   26 |         cin>>residence>>[b-1][f-1][r-1];
      |                           ^
      |                           ,
a.cc:26:27: error: expected identifier before '-' token
a.cc: In lambda function:
a.cc:26:30: error: expected '{' before '[' token
   26 |         cin>>residence>>[b-1][f-1][r-1];
      |                              ^
a.cc: In function 'int main()':
a.cc:26:30: error: no match for 'operator[]' (operand types are 'main()::<lambda()>' and 'int')
a.cc:31:21: error: 'i' was not declared in this scope
   31 |     for(int b=0;b<4;i++)//?£?????????????
      |                     ^
a.cc:37:27: error: 'residence' was not declared in this scope
   37 |                     cout<<residence[i][j][k];
      |                           ^~~~~~~~~
Language: C++

#include<stdio.h>

int main(){
  int n,b,f,r,v;
  int x[4][3][10]={{0}};
  int i,j,k;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d %d %d %d",&b,&f,&r,&v);
    x[b][f][r]=v
    }
  for(i=0;i<4;i++){
    for(j=0;j<3;j++){
      for(k=0;k<10;k++){
        printf(" %d",x[i][j][k]);
      }
      printf("\n");
    }
    if(i<3){
      printf("####################\n")
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: expected ';' before '}' token
   10 |     x[b][f][r]=v
      |                 ^
      |                 ;
   11 |     }
      |     ~            
a.cc:20:39: error: expected ';' before '}' token
   20 |       printf("####################\n")
      |                                       ^
      |                                       ;
   21 |     }
      |     ~
Language: C++

#include<stdio.h>

int main(){
  int n,b,f,r,v;
  int x[4][3][10]={{0}};
  int i,j,k;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d %d %d %d",&b,&f,&r,&v);
    x[b][f][r]=v;
    }
  for(i=0;i<4;i++){
    for(j=0;j<3;j++){
      for(k=0;k<10;k++){
        printf(" %d",x[i][j][k]);
      }
      printf("\n");
    }
    if(i<3){
      printf("####################\n")
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:39: error: expected ';' before '}' token
   20 |       printf("####################\n")
      |                                       ^
      |                                       ;
   21 |     }
      |     ~
Language: C++

#include <stdio.h>
int main(){
  int n,b,f,r,v,i,j;
  int A[3][10];B[3][10],C[3][10],D[3][10];
  scanf("%d",&n);
  for (i=0;i<n;i++){
    scanf(" %d %d %d %d",&b,&f,&r,&v);
    if (b==1) {
      A[f-1][r-1]+=v;
    } else if (b==2) {
      B[f-1][r-1]+=v;
    } else if (b==3) {
      C[f-1][r-1]+=v;
    } else if (b==4) {
      D[f-1][r-1]+=v;
    }
  }
  for (i=0;i<3;i++){
    for (j=0;j<10;j++){
      if (i==0){
        printf(" %d",A[i][j]);
      } else if (i==1){
        printf(" %d",B[i][j]);
      } else if (i==2){
        printf(" %d",C[i][j]);
      }
    }
    printf("\n");
    printf("##########\n");
  }
  for (j=0;j<10;j++){
    printf(" %d",D[3][j]);
  }
  printf("\n");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:16: error: 'B' was not declared in this scope
    4 |   int A[3][10];B[3][10],C[3][10],D[3][10];
      |                ^
a.cc:4:25: error: 'C' was not declared in this scope
    4 |   int A[3][10];B[3][10],C[3][10],D[3][10];
      |                         ^
a.cc:4:34: error: 'D' was not declared in this scope
    4 |   int A[3][10];B[3][10],C[3][10],D[3][10];
      |                                  ^
Language: C++

#include <stdio.h>
int main(){
  int n,b,f,r,v,i,j;
  int A[3][10],B[3][10],C[3][10],D[3][10];
  for (i=0;i<4;i++){
    for (j=0;j<10;j++){
      A[i][j]=0;
      B[i][j]=0;
      C[i][j]=0;
      D[i][j]=0;
    }
  }
  scanf("%d",&n);
  for (i=0;i<n;i++){
    scanf(" %d %d %d %d",&b,&f,&r,&v);
    if (b==1) {
      A[f-1][r-1]+=v;
    } else if (b==2) {
      B[f-1][r-1]+=v;
    } else if (b==3) {
      C[f-1][r-1]+=v;
    } else if (b==4) {
      D[f-1][r-1]+=v;
    }
  }
  for (p=0;p<3;p++){
    for (i=0;i<4;i++){
      for (j=0;j<10;j++){
        if (p==0){
          printf(" %d",A[i][j]);
        } else if (p==1){
          printf(" %d",B[i][j]);
        } else if (p==2){
          printf(" %d",C[i][j]);
        } 
        }
        printf("\n");
      }
      printf("####################\n");
    }
  for (i=0;i<4;i++){
    for (j=0;j<10;j++){
      printf(" %d",D[i][j])
    }
    printf("\n");
  }
  printf("\n");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:8: error: 'p' was not declared in this scope
   26 |   for (p=0;p<3;p++){
      |        ^
a.cc:43:28: error: expected ';' before '}' token
   43 |       printf(" %d",D[i][j])
      |                            ^
      |                            ;
   44 |     }
      |     ~
Language: C++

#include <iostream>

int main() {
  const int buildings = 3;
  const int floors = 3;
  const int rooms = 10;
  int persons[buildings][floors][rooms] = {};
  int b;
  int f;
  int r;
  int v;
  int n;
  std::cin >> n;

  for(int i = 0; i < n; ++i) {
    std::cin >> b >> f >> r >> v;
    if(v == -1;) {
      persons[b][f][r] = 0;
    }
    else {
      persons[b][f][r] = v;
  }

  for(int i = 0; i < buildings; ++i) {
    for(int j = 0; j < floors; ++j) {
      for(int k = 0; k < rooms; ++k) {
        std::cout << " " << persons[i][j][k];
      }
      std::cout << std::endl;
    }
    for(int j = 0; j < 20; ++j) {
      std::cout << "#" << std::endl;
    }
    std::cout << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: expected primary-expression before ')' token
   17 |     if(v == -1;) {
      |                ^
a.cc:34:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   34 |     std::cout << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <iostream>

int main() {
  const int buildings = 3;
  const int floors = 3;
  const int rooms = 10;
  int persons[buildings][floors][rooms] = {};
  int b;
  int f;
  int r;
  int v;
  int n;
  std::cin >> n;

  for(int i = 0; i < n; ++i) {
    std::cin >> b >> f >> r >> v;
    if(v == -1) {
      persons[b][f][r] = 0;
    }
    else {
      persons[b][f][r] = v;
  }

  for(int i = 0; i < buildings; ++i) {
    for(int j = 0; j < floors; ++j) {
      for(int k = 0; k < rooms; ++k) {
        std::cout << " " << persons[i][j][k];
      }
      std::cout << std::endl;
    }
    for(int j = 0; j < 20; ++j) {
      std::cout << "#" << std::endl;
    }
    std::cout << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   34 |     std::cout << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <iostream>

int main() {
  const int buildings = 3;
  const int floors = 3;
  const int rooms = 10;
  int persons[buildings][floors][rooms] = {};
  int b;
  int f;
  int r;
  int v;
  int n;
  std::cin >> n;

  for(int i = 0; i < n; ++i) {
    std::cin >> b >> f >> r >> v;
    if(v == -1) {
      persons[b][f][r] = 0;
    }
    else {
      persons[b][f][r] = v;
  }

  for(int i = 0; i < buildings; ++i) {
    for(int j = 0; j < floors; ++j) {
      for(int k = 0; k < rooms; ++k) {
        std::cout << " " << persons[i][j][k];
      }
      std::cout << std::endl;
    }
    for(int j = 0; j < 20; ++j) {
      std::cout << "#" << std::endl;
    }
    std::cout << std::endl;
  }

  return 0;
}

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

x = {}
for i in range(4):
    for j in range(3):
        for k in range(10):
            i,j,k = str(i), str(j), str(k)
            x[i+j+k] = 0

n = int(input())
for i in range(n):
    i,j,k,l = map(int, input().split())
    key = str(i-1)+str(j-1)+str(k-1)
    x[key] = x[key] + int(l)

for i in range(4):
    for j in range(3):
        for k in range(10):
            i,j,k = str(i), str(j), str(k)
            if k != "9":
                print(str(x[i+j+k]), end=' ')
            else:
                print(x[i+j+k])
    if int(i) + 1 < 4:
        print("#"*20)

Compiler output:
a.cc:1:1: error: 'x' does not name a type
    1 | x = {}
      | ^
a.cc:2:1: error: expected unqualified-id before 'for'
    2 | for i in range(4):
      | ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	int N, b, f, r, v, a[3][2][9];
	for(int i = 0; i < 4; i++){
		for(int j = 0; j < 3; j++){
			for(int k = 0; k < 10; k++){
				a[i][j][k] = 0;
			}	
		}
	}
	cin >> N;
    for(int l = 0; l < N; l++){
    	cin >> b >> f >> r >> v;
        a[b][f][r] += v;
    }
    for(i = 0; i < 4; i++){
    	if(i > 0){
    		cout << "####################";
    	}
    	for(j = 0; j < 3; j++){
    		for(k = 0; k < 10; k++){
    			cout << " " << a[i][j][k];
    		}
    		cout << endl;
    	}
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'i' was not declared in this scope
   17 |     for(i = 0; i < 4; i++){
      |         ^
a.cc:21:13: error: 'j' was not declared in this scope
   21 |         for(j = 0; j < 3; j++){
      |             ^
a.cc:22:21: error: 'k' was not declared in this scope
   22 |                 for(k = 0; k < 10; k++){
      |                     ^
Language: C++

#include <iostream>
#include <cstdio>
#include <iomanip>
using namespace std;
const int M = 100000;
const double pi = 3.141592653589;

int main()
{
	int n;
	int b[M], f[M], r[M], v[M];

	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> b[i] >> f[i] >> r[i] >> v[i];
	}

	for (int i = 0; i < 4; i++) {
		int a[3][10] = { 0 };
		for (int k = 0; k < n; k++) {
			if (b[k] == i) {
				a[f[k] - 1][r[k] - 1] = v[k];
			}
		}
		for (int m = 0; m < 3; m++) {
			for (int l = 0; l < 10; l++) {
				cout << a[m][l];
				if (l == 9) cout << endl;
				else cout << " ";
			}
		}
		if (i != 3) {
			cout << "####################" << endl;
		}
	}

	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:37:18: error: expected '}' at end of input
   37 |         return 0;
      |                  ^
a.cc:9:1: note: to match this '{'
    9 | {
      | ^
Language: C++

#include <iostream>
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
	int n;//??\?????????????????±?????°
	int count[5][4][11]={0};//4?£?3???10??¨?±?
	int b,f,r;//b?£?f??????r??????
	int v;//v???
	cin>>n;
	
	for(int i=0;i<n;i++){
		cin>>b>>f>>r>>v;
		count[b][f][r]+=v;
		

	}

	for(int f=1;f<=4;f++){
		if(f>1)cout<<"####################"<<endl;
		for(int b=1;b<=3;b++){
			for(int r=1;r<=10;r++){
			cout<<" "<<count[f][b][r];



		}
			cout<<endl;

		}
		
	}
	return 0;
}

Compiler output:
a.cc:4:22: error: '_TCHAR' has not been declared
    4 | int _tmain(int argc, _TCHAR* argv[])
      |                      ^~~~~~
Language: C++

#include <iostream>

int main()
{
	int n, b, f, r, v;
	int c[4][3][10] {};
	cin >> n;
	for (int i=0; i!=n; ++i) {
		cin >> b >> f >> r >> v;
		c[b-1][f-1][r-1] += v;
	}
	for (int i=0; i!=4; ++i) {
		for (int j=0; j!=3; ++j) {
			for (int k=0; k!=10; ++k) {
				std::cout << c[i][j][k] << (k!=9 ? ' ' : '\n');
			}
		}
		if (i==3) std::cout << "####################\n";
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin >> n;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
int main(){
    int n, b, f, r, v;
    cin >> n;
    int dmiA[3][10];
    int dmiB[3][10];
    int dmiC[3][10];
    int dmiD[3][10];
    for(int i = 0; i < 3; i++){
        for(int j = 0; j < 10; j++){
            dmiA[i][j] = 0;
            dmiB[i][j] = 0;
            dmiC[i][j] = 0;
            dmiD[i][j] = 0;
        }
    }
    for(int i = 0; i < n; i++){
        cin >> b >> f >> r >> v;
        if(b == 1) dmiA[f - 1][r - 1] = v + dmiA[f - 1][r - 1];
        if(b == 2) dmiB[f - 1][r - 1] = v + dmiB[f - 1][r - 1];
        if(b == 3) dmiC[f - 1][r - 1] = v + dmiC[f - 1][r - 1];
        if(b == 4) dmiD[f - 1][r - 1] = v + dmiD[f - 1][r - 1];
    }
    for(int i = 0; i < 3; i++){
        for(int j = 0; j < 10; j++){
            if(j == 9){
                cout << dmiA[i][j];
                continue;
            }
            cout << dmiA[i][j] << " " ;
        }
        cout << "" << endl;
    }
    cout << "####################" << endl;
    for(int i = 0; i < 3; i++){
        for(int j = 0; j < 10; j++){
            if(j == 9){
                cout << dmiB[i][j];
                continue;
            }
            cout << dmiB[i][j] << " " ;
        }
        cout << "" << endl;
    }
    cout << "####################" << endl;
    for(int i = 0; i < 3; i++){
        for(int j = 0; j < 10; j++){
            if(j == 9){
                cout << dmiC[i][j];
                continue;
            }
            cout << dmiC[i][j] << " " ;
        }
        cout << "" << endl;
    }
    cout << "####################" << endl;
    for(int i = 0; i < 3; i++){
        for(int j = 0; j < 10; j++){
            if(j == 9){
                cout << dmiD[i][j];
                continue;
            }
            cout << dmiD[i][j] << " " ;
        }
        cout << "" << endl;
    }
return 0;

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

#include<iostream>
using namespace std;
??
int main()
{
????int OH[4][3][10]={};
????int b,f,r,v,n;
??
????cin>>n;
????for(int i=0;i<n;i++){
????????cin>>b>>f>>r>>v;
????????OH[b-1][f-1][r-1]+=v;
????}
????for(int k=0;k<4;k++){
????????for(int i=0;i<3;i++){
????????????for(int j=0;j<10;j++){
????????cout<<" "<<OH[k][i][j];
????????????}
????????????cout<<endl;
????????}
????????if(k!=3)cout<<"####################"<<endl;
????}
????return 0;
}

Compiler output:
a.cc:3:1: error: expected unqualified-id before '?' token
    3 | ??
      | ^