This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| input = lambda: sys.stdin.readline().rstrip() | |
| def main(): | |
| H, W, K = map(int, input().split()) | |
| si, sj = map(lambda x: int(x) - 1, input().split()) | |
| A = [list(map(int, input().split())) for _ in range(H)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| from atcoder.segtree import SegTree | |
| input = lambda: sys.stdin.readline().rstrip() | |
| def main(): | |
| N = int(input()) | |
| P = list(map(int, input().split())) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| input = lambda: sys.stdin.readline().rstrip() | |
| def main(): | |
| H, W = map(int, input().split()) | |
| A = [list(map(int, input().split())) for _ in range(H)] | |
| B = [list(map(int, input().split())) for _ in range(H)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| input = lambda: sys.stdin.readline().rstrip() | |
| MOD = 10**9 + 7 | |
| def main(): | |
| N, M = map(int, input().split()) | |
| S = list(map(int, input().split())) | |
| T = list(map(int, input().split())) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| input = lambda: sys.stdin.readline().rstrip() | |
| def main(): | |
| N = int(input()) | |
| A = list(map(int, input().split())) | |
| B = list(map(int, input().split())) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import heapq | |
| import math | |
| import sys | |
| input = lambda: sys.stdin.readline().rstrip() | |
| def main(): | |
| N, M = map(int, input().split()) | |
| G = [[] for _ in range(N)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| input = lambda: sys.stdin.readline().rstrip() | |
| def main(): | |
| N, M, L = map(int, input().split()) | |
| # dist[i][j]: 町 i から町 j までの実際の道路の最短距離 | |
| dist = [[float("inf")] * N for _ in range(N)] | |
| # fuel[i][j]: 町 i から町 j までに行くのに必要な「満タン(給油)の回数」 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| input = lambda: sys.stdin.readline().rstrip() | |
| MOD = 10**9 + 7 | |
| def main(): | |
| N, M = map(int, input().split()) | |
| # 階乗テーブルの作成 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import heapq | |
| import sys | |
| input = lambda: sys.stdin.readline().rstrip() | |
| INF = 1 << 40 | |
| def main(): | |
| N, K = map(int, input().split()) | |
| s = [[] for _ in range(N)] # s[i] := 種類 i の美味しさの集合 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| from collections import deque | |
| input = lambda: sys.stdin.readline().rstrip() | |
| def main(): | |
| N, M = map(int, input().split()) | |
| G = [[] for _ in range(N)] | |
| edge = [[False] * N for _ in range(N)] |
NewerOlder