Spring Security 기본 로그인 화면 제거
·
spring boot/setting
// 스프링 시큐리티 의존성 implementation('org.springframework.boot:spring-boot-starter-oauth2-client') @SpringBootApplication(exclude = SecurityAutoConfiguration.class)
.gitignore파일 제대로 동작하지 않는다면?
·
spring boot/setting
.gitignore가 제대로 동작하지 않아서 ignore처리된 파일이 changed 파일에 계속 뜨는 경우 1.1 원인 .gitignore에 파일을 추가하기 전에 stage에 올라간 파일들이 캐시처리되어 기록이 남아있기 때문 1.2 해결 git rm -r --cached . git add . git commit -m "fixed untracked files" git push origin 자신의 branch 👍 해결완료
[백준 17298번] 오큰수 C++
·
알고리즘
난이도: G4문제풀이 : stack 이용 #include #include #include using namespace std;int main(int argc, char const *argv[]){ ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin >> n; stack> stk; vector res(n, -1); int x; for (int i = 0; i > x; while (!stk.empty() && stk.top().second
[백준 2230번] 수 고르기 C++
·
알고리즘
#include #include #include #include using namespace std;int n;long long m;vector v;long long res = INT_MAX;void selectedNum(int start, int end){ while (start m) { res = min(res, v[end] - v[start]); start++; } else { end++; } }}int main(int argc, char const *argv[]){ ios_base::sync_with_stdio(false); cin.tie(NULL); ..
[백준 1351번] 무한수열 C++
·
알고리즘
https://www.acmicpc.net/problem/1351 1351번: 무한 수열첫째 줄에 3개의 정수 N, P, Q가 주어진다.www.acmicpc.net 해당 문제는 dp와 hash를 적용하여 문제를 해결하였다, 처음에, dp만을 활용하여 재귀함수 호출을 통해서 문제를 제출했으나, 시간 초과가 발생하였다. 아무래도 n * 해당 문제는 Top-down 방식으로 dp를 해결하다보니 memorization이 필요하다.따라서 map STL 라이브러리를 사용하여 해결하는데, 해당 문제에서 dp의 순서는 크게 상관없기때문에 상대적으로 더 간단한 unordered_map을 활용한다. 또한 배열로 선언하기에는 n이 너무 크므로, map을 활용하여 필요한 값들만 따로 저장해두므로 훨씬 편리하다.또한, A[0]..