QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#105703#6315. 填数游戏alch07#0 0ms0kbC++142.6kb2023-05-15 05:53:492024-05-26 02:54:31

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Time Limit Exceeded

input:

20
9 10
2 5 2
2 4 3
1 3
2 4 10
2 1 7
2 1 2
2 5 3
1 6
2 2 7
2 5 4
2 4 3
2 3 9
2 10 4
2 3 1
2 1 2
2 8 7
2 2 6
2 2 7
9 10
2 2 5
2 2 8
2 7 2
2 4 7
2 6 7
2 10 9
2 9 3
2 5 7
2 1 5
2 2 1
2 8 7
2 7 10
2 4 3
2 6 5
2 9 8
2 2 3
2 6 7
2 5 4
9 10
2 2 7
2 4 10
2 5 6
2 2 6
2 9 8
2 7 5
2 3 6
2 6 3
2 7 6
2 7 8
2 5 4...

output:

5 5   4 4   3 3   4 10   1 3   1 1   5 8   6 2   2 2   
10
2 5   4 4   3 3   4 10   1 3   1 1   5 8   6 2   2 2   
10
5 4   4 4   3 3   4 10   1 3   1 1   5 8   6 2   2 2   
10
2 4   4 4   3 3   4 10   1 3   1 1   5 8   6 2   2 2   
10
5 5   3 4   3 3   4 10   1 3   1 1   5 8   6 2   2 2   
10
2 5  ...

result:


Test #2:

score: 0
Time Limit Exceeded

input:

20
9 10
2 4 7
2 6 10
2 9 3
2 5 6
2 7 6
2 3 2
2 4 6
2 8 1
2 3 8
2 8 7
2 10 6
2 3 4
2 5 6
2 6 7
2 1 2
2 4 5
2 8 9
2 3 2
10 10
2 2 1
2 3 7
2 6 10
2 3 4
2 7 4
2 3 4
1 5
2 8 3
2 1 4
2 6 9
2 2 1
2 2 3
2 2 6
2 4 5
2 7 4
2 4 3
2 6 5
2 10 3
2 8 4
2 9 2
10 10
2 9 8
2 7 3
2 1 2
2 10 5
1 6
2 3 2
2 4 10
2 9 1
2 ...

output:

4 8   6 10   9 3   5 5   7 6   3 1   4 4   8 8   3 3   
10
7 8   6 10   9 3   5 5   7 6   3 1   4 4   8 8   3 3   
10
4 7   6 10   9 3   5 5   7 6   3 1   4 4   8 8   3 3   
10
7 7   6 10   9 3   5 5   7 6   3 1   4 4   8 8   3 3   
10
4 8   10 10   9 3   5 5   7 6   3 1   4 4   8 8   3 3   
10
7 8 ...

result:


Test #3:

score: 0
Time Limit Exceeded

input:

20
10 10
1 5
2 3 6
2 4 3
2 2 9
2 1 2
2 4 10
2 4 6
2 7 8
2 2 4
2 3 2
2 5 6
2 2 6
2 3 4
2 2 9
2 1 2
2 10 4
2 4 7
2 8 7
2 5 4
2 2 3
9 10
2 5 8
1 2
2 2 6
2 10 3
1 4
2 9 8
1 10
2 7 8
2 5 3
2 7 8
2 1 2
2 6 5
2 2 3
2 4 3
2 8 9
2 5 10
2 7 6
2 5 4
9 10
2 9 5
2 10 2
2 1 9
2 1 8
2 5 10
1 8
1 4
2 4 6
2 1 10
2 1...

output:

5 5   3 2   4 3   2 2   1 1   4 10   4 4   7 8   2 5   3 2   
11
5 5   3 2   4 3   2 2   1 1   4 10   4 4   7 8   2 5   3 2   
11
5 6   3 2   4 3   2 2   1 1   4 10   4 4   7 8   2 5   3 2   
11
5 6   3 2   4 3   2 2   1 1   4 10   4 4   7 8   2 5   3 2   
11
5 5   6 2   4 3   2 2   1 1   4 10   4 4...

