Submission #54165183


Source Code Expand

n, k = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
if k > 0:
    print('Yes')
    print(*a)
else:
    if sum(a) < k:
        print('No')
    else:
        print('Yes')
        print(*a[::-1])

Submission Info

Submission Time
Task A - Partition
User noriaoki
Language Python (PyPy 3.10-v7.3.12)
Score 300
Code Size 229 Byte
Status AC
Exec Time 122 ms
Memory 121400 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 48
Set Name Test Cases
Sample 00-sample-001.txt, 00-sample-002.txt, 00-sample-003.txt
All 00-sample-001.txt, 00-sample-002.txt, 00-sample-003.txt, 01-handmade-001.txt, 01-handmade-002.txt, 01-handmade-003.txt, 01-handmade-004.txt, 01-handmade-005.txt, 01-handmade-006.txt, 01-handmade-007.txt, 01-handmade-008.txt, 01-handmade-009.txt, 01-handmade-010.txt, 01-handmade-011.txt, 01-handmade-012.txt, 01-handmade-013.txt, 01-handmade-014.txt, 01-handmade-015.txt, 01-handmade-016.txt, 01-handmade-017.txt, 01-handmade-018.txt, 01-handmade-019.txt, 01-handmade-020.txt, 01-handmade-021.txt, 01-handmade-022.txt, 01-handmade-023.txt, 01-handmade-024.txt, 01-handmade-025.txt, 02-random-001.txt, 02-random-002.txt, 02-random-003.txt, 02-random-004.txt, 02-random-005.txt, 02-random-006.txt, 02-random-007.txt, 02-random-008.txt, 02-random-009.txt, 02-random-010.txt, 02-random-011.txt, 02-random-012.txt, 02-random-013.txt, 02-random-014.txt, 02-random-015.txt, 02-random-016.txt, 02-random-017.txt, 02-random-018.txt, 02-random-019.txt, 02-random-020.txt
Case Name Status Exec Time Memory
00-sample-001.txt AC 54 ms 76456 KiB
00-sample-002.txt AC 54 ms 76388 KiB
00-sample-003.txt AC 54 ms 76564 KiB
01-handmade-001.txt AC 54 ms 76296 KiB
01-handmade-002.txt AC 54 ms 76284 KiB
01-handmade-003.txt AC 54 ms 76604 KiB
01-handmade-004.txt AC 54 ms 76468 KiB
01-handmade-005.txt AC 55 ms 76220 KiB
01-handmade-006.txt AC 55 ms 76292 KiB
01-handmade-007.txt AC 55 ms 76356 KiB
01-handmade-008.txt AC 55 ms 76456 KiB
01-handmade-009.txt AC 55 ms 76468 KiB
01-handmade-010.txt AC 55 ms 76360 KiB
01-handmade-011.txt AC 55 ms 76556 KiB
01-handmade-012.txt AC 55 ms 76588 KiB
01-handmade-013.txt AC 54 ms 76288 KiB
01-handmade-014.txt AC 54 ms 76288 KiB
01-handmade-015.txt AC 100 ms 121012 KiB
01-handmade-016.txt AC 80 ms 115056 KiB
01-handmade-017.txt AC 103 ms 115492 KiB
01-handmade-018.txt AC 82 ms 95984 KiB
01-handmade-019.txt AC 107 ms 112752 KiB
01-handmade-020.txt AC 93 ms 101952 KiB
01-handmade-021.txt AC 83 ms 95320 KiB
01-handmade-022.txt AC 75 ms 90404 KiB
01-handmade-023.txt AC 86 ms 100996 KiB
01-handmade-024.txt AC 122 ms 121400 KiB
01-handmade-025.txt AC 118 ms 120736 KiB
02-random-001.txt AC 55 ms 76392 KiB
02-random-002.txt AC 55 ms 76596 KiB
02-random-003.txt AC 55 ms 76460 KiB
02-random-004.txt AC 55 ms 76492 KiB
02-random-005.txt AC 55 ms 76384 KiB
02-random-006.txt AC 56 ms 76724 KiB
02-random-007.txt AC 55 ms 76248 KiB
02-random-008.txt AC 55 ms 76436 KiB
02-random-009.txt AC 55 ms 76296 KiB
02-random-010.txt AC 55 ms 76408 KiB
02-random-011.txt AC 94 ms 103148 KiB
02-random-012.txt AC 72 ms 91328 KiB
02-random-013.txt AC 121 ms 120380 KiB
02-random-014.txt AC 94 ms 103044 KiB
02-random-015.txt AC 67 ms 87416 KiB
02-random-016.txt AC 63 ms 81660 KiB
02-random-017.txt AC 66 ms 86516 KiB
02-random-018.txt AC 76 ms 94756 KiB
02-random-019.txt AC 92 ms 107240 KiB
02-random-020.txt AC 118 ms 120208 KiB