# 颠倒的价牌
小李的店里专卖其它店中下架的样品电视机，可称为：样品电视专卖店。
其标价都是4位数字（即千元不等）。
小李为了标价清晰、方便，使用了预制的类似数码管的标价签，只要用颜色笔涂数字就可以了（参见图片）。  
![](https://img-blog.csdnimg.cn/20200315215554485.png)  
这种价牌有个特点，对一些数字，倒过来看也是合理的数字。如：1 2 5 6 8 9 0 都可以。这样一来，如果牌子挂倒了，有可能完全变成了另一个价格，比如：1958 倒着挂就是：8561，差了几千元啊!!  
当然，多数情况不能倒读，比如，1110 就不能倒过来，因为0不能作为开始数字。  
有一天，悲剧终于发生了。某个店员不小心把店里的某两个价格牌给挂倒了。并且这两个价格牌的电视机都卖出去了!
庆幸的是价格出入不大，其中一个价牌赔了2百多，另一个价牌却赚了8百多，综合起来，反而多赚了558元。

请根据这些信息计算：赔钱的那个价牌正确的价格应该是多少？


## aop
### before
```cpp
#include <iostream>
using namespace std;
```
### after
```cpp

```

## 答案
```cpp
int main()
{
    int num1[7] = {0, 1, 2, 5, 6, 8, 9}; 
    int num2[7] = {0, 1, 2, 5, 9, 8, 6}; 
    int profit1[1111][2];                
    int profit2[1111][2];                
    int before_reverse;                  
    int after_reverse;                   
    int i = 0;
    int j = 0;
    for (int a = 1; a < 7; a++) 
    {
        for (int b = 0; b < 7; b++)
        {
            for (int c = 0; c < 7; c++)
            {
                for (int d = 0; d < 7; d++)
                {
                    before_reverse = num1[a] * 1000 + num1[b] * 100 + num1[c] * 10 + num1[d];
                    after_reverse = num2[d] * 1000 + num2[c] * 100 + num2[b] * 10 + num2[a];
                    
                    if (after_reverse - before_reverse > -300 && after_reverse - before_reverse < -200)
                    
                    {
                        profit1[i][0] = before_reverse;
                        profit1[i][1] = after_reverse - before_reverse;
                        i++;
                    }
                    else if (after_reverse - before_reverse > 800 && after_reverse - before_reverse < 900)
                    
                    {
                        profit1[j][0] = before_reverse;
                        profit2[j][1] = after_reverse - before_reverse;
                        j++;
                    }
                }
            }
        }
    }
    int answer = 0;
    for (int a = 0; a < i; a++)
    {
        for (int b = 0; b < j; b++)
        {
            if (profit1[a][1] + profit2[b][1] == 558)
            {
                answer = profit1[a][0];
            }
        }
    }
    cout << answer << endl;
    return 0;
}
```
## 选项

### A
```cpp
int main()
{
    int num1[7] = {0, 1, 2, 5, 6, 8, 9}; 
    int num2[7] = {0, 1, 2, 5, 9, 8, 6}; 
    int profit1[1111][2];                
    int profit2[1111][2];                
    int before_reverse;                  
    int after_reverse;                   
    int i = 0;
    int j = 0;
    for (int a = 1; a < 7; a++) 
    {
        for (int b = 0; b < 7; b++)
        {
            for (int c = 0; c < 7; c++)
            {
                for (int d = 0; d < 7; d++)
                {
                    before_reverse = num1[a] * 1000 + num1[b] * 100 + num1[c] * 10 + num1[d];
                    after_reverse = num2[d] * 1000 + num2[c] * 100 + num2[b] * 10 + num2[a];
                    
                    if (after_reverse - before_reverse > -300 && after_reverse - before_reverse < -200)
                    
                    {
                        profit1[i][0] = before_reverse;
                        profit1[i][1] = after_reverse - before_reverse;
                        i++;
                    }
                    else if (after_reverse - before_reverse > 800 && after_reverse - before_reverse < 900)
                    
                    {
                        profit1[j][0] = before_reverse;
                        profit2[j][1] = after_reverse - before_reverse;
                        j++;
                    }
                }
            }
        }
    }
    int answer = 0;
    for (int a = 0; a < i; a++)
    {
        for (int b = 0; b < j; b++)
        {
            if (profit1[a][1] + profit2[b][1] == 558)
            {
                answer = profit1[b][1];
            }
        }
    }
    cout << answer << endl;
    return 0;
}
```

### B
```cpp
int main()
{
    int num1[7] = {0, 1, 2, 5, 6, 8, 9}; 
    int num2[7] = {0, 1, 2, 5, 9, 8, 6}; 
    int profit1[1111][2];                
    int profit2[1111][2];                
    int before_reverse;                  
    int after_reverse;                   
    int i = 0;
    int j = 0;
    for (int a = 1; a < 7; a++) 
    {
        for (int b = 0; b < 7; b++)
        {
            for (int c = 0; c < 7; c++)
            {
                for (int d = 0; d < 7; d++)
                {
                    before_reverse = num1[a] * 1000 + num1[b] * 100 + num1[c] * 10 + num1[d];
                    after_reverse = num2[d] * 1000 + num2[c] * 100 + num2[b] * 10 + num2[a];
                    
                    if (after_reverse - before_reverse > -300 && after_reverse - before_reverse < -200)
                    
                    {
                        profit1[i][0] = before_reverse;
                        profit1[i][1] = after_reverse - before_reverse;
                        i++;
                    }
                    else if (after_reverse - before_reverse > 800 && after_reverse - before_reverse < 900)
                    
                    {
                        profit1[j][0] = before_reverse;
                        profit2[j][1] = after_reverse - before_reverse;
                        j++;
                    }
                }
            }
        }
    }
    int answer = 0;
    for (int a = 0; a < i; a++)
    {
        for (int b = 0; b < j; b++)
        {
            if (profit1[a][1] + profit2[b][1] == 558)
            {
                answer = profit1[b][0];
            }
        }
    }
    cout << answer << endl;
    return 0;
}
```

### C
```cpp
int main()
{
    int num1[7] = {0, 1, 2, 5, 6, 8, 9}; 
    int num2[7] = {0, 1, 2, 5, 9, 8, 6}; 
    int profit1[1111][2];                
    int profit2[1111][2];                
    int before_reverse;                  
    int after_reverse;                   
    int i = 0;
    int j = 0;
    for (int a = 1; a < 7; a++) 
    {
        for (int b = 0; b < 7; b++)
        {
            for (int c = 0; c < 7; c++)
            {
                for (int d = 0; d < 7; d++)
                {
                    before_reverse = num1[a] * 1000 + num1[b] * 100 + num1[c] * 10 + num1[d];
                    after_reverse = num2[d] * 1000 + num2[c] * 100 + num2[b] * 10 + num2[a];
                    
                    if (after_reverse - before_reverse > -300 && after_reverse - before_reverse < -200)
                    
                    {
                        profit1[i][0] = before_reverse;
                        profit1[i][1] = after_reverse - before_reverse;
                        i++;
                    }
                    else if (after_reverse - before_reverse > 800 && after_reverse - before_reverse < 900)
                    
                    {
                        profit1[j][0] = before_reverse;
                        profit2[j][1] = after_reverse - before_reverse;
                        j++;
                    }
                }
            }
        }
    }
    int answer = 0;
    for (int a = 0; a < i; a++)
    {
        for (int b = 0; b < j; b++)
        {
            if (profit1[a][1] + profit2[b][1] == 558)
            {
                answer = profit1[0][b];
            }
        }
    }
    cout << answer << endl;
    return 0;
}
```
