C. Vanya and Scales(Codeforces Round #308 (Div. 2))

Vanya has a scales for weighing loads and weights of massesw0,w1,w2,…,w100grams wherewis some integer not less than2(exactly one weight of each nominal value). Vanya wonders whether he can weight an item with massmusing the given weights, if the weights can be put on both pans of the scales. Formally speaking, your task is to determine whether it is possible to place an item of massmand some weights on the left pan of the scales, and some weights on the right pan of the scales so that the pans of the scales were in balance.

,如果说,罗马是一座厚重和凝固的堡垒,

C. Vanya and Scales(Codeforces Round #308 (Div. 2))

相关文章:

你感兴趣的文章:

标签云: