[PYTHON] AtCoder Regular Contest 105 Participation Report

AtCoder Regular Contest 105 Participation Report

ARC105A - Fourtune Cookies

Break through in 3 minutes. Try everything.

A, B, C, D = map(int, input().split())

s = sum([A, B, C, D])
for x in [A, B, C, D, A + B, A + C, A + D, B + C, B + D, C + D]:
    if x == s - x:
        print('Yes')
        break
else:
    print('No')

ARC105B - MAX-=min

It breaks through in 10 minutes. Needless to say, if you simulate it naively, even if you can retrieve the maximum value at high speed with a priority queue, TLE desperately when the minimum value is x = 1. Is it a demon that TLEs even if it is simulated?

If you realize that this calculation is actually a problem to find the greatest common divisor, you can solve it with the following.

from math import gcd
from functools import reduce

N, *a = map(int, open(0).read().split())

print(reduce(gcd, a))

ARC105C - Camels and Bridge

Lost. About 10 minutes before the end, the input / output example passed and I thought "I did it!", But about half of it was WA and TLE ...

Recommended Posts

AtCoder Regular Contest 105 Participation Report
AtCoder Regular Contest 104 Participation Report
AtCoder Beginner Contest 181 Participation Report
AtCoder Beginner Contest 161 Participation Report
AtCoder Beginner Contest 151 Participation Report
AtCoder Beginner Contest 176 Participation Report
AtCoder Grand Contest 041 Participation Report
AtCoder Grand Contest 040 Participation Report
AtCoder Beginner Contest 153 Participation Report
AtCoder Beginner Contest 165 Participation Report
AtCoder Beginner Contest 160 Participation Report
AtCoder Beginner Contest 169 Participation Report
AtCoder Beginner Contest 178 Participation Report
AtCoder Beginner Contest 163 Participation Report
AtCoder Beginner Contest 159 Participation Report
AtCoder Beginner Contest 164 Participation Report
AtCoder Beginner Contest 168 Participation Report
AtCoder Beginner Contest 150 Participation Report
AtCoder Beginner Contest 158 Participation Report
AtCoder Beginner Contest 180 Participation Report
AtCoder Beginner Contest 156 Participation Report
AtCoder Beginner Contest 162 Participation Report
AtCoder Beginner Contest 157 Participation Report
AtCoder Beginner Contest 167 Participation Report
AtCoder Beginner Contest 179 Participation Report
AtCoder Beginner Contest 182 Participation Report
AtCoder Beginner Contest 146 Participation Report
AtCoder Beginner Contest 152 Participation Report
AtCoder Beginner Contest 155 Participation Report
AtCoder Beginner Contest 174 Participation Report
AtCoder Beginner Contest 171 Participation Report
AtCoder Beginner Contest 149 Participation Report
AtCoder Beginner Contest 148 Participation Report
AtCoder Beginner Contest 188 Participation Report
AtCoder Beginner Contest 170 Participation Report
AtCoder Beginner Contest 187 Participation Report
AtCoder Chokudai Contest 005 Participation Report
AtCoder Grand Contest 047 Participation Report
AtCoder Beginner Contest 183 Participation Report
AtCoder HHKB Programming Contest 2020 Participation Report
AtCoder Acing Programming Contest 2020 Participation Report
AtCoder Keyence Programming Contest 2020 Participation Report
AtCoder Panasonic Programming Contest 2020 Participation Report
AtCoder Regular Contest 105 Review
AtCoder Regular Contest 106 Note
AtCoder Library Practice Contest Participation Report (Python)
AtCoder Regular Contest 105 Note
AtCoder Regular Contest 106 Review
AtCoder Introduction to Heuristics Contest Participation Report
AtCoder Regular Contest 104 Review
AtCoder Judge System Update Test Contest 202004 Participation Report
AtCoder Regular Contest # 002 C Problem
ACL Beginner Contest Participation Report
Atcoder Beginner Contest 146 Participation Diary
AtCoder Sumitomo Mitsui Trust Bank Programming Contest 2019 Participation Report
AtCoder Hitachi, Ltd. Social Systems Division Programming Contest 2020 Participation Report
abc154 participation report
abc155 participation report
AtCoder Beginner Contest 179
AtCoder Beginner Contest 180
AtCoder Beginner Contest 173