출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV139KOaABgCFAYh #include #include #include #include using namespace std; int result, D;vector v1; void cal(){result = (v1[0] - v1[99]);while (D--){if ((v1[0] - v1[99]) > 1){v1[0]--; v1[99]++;for (int i = 1; i= v1[i])) break; if ((v1[99] >= v1[i]) && (v1[i - 1] >= v1[99])){int tmp2 = v1[99];v1.pop_back();v1.ins..
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV134DPqAA8CFAYh#none #include #include #include using namespace std; int N, arr[1000], result; int main(){int t = 1, T = 10;while (T--){result = 0; memset(arr, 0, sizeof(arr));cin >> N;for (int i = 0; i > arr[i];for (int i = 2; i < N - 2; i++){int tmp = arr[i] - max(max(arr[i - 2], arr[i - 1]), m..
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWRKNev6fqYDFAV8 #include #include #include using namespace std; int result, arr[26];string s; int main(){int T; cin >> T; int t = 1;while (T--){cin >> s; result = 0; memset(arr, 0, sizeof(arr));for (int i = 0; i < s.size();i++) arr[s.at(i) - 97]++;for (int i = 0; i < 26;i++)result += ((arr[i] * (arr[i] + 1)) /..
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWS2h6AKBCoDFAVT #include #include #include using namespace std; long long L, R, N, result, flag;long long map[50000]; int main(){ long long T, t = 1; cin >> T; while (T--) { cin >> N; result = 0; flag = 0; memset(map, 0, sizeof(map)); for (long long i = 0; i > map[i]; L = 0; R = 0; for (long long..
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWS2dSgKA8MDFAVT #include #include #include using namespace std; int np, p;string s; int main(){ int T, t = 1; cin >> T; while (T--) { np = 0; p = 0; cin >> s; for (int i = 0; i 0) && i > p) { np += (i - p); p += (i-p); } p +=(s[i]-48); } cout
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWSNnKiazq0DFAUr #include #include #include #include using namespace std; int N, result, sum, s1, s2, s3, flag, t;vector arr;vector v[2]; void cal(int count, int sss, int start){if (flag == 1) return;if (count == 3){cout
출처 :https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5V61LqAf8DFAWu #include #include using namespace std; int N, M, K, result, MAX_K, num;int map[20][20]; void square(int i, int j, int depth){ int starti = i; int startj = j; while (1) { if (i >= 0 && j >= 0 && i < N && j < N) { if (map[i][j]) num++; } i--;j++; if (i == starti - depth && j == startj + depth) bre..
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWIeUtVakTMDFAVH #include #include #include using namespace std; int N, result, total;int map[16][16];bool check[16]; int cal(vector &v){ int tmp = 0; for (int i = 0; i < total;i++) for (int j = 0; j < total; j++) {if (i == j) continue; tmp += map[v[i]][v[j]];} return tmp;} int sin(){ vector a; vector b; for (i..
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5V4A46AdIDFAWuSWEA::2115::벌꿀채취 #include #include #include using namespace std; int t, n, m, c;int map[10][10];int d[10][10]; //최대값 계산하기int calc(vector &v, int n, int sum, int val) { if (sum > c) return 0; if (n == v.size()) return val; return max(calc(v, n + 1, sum + v[n], val + v[n] * v[n]), calc(v, n + 1, s..
출처 : https://www.swexpertacademy.com/main/code/problem/problemDetail.do #include #include using namespace std; #define INF 2e9 int N, numMAX, numMIN, tmp, tmp2;int op[4], arr[12]; void dfs(int num, int count){ if (count == N - 1) { numMAX = max(numMAX, tmp); numMIN = min(numMIN, tmp); return; } for (int i = 0; i 0) { if (i == 0) { tmp = num + arr[count + 1]; op[i]--;dfs(t..
- Total
- Today
- Yesterday
- 이차원 배열과 연산
- DFS
- 시간 복잡도
- SWEA
- 17837
- 연구소 3
- 17140
- 17142
- scanf
- STL
- string
- 미세먼지 안녕!
- 트렌드
- 팁
- 입출력
- hackerrank
- 새로운 게임 2
- 2018 카카오 블라인드 채용
- 삼성
- 백준
- DP
- 17144
- 17143
- 알고리즘
- 2018 KAKAO BLIND RECRUITMENT
- 게리맨더링 2
- 역량 테스트
- SW Expert Academy
- 17779
- boj
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |