본문 바로가기

삼성 코팅테스트 준비/모의 역량 테스트 문제17

1949 등산로 조성 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109#include #include #include using namespace std; int width, cut_max;int rst_path;int mountain[10][10];int dx[4] = { 0, 0, -1, 1 };int dy[4] = { -1, 1, 0, 0 };int flag[10][10];vecto.. 2020. 3. 7.
해결) 5653 줄기세포 배양 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139#include #include #include #include using namespace std; // 변수int height, width, total_ti.. 2020. 3. 7.
2382 미생물 격리 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155#include #include #include #include using.. 2020. 3. 6.
2117 홈 방범 서비스 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687#include #include #include #include #include #include using namespace std; //static variableint cen_x = 40, cen_y = 40; // variableint width, pay;int tmp_home[100][100];int rst_cnt;vector home; // functionvoid initialize();void prote.. 2020. 3. 5.
4014 활주로 건설 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102#include #include #include using namespace std; int width, x_len;int way[30][30]; void initialize();int row_line(int y);int col_line(int x); int main() { int test; scanf("%d", &test); for (int t = 1; t 2020. 3. 4.
1953 탈주범 검거 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151#include #include #include #include using namespace s.. 2020. 3. 4.
2477 차량 정비소 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816.. 2020. 3. 4.
2105 디저트 카페 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104#include #include using namespace std; int width;int place[30][30];int flag[30][30];int desert[105];int dx[5] = { 0, -1, 1, 1, -1 };int dy[5] = { 0, 1, 1, -1, -1 };int rst_max; void dfs(int y, i.. 2020. 3. 3.
2115 벌꿀채취 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114#include #include #include #include using namespace std; int w_total, w_part, cap_max=10;int box[15][15];int rst_max;int rst_pair_max;int cur_cap; void dfs(int y, i.. 2020. 3. 3.
4012 요리사 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980#include #include #include #include using namespace std; int num_food;int food[20][20] = { 0 };int teamA[20] = { 0 };long long min_abs; void combination(int idx, int depth);int sum_abs(); int main() { int t; scanf("%d", &t); for (int test = 1; test 2020. 3. 3.
시간초과) 5653 줄기세포 배양 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103#include #include #include #include using namespace std; int dead = -10000000;int cur[800][800];int power[800][800];int tmp_power[800][800];int cen_x = 400, cen_y = 400;int n, m, k; int bfs();void .. 2020. 3. 3.
5658 보물상자 비밀번호 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788#include #include #include #include #include using namespace std; vector num_list;queue arr;int n, k; void find_number(queue q);int hex_to_num(char c);int find_k_num(); int main() { int t; scanf("%d", &t); for (int test = 1; test 2020. 3. 2.