Skip to content

Commit 9e46daa

Browse files
committed
🥺chore
1 parent 753c645 commit 9e46daa

File tree

6 files changed

+253
-2
lines changed

6 files changed

+253
-2
lines changed

abc121/a/main.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!usr/bin/env python3
2+
from collections import defaultdict, deque, Counter, OrderedDict
3+
from bisect import bisect_left, bisect_right
4+
from functools import reduce, lru_cache
5+
from heapq import heappush, heappop, heapify
6+
7+
from itertools import *
8+
import math, fractions
9+
import sys, copy
10+
11+
def L(): return sys.stdin.readline().split()
12+
def I(): return int(sys.stdin.readline().rstrip())
13+
def SL(): return list(sys.stdin.readline().rstrip())
14+
def LI(): return [int(x) for x in sys.stdin.readline().split()]
15+
def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]
16+
def LS(): return [list(x) for x in sys.stdin.readline().split()]
17+
def R(n): return [sys.stdin.readline().strip() for _ in range(n)]
18+
def LR(n): return [L() for _ in range(n)]
19+
def IR(n): return [I() for _ in range(n)]
20+
def LIR(n): return [LI() for _ in range(n)]
21+
def LIR1(n): return [LI1() for _ in range(n)]
22+
def SLR(n): return [SL() for _ in range(n)]
23+
def LSR(n): return [LS() for _ in range(n)]
24+
25+
def perm(n, r): return math.factorial(n) // math.factorial(r)
26+
def comb(n, r): return math.factorial(n) // (math.factorial(r) * math.factorial(n-r))
27+
def powerset(iterable):
28+
s = list(iterable)
29+
return chain.from_iterable(combinations(s, r) for r in range(len(s)+1))
30+
31+
def make_list(n, *args, default=0): return [make_list(*args, default=default) for _ in range(n)] if args else [default for _ in range(n)]
32+
33+
dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
34+
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
35+
alphabets = "abcdefghijklmnopqrstuvwxyz"
36+
ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
37+
MOD = 1000000007
38+
INF = float("inf")
39+
40+
sys.setrecursionlimit(1000000)
41+
42+
def main():
43+
N = I()
44+
45+
if __name__ == '__main__':
46+
main()

abc121/b/main.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!usr/bin/env python3
2+
from collections import defaultdict, deque, Counter, OrderedDict
3+
from bisect import bisect_left, bisect_right
4+
from functools import reduce, lru_cache
5+
from heapq import heappush, heappop, heapify
6+
7+
from itertools import *
8+
import math, fractions
9+
import sys, copy
10+
11+
def L(): return sys.stdin.readline().split()
12+
def I(): return int(sys.stdin.readline().rstrip())
13+
def SL(): return list(sys.stdin.readline().rstrip())
14+
def LI(): return [int(x) for x in sys.stdin.readline().split()]
15+
def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]
16+
def LS(): return [list(x) for x in sys.stdin.readline().split()]
17+
def R(n): return [sys.stdin.readline().strip() for _ in range(n)]
18+
def LR(n): return [L() for _ in range(n)]
19+
def IR(n): return [I() for _ in range(n)]
20+
def LIR(n): return [LI() for _ in range(n)]
21+
def LIR1(n): return [LI1() for _ in range(n)]
22+
def SLR(n): return [SL() for _ in range(n)]
23+
def LSR(n): return [LS() for _ in range(n)]
24+
25+
def perm(n, r): return math.factorial(n) // math.factorial(r)
26+
def comb(n, r): return math.factorial(n) // (math.factorial(r) * math.factorial(n-r))
27+
def powerset(iterable):
28+
s = list(iterable)
29+
return chain.from_iterable(combinations(s, r) for r in range(len(s)+1))
30+
31+
def make_list(n, *args, default=0): return [make_list(*args, default=default) for _ in range(n)] if args else [default for _ in range(n)]
32+
33+
dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
34+
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
35+
alphabets = "abcdefghijklmnopqrstuvwxyz"
36+
ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
37+
MOD = 1000000007
38+
INF = float("inf")
39+
40+
sys.setrecursionlimit(1000000)
41+
42+
def main():
43+
N = I()
44+
45+
if __name__ == '__main__':
46+
main()

abc121/c/main.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!usr/bin/env python3
2+
from collections import defaultdict, deque, Counter, OrderedDict
3+
from bisect import bisect_left, bisect_right
4+
from functools import reduce, lru_cache
5+
from heapq import heappush, heappop, heapify
6+
7+
from itertools import *
8+
import math, fractions
9+
import sys, copy
10+
11+
def L(): return sys.stdin.readline().split()
12+
def I(): return int(sys.stdin.readline().rstrip())
13+
def SL(): return list(sys.stdin.readline().rstrip())
14+
def LI(): return [int(x) for x in sys.stdin.readline().split()]
15+
def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]
16+
def LS(): return [list(x) for x in sys.stdin.readline().split()]
17+
def R(n): return [sys.stdin.readline().strip() for _ in range(n)]
18+
def LR(n): return [L() for _ in range(n)]
19+
def IR(n): return [I() for _ in range(n)]
20+
def LIR(n): return [LI() for _ in range(n)]
21+
def LIR1(n): return [LI1() for _ in range(n)]
22+
def SLR(n): return [SL() for _ in range(n)]
23+
def LSR(n): return [LS() for _ in range(n)]
24+
25+
def perm(n, r): return math.factorial(n) // math.factorial(r)
26+
def comb(n, r): return math.factorial(n) // (math.factorial(r) * math.factorial(n-r))
27+
def powerset(iterable):
28+
s = list(iterable)
29+
return chain.from_iterable(combinations(s, r) for r in range(len(s)+1))
30+
31+
def make_list(n, *args, default=0): return [make_list(*args, default=default) for _ in range(n)] if args else [default for _ in range(n)]
32+
33+
dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
34+
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
35+
alphabets = "abcdefghijklmnopqrstuvwxyz"
36+
ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
37+
MOD = 1000000007
38+
INF = float("inf")
39+
40+
sys.setrecursionlimit(1000000)
41+
42+
def main():
43+
N = I()
44+
45+
if __name__ == '__main__':
46+
main()

