공부
-
[BOJ] 17086 아기 상어 2 / C++공부/PS (백준) 2022. 3. 29. 23:14
https://www.acmicpc.net/problem/17086 17086번: 아기 상어 2 첫째 줄에 공간의 크기 N과 M(2 ≤ N, M ≤ 50)이 주어진다. 둘째 줄부터 N개의 줄에 공간의 상태가 주어지며, 0은 빈 칸, 1은 아기 상어가 있는 칸이다. 빈 칸의 개수가 한 개 이상인 입력만 주어진다. www.acmicpc.net #include #include #include using namespace std; int N, M; // 2 = M || visited[nr][nc]) continue; visited[nr][nc] = 1; q.push({ nr,nc, cur_t + 1 }); } } return 0; } void solve() { for (int i = 0; i < blank_sp..
-
[C++] sort( )를 이용한 구조체 정렬공부/C, C++ 2022. 1. 12. 01:05
#include #include #include using namespace std; int N; struct st { int start, end; }; struct st meeting[100000 + 10]; bool cmp(const struct st &m1, const struct st &m2) { if (m1.start < m2.start) { return true; } else if (m1.start == m2.start) { return m1.end < m2.end; } else { return false; } } int main(void) { scanf("%d", &N); for (int i = 0; i < N; i++) { scanf("%d %d", &meeting[i].start, &me..
-
[MongoDB] data types공부/MongoDB 2022. 1. 11. 23:39
text boolean - true/false number - NumberInt (int32) / NumberLong (int64) / NumberDecimal shell에 숫자를 입력하면 기본적으로 float형(64bit)으로 저장함. mongodb shell이 javascript 기반인데, javascript는 integer와 floating point value 간 구분을 하지 않기 때문 ObjectId ISODate("2022-01-11") / Timestamp(1641908460) Embedded Document Array
-
[git] 로컬 저장소에서 변경한 내역을 원격 저장소에 반영하기공부/etc 2022. 1. 10. 02:00
상황: 로컬 파일 [15729_방탈출.c]를 원격 저장소에 push한 후, 로컬 저장소에서 [15729_방탈출.c]를 [15729.c]로 수정한 후 [15729.c]를 원격 저장소에 push함 원격 저장소에는 아래와 같이 2개의 파일이 존재하고 로컬 저장소에는 15729.c 파일만 존재하는 상황에서 원격 저장소에서도 15729_방탈출.c 파일 삭제 내역을 반영하고 싶음 git status 명령어를 통해 deleted된 15729_방탈출.c 파일이 commit이 되지 않은 것을 확인 git commit -am "15729_방탈출.c 삭제" 를 통해 commit 작업 수행 후 git push origin master 명령어를 수행하면 됨! 아래와 같이 원격 저장소에 로컬 저장소 변경 내역이 반영된 것을 확인..
-
[javascript] javascript 관련 특성공부/javascript 2022. 1. 9. 23:57
monkey patch: 런타임 중인 프로램의 내용이 변경되는 행동 자바스크립트의 요상한 특성..은 아래 사이트에서 참고가능 https://jsisweird.com/ Jacob Bergdahl Full-stack developer, designer, author, writer, and speaker. jacobbergdahl.com https://github.com/aemkei/jsfuck GitHub - aemkei/jsfuck: Write any JavaScript with 6 Characters: []()!+ Write any JavaScript with 6 Characters: []()!+. Contribute to aemkei/jsfuck development by creating an acco..