top of page

소스 코드 제출

공개·회원 52명

2025.6.13

/*#include<stdio.h>


int n, m, k, a;

char str[305][305]={};


int f(int x, int y, int cnt)

{

int i;

if(x==n-1&&y==m-1){

a=cnt;

return 0;

}

if(cnt>=a){

return 0;

}

if(str[x+1][y]=='.'){

f(x+1, y, cnt+1);

}

if(str[x][y+1]=='.'){

f(x, y+1, cnt+1);

}

for(i=1; i<=k; i++){

if(str[x+i][y+i]=='.'){

f(x+i, y+i, cnt+1);

}

}

return a;

}

int main()

{

int i, q, x, y, b;

scanf("%d%d%d", &n, &m, &k);

for(i=0; i<n; i++){

scanf("%s", str[i]);

}

scanf("%d", &q);

for(i=0; i<q; i++){

a=10000;

scanf("%d%d", &y, &x);

b=f(x-1, y-1, 0);

if(b%2==1){

printf("First\n");

}

else{

printf("Second\n");

}

}

return 0;

}*/


#include<stdio.h>


int arr[5000][5000]={};

int w[5000][5000]={};

int main()

{

int n, q, i, j, a, b, c, d, v, cnt=0, x=1, y=1;

scanf("%d%d", &n, &q);

for(i=0; i<n; i++){

scanf("%d%d%d", &a, &b, &c);

arr[a][b]=1;

w[a][b]=c;

}

for(i=0; i<m; i++){

scanf("%d%d", &d, &v);

if(d==0){

a=x;

b=x+v;

}

if(d==1){

v*=-1;

}

if(d==0||d==1){

for(j=0; j<5000; j++){

}

}

else{

}

//d=0일 때, arr[x>=n<=x+v][y]

//d=1일 때, arr[x-v>=n<=x][y]

//d=2일 때, arr[x][y>=n<=y+v]

//d=3일 때, arr[x][y-v>=n<=y]

}

}

2회 조회
주소 : 경기도 용인시 광교중앙로 302 블루 스퀘어 602호
연락처 : 031) 216 - 1546 ,     031) 215 - 1546
사업자등록번호 : 465-92-00916
​학원 등록 제 4603호
bottom of page