Блог пользователя Arthas

Автор Arthas, история, 4 месяца назад, По-английски

Recently, i've been solving some problems from problemset, and i saw this problem:

1381B - Unmerge

And i found it extremely similar to this problem from ICPC: 1906E - Merge Not Sort

I'm not sure if it changes a lot since the ICPC contest had already ended, so all i can do is just tell people about it

Полный текст и комментарии »

  • Проголосовать: нравится
  • +19
  • Проголосовать: не нравится

Автор Arthas, история, 8 месяцев назад, По-русски

Hey, i was trying to solve this problem 1644D - Cross Coloring recently. And, i'm somehow getting TLE, even though it's O(Q), there are no other time consuming data structures, like sets, maps, etc. And others' solutions are pretty similar, the idea is right, but mine is getting TLE. Any advice or help would be lot appreciated :)

Here is my submission: 222648815

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор Arthas, история, 2 года назад, По-русски

Is it possible to find the longest palindrome of numbers in array in O(n)?

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор Arthas, история, 2 года назад, По-английски

If if signed in codeforces with social media like facebook, how could i know my password?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

Автор Arthas, история, 3 года назад, По-русски

How can i find the all pairs shortest path in undirected weighted graph in time complexity less than O(n^2)?

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор Arthas, история, 3 года назад, По-русски

Can someone tell me, why the color of handle at the profile is green, but my rating >= 1400. It has to be light blue, isn't it?

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор Arthas, история, 3 года назад, По-русски

Can someone tell me, why the color of handle at the profile is green, but my rating >= 1400. It has to be light blue, isn't it?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +10
  • Проголосовать: не нравится

Автор Arthas, история, 3 года назад, По-английски

I was wondering if anyone knows how to solve the following problem. I have tried on-and-off for about a week now, but I cannot figure it out:

Given an array A of N(1 <= N <= 100000) positive integers. You have to find out for every k(1 <= k <= n), if it is possible to partition an array into k equal continuous subsequence sum.

For example: if A = [3, 2, 2, 1], the answer will be: 1100.

Note: For the first example: 1)For k = 1, we can partition an array as follows: [3, 2, 2, 1]. 2)For k = 2, we can partition an array as follows: [3, 1] and [2, 2]. 3)For k = 3 and 4, we can't partition an array into equal continuous subsequence sum. The first and last elements is also a continuous subsequence, because we are talking about a circle array.

I have tried DP, but it is also TLE. My algorithm works in O(n^2). Does anyone know how I can solve this?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится

Автор Arthas, история, 3 года назад, По-английски

Can someone tell me, why the color of handle at the profile is gray, but my rating >= 1200. It has to be green, isn't it?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +18
  • Проголосовать: не нравится