일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 자바
- 백준
- 알고리즘
- 6730
- 프로그래머스
- 17087
- 15965
- 사용자정의필터
- Algorithm
- sovled.ac
- 20006
- 23971
- 파이썬
- 라이브러리
- 11688
- PYTHON
- SWEA
- PS
- 25379
- Django
- 1342
- solved.ac
- pccp
- 장고
- 24511
- java
- 2866
- 9081
- programmers
- sloved.ac
- Today
- Total
목록자바 (29)
코깽이의 코딩일기
제출한 코드import java.util.*;class Solution { public int solution(int k, int[] tangerine) { Map map = new HashMap(); int answer = 0; for(int key : tangerine){ map.put(key, map.getOrDefault(key, 0) + 1); } Integer[] data = new Integer[map.size()]; int idx= 0; for(int value : map.values()){ data[idx++] = value; } ..
제출한 코드import java.util.*;class Solution { static int max; public int solution(int n, int[][] wires) { int answer = -1; int[][] map = new int[n+1][n+1]; max = Integer.MAX_VALUE; // 초기 세팅 for(int[] edge : wires){ map[edge[0]][edge[1]] = 1; map[edge[1]][edge[0]] = 1; } // 간선을 1개씩 제거해보면서 탐색 진행 for..
제출한 코드import java.util.*;class Solution { public int solution(int[] bandage, int health, int[][] attacks) { Deque attack = new ArrayDeque(); for(int[] data : attacks){ attack.add(data); } int maxHealth = health; int count = 0; int time = 1; while(!attack.isEmpty()){ // 몬스터 공격을 받는 경우 if(attack.pee..
제출한 코드1차 제출한 코드 - 정확성 60.0 효율성 0 ( 시간 초과 + 메모리 초과 )import java.util.*;public class Solution { public int solution(int n) { int cost = n; // 방문 처리용 배열 세팅 int[] v = new int[n+1]; Arrays.fill(v, Integer.MAX_VALUE); Deque q = new ArrayDeque(); q.add(new int[] {0,0}); while(!q.isEmpty()){ int[]..
제출한 코드 1차 제출 코드 - 정확성 61.2 , 효율성 0 ( 시간초과 )import java.io.*;import java.util.*;class Solution{ public int solution(String s) { int answer = -1; if(s.length()%2 != 0){ return 0; } List list = new ArrayList(); for(int i = 0 ; i 2차 제출한 코드 - 정확성 61.2 , 효율성 38.8 import java.io.*;import java.util.*;class Solution{ public int solution(String s) ..
제출한 코드 1차 제출 코드 - 정확성 70점 , 효율성 0점 ( 시간 초과 0 )import java.util.*;class Solution { public int solution(int n) { int answer = 0; // 이진법 String으로 변환된 정수 n String binaryN = Integer.toBinaryString(n); int startIdx = -1; int finIdx = -1; // 1이 연속되는 index 찾기 for(int i = binaryN.length()-1 ; i >= 0; i --){ if(finIdx == -1 && ..
제출한 코드import java.io.*;import java.util.*;class Solution { public int solution(int n) { int answer = 0; int left = 1; int right = 1; int sum = 1; n = 1; // 예외 상황 if(n==1){ return 1; } // 슬라이딩 윈도우 시작 while(left = n){ // left 값을 올리기 전에 빼고 올려준다. sum -= left; ..

Linkhttps://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWXRUN9KfZ8DFAUo&categoryId=AWXRUN9KfZ8DFAUo&categoryType=CODE&problemTitle=%EC%97%AD%EB%9F%89&orderBy=FIRST_REG_DATETIME&selectCodeLang=ALL&select-1=&pageSize=10&pageIndex=1 SW Expert AcademySW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!swexpertacademy.com문제 내가 제출한 코드import java.io.*;import java.util.*;public class Main..

백준 링크https://www.acmicpc.net/problem/9081문제입력출력입출력 예시 제출한 코드import java.io.*;import java.util.*;public class Main { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); static StringBuilder sb = new StringBuilder(); static char[] input; public static void main(String[] args) throws Exception { int t = Integer.parseInt(br.readLine()); for (int..
Linkhttps://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5V4A46AdIDFAWu&categoryId=AV5V4A46AdIDFAWu&categoryType=CODE&problemTitle=%EC%97%AD%EB%9F%89&orderBy=FIRST_REG_DATETIME&selectCodeLang=ALL&select-1=&pageSize=10&pageIndex=2 SW Expert AcademySW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!swexpertacademy.com내가 제출한 코드import java.util.*;import java.io.*;public class Solutio..