SWexpertAcademy
-
5656. [모의 SW 역량테스트] 벽돌 깨기SWexpertAcademy 2019. 7. 27. 01:44
#include #include #include #include using namespace std; int n,h, w; int map[15][12]; int mapc[15][12]; int tc; int result = 1000000; struct brick { int x; int y; int value; brick(int a, int b, int c) { x = a; y = b; value = c; } }; void sorting() { for (int i = 0; i = 0; j--) { if (map[j][i] == 0) { for (int k = j - 1; k >= 0; k--) { if (map[k][i] != 0) { map[..
-
5653. [모의 SW 역량테스트] 줄기세포배양SWexpertAcademy 2019. 7. 26. 01:07
#include #include #include #include using namespace std; int dx[] = { 0,0,1,-1 }; int dy[] = { 1,-1,0,0 }; struct node { int x; int y; int time; node(int a, int b, int c) { x = a; y = b; time = c; } }; int tc; int map[800][800]; int n, m, k; int answer; void initial() { for (int i = 0; i < 800; i++) { for (int j = 0; j < 800; j++) { map[i][j] = 0; } } } int main() { scanf("%d", &tc); for (int tn..
-
5644. [모의 SW 역량테스트] 무선 충전SWexpertAcademy 2019. 7. 24. 21:39
#include #include #include #include #include using namespace std; struct bat{ int x; int y; int scale; int charge; int numb; }; int map[8][21][21]; bool d[8][21][21]; int m, a; int tc; int c[5] = { 1, 5, 21, 85, 341}; int dx[] = {1,-1,0,0}; int dy[] = {0,0,1,-1}; int dx1[] = {0,-1,0,1,0}; int dy1[] = {0,0,1,0,-1}; int max(int a, int b){ int max = a; if(max < b) max = b; return max; } bool checki..
-
5658. [모의 SW 역량테스트] 보물상자 비밀번호SWexpertAcademy 2019. 7. 15. 23:27
#include #include #include #include using namespace std; int t; int n, k; int pick[28]; char a[28]; vector result; int zegop(int x) { int r = 1; if (x == 0) return 1; for (int i = 0; i 최대 자릿수 7개 -> 제곱 최대 6개 -> //그냥 편하게함 void vect(int n, int rotate, vector& solv) { for (int i = 0; i < n; i += rotate) { int pp = i % rotate; int sum = 0; for ..
-
1486. 장훈이의 높은 선반SWexpertAcademy 2019. 7. 15. 04:11
#include #include #include using namespace std; int t; int n, b; int g[10000000]; int a[20]; void dfs(int i, int k, int j,int t,vector&result,int temp) { if (temp >= 0) { result.push_back(temp); return; } if (i == t){ if (temp >= 0) { result.push_back(temp); } else return; } else { dfs(i + 1,k + a[i + 1],j,t,result, k - j); dfs(i + 1,k,j,t,result, k - j); } } int main() { cin >> t; for (int alp ..
-
1221. [S/W 문제해결 기본] 5일차 - GNSSWexpertAcademy 2019. 7. 15. 00:13
#include #include #include using namespace std; int t; int n; string s[10000]; int main() { scanf("%d", &t); string ex; int pp = 1; while (t--) { vector a[10]; cin >> ex; scanf("%d", &n); //switch하기 귀찮아서 그냥 else if 복붙계속한것 for (int i = 0; i > s[i]; int value = 0; if (s[i] == "ZRO") a[0].push_back(s[i]); else if (s[i] == "ONE") a[1].push_back(s[i]); else if (s[i] == "TWO") a[2].pu..