목록전체 글 (168)
프로그래밍 공부

답지가 없는 문제들만 블로그에 올립니다 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 #include #include using namespace std; // 1번 문제 class Circle { int a; public: Circle() { this->a = 0; } Circle(int n) { this->a = n; } void print() { cout

정답을 공개 하지 않는 문제들만 블로그에 올렸습니다 2번 문제 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #include #include #include #include using namespace std; // 2번 문제 int main() { int* arr = new int[5]; double solve = 0.0; cout arr[i]; solve += arr[i]; } cout

exp.h 파일 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 //exp_header #ifndef EXP_H #define EXP_H #include using namespace std; class Exp { public: int x, y; Exp(); Exp(int x); Exp(int x, int y); //~Exp(); int getValue(); int getBase(); int getExp(); bool equals(Exp b); }; #endif cs exp.cpp 파일 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 3..
www.acmicpc.net/problem/17478 17478번: 재귀함수가 뭔가요? 평소에 질문을 잘 받아주기로 유명한 중앙대학교의 JH 교수님은 학생들로부터 재귀함수가 무엇인지에 대하여 많은 질문을 받아왔다. 매번 질문을 잘 받아주셨던 JH 교수님이지만 그는 중앙대 www.acmicpc.net 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 #include using namespace std; int cnt = 0; void print(int n) { for(int i = 0; i
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051#include #include #include #include using namespace std; int arr[101][101];bool vis[101][101];int dx[4] = { 1,0,-1,0 };int dy[4] = { 0,1,0,-1 }; int main() { ios::sync_with_stdio(0); cin.tie(0); int t; cin >> t; for (int i = 0; i > m >> n >> k; for (int reset = 0; reset > y; if(x
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 #include using namespace std; void insertion_sort(int *arr, int n){ int i,j; for(i = 1; i 0 && arr[j - 1] > tmp; j--) {// j가 0보다 크고, arr[j - 1] 값이 tmp보다 클 때 반복함 arr[j] = arr[j-1]; } arr[j] = tmp; } } int main() { int arr[5] = {3,2,5,9,1}; for(auto i : arr){ cout