QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#527596#9158. 分数bashkort#0 5136ms13620kbC++20675b2024-08-22 17:26:052024-08-22 17:26:06

Judging History

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

  • [2024-08-22 17:26:06]
  • 评测
  • 测评结果:0
  • 用时:5136ms
  • 内存:13620kb
  • [2024-08-22 17:26:05]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

constexpr int N = 1e8 + 1;
int t = 0;
pair<int, int> q[N];

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    auto st = clock();

    int n, m;
    cin >> n >> m;

//    q[t++] = {1, 2};
    q[t++] = {2, 1};
    int s = 0;
    while (t) {
        auto [a, b] = q[--t];
        s += 1;
        if (a + b * 2 <= n) {
            q[t++] = {a + b * 2, b};
        }
        if (b + a * 2 <= m) {
            q[t++] = {a, b + a * 2};
        }
    }

    cout << s << '\n';
    cerr << (clock() - st) / double(CLOCKS_PER_SEC) << endl;

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Pretests

Pretest #1:

score: 0
Wrong Answer
time: 0ms
memory: 4000kb

input:

99 99

output:

203

result:

wrong answer 1st numbers differ - expected: '406', found: '203'

Pretest #2:

score: 0
Wrong Answer
time: 0ms
memory: 3920kb

input:

98 97

output:

203

result:

wrong answer 1st numbers differ - expected: '405', found: '203'

Pretest #3:

score: 0
Wrong Answer
time: 0ms
memory: 3996kb

input:

99 96

output:

194

result:

wrong answer 1st numbers differ - expected: '396', found: '194'

Pretest #4:

score: 0
Wrong Answer
time: 0ms
memory: 4000kb

input:

995 977

output:

5591

result:

wrong answer 1st numbers differ - expected: '11153', found: '5591'

Pretest #5:

score: 0
Wrong Answer
time: 0ms
memory: 3936kb

input:

991 990

output:

5610

result:

wrong answer 1st numbers differ - expected: '11220', found: '5610'

Pretest #6:

score: 0
Wrong Answer
time: 0ms
memory: 3936kb

input:

976 968

output:

5453

result:

wrong answer 1st numbers differ - expected: '10900', found: '5453'

Pretest #7:

score: 0
Wrong Answer
time: 0ms
memory: 3948kb

input:

7602 7864

output:

107789

result:

wrong answer 1st numbers differ - expected: '215706', found: '107789'

Pretest #8:

score: 0
Wrong Answer
time: 1ms
memory: 4060kb

input:

7959 7735

output:

110156

result:

wrong answer 1st numbers differ - expected: '220256', found: '110156'

Pretest #9:

score: 0
Wrong Answer
time: 1ms
memory: 3948kb

input:

7878 7863

output:

110570

result:

wrong answer 1st numbers differ - expected: '221162', found: '110570'

Pretest #10:

score: 0
Wrong Answer
time: 0ms
memory: 3960kb

input:

7788 7658

output:

107677

result:

wrong answer 1st numbers differ - expected: '215323', found: '107677'

Pretest #11:

score: 0
Wrong Answer
time: 10ms
memory: 4096kb

input:

95399 99767

output:

4142277

result:

wrong answer 1st numbers differ - expected: '8285295', found: '4142277'

Pretest #12:

score: 0
Wrong Answer
time: 7ms
memory: 4100kb

input:

98051 99642

output:

4219679

result:

wrong answer 1st numbers differ - expected: '8439713', found: '4219679'

Pretest #13:

score: 0
Wrong Answer
time: 9ms
memory: 4084kb

input:

95624 96007

output:

4034175

result:

wrong answer 1st numbers differ - expected: '8068127', found: '4034175'

Pretest #14:

score: 0
Wrong Answer
time: 10ms
memory: 4036kb

input:

99208 98047

output:

4206691

result:

wrong answer 1st numbers differ - expected: '8412610', found: '4206691'

Pretest #15:

score: 0
Wrong Answer
time: 256ms
memory: 4976kb

input:

997417 967722

output:

114957583

result:

wrong answer 1st numbers differ - expected: '229917323', found: '114957583'

Pretest #16:

score: 0
Wrong Answer
time: 251ms
memory: 6884kb

input:

987807 956529

output:

113210425

result:

wrong answer 1st numbers differ - expected: '226426912', found: '113210425'

Pretest #17:

score: 0
Wrong Answer
time: 253ms
memory: 4888kb

