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

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

We invite you to participate in CodeChef’s [Starters 44]((https://www.codechef.com/START44?utm_source=codeforces_blog&utm_medium=organic&utm_campaign=START44),, this Wednesday, 22nd June, rated for Div 2, 3 & 4 Coders.

Time: 8 PM — 11:00 PM IST

Joining us on the problem setting panel are: - Setters: Utkarsh Utkarsh.25dec Gupta, Lavish lavish315 Gupta,Jeevan Jyot JeevanJyot Singh,Ashish Kryptonix Gangwar,Ashish 7KIRA1999 Kumar

The video editorials of the problems will be available on our YouTube channel as soon as the contest ends. Subscribe to get notifications about our new editorials.

Also, if you have some original and engaging problem ideas and are interested in them being used in CodeChef's contests, you can share them here.

Hope to see you participating. Good Luck!

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

»
4 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Reminder: Contest starts in 15 minutes.

»
4 года назад, скрыть # |
Rev. 2  
Проголосовать: нравится +8 Проголосовать: не нравится

I am trying to solve NOPAL2 using the following logic,

  • First, sort all chars in desc order of their freq.
  • Assign the chars on the indices of the form $$$3x$$$, then assign on the indices of the form $$$3x + 1$$$ and finally assign on the indices of the form $$$3x + 2$$$.

For example, if the string is dbdccbaabaa, then sorted string will be aaaabbbccdd, so the construction will go like.. a__a__a__a_ -> ab_ab_ab_ac -> abcabdabdac

Can somebody point out what's wrong with my logic ? It's giving me WA on 5/15 cases.

Submission link.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Rating change when?