개발/알고리즘
[USACO] Swapity Swap JAVA
import java.util.Scanner; public class Main { // USACO Swapity Swap JAVA // 백준 18788 static int a1; static int a2; static int b1; static int b2; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); a1 = sc.nextInt(); a2 = sc.nextInt(); b1 = sc.nextInt(); b2 = sc.nextInt(); int[] cows = new int[n + 1]; //0번 인덱스 사용 X int[] result..
2021. 2. 23. 00:00
최근댓글