abc121/contest.acc.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"contest": {
3+
"id": "abc121",
4+
"title": "AtCoder Beginner Contest 121",
5+
"url": "https://atcoder.jp/contests/abc121"
6+
},
7+
"tasks": [
8+
{
9+
"id": "abc121_a",
10+
"label": "A",
11+
"title": "White Cells",
12+
"url": "https://atcoder.jp/contests/abc121/tasks/abc121_a",
13+
"directory": {
14+
"path": "a",
15+
"testdir": "test",
16+
"submit": "main.py"
17+
}
18+
},
19+
{
20+
"id": "abc121_b",
21+
"label": "B",
22+
"title": "Can you solve this?",
23+
"url": "https://atcoder.jp/contests/abc121/tasks/abc121_b",
24+
"directory": {
25+
"path": "b",
26+
"testdir": "test",
27+
"submit": "main.py"
28+
}
29+
},
30+
{
31+
"id": "abc121_c",
32+
"label": "C",
33+
"title": "Energy Drink Collector",
34+
"url": "https://atcoder.jp/contests/abc121/tasks/abc121_c",
35+
"directory": {
36+
"path": "c",
37+
"testdir": "test",
38+
"submit": "main.py"
39+
}
40+
},
41+
{
42+
"id": "abc121_d",
43+
"label": "D",
44+
"title": "XOR World",
45+
"url": "https://atcoder.jp/contests/abc121/tasks/abc121_d",
46+
"directory": {
47+
"path": "d",
48+
"testdir": "test",
49+
"submit": "main.py"
50+
}
51+
}
52+
]
53+
}

abc121/d/main.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!usr/bin/env python3
2+
from collections import defaultdict, deque, Counter, OrderedDict
3+
from bisect import bisect_left, bisect_right
4+
from functools import reduce, lru_cache
5+
from heapq import heappush, heappop, heapify
6+
7+
from itertools import *
8+
import math, fractions
9+
import sys, copy
10+
11+
def L(): return sys.stdin.readline().split()
12+
def I(): return int(sys.stdin.readline().rstrip())
13+
def SL(): return list(sys.stdin.readline().rstrip())
14+
def LI(): return [int(x) for x in sys.stdin.readline().split()]
15+
def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]
16+
def LS(): return [list(x) for x in sys.stdin.readline().split()]
17+
def R(n): return [sys.stdin.readline().strip() for _ in range(n)]
18+
def LR(n): return [L() for _ in range(n)]
19+
def IR(n): return [I() for _ in range(n)]
20+
def LIR(n): return [LI() for _ in range(n)]
21+
def LIR1(n): return [LI1() for _ in range(n)]
22+
def SLR(n): return [SL() for _ in range(n)]
23+
def LSR(n): return [LS() for _ in range(n)]
24+
25+
def perm(n, r): return math.factorial(n) // math.factorial(r)
26+
def comb(n, r): return math.factorial(n) // (math.factorial(r) * math.factorial(n-r))
27+
def powerset(iterable):
28+
s = list(iterable)
29+
return chain.from_iterable(combinations(s, r) for r in range(len(s)+1))
30+
31+
def make_list(n, *args, default=0): return [make_list(*args, default=default) for _ in range(n)] if args else [default for _ in range(n)]
32+
33+
dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
34+
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
35+
alphabets = "abcdefghijklmnopqrstuvwxyz"
36+
ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
37+
MOD = 1000000007
38+
INF = float("inf")
39+
40+
sys.setrecursionlimit(1000000)
41+
42+
def main():
43+
A, B = LI()
44+
45+
46+
if __name__ == '__main__':
47+
main()

abc129/c/main.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,23 @@ def LSR(n): return [LS() for i in range(n)]
1717
sys.setrecursionlimit(1000000)
1818
dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
1919
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
20-
MOD = 1000000007
20+
MOD = 1_000_000_007
2121

2222
def main():
23-
N = I()
23+
N, M = LI()
24+
A = set(IR(M))
25+
26+
dp = [0]*(N+1)
27+
dp[0] = 1
28+
dp[1] = 1 if 1 not in A else 0
29+
30+
for i in range(2, N+1):
31+
dp[i] = (dp[i-1] + dp[i-2]) % MOD
32+
if i in A:
33+
dp[i] = 0
34+
print(dp[-1])
35+
36+
2437

2538
if __name__ == '__main__':
2639
main()

0 commit comments

Comments
 (0)