13460번:구슬 탈출 2
https://www.acmicpc.net/problem/13460 메모리:1140KB시간:0ms코드길이:2620B#include struct cBead { int xy[4], cnt = 0; };bool visit[11][11][11][11];char map[11][11];char mapCopy[11][11];cBead que[121 * 4];int N, M, head, tail;int arrBead[2];int xyNew[4];int r, c;bool isFinish[2] = { 0, 0 };bool process(int r, int c, int bead, int rOffSet, int cOffSet ){ if (map[r][c] == '#' || map[r][c] == 'T') { xyNew[ar..
2024. 11. 24.
5525번:IOIOI
https://www.acmicpc.net/problem/5525 메모리 : 1968KB시간 : 12ms코드길이 : 343B#include int main(){ char str[1000001]; int N, M, val = 0, cnt = 0, ret = 0; scanf("%d %d %s", &N, &M, &str); for (int i = 2; i 메모리 : 1968KB시간 : 12ms코드길이 : 585B#include int main(){ int N; int M; char str[1000001]; int val = 0, cnt = 0, ret = 0; bool isStart = false; scanf("%d %d %s", &N, &M, &str); for (int i = 0; i = 8) { val..
2024. 11. 24.