목록2024/11/24 (2)
넘치게 채우기
https://www.acmicpc.net/problem/1865BOJ - 1865 웜홀문제 유형: 최단경로, 플로이드-워셜, 그래프문제 난이도: Gold III시간 제한: 2초메모리 제한: 128MB 문제때는 2020년, 백준이는 월드나라의 한 국민이다. 월드나라에는 N개의 지점이 있고 N개의 지점 사이에는 M개의 도로와 W개의 웜홀이 있다. (단 도로는 방향이 없으며 웜홀은 방향이 있다.) 웜홀은 시작 위치에서 도착 위치로 가는 하나의 경로인데, 특이하게도 도착을 하게 되면 시작을 하였을 때보다 시간이 뒤로 가게 된다. 웜홀 내에서는 시계가 거꾸로 간다고 생각하여도 좋다.시간 여행을 매우 좋아하는 백준이는 한 가지 궁금증에 빠졌다. 한 지점에서 출발을 하여서 시간여행을 하기 시작하여 다시 출발을 하였..
https://leetcode.com/problems/maximum-matrix-sum/description/leetcode - Maximum Matrix Sum문제 유형: 행렬, 그리디문제 난이도: Medium 문제You are given an n x n integer matrix. You can do the following operation any number of times:Choose any two adjacent elements of matrix and multiply each of them by -1.Two elements are considered adjacent if and only if they share a border.Your goal is to maximize the summati..