[백준 12100번] 2048 C++
·
알고리즘
#include #include #include using namespace std; int n; vector pan; int dx[] = {-1, 1, 0, 0}; int dy[] = {0, 0, -1, 1}; int res = 0; extern vector move_up(vector v); extern vector move_down(vector v); extern vector move_right(vector v); extern vector move_left(vector v); void dfs(int L, vector v) { if (L == 5) { for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) res = max(res, v[i][j]); retu..
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); ..