QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#377471#8110. AdditionSolitaryDream#WA 0ms3636kbC++171.7kb2024-04-05 14:00:262024-04-05 14:00:26

Judging History

你现在查看的是最新测评结果

  • [2024-04-05 14:00:26]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3636kb
  • [2024-04-05 14:00:26]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
vector<pair<string, string>> rst = {
    {"+", "BME"},
    {"0B", "B0"},
    {"1B", "B1"},
    {"E0", "R0E"},
    {"E1", "R1E"},
    {"R00", "0R0"},
    {"R01", "1R0"},
    {"R10", "0R1"},
    {"R11", "1R1"},
    {"R0E", "0E"},
    {"R1E", "1E"},
    // ---
    {"X0", "0X"},
    {"X1", "1X"},
    {"XE", "EX"},
    {"Y0", "0Y"},
    {"Y1", "1Y"},
    {"YE", "EY"},
    // ---
    {"0M0", "MX"},
    {"0M1", "MY"},
    {"0ME", "MXE"},

    {"1M0", "MY"},
    {"1M1", "NX"},
    {"1ME", "MYE"},

    {"BM0", "MX"},
    {"BM1", "MY"},
    {"BMEX", "X"},
    {"BMEY", "Y"},
    // ---
    {"0N0", "MY"},
    {"0N1", "NX"},
    {"0NE", "MYE"},

    {"1N0", "NX"},
    {"1N1", "NY"},
    {"1NE", "NXE"},

    {"BN0", "MY"},
    {"BN1", "NX"},
    {"BNE", "Y"},
    // ---
    {"X", "O"},
    {"Y", "I"},
    {"O", "0"},
    {"I", "1"},
};
int main() {
    // string s;
    // cin >> s;
    // while (1) {
    //     bool flag = 0;
    //     for (int i = 0; i < rst.size(); ++i) {
    //         int ps = -1;
    //         for (int j = 0; j + rst[i].first.size() <= s.size(); ++j) 
    //             if (s.substr(j, rst[i].first.size()) == rst[i].first) {
    //                 ps = j;
    //                 break;
    //             }
    //         if (ps == -1) continue;
    //         flag = 1;
    //         s = s.substr(0, ps) + rst[i].second + s.substr(ps + rst[i].first.size(), s.size());
    //         break;
    //     } 
    //     cout << s << endl;
    //     if (!flag) break;
    // }
    // cout << s << endl;
    
    cout << rst.size() << '\n';
    for (auto [x, y] : rst) cout << x << ' ' << y << '\n';
    return 0;
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3568kb

input:

1

output:

40
+ BME
0B B0
1B B1
E0 R0E
E1 R1E
R00 0R0
R01 1R0
R10 0R1
R11 1R1
R0E 0E
R1E 1E
X0 0X
X1 1X
XE EX
Y0 0Y
Y1 1Y
YE EY
0M0 MX
0M1 MY
0ME MXE
1M0 MY
1M1 NX
1ME MYE
BM0 MX
BM1 MY
BMEX X
BMEY Y
0N0 MY
0N1 NX
0NE MYE
1N0 NX
1N1 NY
1NE NXE
BN0 MY
BN1 NX
BNE Y
X O
Y I
O 0
I 1

result:

ok OK!

Test #2:

score: 0
Accepted
time: 0ms
memory: 3512kb

input:

2

output:

40
+ BME
0B B0
1B B1
E0 R0E
E1 R1E
R00 0R0
R01 1R0
R10 0R1
R11 1R1
R0E 0E
R1E 1E
X0 0X
X1 1X
XE EX
Y0 0Y
Y1 1Y
YE EY
0M0 MX
0M1 MY
0ME MXE
1M0 MY
1M1 NX
1ME MYE
BM0 MX
BM1 MY
BMEX X
BMEY Y
0N0 MY
0N1 NX
0NE MYE
1N0 NX
1N1 NY
1NE NXE
BN0 MY
BN1 NX
BNE Y
X O
Y I
O 0
I 1

result:

ok OK!

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 3636kb

input:

3

output:

40
+ BME
0B B0
1B B1
E0 R0E
E1 R1E
R00 0R0
R01 1R0
R10 0R1
R11 1R1
R0E 0E
R1E 1E
X0 0X
X1 1X
XE EX
Y0 0Y
Y1 1Y
YE EY
0M0 MX
0M1 MY
0ME MXE
1M0 MY
1M1 NX
1ME MYE
BM0 MX
BM1 MY
BMEX X
BMEY Y
0N0 MY
0N1 NX
0NE MYE
1N0 NX
1N1 NY
1NE NXE
BN0 MY
BN1 NX
BNE Y
X O
Y I
O 0
I 1

result:

wrong answer Zla odpowiedz. Oczekiwano 10, a wczytano M01E