전체 글 (223) 썸네일형 리스트형 로그인 구현 1. SecurityConfig @Configuration @EnableWebSecurity public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http .authorizeHttpRequests((auth) -> auth //모든 경로에 대하여 권한을 부여->이후 수정 필요 /* .requestMatchers("/**").permitAll()*/ .anyRequest().authenticated()) .formLogin(formLogin -> formLogin //로그인 페이지 지정 .loginProcessingUrl("/login") .usernamePa.. 백준 2512 예산 https://www.acmicpc.net/problem/2512 2512번: 예산 첫째 줄에는 지방의 수를 의미하는 정수 N이 주어진다. N은 3 이상 10,000 이하이다. 다음 줄에는 각 지방의 예산요청을 표현하는 N개의 정수가 빈칸을 사이에 두고 주어진다. 이 값들은 모두 1 이상 www.acmicpc.net #include #include #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n, m; int ans; cin >> n; vector cost; for (int i = 0; i > temp; cost.. 백준 15657 N과 M(8) https://www.acmicpc.net/problem/15657 15657번: N과 M (8) N개의 자연수와 자연수 M이 주어졌을 때, 아래 조건을 만족하는 길이가 M인 수열을 모두 구하는 프로그램을 작성하시오. N개의 자연수는 모두 다른 수이다. N개의 자연수 중에서 M개를 고른 수열 www.acmicpc.net #include #include #include using namespace std; int n, m; vector arr; vector ans; void dfs(int k, int cnt) { ans.push_back(k); if (cnt == m) { for (int i = 0; i < cnt; i++) { cout m; for (int i = 0; i < n; i++) { int t.. 백준 2467 용액 https://www.acmicpc.net/problem/2467 2467번: 용액 첫째 줄에는 전체 용액의 수 N이 입력된다. N은 2 이상 100,000 이하의 정수이다. 둘째 줄에는 용액의 특성값을 나타내는 N개의 정수가 빈칸을 사이에 두고 오름차순으로 입력되며, 이 수들은 모두 - www.acmicpc.net #include #include #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; pair ans; cin >> n; vector liq(n); for (int i = 0; i > liq[i]; } int s = 0;.. 백준 5639 이진 검색 트리 https://www.acmicpc.net/problem/5639 5639번: 이진 검색 트리 트리를 전위 순회한 결과가 주어진다. 노드에 들어있는 키의 값은 106보다 작은 양의 정수이다. 모든 값은 한 줄에 하나씩 주어지며, 노드의 수는 10,000개 이하이다. 같은 키를 가지는 노드는 없다 www.acmicpc.net #include #include using namespace std; vector tree; void postorder(int s, int e){ if (s >= e) { return; } if (s == e - 1) { cout 우, postorder는 좌->우->루트 순이므로 다음과 같이 처리한다. 1. s는 루트 노드이다. 루트 다음의 노드를 cur로 잡고(이는 좌측 child .. 백준 9342 염색체 https://www.acmicpc.net/problem/9342 9342번: 염색체 상근이는 생명과학 연구소에서 염색체가 특정한 패턴인지를 확인하는 일을 하고 있다. 염색체는 알파벳 대문자 (A, B, C, ..., Z)로만 이루어진 문자열이다. 상근이는 각 염색체가 다음과 같은 규칙 www.acmicpc.net #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int t; cin >> t; for (int test = 0; test > s; //맨 .. 회원가입 개발 및 간단한 리팩토링 1. 회원가입 폼 클래스 @Getter public class SignupBody { @NotBlank private String name; @NotBlank private String userId; @NotBlank private String password; @NotBlank private LocalDate birth; @NotBlank private Gender gender; //학생일 경우 필요한 필드 @NotBlank private int grade; @NotBlank private String line; @NotBlank private String school; @NotBlank @Email private String email; @NotBlank private String phone; @No.. 백준 15685 드래곤 커브 https://www.acmicpc.net/problem/15685 15685번: 드래곤 커브 첫째 줄에 드래곤 커브의 개수 N(1 ≤ N ≤ 20)이 주어진다. 둘째 줄부터 N개의 줄에는 드래곤 커브의 정보가 주어진다. 드래곤 커브의 정보는 네 정수 x, y, d, g로 이루어져 있다. x와 y는 드래곤 커 www.acmicpc.net #include #include #include using namespace std; //우상좌하 순 int ny[4]={0, -1, 0, 1}; int nx[4]={1, 0, -1, 0}; bool map[101][101]; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; i.. 이전 1 ··· 23 24 25 26 27 28 다음