ABC195 It was 4 questions, I got 2 RE on D, couldn’t figure out why so I skipped it and solved E, went back, couldn’t figure it out, looked at F. I’ve looked at the official commentary and it’s as good as the official commentary up to F as far as considerations are concerned, so it seems to be a phenomenon of not getting points due to lack of implementation skills. ABC195D, I tested cases where N or M is 1, I tested 10000 random cases and did not reproduce RE at hand, when does it become RE? Panasonic Programming Contest (AtCoder Beginner Contest 195) - AtCoder

image

I thought it would go down harder, but surprisingly it did okay. image

B

  • I’m nervous that I’m going to put in one wrong bug. py
def main():
    import math
    A, B, W = map(int, input().split())
    W *= 1000
    WB = math.ceil(W / B)
    WA = math.floor(W / A)
    if WA < WB:
        print("UNSATISFIABLE")
        return
    print(WB, WA)

C

  • Personally, I was nervous that B was going to put one wrong bug in, but this one was smooth.
  • If I had to use a word, I’d say warp and weft.
  • Vertical length (10^15) is longer than horizontal (15), so add vertically instead of horizontally py
def main():
    N = int(input())
    d = 999
    ret = 0
    while N > d:
        ret += N - d
        d = d * 1000 + 999

    print(ret)

ABC195D RE ABC195Eâś… ABC195Fđź’»

prev ABC194


This page is auto-translated from /nishio/ABC195 using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.