-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path15 Skocimis.py
More file actions
98 lines (84 loc) · 3.12 KB
/
Copy path15 Skocimis.py
File metadata and controls
98 lines (84 loc) · 3.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
ImportType = InputType = ConstType = 1
DecoratorType = FunctinoType = 1
if ImportType:
import os
import sys
import random
import threading
from copy import deepcopy
from decimal import Decimal, getcontext
from random import randint, choice, shuffle
from types import GeneratorType
from functools import lru_cache, reduce
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from itertools import accumulate, combinations, permutations
from heapq import heapify, heappop, heappush, heappushpop
from typing import Generic, Iterable, Iterator, TypeVar, Union, List
from string import ascii_lowercase, ascii_uppercase, digits
from math import ceil, floor, sqrt, pi, factorial, gcd, log, log10, log2, inf
from sys import stdin, stdout, setrecursionlimit
from string import (
ascii_lowercase,
ascii_uppercase,
digits,
punctuation,
printable,
whitespace,
)
if InputType:
def input(): return sys.stdin.readline().rstrip("\r\n")
def I(): return input()
def II(): return int(input())
def MII(): return map(int, input().split())
def LI(): return list(input())
def LII(): return list(map(int, input().split()))
def GMI(): return map(lambda x: int(x) - 1, input().split())
def LGMI(): return list(map(lambda x: int(x) - 1, input().split()))
if FunctinoType:
class Math:
__slots__ = ["mod", "l", "fact", "inv"]
def __init__(self):
self.mod = mod = 10**9 + 7
self.l = l = 3 * 10**5 + 5
self.fact = fact = [1] * (l + 1)
self.inv = inv = [1] * (l + 1)
for i in range(1, l + 1):
fact[i] = fact[i - 1] * i % mod
inv[l] = pow(fact[l], mod - 2, mod)
for i in range(l - 1, -1, -1):
inv[i] = inv[i + 1] * (i + 1) % mod
def comb(self, n: int, r: int): # (Combination) CNR เลขจัดหมู่
return (self.fact[n] * self.inv[r] %
self.mod * self.inv[n - r] %
self.mod if n >= r >= 0 else 0)
def perm(self, n: int, r: int): # (Permutation) PNR เลขเรียงสับเปลี่ยน
return self.fact[n] * self.inv[n -
r] % self.mod if n >= r >= 0 else 0
# math_obj = Math()
# combination = math_obj.comb(5, 2) # คำนวณค่า C(5, 2) = 10
# permutation = math_obj.perm(5, 2) # คำนวณค่า P(5, 2) = 20
if ConstType:
MOD1, MOD9 = 10**9 + 7, 998244353
RD = random.randint(MOD1, MOD1 << 1)
Direction4 = [(0, 1), (0, -1), (1, 0), (-1, 0)] # ->, <-, v, ^
Direction8 = [
(0, 1),
(0, -1),
(1, 0),
(-1, 0),
(1, 1),
(1, -1),
(-1, 1),
(-1, -1),
] # ->, <-, v, ^, ↘, ↙, ↗, ↖
Y, N = "Yes", "No"
A, B = "Alice", "Bob"
def solve():
A, B, C = MII()
x = max(B - A - 1, C - B - 1)
print(x)
if __name__ == "__main__":
TEST = 1
for _ in range(TEST):
solve()