· Unreal
// Fill out your copyright notice in the Description page of Project Settings.#include "Weapon/Projectile/SolaProjectileBase.h"#include "Components/SphereComponent.h"#include "GameFramework/ProjectileMovementComponent.h"#include "GameFramework/Character.h"#include "GameFramework/DamageType.h"#include "Engine/Classes/Engine/DamageEvents.h"ASolaProjectileBase::ASolaProjectileBase(){ PrimaryActorTi..
· Unreal
Character 클래스에 달려있던 많은 대쉬 관련 기능들을 DashHandler 클래스로 분리했다.그리고 체크해보는데... 대쉬가 안된다. 로그 찍어보며 이것저것 확인하다보니, OwnerCharacter에게서 CharacterMovement와 CapsuleComponent를 가져오는 것이 BeginPlay의 Initialize 호출 시에 처리되고 있는데,내부의 ExecuteDash가 호출될 때는 OwnerCharacter가 missing인 문제가 있었다. 즉 초기화하는 DashHandler와 Character클래스에서 접근하는 DashHandler가 다른 것 같다. 일단 Character의 BeginPlay에서 DashHandler의 초기화를 추가하여 해결하긴 했는데 이유를 자세히 알아봐야겠다.
· Algorithm
유형 난이도 완료일 링크 특이사항 DP 실버1 23.4.9 https://www.acmicpc.net/problem/9465 내 코드 #include #include using namespace std; int arr[2][100000]; int dp[2][100000]; int main(void) { int t, n; cin >> t; for(int i=0; i> n; for(int j= 0; j> arr[0][j]; } for(int j= 0; j> arr[1][j]; } dp[0][0] = arr[0][0]; dp[1][0] = arr[1][0]; dp[0][1] = arr[1][0] + arr[0][1]; dp[1][1] = arr[0][0] + arr[1][1]; for(int i=2 ; i
· Algorithm
유형 난이도 완료일 링크 특이사항 DFS 실버1 23.4.8 https://www.acmicpc.net/problem/1991 내 코드 #include #include using namespace std; int n; int arr[26][26]; char p, c1, c2; int pk, c1k, c2k; char output; vector vec[26]; void Preorder(int node) { output = node+65; cout p >> c1 >> c2; pk = p-65; c1k = c1-65; c2k = c2-65; if(c1k>=0) { arr[pk][c1k] = 1; vec[pk].emplace_back(c1k); } else { vec[pk].emplace_back(-1); } ..
· Algorithm
유형 난이도 완료일 링크 특이사항 DP 실버1 23.4.6 https://www.acmicpc.net/problem/1629 오답 풀이 #include using namespace std; int a, b, c; int Recursion(int temp, int exponent) { if(exponent == 2) return ((temp%c)*(temp%c))%c; else if(exponent == 1) return temp%c; return (Recursion(temp, exponent/2) * Recursion(temp, exponent-exponent/2)) % c; } int main(void) { cin >> a >> b >> c; cout > a >> b >> c; cout
· Algorithm
유형 난이도 완료일 링크 특이사항 DP 실버1 23.4.5 https://www.acmicpc.net/problem/11660 내 코드 #include using namespace std; int x1,x2,y1,y2; int n, m; int arr[1025][1025]; int dp[1025][1025]; int sum = 0; int main(void) { ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> n >> m; for(int i=1; i arr[i][j]; } } for(int i=1; i> y1 >> x2 >> y2; //x는 행 y는 열 for(int i = x1; i>m; for(int i=1;iarr[i][j]; dp[i][j] = ..
· Algorithm
유형 난이도 완료일 링크 특이사항 백트래킹 실버2 23.04.04 https://www.acmicpc.net/problem/16953 내 코드 #include using namespace std; int a, b; int MIN = 1000000000; void DFS(long long int n, int depth) { if(n == b && depth b) return; DFS(n*2, depth+1); DFS(n*10+1, depth+1); } int main(void) { cin >> a>> b; DFS(a,1); if(MIN == 1000000000) MIN = -1; cout
· Algorithm
유형 난이도 완료일 링크 특이사항 백트래킹 실버2 23/04/03 https://www.acmicpc.net/problem/11725 내 코드 #include #include #include using namespace std; vector vv; vector v; int v1, v2; int arr[100001]; int visited[100001]; int n; void DFS(int parent, int me) { arr[me] = parent; visited[me] = 1; for(int i=0; i < vv[me].size(); i++) { if(visited[vv[me][i]]==1) continue; DFS(me, vv[me][i]); } } int main(void) { ios_base::..
· Algorithm
유형 난이도 완료일 링크 특이사항 백트래킹 실버2 23/04/03 https://www.acmicpc.net/problem/15666 내 코드 #include #include #include using namespace std; int arr[10001]; int n, m; vector box; void DFS(int idx, int depth) { if(depth > m) { for(int a: box) cout k; arr[k]+=10001; } DFS(0,1); } 이전 문제 N과M(9)와 다른 점은 같은 수를 여러번 사용해도 되며 수열이 비내림차순이어야 한다는 점 이었다. 같은 수를 여러번 사용할 수 있으므로 중복된 입력을 받아도 한 번만 입력 받은 것과 차이가 없다. 따라서 한 번 입력 받았을 ..
· Algorithm
유형 난이도 완료일 링크 특이사항 백트래킹 실버2 23/03/31 https://www.acmicpc.net/problem/15663 내 코드 #include #include #include using namespace std; int arr[10001]; int n, m; vector box; void DFS(int idx, int depth) { if(depth > m) { for(int a: box) cout k; arr[k]++; } DFS(0,1); } 이전 문제들과 달리 입력으로 중복된 수가 주어질 수 있는 문제다. 따라서 숫자들을 입력 받아 배열에 저장하는 방식이 아닌 숫자 범위인 10000까지를 인덱스로 갖는 배열을 만들어 숫자가 입력될 때마다 그 값에 +1 하는 것으로 대체하였다. 값이 ..
· Algorithm
유형 난이도 완료일 링크 특이사항 백트래킹 실버3 23/03/31 https://www.acmicpc.net/problem/15657 내 코드 #include #include #include using namespace std; int arr[8]; int n, m; int visited[8]; vector box; void DFS(int idx, int depth) { if(depth == m) { for(int i=0;i
· Algorithm
유형 난이도 완료일 링크 특이사항 백트래킹 실버3 23/03/30 https://www.acmicpc.net/problem/15654 내 코드 #include #include #include using namespace std; int arr[8]; int n, m; int visited[8]; vector box; void DFS(int idx, int depth) { if(depth == m) { for(int i=0;i
Yannoo
YannooLog