/*
#include <stdio.h>
int top = 0;
int main()
{
char str[100001] = {};
gets(str);
int len = strlen(str), a = 0;
for(int i = 0; i < len; i++){
if(str[i] == '(' && str[i+1] == '('){
top++;
}
else if(str[i] == ')'){
top--;
a++;
}
else if(str[i] == '(' && str[i+1] == ')'){
a += top;
i++;
}
}
printf("%d", a);
}
*/
/*
#include <stdio.h>
#define SIZE 10
int stack[SIZE] = {};
int top = -1;
void push(int b)
{
stack[++top] = b;
}
int pop()
{
if(top != -1)
return stack[top--];
}
void view()
{
printf("stack : \n");
for(int i = 0; i <= top; i++)
{
printf("%d\n", stack[i]);
}
printf("\n");
}
int main()
{
int a, b;
printf("**********stack***********\n");
while(1){
printf("1. push 2. pop 3. view 4. exit >> ");
scanf("%d",&a);
if(a==1){
if(top >= SIZE-1){//
printf("stack is full.\n");
continue;
}
printf("push할 데이터를 입력하세요 >> ");
scanf("%d",&b);
push(b);
}
else if(a==2){
if(top == -1){//
printf("stack is empty.\n");
continue;
}
printf("pop한 데이터는 %d 입니다.\n",pop());
}
else if(a==3){
if(top == -1){
printf("Nothing to view\n");
}
else view();
}
else if(a==4){
break;
}
printf("\n");
}
}
Queue
*/
/*
#include <stdio.h>
#define SIZE 5
int queue[SIZE] = {};
int f = 0;
int r = 0;
void enqueue(int b)
{
r=(r+1)%SIZE;
queue[r] = b;
}
int dequeue()
{
f=(f+1)%SIZE;
return queue[f];
}
void view()
{
if(f<r)
for(int i = f+1; i <= r; i++)
printf("%d ", queue[i]);
else{
for(int i=f+1;i<SIZE;i++) printf("%d ", queue[i]);
for(int i=0;i<=r;i++) printf("%d ", queue[i]);
}
printf("\n");
}
int main()
{
int a,b;
while(1){
printf("Select between these actions : 1. enqueue 2. dequeue 3. view 4. exit >> ");
scanf("%d", &a);
if(a == 1){
if((r+1)%SIZE == f){
printf("Queue is full\n");
}
else{
printf("Enter the number to Enqueue >> ");
scanf("%d", &b);
enqueue(b);
}
continue;
}
else if(a == 2){
if(f == r){
printf("None to be dequeued \n");
}
else{
printf("Number dequeued was %d \n", dequeue());
}
continue;
}
else if(a == 3){
if(f == r){
printf("Nothing to be viewed\n");
}
else{
view();
}
continue;
}
else if(a == 4){
break;
}
}
}
*/
#include <stdio.h>
int main()
{
int n, x, y, arr[101][101] = {};
scanf("%d", &n);
for(int i = 0; i < n; i++){
scanf("%d %d", &x, &y);
arr[y][x] = 4;
}
for(int i = 0; i < 101; i++){
for(int j = 0; j < 101; j++){
printf("%d", arr[i][j]);
}
printf("\n");
}
}