전체 글 (602) 썸네일형 리스트형 QUICKSORT #include #include using namespace std; const int MAX_BUFFER_SIZE = 1024; void quick(vector &items, int start, int end); void splitStringWithDelim(char* source, vector &result, char delim, int maxSize); int main() { int caseNum = 0, elemNum = 0; char inputBuffer[MAX_BUFFER_SIZE]; vector items; cin >> caseNum; for (int cIter = 0; cIter > elemNum; cin.ignore(); items.clea.. MERGESORT #include #include using namespace std; const int MAX_BUFFER_SIZE = 1024; vector items; vector sort(int start, int end); vector merge(vector &first, vector &second); void splitStringWithDelim(char* source, vector &result, char delim, int maxSize); int main() { int caseNum = 0, itemNum = 0; char inputBuffer[MAX_BUFFER_SIZE]; cin >> caseNum; for (int cIter = 0; cIter > it.. CLOCKSYNC #include #include using namespace std; const int MAX_BUFFER_SIZE = 1024; const int SWITCH_NUM = 10; const int CLOCK_NUM = 16; const char* switches[10] = { {"oooxxxxxxxxxxxxx"}, {"xxxoxxxoxoxoxxxx"}, {"xxxxoxxxxxoxxxoo"}, {"oxxxooooxxxxxxxx"}, {"xxxxxxoooxoxoxxx"}, {"oxoxxxxxxxxxxxoo"}, {"xxxoxxxxxxxxxxoo"}, {"xxxxooxoxxxxxxoo"}, {"xoooooxxxxxxxxxx"}, {"xxxoooxxxoxxxoxx"} }; vector clockState; in.. TSP(Traveling Salesman Problem) #include #include #include using namespace std; const int MAX_BUFFER_SIZE = 1024; const int MAX_TOWN_NUM = 8; vector dist; bool visited[MAX_TOWN_NUM]; int townNum = 0; double getMinDistance(int curTown); void splitStringWithDelim(char* source, vector &result, char delim, int maxSize); int main() { int caseNum = 0; char buffer[MAX_BUFFER_SIZE] = {0, }; cin >> caseNum; for (int cIter = 0; cIter < .. BOARDCOVER #include #include using namespace std; const int MAX_WIDTH = 20; const int coverType[4][3][2] = { {{0, 0}, {1, 0}, {1, -1}}, {{0, 0}, {0, 1}, {1, 1}}, {{0, 0}, {1, 0}, {1, 1}}, {{0, 0}, {1, 0}, {0, 1}} }; int boardHeight = 0, boardWidth = 0; int cover(vector &board); bool set(vector &board, int y, int x, int type, int flip); int main() { int caseNum = 0; string inputBuffer; char widthBuffer[MAX_.. PICNIC #include #include using namespace std; const int MAX_BUFFER_SIZE = 1024; int studentCnt = 0, pairCnt = 0; bool areFriend[10][10] = { false, }; int makePairing(bool done[10]); void splitStringWithDelim(char* source, vector &result, char delim, int maxSize); int main() { int caseNum = 0; char areFriendInput[MAX_BUFFER_SIZE]; vector areFriendInputParsed; bool done[10] = { false, }; cin >> caseNum; .. 백준 터렛 문제 (C++) 백준의 터렛 문제를 C++ 로 풀어보았다. #include #include using namespace std; int main() { int caseNum = 0; int x1 = 0, y1 = 0, x2 = 0, y2 = 0; int r1 = 0, r2 = 0; cin >> caseNum; for (int i = 0; i > x1 >> y1 >> r1 >> x2 >> y2 >> r2; double distance = sqrt(pow(abs(x1 - x2), 2) + pow(abs(y1 - y2), 2)); int maxR = r1 + r2, minR = abs(r1 - r2); if (x1 == x2 && y1 == y2 && r1 == r2) cout Kotlin realm-recycler-view 대신 realm-recyclerview Kotlin을 이용하여 안드로이드 앱을 만들다가 접었다. 참고 자료가 Java에 비해 별로 없다는 느낌을 강하게 받았기 때문이다. 그래서 Java를 이용해서 프로젝트를 새로 빌드하고 RealmRecyclerView 를 사용하기 위해 build gradle에 maven { url "https://jitpack.io" } 를 추가하고 dependencies {} 에는 implementation 을 추가하였다. realm 'com.github.thorbenprimke:realm-recycler-view:0.9.4' 을 implementation 하라고 써있었는데 악몽은 여기서부터 시작되었다. dependencies { implementation 'com.github.thorbenprimke:realm-recy.. 이전 1 ··· 72 73 74 75 76 다음 목록 더보기