Oanh_va_Khoi's blog

By Oanh_va_Khoi, history, 2 weeks ago, In English

Hello everyone, I have a very hard problem (in my opinion) in my country's contest. I need your help, thanks a lot

Given an array a with N (1 <= N <= 200000) elements (1 <= a[i] <= N). Count how many triples (i, j, k) with satisfies:

. 1 <= i < j < k <= N . for each value x in subarray [ i .. j ], x is appears in subarray [ j + 1 .. k ] and for each value y in subarray [ j + 1 .. k], y is appears in subarray [i .. j]

For an example

N = 7

a = [3 1 2 1 2 3 1]

Output is 4

There are 4 triples (i, j, k): (1, 3, 6), (1, 3, 7), (1, 4, 7), (2, 3, 5)

Full text and comments »

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

By Oanh_va_Khoi, history, 3 weeks ago, In English

Hello Codeforces — ers,

I have this problem need to solve

Given an array a with N integers (1 <= N <= 500000)

Given Q queries (1 <= Q <= 100000), for each query, we have 2 integers L and R, we have to find the maximum value of a[x] + a[y] + a[z] with sastifies:

. L <= x < y < z <= R . y — x < z — y

Thanks a lot :D

Full text and comments »

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

By Oanh_va_Khoi, history, 8 months ago, In English

Hello everyone,

I'm looking forward to some problems in competitive programming which used some calculus techniques (derivatives, integrals, ....).

Would you please show me some problem :D :D :D ? The solution maybe just use only calculus, not using some hard techniques like FFT. Thanks a lot :D

Full text and comments »

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

By Oanh_va_Khoi, history, 2 years ago, In English

Hello Codeforces,

My sister implemented the solution for 279B — Books here:

https://ideone.com/uPow6L

And so amazing !!!! This solution is accepted. I've tried but cannot create the test case to prove this solution is wrong. Can you help me ? Or can you prove that this solution is correct

Thank you a lot for your help.

Full text and comments »

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