#1749: CPP提示


1550294-5@g.puiching.edu.mo (username)

School : No School
ID : 3077
IP address : [192.168.120.33]
Last Login :
2025-01-16 21:01:01
a344. 分配小珠 -- MOI 2020 | From: [192.168.120.33] | Post Date : 2025-01-06 21:31

int n, t;

first while(cin >> n)

and then if (n == 0)break

cin >> t

vector<long long int>a(t + 1, 0)

....

....

....省

....略

....了

....

....

if (c == -1)

ans = false;

else

a[c] = x;

printf("%s\n", ans ? " YES" : "NO");

that's all i can give you 

 
ZeroJudge Forum