duongtnhat's blog

By duongtnhat, history, 9 years ago, In English

17754492 Here is my solution for 670D1 - Magic Powder - 1

I dont know why it catch time limit exceeded on test 148. And then, I try g = l + (r-l+1) / 2, it is accepted? (g is midle in binary search), Im a newbie in python, and sorry for my bad in English

Full text and comments »

  • Vote: I like it
  • +6
  • Vote: I do not like it

By duongtnhat, 10 years ago, In English

Have a set A. First there are n (n<=40000) number in A. If u and v are in A, LCM(u, v) and GCD(u, v) are in A, too. Give A and a number S, is S in A? Sorry, my English isn't good.

Full text and comments »

  • Vote: I like it
  • +5
  • Vote: I do not like it