[Offer收割]编程练习赛51 register

Ended

Participants:280

Verdict:Wrong Answer
Score:60 / 100
Submitted:2018-03-18 13:44:27

Lang:Python2

Edit
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
NMXY = (int(x) for x in raw_input().strip().split(' '))
ABCD = (int(x) for x in raw_input().strip().split(' '))
total = 0
def algorithm(NMXYnext_Anext_Btotal):
    temp = total + 1
    if X + next_A >= 1 and X + next_A <= N and Y + next_B >= 1 and Y + next_B <= M:
        temp = algorithm(NMX + next_AY + next_Bnext_Anext_Btemp)
    return temp
# if X + next_C >= 1 and X + next_C <= N and Y + next_D >= 1 and Y + next_D <= M:
#     temp += algorithm(N, M, X + next_C, Y + next_D, next_A, next_B, next_C, next_D, 0)
left = algorithm(NMXYAB0)
right = algorithm(NMXYCD0)
print left + right - 1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX