QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#646070#1146. RailDimash0 2ms4068kbC++23795b2024-10-16 21:07:582024-10-16 21:08:01

Judging History

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

  • [2024-10-16 21:08:01]
  • 评测
  • 测评结果:0
  • 用时:2ms
  • 内存:4068kb
  • [2024-10-16 21:07:58]
  • 提交

answer

#include "rail.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 12;
int D[N];
void findLocation(int n, int first, int location[], int stype[]) {
    stype[0] = 1;
    location[0] = first;
    int mn = -1, v;
    for(int i = 1; i < n; i++) {
        int f;
        if(mn == -1 || mn > (f = getDistance(0, i))) {
            mn = f;
            D[i] = f;
            v = i;
        }
    }
    // location[v] = first + mn;
    // stype[v] = 2;
    for(int i = 0; i < n; i++) {
        if(stype[i]) continue;
        int s1 = D[i];
        if(1) {
            stype[i] = 2;
            location[i] = first + s1;
        } 
        // else if(mn + s2 == s1) {
        //     stype[i] = 1;
        //     location[i] = v - s2;
        // }
    }
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

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

input:

1
100
1 11
2 794
2 775
2 347
2 737
2 864
2 584
2 555
2 361
2 429
2 892
2 302
2 483
2 217
2 39
2 566
2 435
2 448
2 304
2 466
2 386
2 780
2 164
2 918
2 601
2 867
2 929
2 341
2 636
2 556
2 954
2 430
2 683
2 301
2 519
2 547
2 237
2 426
2 908
2 667
2 670
2 210
2 502
2 887
2 420
2 675
2 401
2 724
2 493
2 ...

output:

Incorrect

result:

wrong answer Token "Incorrect" doesn't correspond to pattern "Correct"

Subtask #2:

score: 0
Wrong Answer

Test #11:

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

input:

2
100
1 7327
1 116
2 9993
1 2736
1 6502
1 4106
1 6326
2 8055
1 6767
1 388
2 7645
1 1780
1 6159
2 7738
1 3706
1 3476
2 9549
2 7564
1 2401
1 6353
2 8829
1 945
1 606
1 4664
2 9585
2 7499
1 6703
1 3229
1 1382
2 8286
1 6805
1 351
1 793
1 1641
1 3087
1 3647
1 2099
2 9414
1 1703
2 8866
2 9802
2 9348
1 6999...

output:

Incorrect

result:

wrong answer Token "Incorrect" doesn't correspond to pattern "Correct"

Subtask #3:

score: 0
Wrong Answer

Test #21:

score: 0
Wrong Answer
time: 2ms
memory: 4068kb

input:

3
5000
1 763228
1 39310
2 962072
2 203549
1 85439
2 414565
2 78225
1 185073
2 174996
2 386604
1 662313
2 96651
1 271323
2 556033
1 788441
1 717148
1 404737
2 197742
2 760887
1 549658
2 713177
1 156708
1 858133
1 166177
1 809643
2 365041
1 73222
2 706708
2 296516
1 861386
1 782475
2 167675
1 100665
1...

output:

Incorrect

result:

wrong answer Token "Incorrect" doesn't correspond to pattern "Correct"

Subtask #4:

score: 0
Wrong Answer

Test #31:

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

input:

3
5000
1 763228
1 39310
2 962072
2 203549
1 85439
2 414565
2 78225
1 185073
2 174996
2 386604
1 662313
2 96651
1 271323
2 556033
1 788441
1 717148
1 404737
2 197742
2 760887
1 549658
2 713177
1 156708
1 858133
1 166177
1 809643
2 365041
1 73222
2 706708
2 296516
1 861386
1 782475
2 167675
1 100665
1...

output:

Incorrect

result:

wrong answer Token "Incorrect" doesn't correspond to pattern "Correct"