Tên đăng nhập Điểm ▾ Bài tập Giới thiệu
25801 197 2
25801 197 2
25801 197 2
25801 197 2
25801 197 2
25801 197 2
25801 197 2
25808 196 1
25809 196 1
25810 196 2
25810 196 2
25810 196 2
25813
mttn015nc
NC QNa-LTT Nguyen Van Le Bao
195 3
25814 195 4
25815
mttn111cb
CB DL Nguyen Dinh Tuan Phong
195 4
25816 195 2
25816 195 1

FunkyM-?

25816 195 1
25816 195 1
25816 195 1
25821 195 2
25821 195 3
25823 195 1
25824
broo 1049
195 2
25825
mttn064nc
NC DL Doan Quoc Kien
194 4
25826
A_031
DO DUY VINH
194 3
25827 194 2
25828
mttn078nc
NC TN Duong Gia Khuong
194 4
25829
A_040
PHAN NHAN
193 4
25830 193 1
25831 193 3
25832 192 5
25833
mttn129cb
CB QB Vo Ngoc Sinh
192 4
25834
A_085
NGUYEN HO PHUONG KHANH
192 3
25835
alphadanang
Công Thành
192 2
25835 192 2
25837 192 3
25838 192 1
25839 192 1
25840 191 2
25841
mttn130cb
CB DNo Nguyen Dinh Tai
191 4
25841
mttn042nc
NC GL Bui Thanh Hieu
191 4
25843
A_098
NGUYEN CAO NGUYEN
190 4
25844 190 2
25845 190 1
25845 190 1

Hiiiiiiii

25845 190 1
25845 190 1
25845 190 1
25845 190 1
25845 190 1
25845 190 1
25845 190 1
25845 190 1
25845 190 1
25856
mttn113nc
NC QNg Nguyen Quoc Phu
190 4
25857 190 1
25858 189 2
25859 189 2
25860 188 2
25861 188 3
25862 188 3
25863 188 1
25863 188 1

def find_subset_with_sum(arr, k):
n = len(arr)

def backtrack(start, path, current_sum):
    if current_sum == k:
        return path
    for i in range(start, n):
        if current_sum + arr[i] <= k:
            result = backtrack(i + 1, path + [arr[i]], current_sum + arr[i])
            if result:
                return result
    return None

return backtrack(0, [], 0)

ar = list(map(int,input().split()))
m = ar[1]
a = list(map(int,input().split()))
sub=find_subset_with_sum(a,m)
c=[]
for x in a:
if x in sub:
c.append(1)
else:
c.append(0)
print(*c)

25865
mttn103nc
NC BDi-CVA To Quang Nhat
187 3
25866
yueakayue
TranVuAnh
187 4

Nothing here

25867
THTA21
Phạm Quang Hoạch
187 2
25868 186 2

var n,m,i,x:longint;
a:array[1..1000] of longint;
tep1,tep2:text;
begin
assign(tep1,'YAL.inp'); reset(tep1);
assign(tep2,'YAL.out'); rewrite(tep2);
readln(tep1,n,m);
for i:=1 to m do
begin
read(tep1,x);
a[x]:=a[x]+1;
end;
for i:=1 to n do
if a[i]=0 then write(tep2,i,' ');
close(tep1);
close(tep2);
end.

25868
shiminhtien 1222
Phạm Minh Tiến
186 2

Oak91%9@‘ §91’sias oaks§¥¥pw92jja;

25868 186 2
25871
dzunghandsome
Đào Việt Dũng
186 1
25872 186 1
25873 186 2
25874
mttn149nc
NC NT Vo Le Ngoc Thinh
185 4
25875 185 1
25875 185 1
25875 185 1
25875 185 1
25879 185 2
25880
mttn119nc
NC DNa Vu Hoang Long
184 4
25881 184 3
25882 183 2
25883 183 2
25884
mttn012cb
CB GL Dang Xuan Bach
182 3
25884
mttn052cb
CB DNo Hoang Manh Hung
182 4
25886
enxiayy 1447
Võ Tấn Bảo
182 1
25887 182 2
25887 182 2

My name is Long

25889 182 1
25890
mttn016cb
CB BP-CBL Phan Nguyen Quoc Bao
182 4
25891
mttn173nc
NC HCMUTE Tran Canh Nam
182 3
25892 181 1
25892 180 1
25892 180 1
25892 180 1
25892 180 1
25892 180 1
25892 180 1
25892 180 1
25892 180 1