DEAMN's blog

By DEAMN, history, 3 years ago, In English

who knows from what problem these examples?

  • Input
  • 3 5 3
  • 1<2
  • 2<4
  • 3=5
  • Output

  • 1
  • 2
  • ?
  • 3
  • ?

Full text and comments »

  • Vote: I like it
  • -20
  • Vote: I do not like it

By DEAMN, history, 3 years ago, In English
  • I can't think of a DP for this task help plz Find the number of sequences (a1, a2,..., an) such that a[i]^2 + a[i + 1]^2 + ... + a[n]^2 = k a[i] <= a[i + 1] <= ... <= a[n]

  • T is testcase

  • n is quantity of number
  • k is a[i]^2 + a[i + 1]^2 + ... + a[n]^2 = k
  • 1 <= T <= 1e5

  • 1 <= n <= 100
  • 1 <= k <= 5000
  • example
  • input
  • 1
  • 4 243
  • output
  • 9
  • Explanation

  • first 1 1 4 15 -> (1 * 1) + (1 * 1) + (4 * 4) + (15 * 15) = 243 — second 1 3 8 13 — third 1 7 7 12 — fouth 3 3 9 12 — fifth 3 4 7 13 — sixth 3 7 8 11 — seventh 4 5 9 11 — eighth 5 5 7 12 — nineth 7 7 8 9

Full text and comments »

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

By DEAMN, history, 3 years ago, In English

Hello Codeforces For some reason, sabtask 4 does not pass for me this problem this code, if you find my mistake, I ask you to write to me. Thank you in advance!

I wonder why minus the contribution? I am amazed by people

Full text and comments »

  • Vote: I like it
  • -26
  • Vote: I do not like it

By DEAMN, history, 3 years ago, In English

Hello Codeforces! I need help. I can't solve this problem for 24 points (this problem), if anyone has an idea, you can write a comment. Thank you in advance

Full text and comments »

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