result:


Test #4:

score: 0
Time Limit Exceeded

input:

20
9 10
2 2 4
2 6 3
1 2
2 10 7
1 4
2 1 2
1 4
1 6
2 9 4
2 4 2
2 2 3
2 1 10
2 8 7
2 4 7
2 1 2
2 5 4
2 6 2
2 4 9
9 10
2 5 4
2 6 8
2 4 2
2 4 3
2 5 6
2 2 3
2 7 6
2 3 8
2 9 7
2 5 4
2 8 9
2 1 2
2 4 3
2 6 5
2 3 10
2 7 6
2 3 2
2 8 7
9 10
2 4 3
2 9 6
2 2 7
2 5 9
1 8
1 3
2 9 5
2 7 3
1 4
2 10 9
2 6 5
2 2 1
2 5 ...

output:

2 4   6 2   2 1   10 8   4 4   1 1   4 5   6 6   9 4   
10
4 4   6 2   2 1   10 8   4 4   1 1   4 5   6 6   9 4   
10
2 2   6 2   2 1   10 8   4 4   1 1   4 5   6 6   9 4   
10
4 2   6 2   2 1   10 8   4 4   1 1   4 5   6 6   9 4   
10
2 4   3 2   2 1   10 8   4 4   1 1   4 5   6 6   9 4   
10
4 4  ...

result:


Test #5:

score: 0
Time Limit Exceeded

input:

20
10 10
2 7 3
2 6 2
1 3
2 1 4
2 3 4
1 1
2 5 4
2 1 8
1 4
2 4 8
2 7 6
2 3 2
2 8 3
2 10 4
2 5 4
2 6 1
2 5 6
2 1 2
2 9 4
2 4 3
10 10
2 2 1
1 4
2 10 3
2 2 4
1 6
2 5 9
2 6 9
1 2
2 3 8
1 2
2 2 10
2 8 4
2 4 3
2 1 2
2 6 5
2 5 4
2 9 6
2 3 2
2 7 3
2 1 2
9 10
2 9 3
1 6
2 2 1
2 9 4
1 4
2 8 1
2 8 6
1 5
1 7
2 3 2...

output:

7 7   6 3   3 8   1 10   3 5   1 6   5 5   1 1   4 9   4 4   
11
3 7   6 3   3 8   1 10   3 5   1 6   5 5   1 1   4 9   4 4   
11
7 6   6 3   3 8   1 10   3 5   1 6   5 5   1 1   4 9   4 4   
11
3 6   6 3   3 8   1 10   3 5   1 6   5 5   1 1   4 9   4 4   
11
7 7   2 3   3 8   1 10   3 5   1 6   5 5...

result:


Test #6:

score: 0
Time Limit Exceeded

input:

1000
10 10
2 1 8
2 8 3
2 3 4
2 2 1
2 4 7
2 7 4
2 9 6
1 5
1 8
2 2 6
2 7 3
2 6 7
2 10 9
2 8 3
2 9 1
2 10 6
2 3 10
2 7 4
2 5 6
2 3 8
9 10
2 8 4
1 3
1 9
2 3 7
2 6 2
2 4 3
2 3 7
2 1 4
2 1 7
2 5 2
2 5 4
2 5 8
2 10 5
2 8 9
2 5 6
1 10
2 8 7
1 10
39 40
2 3 40
2 26 17
2 21 27
2 5 9
1 24
2 19 6
2 25 18
2 18 29...

output:

1 7   8 6   3 10   2 8   4 9   7 10   9 3   5 7   8 5   2 3   
11
8 7   8 6   3 10   2 8   4 9   7 10   9 3   5 7   8 5   2 3   
11
1 3   8 6   3 10   2 8   4 9   7 10   9 3   5 7   8 5   2 3   
11
8 3   8 6   3 10   2 8   4 9   7 10   9 3   5 7   8 5   2 3   
11
1 7   3 6   3 10   2 8   4 9   7 10 ...

