[프로그래머스 2레벨] 혼자서 하는 틱택토 (C++)
#include #include using namespace std;bool check(vectorboard, char c){ if(board[0][0] == c && board[1][1] == c && board[2][2] == c) return 1; //대각선 체크 if(board[0][2] == c && board[1][1] == c && board[2][0] == c) return 1; for(int i=0; i board) { int answer = 1; int oCnt = 0, xCnt = 0; for(auto i : board) { for(int j=0; j= 2) answer = 0; if(oWin && xWin) ans..
프로그래머스/2레벨
2025. 5. 18. 04:09