본문 바로가기

기타[etc]

(62)
[퍼옴] gdb 분석 보조 - python 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354#!/usr/bin/python from subprocess import Popen , PIPEfrom time import sleep # shellcodeshellcode = "\x41" * 1000 + "\n" # opens gdb with parameter executable# you can also manage stdout and stderr hereproc = Popen( ['gdb' , 'executable'] , bufsize=1 ,stdin=PIPE ) # sample breakpoint# notice the new..
[알고리즘] DP- 땅따먹기 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172#include#includeusing namespace std; vector dp(10001, vector(4,0)); int hopscotch(vector board){ // 함수를 완성하세요. // if (x != z) // d[n][x] = max(d[n-1][z]) + board[n][z] // 점화식[?] int answer = 0; int col = 4; int row = board.size(); int tmp = 0; for(int i = 0 ; i
[알고리즘] DP-가장 큰 정사각형 찾기 문제 해결 전략DP 파악DP는 작은 문제로 큰 문제 해결작은 문제의 답을 memory에 적재12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667#include#include#include#includeusing namespace std; //x,y에서의 최대 변의 길이를 저장하는 변수vector dp(10001, vector(10001,0)); int _min(int a, int b, int c){ a = a
[백준] 동적기획법 - 피보나치 0과 1 세기 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455#include #include #include using namespace std; int a,b;int fibonacci(int n, int m); int mem[10001][4] = {0}; int main(void){ mem[0][0] = 1; mem[1][0] = 0; int n,c; cin >> n; while(n--){ cin >> c ; if( 0 > c || c > 40){ return 1; } cout
[알고리즘] 숫자의 표현 123456789101112131415161718192021222324252627282930313233343536373839/*수학을 공부하던 민지는 재미있는 사실을 발견하였습니다.그 사실은 바로 연속된 자연수의 합으로 어떤 숫자를 표현하는 방법이 여러 가지라는 것입니다.예를 들어, 15를 표현하는 방법은(1+2+3+4+5)(4+5+6)(7+8)(15)로 총 4가지가 존재합니다. 숫자를 입력받아 연속된 수로 표현하는 방법을 반환하는 expressions 함수를 만들어 민지를 도와주세요.예를 들어 15가 입력된다면 4를 반환해 주면 됩니다.*/ #includeusing namespace std;int expressions(int testCase){ int answer = 0; for (int i = 1 ;..
QEMU 네트워크 브릿지 구성 [정리] QEMU에서 네트워크 통신을 위해서 브릿지 모드를 설정하려 한다. [출처1]에서 가져온 밑의 그림은 브릿지를 직관적으로 이해하기 쉽게 나와있다. 123456789101112 HOST +---------------+ | | KVM GUEST1 | | +--------------+ | +------+ | | | LAN ---+--- eth0 | +--+---+---- nic0 | KVM GUEST2 | | tap0----+ | |192.168.1.13 | +--------------+ | | tap1----+ | +--------------+ | | | +------+ | | | | | br0 +--+----------------------+---- nic0 | |192.168.1.12 | |192..
bfs, dfs 연습 보호되어 있는 글입니다.
[hackerrank]Get Node Value 보호되어 있는 글입니다.