[누적합] 백준 2143번: 두 배열의 합 / 골드 3
https://www.acmicpc.net/problem/2143 2143번: 두 배열의 합 첫째 줄에 T(-1,000,000,000 ≤ T ≤ 1,000,000,000)가 주어진다. 다음 줄에는 n(1 ≤ n ≤ 1,000)이 주어지고, 그 다음 줄에 n개의 정수로 A[1], …, A[n]이 주어진다. 다음 줄에는 m(1 ≤ m ≤ 1,000)이 주어지고, 그 www.acmicpc.net import collections import sys input = sys.stdin.readline t = int(input()) n = int(input()) a = list(map(int, input().split())) m = int(input()) b = list(map(int, input().split())..
2021. 8. 22.
[기하학/파이썬] 백준 2527번: 직사각형 / 실버 1
https://www.acmicpc.net/problem/2527 2527번: 직사각형 4개의 줄로 이루어져 있다. 각 줄에는 8개의 정수가 하나의 공백을 두고 나타나는데, 첫 4개의 정수는 첫 번째 직사각형을, 나머지 4개의 정수는 두 번째 직사각형을 각각 나타낸다. 단 입력 직 www.acmicpc.net import sys input = sys.stdin.readline for i in range(4): x1, y1, x2, y2, x3, y3, x4, y4 = map(int, input().split()) if x3 > x2 or x4 y2 or y4 < y1: print('d') continue if [x1, y1] == [x4, y4] or [x2, y1]==[x3, y..
2021. 8. 21.