MY MEMO
+)Octave,MATLAB1.Simple Octave/MATLAB function -first assignment is really simple. this assignment is for teaching you how to submit the code and get a score you can open the warmUpExcercise.m file and write down A = eye(5) and submit that code 2. Linear regression with one variable 2.1 Plotting the DataBefore starting on any task, it is often useful to understand the data by visualizing it. For..
1. 십진수 0에 해당하는 이진수 0을 첫 번째 학생이 말한다. 2. 십진수 1에 해당하는 이진수 1을 두 번째 학생이 말한다. 3. 십진수 2에 해당하는 이진수 10 중 첫 번째 비트 1을 세 번째 학생이 말한다. 4. 십진수 2에 해당하는 이진수 10 중 두 번째 비트 0을 네 번째 학생이 말한다. ... 첫 번째 줄에는 테스트케이스의 수 두 번째 줄에는 몇 번째 차례인지를 나타내는 수 #include #include #include #include using namespace std; vectorbitgame; int sum(int num) { return num*pow(2, num) - pow(2, num) + 1; } void decimal_to_binary(int num) { bitgame.c..
pancake1과 달리 집게가 없으므로 주걱만 이용해야한다. 1. pancake의 크기를 모두 입력받고 오름차순으로 sorting해 right_order vector에 저장한다. 2. right_order의 마지막과 pancake의 마지막을 비교한다. 3. 만약 같지 않으면 3-1 pancake에서 같지 않은 수(임의로 x라 한다) x를 찾는다 3-2 만약 x가 첫번째에 있다면 x가 들어가야할 자리부터 처음까지 뒤집는다. 3-3 만약 x가 첫번째에 있지 않다면 x를 첫 번째로 가도록 뒤집은 다음 3-1을 진행한다. (이 경우에는 count를 2번 진행한다.) 4. right_order와 pancake이 모두 같다면 while문을 빠져나온다. #include #include #include #include..