/* 지뢰 찾기1
#include <stdio.h>
int main(void)
{
int arr[11][11] = {}, x, y, i, j, num=0;
for(i=1; i<=9; i++)
{
for(j=1; j<=9; j++)
{
scanf("%d", &arr[i][j]);
}
}
scanf("%d %d", &x, &y);
if(arr[x][y] == 1)
{
printf("-1");
return 0;
}
for(i=x-1; i<=x+1; i++)
{
for(j=y-1; j<=y+1; j++)
{
if(arr[i][j] == 1)
{
num++;
}
}
}
printf("%d\n", num);
return 0;
}
*/
/* 크레이지 아케이드
#include <stdio.h>
int main(void)
{
int arr[10][10] = {}, bomb[10][10] = {}, player[10][10] = {}, i, j, x, y, n, k;
for(i=0; i<10; i++){
for(j=0; j<10; j++){
scanf("%d", &arr[i][j]);
if(arr[i][j] > 0){
bomb[i][j] = arr[i][j];
}
}
}
scanf("%d", &n);
for(i=0; i<10; i++){
for(j=0; j<10; j++){
if(bomb[i][j]>0){
for(k=j; k<=j+bomb[i][j]; k++){
if(9<k){
break;
}
if(arr[i][k]!=-1){
arr[i][k] = -2;
}else{
break;
}
}
for(k=j; k>=j-bomb[i][j]; k--){
if(0>k){
break;
}
if(arr[i][k]!=-1){
arr[i][k] = -2;
}else{
break;
}
}
for(k=i; k<=i+bomb[i][j]; k++){
if(9<k){
break;
}
if(arr[k][j]!=-1){
arr[k][j] = -2;
}else{
break;
}
}
for(k=i; k>=i-bomb[i][j]; k--){
if(0>k){
break;
}
if(arr[k][j]!=-1){
arr[k][j] = -2;
}else{
break;
}
}
}
}
}
for(i=1; i<=n; i++){
scanf("%d %d", &x, &y);
player[x-1][y-1] = i;
}
for(i=0; i<10; i++){
for(j=0; j<10; j++){
if(player[i][j] > 0){
if(arr[i][j] == -2){
player[i][j] = -1 * player[i][j];
}else{
arr[i][j] = player[i][j];
}
}
printf("%d ", arr[i][j]);
}
printf("\n");
}
printf("Character Information\n");
for(k=1; k<=n; k++){
for(i=0; i<10; i++){
for(j=0; j<10; j++){
if(player[i][j] == k){
printf("player %d survive\n", k);
}else if(player[i][j] == -1*k){
printf("player %d dead\n", k);
}
}
}
}
return 0;
}
*/
/*
#include<stdio.h>
void show() {
printf("This is sub Show Function\n");
}
void talk(int k) {
printf("Received Data is %d\n", k);
}
int sum(int x, int y) {
printf("Send data is %d and %d\n", x, y);
return x+ y;
}
int main() {
printf("This is main Function\n");
show();
talk(100);
printf("Received result is %d\n", sum(100, 200));
}
*/
/*
#include <stdio.h>
int n;
void f(int n)
{
int i=1;
for(i=2; i<n; i++){
if(n%i == 0){
printf("composite");
break;
}
if(i==(n-1)){
printf("prime");
}
}
if(n==2){
printf("prime");
}
}
int main(){
scanf("%d", &n);
f(n);
return 0;
}
*/
/*
#include <stdio.h>
long long int n;
long long int sqrt(long long int n)
{
long long int i;
if(n==0) {
return 0;
}else if(n==1){
return 1;
}
for(i=0; i<n; i++){
if(i*i <= n && (i+1)*(i+1) > n){
return i;
break;
}
}
}
int main()
{
scanf("%lld", &n);
printf("%d\n", sqrt(n));
return 0;
}
*/
/*
#include <stdio.h>
long long int n;
long long int f(long long int n){
long long int i, k=0, len=1;
for(;n>0;){
k=k*10;
k=k+(n%10);
n=n/10;
}
return k;
}
int main()
{
scanf("%lld", &n);
printf("%lld\n", f(n));
return 0;
}
*/



