wannared's blog

By wannared, history, 7 years ago, In English

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

Full text and comments »

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

By wannared, history, 7 years ago, In English

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!!

Full text and comments »

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

By wannared, history, 7 years ago, In English

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

Full text and comments »

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

By wannared, history, 7 years ago, In English

How to solve the last problem? Link

Full text and comments »

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

By wannared, history, 7 years ago, In English

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.

Full text and comments »

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

By wannared, history, 7 years ago, In English

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

Full text and comments »

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

By wannared, history, 7 years ago, In English

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

Full text and comments »

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

By wannared, history, 7 years ago, In English

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?

Full text and comments »

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

By wannared, history, 7 years ago, In English

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

Full text and comments »

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