반응형
반응형
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { long[] dp; public void solution() throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); dp = new long[91]; dp[1] = 1; dp[2] = 1; dp[3] = 2; for(int i=4; i
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; 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