QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#507063#6311. 火车站bribritt0 88ms8232kbC++17432b2024-08-06 09:48:102024-08-06 09:48:10

Judging History

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

  • [2024-08-06 09:48:10]
  • 评测
  • 测评结果:0
  • 用时:88ms
  • 内存:8232kb
  • [2024-08-06 09:48:10]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define int long long
main() {
  int n, m, x; cin >> n >> m >> x;
  pair<int,int> lr[m];
  for(int i=0;i<m;i++) cin>>lr[i].first>>lr[i].second;
  sort(lr,lr+m);
  int mx = 1;
  vector<int> ans;
  for(int i=0;i<m;i++) if(mx>=lr[i].first) {
    mx=max(mx,lr[i].second);
    ans.push_back(lr[i].second);
  }
  sort(ans.begin(),ans.end());
  for(auto i: ans) cout<<i<<" ";
}

Details

Tip: Click on the bar to expand more detailed information

Pretests


Final Tests

Test #1:

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

input:

46 50 24
38 39
14 18
38 41
38 40
38 44
1 9
20 32
2 31
6 23
4 11
38 40
38 40
24 30
10 32
1 15
13 30
7 29
3 7
15 36
17 30
5 9
38 44
38 46
22 29
2 25
4 32
38 44
38 45
33 36
1 20
38 41
38 40
9 20
23 26
38 40
29 31
8 23
2 6
1 24
10 29
38 42
38 42
38 40
38 44
5 8
38 45
10 20
14 34
9 33
16 28

output:

6 7 8 9 9 11 15 18 20 20 20 23 23 24 25 26 28 29 29 29 30 30 30 31 31 32 32 32 33 34 36 36 

result:

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

Test #2:

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

input:

46 49 22
25 28
5 14
24 29
43 46
13 14
5 14
9 14
12 14
24 33
18 33
3 14
17 40
26 32
1 14
43 46
33 36
4 14
43 44
20 21
2 14
25 30
23 28
43 45
43 46
29 38
43 45
3 14
9 14
11 14
13 14
33 38
25 41
9 14
3 14
1 14
3 14
43 46
30 38
10 14
3 14
9 14
31 33
17 38
6 14
6 14
10 14
5 14
11 14
17 20

output:

14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 

result:

wrong answer 1st numbers differ - expected: '17', found: '14'

Test #3:

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

input:

4901 4742 2784
1660 2698
1184 1582
3644 3650
860 1582
12 1582
4284 4750
693 1582
4284 4420
530 1582
4284 4778
213 1582
1346 1582
2456 3284
1951 2247
2526 3899
1748 3843
1840 4158
1847 3233
2710 4082
17 1582
1217 1582
2732 3868
2176 3652
1440 1582
3392 3778
115 1582
51 1582
4284 4410
343 1582
696 158...

output:

1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 1582 ...

result:

wrong answer 1st numbers differ - expected: '1584', found: '1582'

Test #4:

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

input:

4752 4916 2637
631 1748
1958 2543
976 1748
4059 4176
1753 2555
1293 1748
400 1748
1531 1748
439 1748
814 1748
752 1748
4059 4745
1500 1748
410 1748
4059 4543
860 1748
3244 3846
1484 1748
2949 3200
365 1748
490 1748
533 1748
159 1748
2145 3211
938 1748
2104 2499
4059 4568
1321 1748
114 1748
257 1748
...

output:


result:

wrong answer Answer contains longer sequence [length = 1183], but output contains 0 elements

Test #5:

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

input:

4638 4800 2174
763 2920
3689 3981
1696 1863
2225 3298
4041 4197
514 565
955 2677
982 1067
4041 4426
369 565
1280 1583
2033 2897
4041 4147
2216 3385
2470 3479
4041 4231
284 565
333 565
4041 4496
2471 3315
156 565
1449 2938
1754 3500
1634 3795
236 565
4041 4626
934 3865
2513 2835
239 565
1239 3066
136...

output:

565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 565 ...

result:

wrong answer 1st numbers differ - expected: '567', found: '565'

Test #6:

score: 0
Wrong Answer
time: 79ms
memory: 6680kb

input:

193872 190790 1
1 55918
61723 111652
61723 106905
61723 146471
8591 47114
3781 26833
61723 175724
61723 105145
12561 22256
61723 167628
61723 152637
61723 89452
61723 126604
61723 87227
61723 80698
61723 72291
61723 96877
61723 122100
61723 83795
10417 42641
61723 158895
61723 107569
61723 164698
61...

output:

781 920 964 1035 1110 1131 1395 1426 1485 1691 1731 1818 1888 1983 2056 2124 2215 2224 2269 2333 2347 2400 2419 2440 2442 2446 2469 2477 2482 2482 2626 2681 2683 2818 2822 2848 2858 2887 2931 2992 3004 3012 3040 3040 3091 3120 3124 3134 3138 3138 3172 3182 3188 3195 3267 3293 3366 3398 3492 3497 351...

result:

wrong answer 30th numbers differ - expected: '2626', found: '2482'

Test #7:

score: 0
Wrong Answer
time: 80ms
memory: 6600kb

input:

183551 186029 1
1 18923
46775 110591
46775 147364
46775 151335
46775 154945
46775 178847
46775 173705
46775 91772
46775 81093
46775 103570
46775 66868
46775 91670
46775 129650
46775 149481
46775 182893
46775 115551
46775 167292
46775 182574
46775 95438
46775 167281
46775 160712
46775 121691
46775 12...

output:

745 804 865 899 1129 1205 1261 1366 1431 1491 1572 1695 1700 1740 1835 1862 1871 1883 1926 1986 1994 2198 2214 2229 2285 2313 2359 2374 2413 2440 2459 2459 2477 2486 2493 2506 2529 2532 2545 2546 2557 2588 2622 2642 2676 2771 2778 2812 2821 2822 2825 2939 2963 3039 3058 3061 3106 3138 3143 3167 3199...

result:

wrong answer 32nd numbers differ - expected: '2477', found: '2459'

Test #8:

score: 0
Wrong Answer
time: 88ms
memory: 7292kb

input:

180643 198737 94738
48353 166027
87663 136789
93307 135408
19654 33351
26552 33351
19265 33351
111942 134907
65187 149795
119612 170991
2417 33351
79279 166110
114686 162975
54701 163928
43129 116584
66103 139188
107280 147888
26067 33351
104751 139808
63876 148071
39714 129382
72905 148130
25384 33...

output:

33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 33351 ...

result:

wrong answer 1st numbers differ - expected: '33355', found: '33351'

Test #9:

score: 0
Wrong Answer
time: 84ms
memory: 8232kb

input:

191508 185305 100905
63990 91135
7954 91135
17174 91135
39427 91135
1129 91135
78418 91135
75781 91135
7987 91135
51528 91135
148938 181214
40890 91135
67657 91135
56216 91135
29882 91135
33981 91135
76412 91135
115229 151727
98300 104478
182577 190282
125477 163728
68488 91135
64154 91135
20562 911...

output:

91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 91135 ...

result:

wrong answer 1st numbers differ - expected: '91137', found: '91135'

Test #10:

score: 0
Wrong Answer
time: 84ms
memory: 7184kb

input:

191846 183854 90869
55728 85721
9713 85721
57235 85721
130204 144564
77210 85721
161065 162256
8962 85721
168055 177244
168055 174207
6371 85721
89768 136908
45508 85721
168055 185778
35520 85721
43450 85721
18758 85721
161027 162664
73184 85721
11364 85721
45366 85721
121115 163577
168055 190467
16...

output:

85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 85721 ...

result:

wrong answer 1st numbers differ - expected: '85723', found: '85721'