result:


Test #7:

score: 0
Time Limit Exceeded

input:

1000
10 10
2 2 6
1 2
1 3
1 5
2 9 10
2 6 7
1 7
2 4 8
2 9 4
1 10
2 2 1
2 3 2
2 4 3
2 5 4
2 6 5
2 7 6
2 7 8
2 9 8
2 10 9
2 10 1
9 10
2 1 2
2 2 3
1 7
1 4
2 1 6
2 7 6
2 7 3
2 4 9
2 1 9
2 2 1
2 3 2
2 4 3
2 4 5
2 6 5
2 6 7
2 8 7
2 9 8
2 9 1
9 10
2 1 7
1 10
2 3 6
2 9 5
2 5 4
1 6
2 8 7
2 8 9
2 9 8
2 1 2
2 2 ...

output:

2 2   2 3   3 4   5 5   9 6   6 7   7 7   4 9   9 10   10 10   
11
6 2   2 3   3 4   5 5   9 6   6 7   7 7   4 9   9 10   10 10   
11
2 1   2 3   3 4   5 5   9 6   6 7   7 7   4 9   9 10   10 10   
11
6 1   2 3   3 4   5 5   9 6   6 7   7 7   4 9   9 10   10 10   
11
2 2   2 3   3 4   5 5   9 6   6 ...

result:


Test #8:

score: 0
Memory Limit Exceeded

input:

1000
1 10
1 7
1 7
2 10
1 8
1 3
1 8
1 3
2 10
1 1
1 9
1 1
1 9
5 10
1 7
1 6
1 4
1 3
1 10
1 7
1 6
1 4
1 3
1 10
29 40
1 9
1 15
1 29
1 20
1 8
1 30
1 27
1 7
1 24
1 8
1 23
1 17
1 10
1 28
1 26
1 19
1 15
1 33
1 16
1 14
1 10
1 30
1 20
1 40
1 22
1 10
1 31
1 38
1 5
2 28 9
2 15 6
2 39 29
2 20 31
2 8 38
2 30 25
1 ...

output:

7 7   
1
7 7   
1
7 7   
1
7 7   
1
1
8 8   3 3   
2
8 8   3 3   
2
8 8   3 3   
2
8 8   3 3   
2
8 8   3 3   
2
8 8   3 3   
2
8 8   3 3   
2
8 8   3 3   
2
8 8   3 3   
2
8 8   3 3   
2
8 8   3 3   
2
8 8   3 3   
2
8 8   3 3   
2
8 8   3 3   
2
8 8   3 3   
2
8 8   3 3   
2
2
1 1   9 9   
2
1 1  ...

result:


Test #9:

score: 0
Runtime Error

input:

1000
5 10
1 7
2 9 8
2 1 4
1 3
2 2 9
1 7
2 9 8
2 1 4
1 3
2 2 9
6 10
2 3 6
2 2 5
2 6 3
2 2 5
2 8 9
1 4
2 6 3
2 5 2
2 6 3
2 5 2
2 9 8
1 4
8 10
1 8
2 5 6
2 5 6
2 3 8
2 9 7
2 7 9
1 4
1 10
1 8
2 6 5
2 6 5
2 8 3
2 7 9
2 7 9
1 4
1 10
6 10
1 9
1 4
1 3
2 7 1
1 5
2 1 6
1 9
1 4
1 3
2 7 1
1 5
2 1 6
6 10
2 6 1
2 ...

output:

7 7   9 9   1 1   3 3   2 2   
5
7 7   9 9   1 1   3 3   2 2   
5
7 7   9 9   1 1   3 3   2 2   
5
7 7   9 9   1 1   3 3   2 2   
5
7 7   8 9   1 1   3 3   2 2   
4
7 7   8 9   1 1   3 3   2 2   
4
7 7   8 9   1 1   3 3   2 2   
4
7 7   8 9   1 1   3 3   2 2   
4
7 7   9 8   1 1   3 3   2 2   
4
7 7...

result:


Test #10:

