QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#410571#6664. 학생들Unknown15080 23ms8456kbC++20553b2024-05-14 09:53:382024-05-14 09:53:38

Judging History

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

  • [2024-05-14 09:53:38]
  • 评测
  • 测评结果:0
  • 用时:23ms
  • 内存:8456kb
  • [2024-05-14 09:53:38]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

pair<int, vector<int>> complaint(int N, vector<int> L, vector<int> R){
	vector<int> pfx(N + 1, 0);
	int M = L.size();

	for (int i = 0; i < M; i++){
		pfx[L[i]]++;
		pfx[R[i] + 1]--;
	}

	for (int i = 1; i <= N; i++) pfx[i] += pfx[i-1];
	for (int i = 0; i <= N; i++) pfx[i] = M + 1 - pfx[i];

	int mn = M + 2;
	vector<int> res;

	for (int i = 0; i < N; i++){
		if (pfx[i] < mn){
			res.clear();
			mn = pfx[i];
		}
		if (pfx[i] == mn) res.push_back(i);
	}

	return {mn, res};
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

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

input:

10 10
4 4
7 7
1 1
6 6
7 7
2 2
4 4
4 4
7 7
6 6

output:

8
4 7 

result:

wrong answer 1st lines differ - expected: '5', found: '8'

Subtask #2:

score: 0
Wrong Answer

Test #22:

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

input:

2500 2500
436 436
48 48
971 971
2223 2223
2046 2046
1706 1706
1847 1847
1739 1739
2398 2398
525 525
2479 2479
490 490
1434 1434
2160 2160
2049 2049
771 771
1758 1758
1651 1651
1496 1496
538 538
586 586
2141 2141
198 198
895 895
1231 1231
1478 1478
923 923
1398 1398
1103 1103
1226 1226
723 723
48 48
...

output:

2495
2019 

result:

wrong answer 1st lines differ - expected: '1574', found: '2495'

Subtask #3:

score: 0
Skipped

Dependency #1:

0%

Subtask #4:

score: 0
Wrong Answer

Test #41:

score: 0
Wrong Answer
time: 23ms
memory: 8456kb

input:

250000 250000
159526 159526
198590 198590
55199 55199
129454 129454
149248 149248
230920 230920
158933 158936
215937 215937
173724 173724
151808 151808
168086 168086
218032 218035
153365 153365
70475 70475
68770 68779
121856 121856
143399 143400
124906 124906
92405 92405
149057 149057
124739 124739
...

output:

249990
30416 30417 30418 30419 30685 

result:

wrong answer 1st lines differ - expected: '189514', found: '249990'

Subtask #5:

score: 0
Wrong Answer

Test #47:

score: 0
Wrong Answer
time: 22ms
memory: 7344kb

input:

250000 212688
1 4
2 5
3 9
4 12
6 13
7 14
10 16
11 17
13 19
14 20
15 21
20 22
21 23
23 24
24 26
25 28
26 29
31 31
32 32
35 36
36 37
37 38
38 42
39 43
41 44
42 45
43 47
44 52
45 55
46 56
49 58
50 60
51 61
52 63
54 64
55 68
57 69
58 70
59 72
61 74
63 75
64 76
65 77
66 78
68 80
69 81
72 83
73 85
74 86
7...

output:

212339
112573 112574 112576 112577 112578 112579 112583 112584 112585 112586 112587 112588 112589 112613 112614 112615 112616 112617 112657 112667 112668 112669 112670 112671 112672 112673 112674 

result:

wrong answer 1st lines differ - expected: '1791', found: '212339'

Subtask #6:

score: 0
Skipped

Dependency #1:

0%