분류 전체보기
-
-
[백준] 24024번 - 삼색 그래프알고리즘/백준 2025. 2. 23. 01:22
문제https://www.acmicpc.net/problem/24024 풀이X개 이하의 스푼을 사용했을 때, 최소 비용의 최대 값을 구해야 함조금 생각해보면, X 스푼을 사용했을 때가 최소 비용의 최대 값임을 알 수 있다.정확한 그래프 개형은 몰라도, 특정 값에서 최대가 되는 그래프를 그리기 때문에, 빨간색 면에 대해 n 스푼, 파란색 면에 대해 X-n 스푼으로 삼분 탐색을 돌려주면 된다. 코드#include #include #include #include #include #include #include #include #include using namespace std;int N, M, X;struct Input { int n; long long cost; int color;};struct Node {..
-
[IDA] IDA FreeSecurity/Reversing 2025. 2. 18. 23:32
예전에 대학교 동아리에서 몇 번 사용했던 기억이 나는 프로그램, 어셈블리를 디셈블리해서 예쁘게 보여줌상업적 목적 사용이 아니라면 Free를 다운받아 사용할 수 있음 https://hex-rays.com/ida-free IDA Free hex-rays.com 대충 아무 코드나 작성해서 돌려보면 아래처럼 예쁘게 보여줌 원래는 arm이나 sparc 같은 바이너리도 지원되나 확인하고 싶었던 건데, Free는 지원하지 않는 것 같음https://docs.hex-rays.com/user-guide/disassembler/supported-processors Supported processors | Hex-Rays DocsHitachi/Renesas H8/300, H8/300L, H8/300H, H8S/2000..
-
컴퓨터 구조 for 임베디드공부/Embedded 2025. 2. 17. 02:28
컴퓨터 구조를 읽으면서 적당히 끄적거리는 페이지 1. 명령어 실행 기본적인 내용들CPU의 내부 구성 요소: 산술논리연산장치(ALU), 레지스터 세트, 제어 유닛...버스들: 주소 / 데이터/ 제어CPU, 주기억장치, I/O장치들은 시스템 버스로 서로 연결됨 ARM 버스 구조(https://wikidocs.net/159026) 버스 마스터(bus master)버스 중재(bus arbitration) - 병렬 중재, 직렬 중재, 폴링 방식 등 동기식 버스 / 비동기식 버스 I/O 장치의 연결I/O장치는 속도가 CPU보다 느리고, 제어 방법도 다르고, 데이터 형식의 길이도 다를 수 있음흔히 I/O장치를 시스템 버스에 접속하기 위해 ~~ 컨트롤러, ~~ 인터페이스를 사용함-> 상태/제어 레지스터 주소 지정 I..
-
[Gaisler IP] GRETH공부/Embedded 2025. 2. 16. 18:38
가이슬러 IPhttps://www.gaisler.com/products/ethernet Ethernet 10/100 | GaislerReceive and transmit data is autonomously transferred between the Ethernet MAC and the AMBA AHB bus using DMA transfers. Through the use of receive and transmit descriptors, multiple ethernet packets can be received and transmitted without CPU involvement.www.gaisler.com GRETH - Ethernet Media Access Controller (MAC) with ..
-
[C 함수 파싱] clang library공부/Python 2025. 2. 10. 00:38
코드를 바이너리 코드로 변환할 때 사용하는 llvm기반으로 C함수 파싱 LLVM--win64.exe 다운로드https://github.com/llvm/llvm-project/releases Releases · llvm/llvm-projectThe LLVM Project is a collection of modular and reusable compiler and toolchain technologies. - llvm/llvm-projectgithub.com lib clang docshttps://libclang.readthedocs.io/en/latest/_modules/clang/cindex.html example codeimport clang.cindeximport reimport os# Window..
-
[백준] 13310번 - 먼 별알고리즘/백준 2025. 2. 9. 04:16
문제https://www.acmicpc.net/problem/13310 풀이캘리퍼스 + 삼분 탐색각 시간마다 찍힌 별들 중 최대 거리에 대해 최소값을 찾는 문제f(x)에 대한 삼분 탐색이지만 f(x)가 캘리퍼스 구현 ㅇㅇ..., distance 반환값을 int로 해놓고 발견못해서 고통받았다. + 계속 틀리길래 혹시해서 탐색 구현을 아래처럼 변경했더니 pass됨, 왜 그런지는 좀 생각해봐야 할듯// 틀림if (sim(lm) sim(rm)) { left = lm;}else { right = rm;} 코드#include #include #include #include #include #include #include using namespace std;struct Input { long long x, y, ..
-
[Zephyr OS] LLEXT공부/Embedded 2025. 2. 2. 23:18
https://docs.zephyrproject.org/latest/services/llext/index.html Linkable Loadable Extensions (LLEXT) — Zephyr Project DocumentationThe LLEXT subsystem provides a toolbox for extending the functionality of an application at runtime with linkable loadable code. Extensions are precompiled executables in ELF format that can be verified, loaded, and linked with the main Zephyr binary. Extedocs.zephyr..