목록문제풀이/BAEKJOON Online Judge (75)
말랑한 하루
[ 개요 ] 모든 육지를 시작으로, 다른 육지까지 갈 수 있는 거리 중 가장 큰 최대거리를 뽑아주면 된다. [ 학습 내용 ] ※ 클래스 선언 (클래스 중복선언을 피하고자, 문제번호를 추가하였음) class Pair { int y; int x; public Pair (int y, int x) { this.y = y; this.x = x; } } [ 소스 코드 ] import java.io.*; import java.util.*; class Pair_2589 { int y; int x; public Pair_2589(int y, int x) { this.y = y; this.x = x; } } class Data_2589 { Pair_2589 yx; int cnt; public Data_2589(Pair_2..
[ 개요 ] https://www.acmicpc.net/problem/1181 [ 학습 내용 ] ※ 입력 import sys input = sys.stdin.readline # 정수입력 N = int(input()) # 공백을 제거하는 문자열 입력 content = input().rstrip() ※ set을 활용한 정렬된 리스트 ary : [(3, 'but'), (1, 'i'), (4, 'wont'), (8, 'hesitate'), (2, 'no'), (4, 'more'), (2, 'no'), (4, 'more'), (2, 'it'), (6, 'cannot'), (4, 'wait'), (2, 'im'), (5, 'yours')] ### sorted # 기본적으로 새로운 정렬 목록 반환 ary = list..