input:

971654 984345

output:

114182723

result:

wrong answer 1st numbers differ - expected: '228363805', found: '114182723'

Pretest #18:

score: 0
Wrong Answer
time: 5136ms
memory: 13620kb

input:

7892259 7983727

output:

-1971219555

result:

wrong answer 1st numbers differ - expected: '4647501224', found: '-1971219555'

Pretest #19:

score: 0
Time Limit Exceeded

input:

7937869 29796968

output:


result:


Pretest #20:

score: 0
Time Limit Exceeded

input:

29717543 29510173

output:


result:



Final Tests

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 4004kb

input:

96 98

output:

202

result:

wrong answer 1st numbers differ - expected: '396', found: '202'

Test #2:

score: 0
Wrong Answer
time: 0ms
memory: 4000kb

input:

100 99

output:

205

result:

wrong answer 1st numbers differ - expected: '408', found: '205'

Test #3:

score: 0
Wrong Answer
time: 0ms
memory: 3928kb

input:

99 99

output:

203

result:

wrong answer 1st numbers differ - expected: '406', found: '203'

Test #4:

score: 0
Wrong Answer
time: 0ms
memory: 4000kb

input:

963 951

output:

5304

result:

wrong answer 1st numbers differ - expected: '10634', found: '5304'

Test #5:

score: 0
Wrong Answer
time: 0ms
memory: 3992kb

input:

958 974

output:

5405

result:

wrong answer 1st numbers differ - expected: '10795', found: '5405'

Test #6:

score: 0
Wrong Answer
time: 0ms
memory: 4052kb

input:

966 990

output:

5490

result:

wrong answer 1st numbers differ - expected: '11003', found: '5490'

Test #7:

score: 0
Wrong Answer
time: 1ms
memory: 3952kb

input:

7958 7947

output:

112258

result:

wrong answer 1st numbers differ - expected: '224482', found: '112258'

Test #8:

score: 0
Wrong Answer
time: 0ms
memory: 4012kb

input:

7623 7730

output:

106741

result:

wrong answer 1st numbers differ - expected: '213444', found: '106741'

Test #9:

score: 0
Wrong Answer
time: 1ms
memory: 3816kb

input:

7845 7783

output:

109495

result:

wrong answer 1st numbers differ - expected: '218916', found: '109495'

Test #10:

score: 0
Wrong Answer
time: 1ms
memory: 4008kb

input:

7881 7773

output:

109770

result:

wrong answer 1st numbers differ - expected: '219451', found: '109770'

Test #11:

score: 0
Wrong Answer
time: 10ms
memory: 4088kb

input:

99414 98698

output:

4232792

result:

wrong answer 1st numbers differ - expected: '8465217', found: '4232792'

Test #12:

score: 0
Wrong Answer
time: 6ms
memory: 4112kb

input:

98249 96148

output:

4119120

result:

wrong answer 1st numbers differ - expected: '8237486', found: '4119120'

Test #13:

score: 0
Wrong Answer
time: 6ms
memory: 4148kb

input:

99003 96832

output:

4163228

result:

wrong answer 1st numbers differ - expected: '8324931', found: '4163228'

Test #14:

score: 0
Wrong Answer
time: 10ms
memory: 4140kb

input:

98266 96030

output:

4115978

result:

wrong answer 1st numbers differ - expected: '8231065', found: '4115978'

Test #15:

score: 0
Wrong Answer
time: 249ms
memory: 4888kb

input:

968207 958885

output:

111760246

result:

wrong answer 1st numbers differ - expected: '223522215', found: '111760246'

Test #16:

score: 0
Wrong Answer
time: 253ms
memory: 5940kb

input:

959846 998397

output:

114388140

result:

wrong answer 1st numbers differ - expected: '228770873', found: '114388140'

Test #17:

score: 0
Wrong Answer
time: 252ms
memory: 6444kb

input:

965821 972280

output:

112682401

result:

wrong answer 1st numbers differ - expected: '225359210', found: '112682401'

Test #18:

score: 0
Wrong Answer
time: 5099ms
memory: 11796kb

input:

7855098 7962479

output:

-1983503172

result:

wrong answer 1st numbers differ - expected: '4622947400', found: '-1983503172'

Test #19:

score: 0
Time Limit Exceeded

input:

7841076 29648718

output:


result:


Test #20:

score: 0
Time Limit Exceeded

input:

29365129 29012208

output:


result: