[코드트리 조별과제] 2주차
[시뮬레이션 ] 기울어진 직사각형https://www.codetree.ai/missions/2/problems/slanted-rectangle?&utm_source=clipboard&utm_medium=text 대각선 방향 이동이동하면서 직사각형을 만드는 거라서 이동 크기 주의 step1, step2 적용하기 : move[] ={s1, s2, s1, s2}; #include using namespace std;int n, a[20][20], ans;int dy[]={-1,-1,1,1}, dx[]={1,-1,-1,1}; // 우상향-왼상향-왼하향-우하향int calc(int y, int x, int s1, int s2){ int sum=0, ny=y, nx=x; for(int i=1;..
2024. 7. 26.