algorithm 썸네일형 리스트형 문제 2. 지뢰 찾기 (Mine sweeper) // Written by rinehart // rinehart@naver.com //2007. 6. 8 /* Note : This code will be better if get map text from file. (I'm lazy...) Maybe, some part of main function need to seperate to another functions */ #include #include #include #define MAP_MAX 100 #define Type_New_map 1 #define Type_Read_map 2 #define Type_Exit 3 int Get_String(char *input_buf, int *m, int *n); int Get_Result(char **map,.. 더보기 문제 1. 3n+1 문제(The 3n+1 Problem) // Written by rinehart // rinehart@naver.com //2007. 6. 1 /* Note : About 110,000 times tries, the program freezed. I don't know why. Maybe the windows OS can't support too much loop or function calls. */ #include #include #include #define MAX_INPUT 1000000 #define MIN_INPUT 1 int Get_Numbers(int *input_a, int *input_b); int Get_Cycle(int x); int main() { int v_input_a, v_input_b, v_input_temp; .. 더보기 이전 1 다음