10
50 237
382 1198
72 135
21 102
140 235
800 2684
991 1765
87 2426
557 1269
554 2158
142
<4813 bytes omitted>
用户输出
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#5488 | #1044. 线段覆盖 | Wrong Answer | 60 | 4570 ms | 12756 K | Python 3 / 687 B | t330034045 | 2024-04-27 16:31:30 |
import math
from collections import Counter
T=int(input())
for _ in range(T):
n,idx=map(int,input().split())
strings=[]
for i in range(n):
l,r=list(map(int,input().split()))
if l<=idx<=r:
strings.append((l,r))
if len(strings)==0:
print("NO")
continue
length=-math.inf
for i in strings:
length=max(i[1],length)
list1=[0]*(length+1)
for a1 in strings:
l1,r1=a1[0],a1[1]
for b1 in range(l1,r1+1):
list1[b1]+=1
count1=Counter(list1)
if list1[idx]==max(list1) and count1[max(list1)]==1:
print("YES")
else:
print("NO")
10
50 237
382 1198
72 135
21 102
140 235
800 2684
991 1765
87 2426
557 1269
554 2158
142
<4813 bytes omitted>
用户输出
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
系统信息
Exited with return code 0
10
49 2587
240 905
2709 2840
2667 2732
1762 2207
2780 2882
2746 2865
2598 2913
1162 2421
2
<4677 bytes omitted>
用户输出
NO
YES
NO
NO
NO
YES
NO
NO
NO
YES
系统信息
Exited with return code 0
10
46 1091
111 623
836 2002
1726 2670
1459 1907
581 2361
122 252
139 635
79 1226
1984 2330
<4851 bytes omitted>
用户输出
NO
NO
NO
NO
NO
YES
NO
NO
NO
YES
系统信息
Exited with return code 0
10
47 1371
979 1733
2028 2722
2037 2790
1639 1753
2233 2518
1909 2825
294 1287
1459 1725
1
<4669 bytes omitted>
用户输出
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
系统信息
Exited with return code 0
10
48 1887
867 1947
1903 2853
555 1703
118 1035
478 1739
603 891
1876 2168
2762 2980
1410
<4749 bytes omitted>
用户输出
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
系统信息
Exited with return code 0
10
47 1611
1228 1322
669 1501
1609 2514
702 1239
25 742
268 1297
1779 1905
1669 2651
2497
<4863 bytes omitted>
用户输出
NO
NO
NO
NO
NO
NO
YES
YES
NO
NO
系统信息
Exited with return code 0
10
973 569
2119 2442
504 520
1410 2821
199 347
94 1128
1571 2079
1579 2277
307 399
2952 29
<98050 bytes omitted>
用户输出
NO
NO
NO
NO
NO
NO
YES
NO
YES
YES
系统信息
Exited with return code 0
10
983 995
158 935
239 629
1829 2574
1781 2233
1950 2049
557 980
1483 1745
41 974
569 2545
<95138 bytes omitted>
用户输出
YES
NO
NO
YES
YES
YES
NO
YES
YES
NO
系统信息
Exited with return code 0
10
961 957
2022 2031
877 1427
28 578
570 861
82 914
1024 1810
455 518
389 476
884 2446
15
<94908 bytes omitted>
用户输出
NO
NO
YES
NO
YES
YES
YES
YES
YES
NO
系统信息
Exited with return code 0
10
964 670
661 2258
2291 2911
2621 2671
9 423
133 1160
732 1790
270 786
504 591
1702 2443
<98416 bytes omitted>
用户输出
NO
NO
NO
YES
NO
NO
NO
NO
NO
YES
系统信息
Exited with return code 0
10
964 1077
296 621
1011 2371
1908 2248
699 996
302 919
150 529
423 900
37 1756
440 898
3
<93939 bytes omitted>
用户输出
YES
NO
YES
YES
YES
NO
NO
NO
YES
YES
系统信息
Exited with return code 0
10
971 2016
1215 2175
689 2962
804 1849
248 2250
835 1749
232 1647
608 1915
467 1101
392 1
<95408 bytes omitted>
用户输出
NO
YES
NO
NO
YES
NO
NO
NO
NO
NO
系统信息
Exited with return code 0
5
85477 454113435
263588954 696741154
186789384 552056627
534750185 655186409
450716299 4632855
<8995285 bytes omitted>
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 18, in <module>
list1=[0]*(length+1)
MemoryError
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
5
99843 804971477
840892566 855625000
97943193 723660296
983392928 987252320
9172089 884525119
<8727825 bytes omitted>
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 18, in <module>
list1=[0]*(length+1)
MemoryError
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
4
81460 134341487
6715522 655437293
479739661 537036067
62510482 952049039
599859509 908776889
<6775989 bytes omitted>
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 18, in <module>
list1=[0]*(length+1)
MemoryError
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
4
97977 476973931
472314838 917499054
408240651 443394102
31726435 962639779
163707695 92665055
<7076984 bytes omitted>
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 18, in <module>
list1=[0]*(length+1)
MemoryError
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
4
73209 75453184
54485375 475074953
65372174 72488221
56960770 71227413
6734985 789562542
4425
<6879172 bytes omitted>
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 18, in <module>
list1=[0]*(length+1)
MemoryError
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
5
94655 521251393
309921429 564349789
13627233 223233562
158854345 798867628
141556748 75784492
<9504883 bytes omitted>
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 18, in <module>
list1=[0]*(length+1)
MemoryError
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
4
97566 679356208
384760156 803418556
303725237 790704545
326073474 928206477
433117779 7950433
<7473715 bytes omitted>
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 18, in <module>
list1=[0]*(length+1)
MemoryError
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1
4
77401 403320392
15710597 521075834
392901104 406386094
382913834 461587070
206741729 93134121
<6865165 bytes omitted>
标准错误流
Traceback (most recent call last):
File "/sandbox/2/a.py", line 18, in <module>
list1=[0]*(length+1)
MemoryError
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 1