반응형

전체 글 312

프로그래머스 SQL [SUM,MAX,MIN]

최댓값 구하기 -- 코드를 입력하세요 SELECT max(DATETIME) from ANIMAL_INS max를 사용하여 최댓값 출 최솟값 구하기 -- 코드를 입력하세요 SELECT min(DATETIME) from ANIMAL_INS min 사용하여 최솟값 출력 동물 수 구하기 -- 코드를 입력하세요 SELECT count(ANIMAL_ID) as count from ANIMAL_INS count를 사용하여 ANIMAL_ID의 총 개수를 출력 중복 제거하기 -- 코드를 입력하세요 SELECT count(distinct NAME) as count from ANIMAL_INS where NAME is not NULL distinct를 사용하여 중복을 제외하고 where을 사용하여 NULL값을 제외한 NAM..

깃허브 git could not be found at the expected path 에러 [깃허브데스크탑]

GitHub Desktop 에러 평소와 같이 사용하던 중 갑자기 이런에러가 뜨며, 실행이 되지않아서 구글로 해결법을 찾아봤다. 검색결과 1. 깃허브데스크탑 제거 2. %LOCALAPPDATA%\GitHubDesktop\ 와 %APPDATA%\GitHub Desktop 각각 의 폴더를 삭제 3. 깃허브데스크탑 설치 위의 과정을 그대로 따라하니 해결되었다. 2번의 폴더들을 찾을때 쉽게 찾기위해서 cmd에서 명령어를 활용하면 편하다. dir C:\ /s /ad | find /i "GitHub Desktop " dir C:\ /s /ad | find /i "GitHubDesktop " 출처: https://stackoverflow.com/questions/48246205/github-desktop-git-cou..

Programming/Error 2022.05.06

백준 5567 c++ [결혼식]

#include #include #include #include #include #include using namespace std; int n, m; vectorv[10001]; int t1, t2; sets; void bfs(int start) { queueq; q.push({ start,0 }); while (!q.empty()) { int qx = q.front().first; int qcnt = q.front().second; q.pop(); if (qcnt > 2)continue;//qcnt가 2보다 크다면 상근이의 친구 및 친구의친구가 아닌경우 s.insert(qx); for (int i = 0; i < v[qx].size(); i++) q.push({v[qx][i], qcnt+1}); } ..

백준 16943 c++ [숫자재배치]

#include #include #include #include #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int a, b, c; c = -1; cin >> a >> b; string str = to_string(a); sort(str.begin(), str.end());//next_permutation을 사용하기 위해 오름차순 정렬 do { int num = stoi(str); if (str[0] == '0')continue;//문자열의 첫번째 문자가 0이면 정수로변환했을때 자리수가 변경됨으로 순열X if (num < b && c < num)//b보다 작으면서 현..

백준 1063 c++ [킹]

#include #include #include #include #include #include using namespace std; int map[8][8];//체스판 string str, str2, od;//킹의위치입력, 돌의위치입력, 움직이는정보 int n;//움직이는횟수 vectorv(2);//킹,돌의 좌표저장할 vector int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> str >> str2 >> n; for (int i = 0; i < str.length(); i++)//킹의위치 저장, 좌표상 0,0 은 체스판으로 8,a { if (i == 0) { int idx = 0; for (char j = '..

[백준] 2667 단지번호붙이기 c++

#include #include #include #include #include #include using namespace std; int n;//지도의크기, 지도는 정사각형 int map[26][26]; bool visited[26][26]; int dx[4] = { 1,0,-1,0 };//상하좌우탐색 int dy[4] = { 0,1,0,-1 }; int cnt = 0;//총 단지 수 vectorv;//단지내 집의 수 void bfs(int x,int y) { queueq; q.push({ x,y }); visited[x][y] = true; map[x][y] = -1; int temp = 1;//입력받은 좌표값부터 시작함으로 temp는 1부터시작, temp는 단지내 집의 수 while (!q.emp..

[백준] 7569 토마토 c++

#include #include #include #include #include using namespace std; //1익은토마토, 0익지않은토마토, -1비어있는칸 //저장될때부터 익어있으면 0 출력, 모두 익지못하는 상황이면 -1 출력 typedef struct { int x; int y; int z; }node; int n, m, h;//세로,가로,높이 칸수 int map[101][101][101]; bool visited[101][101][101]; int dx[6] = { 0,0,0,0,1,-1 }; int dy[6] = { 0,1,0,-1,0,0 }; int dz[6] = { 1,0,-1,0,0,0 }; int answer = 0; int num = 0; int num2 = 0; vector..

반응형