QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#293402#7122. Overtakinghypeskynick0 1ms3812kbC++14944b2023-12-29 06:43:312024-04-28 08:20:24

Judging History

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

  • [2024-04-28 08:20:24]
  • 管理员手动重测本题所有提交记录
  • 测评结果:0
  • 用时:1ms
  • 内存:3812kb
  • [2023-12-29 06:43:31]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:4072kb
  • [2023-12-29 06:43:31]
  • 提交

answer

#include <bits/stdc++.h>

#define ll long long
using namespace std;

ll X, N, M, L, Y;
vector<int> cars;
vector<ll> T;
vector<int> W;
vector<int> S;

void init(int l, int n, vector<ll> t, vector<int> w, int x, int m, vector<int> s) {
    L = l; N = n; M = m; X = x;
	cars.resize(N);
    for (int i = 0; i < N; i++){
        cars[i] = i;
	}
    T = t;
	W=w;
	S=s;
}

int search(ll l, ll r) {
    if (l == r) {
        if (T[0] + W[0] * S[l] >= Y + X * S[l]){
            return l;
        }
        return -1;
    }

    ll mid = l + (r-l)/ 2;
    if (Y + X * S[mid] <= T[0] + W[0] * S[mid]) {
        return search(l, mid);
	}
    return search(mid + 1, r);
}

ll arrival_time(ll k) {
    Y = k;
    if (W[0] <= X || T[0] >= Y)
        return Y + X * L;

    int idx = search(1, M - 1);

    if (idx == -1) {
        return Y + X * L;
    }

    return T[0] + W[0] * S[idx] + (L - S[idx]) * X;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 9
Accepted
time: 1ms
memory: 3796kb

input:

XwWPuInrOjpekAwGKojzwKw3yVDtdkGS
2500 1 78 100 1000
100000
80
0 38 51 89 92 105 117 119 122 126 142 179 259 355 385 410 419 443 483 496 551 671 691 698 709 762 778 818 860 888 897 909 930 938 946 951 955 995 1045 1091 1164 1187 1215 1243 1264 1301 1363 1409 1416 1448 1504 1518 1535 1555 1562 1597 16...

output:

mGlgT4yvr1qPbquFwkxRVh9hMn0Mrxoz
OK
299664
298224
299166
298008
295102
298070
297182
298650
298312
296396
296524
298070
295838
296910
296892
297374
298684
295184
295710
299062
296382
298684
298110
298008
299530
298766
295966
299062
296794
298998
299738
296418
298588
296876
295102
299860
295710
29577...

result:

ok 

Test #2:

score: -9
Wrong Answer
time: 1ms
memory: 3784kb

input:

XwWPuInrOjpekAwGKojzwKw3yVDtdkGS
80000001 1 151251000 400 1000
10000
151251252
0 563193 647572 715146 1130358 1138744 1557704 2110181 2300143 2420378 2557533 2614949 2657752 2838017 2861875 3146425 3202178 3240281 3248583 3280296 3310987 3401711 3683587 3943976 4135364 4214616 4277932 4503844 476465...

output:

mGlgT4yvr1qPbquFwkxRVh9hMn0Mrxoz
OK
12100095742446568
12100080886229836
12100085484470560
12100095193996036
12100090623619960
12100097293616944
12100080551478328
12100093846481476
12100099967266132
12100096776389716
12100096137052864
12100097655358156
12100083565309876
12100099843300024
121000877682...

result:

wrong answer 3rd lines differ - on the 1st token, expected: '12100095744014512', found: '12100095742446568'

Subtask #2:

score: 0
Wrong Answer

Test #12:

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

input:

XwWPuInrOjpekAwGKojzwKw3yVDtdkGS
2000000 100 100 2 1000
566035866 424023571 564031634 266012245 266012901 566037245 106005324 106003684 266012594 424028440 424019007 106005224 564034079 424024371 424024546 566039191 424016814 424029581 82000890 754044052 566036512 424018510 424017279 424019925 42401...

output:

mGlgT4yvr1qPbquFwkxRVh9hMn0Mrxoz
OK
764551708
625005433
954136298
306500697
624768640
624669498
768035866
625136434
947580853
625100943
624760284
306475062
768035866
306776294
625698807
737888912
955288081
326658949
624965258
416149655
306877619
954101982
765386432
624737296
463254712
624909072
4668...

result:

wrong answer 3rd lines differ - on the 1st token, expected: '768035150', found: '764551708'

Subtask #3:

score: 0
Skipped

Dependency #1:

0%

Subtask #4:

score: 0
Skipped

Dependency #1:

0%

Subtask #5:

score: 0
Skipped

Dependency #1:

0%