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

Автор wannared, история, 6 лет назад, По-английски

Can someone give me problems that can be solved using regular expressions (regex) in codeforces or any other competive programming site. Thanks

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

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

Автор wannared, история, 6 лет назад, По-английски

Given an array of n numbers A1, A2, ...An,  how many maximum groups I can form from this array, such that the sum of the elements in each group is  ≥ X?

Constraints: N ≤ 106, X ≤ 106,  0 ≤ Ai ≤ X,  Sum of all Ai's  ≤ 106.

For example if Array is

[5, 5, 9, 5, 12, 5] and X is 20. Answer is 2 as we can form 2 groups [5,5,5,5] and [9, 12] such that both groups have sum greater than or equal to 20

I have no idea how to get the optimal solution, Any help is welcome.

Thanks!!

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

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

Автор wannared, история, 6 лет назад, По-английски

You have to design A keyboard with 63 Keys. 3 rows and 21 columns. Keys are [A-Z], [a-z], [0-9], and [space]

Given a string of length 105 you have to arrange the keys in keyboard in a way that it minimizes the total distance travelled by the finger.

Total distance travelled by finger is: Assume your finger is initially at [1, 1], now you will type each characters from 1 finger, if your finger is at [x, y] and you moves it to [z, w] the distance travelled by finger is |x - z| + |y - w| (Manhattan distance)

To me the problem is very interesting, Any ideas what sort of algorithms are good for such approximation tasks.

Problem Link: 3rd task from Here

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

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

Автор wannared, история, 6 лет назад, По-английски
  • Проголосовать: нравится
  • +7
  • Проголосовать: не нравится

Автор wannared, история, 7 лет назад, По-английски

Dear Codeforces community,

What strategy do you use to hack others code. Writing code and then comparing with other? Did anyone tried automating it? Is it possible to build a tool that convert image to text and then stress testing it. I'd like to know what strategy do you use?

Thank you and have a nice day.

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

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

Автор wannared, история, 7 лет назад, По-английски

Dear Codeforces community,

Can someone tell me the reason behind reduced frequency of hacker rank contests. Is there any official announcement regarding this which I missed?

Week of Code Last happened in July

Ad infinitum Last happened in June. these were really interesting

Hourrank Happens approx once in 2 months

101 Hack same as hourrank.

Is there any possibility of Ad infinitum to be back?

Have a nice day

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

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

Автор wannared, история, 7 лет назад, По-английски

Given a Point P(x, y) find two points S1 and S2 such that S1, S2 lies on line joining origin and P and d(P, S1) = d(p, S2) = r, i.e two points that are at distance r from P.

How to get S1, S2 using minimum number of characters in C++ (CodeGolf). Codes snippets are welcome ..

Thanks in advance

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

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

Автор wannared, история, 7 лет назад, По-английски

Friend list: It would be great if we can see who all have added me as a friend.

Motto in profile: I really like reading mottoes of users in topcoder, Introducing it to codeforces will be fun.

Country-wise Standings: I think that would be useful

Activity log of friends: basically contains timeline of friends submissions, comments, blog etc

Filtering comment section: Sometimes we only look for meaningful comments in blog.. Only seeing comments of red user or something like user having rating > 1900 would be useful

what do you guys think of these features?

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

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

Автор wannared, история, 7 лет назад, По-английски

Can someone help me solving this problem Link problem statement is very simple

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

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