score: 0
Runtime Error

input:

1000
7 10
2 6 9
2 7 1
2 3 2
2 3 10
2 4 10
1 8
2 2 6
1 9
1 7
2 2 3
1 10
2 2 4
1 8
1 6
6 10
2 2 7
2 10 4
1 9
1 10
2 10 6
1 5
1 7
1 4
1 9
1 10
1 6
1 5
6 10
1 4
2 9 2
2 6 5
1 7
2 6 7
1 10
1 4
1 9
1 5
1 7
1 6
1 10
6 10
2 2 8
1 7
2 3 6
2 6 4
2 10 4
1 8
2 4 2
1 7
2 2 3
1 6
1 10
1 8
6 10
1 5
2 1 2
1 7
2 2 6...

output:

6 9   7 7   3 2   3 10   4 2   8 8   2 6   
8
9 9   7 7   3 2   3 10   4 2   8 8   2 6   
8
6 9   7 7   3 2   3 10   4 2   8 8   2 6   
8
9 9   7 7   3 2   3 10   4 2   8 8   2 6   
8
6 9   1 7   3 2   3 10   4 2   8 8   2 6   
8
9 9   1 7   3 2   3 10   4 2   8 8   2 6   
8
6 9   1 7   3 2   3 10  ...

result:


Test #11:

score: 0
Memory Limit Exceeded

input:

1000
5 10
1 1
2 6 5
1 5
2 9 7
1 8
2 1 2
1 6
2 1 3
1 7
1 8
7 10
1 8
2 4 7
2 8 5
1 10
2 2 9
1 7
1 6
1 8
1 4
1 5
1 10
1 9
1 7
1 6
5 10
2 2 5
2 4 9
2 9 8
2 9 10
1 6
1 5
1 4
1 8
1 9
1 6
6 10
2 2 5
2 10 7
1 4
2 6 4
1 8
2 5 7
1 5
1 10
1 4
1 6
1 8
1 7
5 10
2 7 8
2 3 1
1 6
1 1
1 8
1 7
2 1 3
1 6
2 1 2
1 8
5 1...

output:

1 1   6 6   5 1   9 7   8 8   
6
1 1   6 6   5 1   9 7   8 8   
6
1 2   6 6   5 1   9 7   8 8   
2
1 2   6 6   5 1   9 7   8 8   
2
1 1   5 6   5 1   9 7   8 8   
6
1 1   5 6   5 1   9 7   8 8   
6
1 2   5 6   5 1   9 7   8 8   
1
1 2   5 6   5 1   9 7   8 8   
1
1 1   6 6   5 1   9 7   8 8   
6
1 1...

result:


Test #12:

score: 0
Runtime Error

input:

1000
89 100
2 7 10
2 44 79
2 90 72
2 81 82
2 97 98
1 26
2 12 11
2 19 22
2 75 76
2 87 57
2 93 20
2 14 15
1 18
2 52 56
2 63 65
1 52
2 19 69
2 17 30
1 80
2 87 88
2 32 79
2 65 57
2 10 99
2 74 71
1 90
2 61 62
2 61 40
2 15 59
2 78 53
1 71
2 82 36
2 29 8
2 17 18
2 92 67
2 81 63
2 4 5
2 51 54
2 14 13
1 62
2...

output:

7 7   44 79   90 72   81 81   97 98   26 26   12 12   19 21   75 75   87 56   93 28   14 14   18 18   52 56   63 65   52 52   19 69   17 31   80 80   87 87   32 32   65 59   10 10   74 74   90 90   61 62   61 64   15 16   78 53   71 71   82 36   29 9   17 17   92 67   81 41   4 5   51 54   14 14   6...

result:


Test #13:

score: 0
Memory Limit Exceeded

input:

