# TopCoder

Caido
$\mathbb{W}\mathcal{aimai}\sim$

57.9% (11/19)

26.9% (18/67)

# Input Format

• $1\leq a,b,x\leq 10^ 9$
• $2\leq N,M\leq 10^ 9$
• $1\leq y\leq 1000$

3 5 10 4 28 35

10 19

# Sample Input 2

42 1 888 999 13579 12345

9498 0

# Sample Input 3

48763 1 111111111 154 4949 1000

2199 0

# Sample Input 4

10 2320 999998888 1 14107 1910

13943 320

# Problem Source

No. Testdata Range Constraints Score
1 0~3 範例測資 0
2 1, 4~13 $x\leq 10^ 5,b=1$ 8
3 1~2, 4~20 $b=1$ 11
4 3, 21~32 $y=1,b<N,N$ 是質數 18
5 3, 21~48 $y=1$ 21
6 0~96 無其他限制 42

# Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 2000 65536 65536 1 6
1 2000 65536 65536 1 2 3 6
2 2000 65536 65536 1 3 6
3 2000 65536 65536 1 4 5 6
4 2000 65536 65536 2 3 6
5 2000 65536 65536 2 3 6
6 2000 65536 65536 2 3 6
7 2000 65536 65536 2 3 6
8 2000 65536 65536 2 3 6
9 2000 65536 65536 2 3 6
10 2000 65536 65536 2 3 6
11 2000 65536 65536 2 3 6
12 2000 65536 65536 2 3 6
13 2000 65536 65536 2 3 6
14 2000 65536 65536 3 6
15 2000 65536 65536 3 6
16 2000 65536 65536 3 6
17 2000 65536 65536 3 6
18 2000 65536 65536 3 6
19 2000 65536 65536 3 6
20 2000 65536 65536 3 6
21 2000 65536 65536 4 5 6
22 2000 65536 65536 4 5 6
23 2000 65536 65536 4 5 6
24 2000 65536 65536 4 5 6
25 2000 65536 65536 4 5 6
26 2000 65536 65536 4 5 6
27 2000 65536 65536 4 5 6
28 2000 65536 65536 4 5 6
29 2000 65536 65536 4 5 6
30 2000 65536 65536 4 5 6
31 2000 65536 65536 4 5 6
32 2000 65536 65536 4 5 6
33 2000 65536 65536 5 6
34 2000 65536 65536 5 6
35 2000 65536 65536 5 6
36 2000 65536 65536 5 6
37 2000 65536 65536 5 6
38 2000 65536 65536 5 6
39 2000 65536 65536 5 6
40 2000 65536 65536 5 6
41 2000 65536 65536 5 6
42 2000 65536 65536 5 6
43 2000 65536 65536 5 6
44 2000 65536 65536 5 6
45 2000 65536 65536 5 6
46 2000 65536 65536 5 6
47 2000 65536 65536 5 6
48 2000 65536 65536 5 6
49 2000 65536 65536 6
50 2000 65536 65536 6
51 2000 65536 65536 6
52 2000 65536 65536 6
53 2000 65536 65536 6
54 2000 65536 65536 6
55 2000 65536 65536 6
56 2000 65536 65536 6
57 2000 65536 65536 6
58 2000 65536 65536 6
59 2000 65536 65536 6
60 2000 65536 65536 6
61 2000 65536 65536 6
62 2000 65536 65536 6
63 2000 65536 65536 6
64 2000 65536 65536 6
65 2000 65536 65536 6
66 2000 65536 65536 6
67 2000 65536 65536 6
68 2000 65536 65536 6
69 2000 65536 65536 6
70 2000 65536 65536 6
71 2000 65536 65536 6
72 2000 65536 65536 6
73 2000 65536 65536 6
74 2000 65536 65536 6
75 2000 65536 65536 6
76 2000 65536 65536 6
77 2000 65536 65536 6
78 2000 65536 65536 6
79 2000 65536 65536 6
80 2000 65536 65536 6
81 2000 65536 65536 6
82 2000 65536 65536 6
83 2000 65536 65536 6
84 2000 65536 65536 6
85 2000 65536 65536 6
86 2000 65536 65536 6
87 2000 65536 65536 6
88 2000 65536 65536 6
89 2000 65536 65536 6
90 2000 65536 65536 6
91 2000 65536 65536 6
92 2000 65536 65536 6
93 2000 65536 65536 6
94 2000 65536 65536 6
95 2000 65536 65536 6
96 2000 65536 65536 6