Skip to content

Instantly share code, notes, and snippets.

@uchidama
Created July 4, 2021 15:50
Show Gist options
  • Select an option

  • Save uchidama/4700897a7597434f9542d0d45633959e to your computer and use it in GitHub Desktop.

Select an option

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
'''
'''
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', '')
'''
@uchidama
Copy link
Author

uchidama commented Jul 4, 2021

計算が面倒くさいABC A問題

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment