-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathinput.js
72 lines (69 loc) · 2.15 KB
/
input.js
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
const PROGRAM = [
{ type: 'set', x: 'i', y: 31 },
{ type: 'set', x: 'a', y: 1 },
{ type: 'mul', x: 'p', y: 17 },
{ type: 'jgz', x: 'p', y: 'p' },
{ type: 'mul', x: 'a', y: 2 },
{ type: 'add', x: 'i', y: -1 },
{ type: 'jgz', x: 'i', y: -2 },
{ type: 'add', x: 'a', y: -1 },
{ type: 'set', x: 'i', y: 127 },
{ type: 'set', x: 'p', y: 464 },
{ type: 'mul', x: 'p', y: 8505 },
{ type: 'mod', x: 'p', y: 'a' },
{ type: 'mul', x: 'p', y: 129749 },
{ type: 'add', x: 'p', y: 12345 },
{ type: 'mod', x: 'p', y: 'a' },
{ type: 'set', x: 'b', y: 'p' },
{ type: 'mod', x: 'b', y: 10000 },
{ type: 'snd', x: 'b' },
{ type: 'add', x: 'i', y: -1 },
{ type: 'jgz', x: 'i', y: -9 },
{ type: 'jgz', x: 'a', y: 3 },
{ type: 'rcv', x: 'b' },
{ type: 'jgz', x: 'b', y: -1 },
{ type: 'set', x: 'f', y: 0 },
{ type: 'set', x: 'i', y: 126 },
{ type: 'rcv', x: 'a' },
{ type: 'rcv', x: 'b' },
{ type: 'set', x: 'p', y: 'a' },
{ type: 'mul', x: 'p', y: -1 },
{ type: 'add', x: 'p', y: 'b' },
{ type: 'jgz', x: 'p', y: 4 },
{ type: 'snd', x: 'a' },
{ type: 'set', x: 'a', y: 'b' },
{ type: 'jgz', x: 1, y: 3 },
{ type: 'snd', x: 'b' },
{ type: 'set', x: 'f', y: 1 },
{ type: 'add', x: 'i', y: -1 },
{ type: 'jgz', x: 'i', y: -11 },
{ type: 'snd', x: 'a' },
{ type: 'jgz', x: 'f', y: -16 },
{ type: 'jgz', x: 'a', y: -19 },
];
const SAMPLE_PROGRAM = [
{ type: 'set', x: 'a', y: 1 },
{ type: 'add', x: 'a', y: 2 },
{ type: 'mul', x: 'a', y: 'a' },
{ type: 'mod', x: 'a', y: 5 },
{ type: 'snd', x: 'a' },
{ type: 'set', x: 'a', y: 0 },
{ type: 'rcv', x: 'a' },
{ type: 'jgz', x: 'a', y: -1 },
{ type: 'set', x: 'a', y: 1 },
{ type: 'jgz', x: 'a', y: -2 },
];
const SAMPLE_PARALLEL_PROGRAM = [
{ type: 'snd', x: 1 },
{ type: 'snd', x: 2 },
{ type: 'snd', x: 'p' },
{ type: 'rcv', x: 'a' },
{ type: 'rcv', x: 'b' },
{ type: 'rcv', x: 'c' },
{ type: 'rcv', x: 'd' },
];
module.exports = {
input: PROGRAM,
sampleInput: SAMPLE_PROGRAM,
sampleParallelInput: SAMPLE_PARALLEL_PROGRAM,
};