1000
94 100
2 52 4
1 59
1 47
1 59
2 42 94
2 12 13
2 71 87
2 60 59
2 57 47
2 94 70
1 64
2 12 27
2 77 94
2 50 35
1 5
2 70 58
2 64 56
2 67 68
2 21 29
1 26
2 100 73
2 92 93
1 73
2 71 72
2 38 36
2 50 20
1 74
2 47 87
1 4
1 76
2 92 99
2 82 64
2 48 49
2 15 14
2 38 69
1 51
2 55 42
1 68
1 45
2 21 16
1 30
2 91...

output:


result:


Test #14:

score: 0
Runtime Error

input:

1000
88 90
2 59 42
1 45
2 68 83
2 36 2
2 89 70
1 7
1 8
2 67 55
2 81 47
2 76 36
1 68
2 86 27
1 8
1 12
1 4
2 64 21
2 11 1
2 6 69
2 39 58
2 39 40
1 3
2 39 76
1 62
2 43 69
1 53
1 79
2 78 65
2 85 1
1 75
2 47 87
2 26 41
2 17 38
1 2
2 25 41
2 86 71
1 37
2 31 80
1 14
2 47 12
2 66 78
2 28 83
1 57
1 69
2 53 6...

output:

59 4   45 21   68 40   36 72   89 58   7 86   8 51   67 63   81 28   76 22   68 34   86 60   8 70   12 90   4 48   64 20   11 2   6 80   39 80   39 59   3 62   39 4   62 49   43 49   53 11   79 32   78 72   85 63   75 71   47 26   26 63   17 56   2 61   25 21   86 82   37 85   31 6   14 51   47 43  ...

result:


Test #15:

score: 0
Runtime Error

input:

1000
86 90
1 2
2 2 79
2 4 89
2 55 4
2 12 6
2 6 70
2 7 9
2 8 39
2 30 10
2 10 35
2 70 8
2 12 13
1 13
2 14 35
2 15 21
2 42 16
1 28
1 18
1 19
2 75 20
2 21 5
2 81 22
2 55 23
2 24 19
1 25
1 62
1 27
1 28
2 59 29
2 31 30
2 32 31
1 32
1 33
1 35
1 35
2 36 70
2 85 29
2 39 38
1 39
1 40
2 18 41
1 42
2 84 44
2 44...

output:

2 1   2 2   4 3   55 4   12 5   6 7   7 7   8 8   30 9   10 11   70 12   12 12   13 14   14 14   15 16   42 16   28 18   18 18   19 20   75 21   21 22   81 23   55 24   24 24   25 26   62 27   27 27   28 28   59 29   31 31   32 32   32 32   33 34   35 34   35 35   36 37   85 38   39 39   39 39   40 ...

result:


Test #16:

score: 0
Time Limit Exceeded

input:

1000
90 90
2 25 2
2 27 3
2 85 4
2 5 4
2 19 6
2 6 7
2 50 7
2 9 69
1 10
1 11
1 11
1 13
2 14 16
1 15
1 16
2 88 16
1 26
2 76 19
2 19 20
1 20
1 22
2 53 22
2 26 24
1 25
2 25 26
2 8 61
1 23
2 66 29
2 21 30
1 31
2 32 1
2 67 32
2 56 34
1 34
2 36 35
1 36
2 37 40
2 20 39
1 40
2 65 41
2 64 42
2 74 54
2 24 44
2 ...

output:

25 2   27 3   85 4   5 4   19 6   6 6   50 8   9 8   10 9   11 11   11 12   13 13   14 13   15 14   16 16   88 17   26 17   76 19   19 19   20 21   22 21   53 22   26 24   25 25   25 26   8 27   23 27   66 28   21 30   31 31   32 31   67 32   56 34   34 34   36 35   36 37   37 37   20 39   40 39   6...

result:


Test #17:

score: 0
Memory Limit Exceeded

input:

1000
76 90
1 3
1 83
1 67
1 28
1 17
1 63
1 16
1 13
1 27
1 75
1 12
1 85
1 19
1 40
1 30
1 32
1 58
1 20
1 83
1 72
1 50
1 11
1 53
1 39
1 3
1 58
1 71
1 31
1 6
1 35
1 20
1 62
1 43
1 63
1 32
1 51
1 55
1 73
1 33
1 8
1 34
1 21
1 55
1 44
1 50
1 81
1 84
1 88
1 65
1 53
1 28
1 40
1 14
1 77
1 4
1 87
1 13
1 89
1 11...

