개발/알고리즘
[USACO] Triangles JAVA
문제 www.acmicpc.net/problem/18786 풀이 및 코드 import java.util.Scanner; public class Main { // USACO Triangles // 백준 18786 public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); Fence[] fences = new Fence[n]; //펜스 입력 for (int i = 0; i < n; i++) { int x = sc.nextInt(); int y = sc.nextInt(); fences[i] = new Fence(x, y); } // 모든 삼각형의 경우를 구해서 제일 큰 삼각형을 찾자 // 말..
2021. 2. 22. 00:00
최근댓글