'삼성' 태그의 글 목록 (27 Page)
본문 바로가기
728x90
반응형

삼성118

프로그래머스 단어변환 https://programmers.co.kr/learn/courses/30/lessons/43163 코딩테스트 연습 - 단어 변환 두 개의 단어 begin, target과 단어의 집합 words가 있습니다. 아래와 같은 규칙을 이용하여 begin에서 target으로 변환하는 가장 짧은 변환 과정을 찾으려고 합니다. 1. 한 번에 한 개의 알파벳만 바꿀 수 programmers.co.kr #include #include #include #include using namespace std; int visit[51] = { 0, };// 중복 방지를 위한 배열 int flag = 0; struct Data { string word; int cnt; }; int solution(string begin, str.. 2020. 7. 16.
1952. [모의 SW 역량테스트] 수영장 #include #include #include #include using namespace std; #define NS int ret = 0x7fffffff; struct Data { int month, day; }; struct Data1 { int cost; }; vectorv; //vectormonthChk; int monthChk[15];//계획 세우기 int monthPlan[15]; int c;//이용달 확인위해서 struct Honey { Honey() { int T; scanf("%d", &T); for (int t = 1; t 12) { int sum = 0; int cnt = 0; for (int i = 1; i 2020. 2. 29.
1225 암호 생성기 #include #include #include using namespace std; int n; int arr[9]; int retIdx; struct Screat { Screat() { int t; while (cin >> t) { init(); for (int i = 0; i < 8; i++) { scanf("%d",&arr[i]); } arrCircle(); printf("#%d ", t); int cnt = 0; for (int i = 0; i < 8; i++) { printf("%d ", arr[retIdx++]); if (retIdx == 8)retIdx = 0; } printf("\n"); } } void init() { memset(arr, 0, sizeof(arr)); retIdx = .. 2020. 2. 27.
[모의 SW 역량테스트] 원자 소멸 시뮬레이션 #include #include #include #include using namespace std; int ret; int dy[] = { 1,-1,0,0 }; int dx[] = { 0,0,-1,1 }; struct Data { int y, x, dir, k; }; bool cmp(Data a, Data b) { if (a.y == b.y)return a.x 2000 || v[idx].x 2000)return true; else return false; } void move() { for (int .. 2019. 12. 20.
728x90
반응형