output:


result:


Test #18:

score: 0
Runtime Error

input:

1000
83 90
1 34
1 30
1 86
1 13
1 82
1 25
1 83
1 45
1 26
1 12
1 49
1 56
1 73
1 40
1 35
1 34
1 5
1 80
1 69
1 81
1 25
1 67
1 20
1 54
1 62
1 83
1 21
1 35
1 52
1 67
1 47
1 69
1 11
1 85
1 31
1 33
1 51
1 4
1 9
1 63
1 18
1 41
1 63
1 11
1 48
1 43
1 65
1 53
1 61
1 2
1 5
1 76
1 75
1 77
1 64
1 78
1 14
1 72
1 8
...

output:

34 41   30 30   86 46   13 13   82 82   25 25   83 83   45 45   26 61   12 55   49 29   56 56   73 73   40 40   35 58   34 34   5 5   80 73   69 69   81 83   25 25   67 67   20 3   54 78   62 62   83 83   21 59   35 24   52 12   67 6   47 47   69 69   11 11   85 37   31 35   33 19   51 51   4 56   9...

result:


Test #19:

score: 0
Memory Limit Exceeded

input:

1000
62 90
1 59
2 46 10
2 85 2
2 79 41
2 34 88
2 49 7
2 66 19
2 77 75
2 26 86
2 68 13
2 71 85
2 11 29
2 65 74
2 80 19
2 87 48
2 17 27
2 21 46
1 44
2 30 27
1 20
2 86 58
2 85 40
2 40 36
2 1 27
2 74 44
1 72
2 14 12
2 18 29
2 39 33
2 66 19
2 90 60
2 47 62
2 52 90
2 12 80
2 68 75
2 51 29
2 1 57
1 61
2 43...

output:


result:


Test #20:

score: 0
Runtime Error

input:

1000
65 90
2 33 90
2 61 28
2 39 71
2 58 78
2 9 41
2 70 84
2 20 64
2 26 3
2 73 57
2 21 4
2 89 88
2 69 85
2 82 55
2 20 39
2 5 27
2 9 42
2 64 25
2 85 81
2 26 3
1 15
2 87 60
2 86 1
2 10 22
2 66 28
2 66 12
2 19 14
2 8 33
2 84 70
2 11 39
1 16
2 75 37
2 47 39
1 51
2 78 57
2 19 18
2 77 74
2 59 15
2 76 65
2 ...

output:

33 90   61 61   39 39   58 58   9 9   70 70   20 64   26 3   73 57   21 21   89 88   69 85   82 82   20 39   5 5   9 42   64 25   85 85   26 26   15 15   87 60   86 1   10 10   66 66   66 66   19 14   8 8   84 84   11 39   16 16   75 37   47 39   51 51   78 78   19 18   77 77   59 15   76 65   28 49...

result:


Test #21:

score: 0
Memory Limit Exceeded

input:

1000
76 90
2 15 3
2 61 68
2 35 15
2 67 86
1 36
1 40
2 13 12
2 30 37
2 14 64
2 29 68
2 15 14
2 17 25
2 11 12
2 79 13
2 62 7
2 35 1
2 42 71
2 33 38
1 85
2 47 17
2 39 37
2 60 6
1 77
1 57
2 39 29
1 71
2 30 47
2 30 33
2 64 79
2 42 77
2 45 38
2 33 1
2 75 76
2 18 26
1 18
2 57 56
2 19 55
2 7 81
2 53 19
2 56...

output:


result:


Test #22:

score: 0
Memory Limit Exceeded

input:

