1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

AtCoder Beginner Contest 242 参戦記

Posted at

AtCoder Beginner Contest 242 参戦記

ジャッジが詰まっていて大変だった上に、Dが解けなくて落緑_(┐「ε:)_

ABC242A - T-shirt

書くだけ. elifif と誤記して WA1(泣).

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

if X <= A:
    print(1)
elif X > B:
    print(0)
else:
    print(C / (B - A))

ABC242B - Minimize Ordering

書くだけ.

S = input()

print(''.join(sorted(S)))

ABC242C - 1111gal password

素直に DP するだけ. C問題で DP はもう普通なんだな.

m = 998244353

N = int(input())

t = [1] * 10
t[0] = 0

for i in range(N - 1):
    u = [0] * 10
    for i in range(1, 10):
        for j in [-1, 0, 1]:
            k = i + j
            if k < 1 or k > 9:
                continue
            u[k] += t[i]
            u[k] %= m
    t = u
print(sum(t) % m)
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?