목록Algorithm/구현 | ETC (50)
:: ADVANCE ::
dovelet 5 단계 배열 베이비 긴 (baby_gin) http://59.23.113.171/30stair/baby_gin/baby_gin.php?pname=baby_gin 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 #include using namespace std; int card[6]; void so..
dovelet 5 단계 배열 두 수 (pir) http://59.23.113.171/30stair/pir/pir.php?pname=pir 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 #include using namespace std; int main(void) { int i, input[20], temp = 0, mmax = 0, max = 0; for(i = 0; i > input[i]; if(temp
dovelet 4 단계 다중 반복문 거듭 제곱 테이블 (table) http://59.23.113.171/30stair/table/table.php?pname=table 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 #include using namespace std; int table[1000]; void split(long long n..
dovelet 4 단계 다중 반복문 n번째 숫자 구하기 (se) http://59.23.113.171/30stair/se/se.php?pname=se 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 #include using namespace std; char temp[1000000]; int main(void) { int n, i; cin >> n; i = 1; int index = 1; while(index
dovelet 4 단계 다중 반복문 세 거듭제곱 (cube) http://59.23.113.171/30stair/cube/cube.php?pname=cube 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 #include using namespace std; long cubearr[110]; void cube(int n) { int i; for(i = 1; i
dovelet 4 단계 다중 반복문 3*n + 1의 최대 길이 (3nplusone) http://59.23.113.171/30stair/3nplusone/3nplusone.php?pname=3nplusone 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 #include using namespace std; int func(int n, int cnt) { if(n == 2) return cnt+1; if(n % 2 == 0) return func(n/2, cnt+1); else return func(3*n + 1, cnt+1); } int main(void) { int n, m, max = 0, i, t..
dovelet 4 단계 다중 반복문 친구 수 (amicable) http://59.23.113.171/30stair/amicable/amicable.php?pname=amicable 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 #include using namespace std; char ox[10000]; int func(int n) { int i, result = 0; for(i = 2; i * i > n; for(int i = 220; i
dovelet 4 단계 다중 반복문 lock (lock) http://59.23.113.171/30stair/lock/lock.php?pname=lock 1차 풀이 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 #include using namespace std; int main(void) { int start, one, two, three, angle; while(1) { angle = 1080; cin >> start >> one >> two >> three; if((start + one..
dovelet 4 단계 다중 반복문 설탕 공장 (sugar) http://59.23.113.171/30stair/sugar/sugar.php?pname=sugar 1차 풀이 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 #include using namespace std; int data[2000][1100]; int main(void) { int n, x = 0, y = 0, result = 0, min = 100000, i, j, flag = 0; cin >> n; for(i = 0; i
dovelet 4 단계 다중 반복문 오실로스코프(별) (oscilloscope) http://59.23.113.171/30stair/oscilloscope/oscilloscope.php?pname=oscilloscope 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 #include using namespace std; char output[25][65]; int volt[60]; int main(void) { int n, i, j = 0; cin >> n; for(..