목록전체 글 (13)
맛만 볼게요
마무: 리눅스 독학 사이트 (mamu2830.blogspot.com)

환경: 윈도우10 + ubuntu 22.04 듀얼 부팅 .. 을 다른 데스크탑에서(윈도우10 wsl + ubuntu20.04) ssh로 접속 후 진행 중 책: 도전 임베디드 os 만들기 _ 이만우 사용 파일: qemu, arm-linux-gcc-3.3.2(크로스 컴파일러란? 크로스 컴파일러 설치 방법!! (도전 임베디드 OS 만들기) (tistory.com)), gumstix_uboot(도전 임베디드 OS 만들기 - qemu, u-boot 설치(Ubuntu 18.04 64bit ver) (tistory.com)), ezboot - qemu 설치 sudo apt-get install -y qemu sudo apt-get install -y qemu-system - arm-linux-gcc 설치 git cl..
HTML 삽입 미리보기할 수 없는 소스 후.. 해결까지 너무 오래 걸렸음... 며칠 만에 간신히 해결했..... 일단 세 번의 구현을 거침. 첫 번째 코드는 생각없이 막 썼는데, 테스트 케이스는 통과했으나, 제출 실패였고, print 찍으면서 되짚어 보니 너무 주먹구구식에 개판이라 일단 얘는 걍 버림. 두 번째 코드는 이제 나름 생각해 보면서 씀. 그러나 얘는 테스트 케이스는 통과했지만, 제출 시 실패 케이스 한 두 개 보이고 나머지 죄다 시간 초과...; 다시 보니 함수에서 함수를 들어가고를 반복하다 보니 결과적으로 최대 5중 반복이 ㅋㅋㅋ.... 물론 5중첩이 원인이 아닐 가능성 매우 농후. 얘도 문제 많아 보여서 다시 보기는 싫음. 여기까지 이미 며칠이 지나버림;; 그리고 최종 세 번째 코드는 생각..
HTML 삽입 미리보기할 수 없는 소스 #include #include #include int solution(int arrayA[], size_t arrayA_len, int arrayB[], size_t arrayB_len) { int answer = 0; int* a = malloc(sizeof(int) * arrayA_len); int* b = malloc(sizeof(int) * arrayB_len); int a_idx = 0, b_idx = 0; // a b 공약수들 for (int i = 2; i answer) { answer = b[i]; } } } } return answer; } a, b 배열을 아무 생각 없이 int a[(int)arrayA_len] = .... 이렇게 하려니 배열 크..
HTML 삽입 미리보기할 수 없는 소스 #include #include #include int compare(const void* a, const void* b) { if (*(int*)a > *(int*)b) return -1; else if (*(int*)a < *(int*)b) return 1; else return 0; } int solution(int k, int m, int score[], size_t score_len) { int answer = 0; int num = (int)score_len / m; int **tmp; // score sorting qsort(score, score_len, sizeof(int), compare); // split size m tmp = malloc(si..