Created
July 4, 2021 15:50
-
-
Save uchidama/4700897a7597434f9542d0d45633959e to your computer and use it in GitHub Desktop.
AtCoder Beginner Contest 121 [ A - White Cells ] https://atcoder.jp/contests/abc121/tasks/abc121_a
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 | |
| sys.setrecursionlimit(10 ** 6) # 再帰上限の引き上げ | |
| input = sys.stdin.readline | |
| INF = 2 ** 63 - 1 | |
| H, W = map(int, input().split()) | |
| h, w = map(int, input().split()) | |
| white = H*W | |
| black = h*W | |
| ans = (white-black) - (H-h)*w | |
| print(ans) | |
| ''' | |
| # 読み込み系テンプレ | |
| N, M = map(int, input().split()) | |
| N = int(input()) | |
| h_list = list(map(int, input().split())) | |
| sa = list(input()) # 一文字ずつバラす | |
| N = int(input()) | |
| A = [tuple(map(int, input().split())) for i in range(N)] | |
| # タプルの2番目の要素でソート | |
| A.sort(key=lambda x: x[1], reverse=True) | |
| # 昔のINF | |
| INF = 10**18+7 | |
| S = S.replace('\n', '') | |
| ''' |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
計算が面倒くさいABC A問題