반응형
반응형
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { int[] p; int[] dp; public void solution() throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); StringTokenizer st = new StringTokenizer(br.readLine()); p = new int[n+1]..
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public void solution() throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int[] dp = new int[n+2]; dp[0] = 0; dp[1] = 1; dp[2] = 3; for(int i=3; i
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public void solution() throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int[] dp = new int[n+2]; dp[0] = 0; dp[1] = 1; dp[2] = 2; for(int i=3; i
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public void solution() throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int dp[] = new int[n+1]; dp[0] = dp[1] = 0; for(int i=2; i
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { int[] numArray; int n; int s; int count = 0; int[] resultArray; StringBuilder sb = new StringBuilder(); public void solution() throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new Stri..
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.StringTokenizer; public class Main { boolean[] set = new boolean[21]; public void solution() throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb = new StringBuilder(); int count = Integer.parseInt(br.rea..