1000
80 90
2 48 50
2 20 23
2 82 8
1 4
1 40
2 69 59
2 13 67
2 6 86
2 3 74
2 9 38
1 9
1 79
1 18
2 15 14
1 31
2 77 21
2 33 72
2 56 39
2 32 33
2 90 89
2 86 83
2 90 13
2 34 26
2 23 68
1 50
2 65 83
1 77
2 79 69
2 25 26
2 44 43
2 74 84
2 13 12
1 62
1 71
2 26 70
2 2 83
2 7 20
2 23 1
2 11 12
2 78 7
1 58
1 65...

output:

48 48   20 20   82 8   4 4   40 41   69 69   13 32   6 6   3 22   9 26   9 9   79 79   18 18   15 15   31 26   77 21   33 75   56 57   32 33   90 90   86 86   90 90   34 26   23 68   50 29   65 83   77 78   79 79   25 25   44 43   74 85   13 12   62 63   71 31   26 30   2 3   7 20   23 1   11 12   7...

result:


Test #23:

score: 0
Runtime Error

input:

1000
82 90
2 36 58
2 64 41
2 1 12
2 6 90
2 50 15
2 30 27
2 42 87
2 89 33
2 47 28
1 70
1 17
1 20
2 33 62
2 31 7
2 4 69
2 83 37
2 55 36
2 35 32
2 29 11
1 57
2 53 52
2 9 53
2 88 66
1 21
1 22
2 28 39
2 11 12
1 5
2 78 56
2 59 57
2 63 8
2 85 62
2 84 16
2 48 49
2 7 61
2 3 9
1 4
1 50
1 80
2 62 43
2 77 50
2 ...

output:

36 36   64 64   1 36   6 6   50 15   30 27   42 89   89 40   47 47   70 73   17 17   20 19   33 63   31 7   4 69   83 83   55 56   35 32   29 35   57 58   53 52   9 52   88 88   21 21   22 21   28 34   11 12   5 5   78 24   59 57   63 8   85 61   84 85   48 48   7 7   3 10   4 4   50 51   80 80   62...

result:


Test #24:

score: 0
Runtime Error

input:

1000
83 90
2 71 72
2 6 16
2 78 3
2 24 25
2 39 65
2 19 9
2 10 14
1 30
2 86 65
2 17 18
1 47
2 69 68
1 7
2 64 7
2 31 68
2 90 89
2 85 4
2 22 79
2 12 62
2 56 66
1 83
1 88
2 43 45
2 50 20
2 15 14
2 38 59
1 32
1 80
2 33 6
1 61
2 15 41
2 47 20
2 78 52
2 1 13
1 18
2 6 63
2 70 62
2 25 27
1 74
2 8 2
2 65 41
2 ...

output:

71 71   6 16   78 78   24 25   39 31   19 10   10 11   30 31   86 85   17 17   47 45   69 69   7 6   64 7   31 68   90 90   85 85   22 78   12 62   56 56   83 83   88 88   43 45   50 50   15 15   38 38   32 33   80 80   33 34   61 60   15 15   47 19   78 77   1 2   18 18   6 6   70 62   25 37   74 7...

result:


Test #25:

score: 0
Runtime Error

input:

1000
80 90
2 66 52
2 74 17
2 42 71
2 59 58
2 86 21
1 81
2 25 63
1 52
1 1
1 25
2 2 22
1 89
1 39
1 28
2 78 85
2 67 76
1 85
2 30 31
2 12 13
2 25 38
1 33
2 38 71
1 9
2 62 61
1 16
1 54
2 52 66
2 5 15
2 14 13
2 69 3
2 70 66
2 37 25
2 21 27
2 34 6
2 44 85
2 12 33
1 75
2 51 53
2 4 45
2 39 82
1 26
1 15
2 46 ...

output:

66 52   74 18   42 71   59 59   86 86   81 14   25 63   52 52   1 1   25 25   2 2   89 89   39 41   28 28   78 86   67 67   85 88   30 31   12 13   25 25   33 30   38 73   9 10   62 62   16 17   54 54   52 58   5 4   14 14   69 69   70 66   37 25   21 20   34 6   44 44   12 29   75 76   51 53   4 4 ...

result: