SW Expert Academy :: SWEA :: 5789 :: 현주의 상자 바꾸기 출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWYygN36Qn8DFAVm #include using namespace std; int i, j, T, N, Q, n1, n2; int main() {std::ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);cin >> T;for (int tc = 1; tc > N >> Q;vectorq; vectorv(N + 1, 0), a(N + 1, 0);while (Q--) {cin >> n1 >> n2; q.push_back(..
SW Expert Academy :: SWEA :: 5521 :: 상원이의 생일파티 출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWWO3kT6F2oDFAV4&categoryId=AWWO3kT6F2oDFAV4&categoryType=CODE #include #include using namespace std; int main() {int T; scanf("%d", &T);for (int tc = 1; tc > v(501);bool c[501] = { 0, }; c[1] = 1;while (M--) {scanf("%d %d", &a, &b); v[a].push_..
SWEA::2382::미생물 격리 출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV597vbqAH0DFAVl #include #include #include using namespace std; struct me {int ii, jj, num, d,ttmp;}; int N, M, K;int dir[5][2] = { {0,0}, {-1,0},{1,0},{0,-1},{0,1} };vector m; int cal(int time, int me_n) {while (time--) {for (int i = 0; i < m.size(); i++) { // movem[i].ii += dir[m[i].d][0];..
SWEA::2383::점심 식사시간 출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5-BEE6AK0DFAVl #include using namespace std; struct P { int y, x; };int T, t = 1, N, a[10][10], c[10], s[2], ans, pn, ps=0;vector vp,vs[2]; vector q[2]; int cal(int r) {q[0].clear(); q[1].clear();for (int i = 0; i < pn; i++) q[c[i]].push_back(vs[c[i]][i].y);sort(q[0].begin(), q[0].end()); ..
SWEA::1244::최대 상금 출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV15Khn6AN0CFAYD #include #include #include using namespace std; int N, K, ans;char tmp[256];string s; void cal(int cnt, int now) {if (cnt == K) {ans = max(ans, stoi(s));return;} for (int i = now; i < s.size(); i++) {for (int j = i; j < s.size(); j++) {if (i == j)continue;if (s[i]
SWEA::1224::계산기3 출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14tDX6AFgCFAYD #include #include char data[501];char arr[501], arr2[501];int calc[501];int a, b, c;char d[4][2] = { { 0, 3 },{ -1, -1 },{ 2, 2 },{ 1, 1 } }; int main() {int tc, N, i; for (tc = 1; tc 0 && d[arr2[b - 1] - '('][0] >= d[data[i] - '('][1]) {arr[a] = arr2[b - 1];a++;b--;}arr2[b] = ..
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14nnAaAFACFAYD #include #include int N, result;char a[150]; int main(){for (int t = 1; t < 11;t++){scanf("%d", &N); scanf("%s", a); result = 0;int n1 = 0, n2 = 0, s1[150], s2[150]; for (int i = 0; i < N; i++) {if (a[i] == '+') s2[n2++] = '+';else if (a[i] == '*') {s1[n1 - 1] = s1[n1 - 1] * (a[i + 1] - '0');i+..
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14mbSaAEwCFAYD #include #include int N, result;char a[250]; int main(){for (int t = 1; t < 11;t++){scanf("%d", &N); scanf("%s", a); result = 0; for (int i = 0; i < N; i+=2) result += (a[i] - '0'); printf("#%d %d\n", t, result);} return 0;}
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14jJh6ACYCFAYD #include #include #include #include using namespace std; int N,result;char arr[10][4] = { "ZRO","ONE","TWO","THR","FOR","FIV","SIX","SVN","EGT","NIN" };int cnt[10]; int main(){int T; int t = 1; string tt;cin >> T;while (T--){cin >> tt; cin >> N;for (int i = 0; i > tmp..
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV14hwZqABsCFAYD #include #include #include using namespace std; int N,result;int arr[100][100]; int main(){int T; int t=1;T = 10;while (T--){cin >> N; result = 0;for (int i = 0; i > arr[i][j]; for (int j = 0; j < N; j++){for (int i = 0; i < N; i++){if (arr[i][j] == 2) ..
- Total
- Today
- Yesterday
- 입출력
- 17142
- 미세먼지 안녕!
- scanf
- hackerrank
- 17140
- 백준
- 트렌드
- 새로운 게임 2
- SW Expert Academy
- 이차원 배열과 연산
- string
- 알고리즘
- 17144
- DP
- 역량 테스트
- STL
- boj
- 연구소 3
- SWEA
- 시간 복잡도
- 2018 카카오 블라인드 채용
- 팁
- 17779
- 게리맨더링 2
- DFS
- 17143
- 2018 KAKAO BLIND RECRUITMENT
- 삼성
- 17837
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |