반응형

C++ 7

[C++] 3-dimension 63-Puzzle

프로그래밍 언어 / 2003년 1학기 / 한상영 교수님 [설명] 2차원에서의 15-puzzle을 3차원으로 확장한 개념. 임의의 퍼즐 배치를 입력으로 받아 Optimal Solution(최소move)을 구함. Cell을 움직이거나, 움직임의 sequence를 입력받아 움직일 수 있음. [puzzle.cpp] #include #include #include #include #include #define WIDTH 4 short CELL[WIDTH][WIDTH][WIDTH]; short* CELL_S = &(CELL[0][0][0]); // the 1-dimension alias of the 3-dimension array CELL short MD[WIDTH*WIDTH*WIDTH][WIDTH*WIDTH*WI..

IT/소스코드 2003.07.10

[C++] Booth's Algorithm Simulator

컴퓨터 구조 / 2003년 1학기 / 김지홍 교수님 Booth's Algorithm을 이용한 Low Level적인 곱셈을 시뮬레이션 /************************************************************************* ** ** ** Assignment 3. 1번 Booth's algorithm simulator ** ** ** ** ca49 2001-12204 이준희 ** ** ** *************************************************************************/ #include #include #include #include #include void printHex(int hex) // int를 16진..

IT/소스코드 2003.07.10

[C++] Vigenere Cipher and Cryptanalysis

공학수학2 / 2002년2학기 / 박근수 교수님 [설명] Vigenere Cipher and Cryptanalysis : n만큼의 길이를 가지는 Key를 이용해 암호화. 그리고 그 Key 없이 암호분석. vigen.cpp : Key를 이용하여 Plaintext(vigen.in)를 Ciphertext(vigen.out)으로 바꿈. vigcr.cpp : Ciphertext로부터 Key를 유추하여 Plaintext(vigcr.out)을 만들어냄. vigen.in : 첫줄에는 Key가 있어야 함. Key는 반드시 대문자. 나머지 plaintext는 소문자. vigen.out : 실행시 자동 생성됨. Ciphertext. vigcr.out : 실행시 자동 생성됨. 정상적으로 동작할 경우 vigen.in과 같은 파..

IT/소스코드 2003.07.10
반응형