목록문제/백준_자바 (102)
sm 기술 블로그
import java.util.*; import java.io.*; class Main { static int fibCnt; static int fib2Cnt; static int[] memo; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); fibCnt = 0; fib2Cnt = 0; memo = new int[100]; fib(n); fib2(n); System.out.println(fibCnt + " " + fib2Cnt); } private static int fib(int n) { if (n == 1 || n == 2) { fibCnt++; return 1; } el..
import java.util.*; import java.io.*; class Main { static int N; static int[][] startLink; static boolean[] visited; static ArrayList result; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); N = Integer.parseInt(br.readLine()); startLink = new int[N][N]; result = new ArrayList(); visited = new boolean[N]; for (i..
import java.util.*; import java.io.*; class Main { static int N; static int[] num; static ArrayList result = new ArrayList(); public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[] operation = new int[4]; N = Integer.parseInt(br.readLine()); num = new int[N]; String[] numBits = br.readLine().split(" "); for (int..
import java.util.*; import java.io.*; class Main { static int[][] sudoku; static StringBuilder sb = new StringBuilder(); public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); sudoku = new int[9][9]; for (int i = 0; i < 9; i++) { String[] sBits = br.readLine().split(" "); for (int j = 0; j < 9; j++) { sudoku[i][j] = I..