ed1d1a8d's blog

By ed1d1a8d, history, 8 years ago, In English

Greetings! CodeForces Round #336 welcomes both divisions this Wednesday, December 23, 2015 at 16:35:00 UTC. The round is authored by me, Amor727, Chilli, and GlebsHP. We hope you'll like the problems. Scoring and score distribution: Not Dynamic; Div1: 500 — 1250 — 1500 — 2000 — 3000; Div2: 500 — 1000 — 1500 — 2250 — 2500

Much thanks to Amor727 and Chilli for writing and editing problems, GlebsHP for organizing the competition and for his very helpful attitude, Delinur for translations, winger for testing, Marina Kruglikova for statement fixes, and MikeMirzayanov for his amazing CF and Polygon platforms.

During this contest you will be assisting Genos from the series One Punch Man. His master Saitama will also make some appearances. We wish everyone good luck and high rating in assisting the two. From the contest crew and the two fellows below, happy holidays!

Congratulations to the winners:

Division 1:

  1. matthew99

  2. tourist

  3. ACRush

  4. jqdai0815

Division 2:

  1. Hansuzu

  2. ajjack999888

  3. platypus179

  4. Petru

  5. Mihaell

Editorial of round: /blog/entry/22256

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

| Write comment?
»
8 years ago, # |
  Vote: I like it +2 Vote: I do not like it

Auto comment: topic has been updated by ed1d1a8d (previous revision, new revision, compare).

»
8 years ago, # |
  Vote: I like it +44 Vote: I do not like it

I love ONEPUNCHMAN, I was waiting for this for ages!!!! GL && HF!

P.S Hoping for some funny jokes.

»
8 years ago, # |
Rev. 3   Vote: I like it -28 Vote: I do not like it

hardest contest, hardest life.

»
8 years ago, # |
  Vote: I like it +86 Vote: I do not like it

Div 1 contest being prepared by a Specialist? I can imagine contest setting going like this:

-GlebsHP: Seriously? A Div 1 contest being prepared by two purples and a specialist? Who do you think you are?
-ed1d1a8d, Amor727 & Chilli:

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

like One Punch Man very much!!!

»
8 years ago, # |
  Vote: I like it +35 Vote: I do not like it

Hi again guys!

Thanks for support :D

GL & HF!

P.S. When I firstly have seen this blog I thought that it was Xephy's :)

»
8 years ago, # |
Rev. 2   Vote: I like it +14 Vote: I do not like it

Saitama is like a reference to tourist xD. Onecodeman ;DDD

»
8 years ago, # |
  Vote: I like it +25 Vote: I do not like it

Code until you go bald :P

»
8 years ago, # |
  Vote: I like it +4 Vote: I do not like it

Hope to celebrate the Christmas by becoming specialist :)

»
8 years ago, # |
  Vote: I like it +24 Vote: I do not like it

Accepted from one submit. (c) One Submit Man

»
8 years ago, # |
Rev. 2   Vote: I like it +18 Vote: I do not like it

To train for this contest, every day for a year I did 100 pushups 100 situps and 10km running

  • »
    »
    8 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    It's why you are cyan.
    To be RED you should do every day for a year 100 div1 C problems, 100 div1 D problems, 10 div1 E problems.

    • »
      »
      »
      8 years ago, # ^ |
        Vote: I like it +53 Vote: I do not like it

      • »
        »
        »
        »
        8 years ago, # ^ |
          Vote: I like it +1 Vote: I do not like it

        what if.. the reply from Baian is a joke too :P

        he substituted the physical training with hard CF problems

    • »
      »
      »
      8 years ago, # ^ |
        Vote: I like it +7 Vote: I do not like it

      To be accurate actually 10km div1 E problems ;)

    • »
      »
      »
      8 years ago, # ^ |
        Vote: I like it +15 Vote: I do not like it

      • »
        »
        »
        »
        8 years ago, # ^ |
          Vote: I like it +4 Vote: I do not like it

        It's a reference to Onepunch Man, an anime that this contest will be referencing. It's a pretty good show for someone just wanting to watch something for laughs and giggles. A solid 10/10 in my book.

        • »
          »
          »
          »
          »
          8 years ago, # ^ |
            Vote: I like it +28 Vote: I do not like it

          A solid 5/7 from my side too!

          • »
            »
            »
            »
            »
            »
            8 years ago, # ^ |
              Vote: I like it +3 Vote: I do not like it

            Haha, I saw that 9gag post also

  • »
    »
    8 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You could've done better if you didn't forget to seal your AC xD

»
8 years ago, # |
  Vote: I like it -7 Vote: I do not like it

OneCodingMan

»
8 years ago, # |
Rev. 2   Vote: I like it +102 Vote: I do not like it

tourist vs jqdai0815
that would be interesting.

»
8 years ago, # |
  Vote: I like it +2 Vote: I do not like it

who looks like ONE PUNCH MAN in codeforces ??

»
8 years ago, # |
  Vote: I like it -17 Vote: I do not like it

this contest will be amazing ☺ !

»
8 years ago, # |
Rev. 2   Vote: I like it +32 Vote: I do not like it

It would be interesting if tourist jqdai0815 rng_58 and Petr all participate in this contest ;)

»
8 years ago, # |
  Vote: I like it +11 Vote: I do not like it

So addictive site ^_^

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

One Punch Man...!! Who'd be the "One Code Man" of this contest.....??

»
8 years ago, # |
  Vote: I like it +6 Vote: I do not like it

GL & HF !

»
8 years ago, # |
  Vote: I like it +1 Vote: I do not like it

The problem will be like determine the minimum strength of the monsters that can beat Saitama :D

  • »
    »
    8 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    in the last line, this description make the answer obvious : print -1 if it doesnt exist.

»
8 years ago, # |
  Vote: I like it +10 Vote: I do not like it

My first round on codeforces . I hope that I will will enjoy :)

»
8 years ago, # |
  Vote: I like it +5 Vote: I do not like it

tourist and jqdai0815 are online, looks like they will participate . Guys get ready for the ULTIMATE CLASH OF 2015 .

  • »
    »
    8 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I wish tourist would become active in talking to the community. So few red coders care to participate in the comments section.

»
8 years ago, # |
Rev. 6   Vote: I like it +7 Vote: I do not like it

deleted (i had a mistake about times)

»
8 years ago, # |
  Vote: I like it -19 Vote: I do not like it

»
8 years ago, # |
  Vote: I like it -76 Vote: I do not like it

ANIME is the WORST ONE I HAVE SEEN

  • »
    »
    8 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I dont think so

  • »
    »
    8 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    All of my friends who watch anime said it is at least best of the season one. On myanimelist it is placed #10 in top. So I guess you have watched only #1-9 before that one? :-P

    • »
      »
      »
      8 years ago, # ^ |
        Vote: I like it +16 Vote: I do not like it

      What are you Sir Beresta :D a sword?

»
8 years ago, # |
  Vote: I like it +6 Vote: I do not like it

Nice, I've just watched first two episodes of this anime today. Guess I'm ready for this round now :D

»
8 years ago, # |
Rev. 2   Vote: I like it +22 Vote: I do not like it

Standard ? really ? 500 — 1250 — 1500 — 2000 — 3000 is standard now ?

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Am I the only one here who doesn't watch this show?

»
8 years ago, # |
  Vote: I like it -35 Vote: I do not like it

i think we will hope for the many math problems!

»
8 years ago, # |
  Vote: I like it -7 Vote: I do not like it

On an unrelated note, what do you guys think is more important? Learning more and more concepts or mastering what you know?

  • »
    »
    8 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Well i don't have much experience but i think whenever we learn a new concept we should try to solve a few problems related to it to make it clear to us . This way, we do both the things simultaneously upto a level .

»
8 years ago, # |
Rev. 3   Vote: I like it -10 Vote: I do not like it

 Dota 2 version!(Not everyone will understand...)

»
8 years ago, # |
Rev. 2   Vote: I like it +28 Vote: I do not like it

In all rooms...

»
8 years ago, # |
Rev. 3   Vote: I like it +21 Vote: I do not like it

Что-то пошло не так

»
8 years ago, # |
  Vote: I like it +11 Vote: I do not like it

 Seems to be a bug in codeforces

  • »
    »
    8 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Actually I don't think it's a bug. Maybe it's a new feature to see all the other participants with hacks. I think it's actually pretty useful.

    • »
      »
      »
      8 years ago, # ^ |
        Vote: I like it +4 Vote: I do not like it

      The thing is that these people made successful challenge without submitting a problem :) I think it's a bug in standings, though.

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Anyone else keep getting a runtime error for Div2C/Div1A?

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve B? Is the solution is keeping remove the largest palindrome subsequence until the string become empty?

  • »
    »
    8 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    No. B is DP problem.

  • »
    »
    8 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    No, see 1 4 4 2 3 2 1 for example.

  • »
    »
    8 years ago, # ^ |
      Vote: I like it +6 Vote: I do not like it

    I think it is wrong approach. I don't know what to do when you have multiple choices to remove the largest subsequence.

  • »
    »
    8 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    I don't know if my solution will pass the final test cases, but here it is:

    Let DP[i][j] be the minimum number of operations to remove the continuous subsegment [i..j]. Then you have DP[i][j] = min(DP[i][k] + DP[k+1][j]), with k in [i..j-1]. You should also consider the case when V[i] == V[j], there DP[i][j] can also be DP[i+1][j-1].

    The complexity of my algorithm is O(n^3).

  • »
    »
    8 years ago, # ^ |
    Rev. 2   Vote: I like it +6 Vote: I do not like it

    Sometimes it's better not to choose the largest. For example in 32123433 it's better to remove 212, but not 32123.

    • »
      »
      »
      8 years ago, # ^ |
      Rev. 2   Vote: I like it -10 Vote: I do not like it

      Yes. But it is only the special case. You will check that '343' is also palindrom. And decide to remove '3' + '343' + '3' in 1 sec.

  • »
    »
    8 years ago, # ^ |
      Vote: I like it -7 Vote: I do not like it

    I think the question is quite similar to palindrome partitioning with bit modification. http://www.geeksforgeeks.org/dynamic-programming-set-17-palindrome-partitioning/

    But could not get the dp relation for the actual problem. :(

»
8 years ago, # |
  Vote: I like it +4 Vote: I do not like it

B seemed much harder than C...

  • »
    »
    8 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yeah. Worst case complexity is 10^10 (a=10^5,b=2*10^5). How did people do it in time ?

    • »
      »
      »
      8 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Seems obvious that solution with such complexity won't work :)

      I suspect that correct one would be like O(len(b)), however I didn't find the correct one.

    • »
      »
      »
      8 years ago, # ^ |
        Vote: I like it +11 Vote: I do not like it

      Look at each character in A and count how many opposite characters in B it will have to pass as you shift A across B.

    • »
      »
      »
      8 years ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      because you shouldn't solve it 10^10

      The correct solution is like that:

      Take a note, that you asked about the sum of "differences", not to count all differences. This leads to following approach. Fix some position in second string, and the first string will be shifting relatively to second one. Actually the positions, which are opposites to our fixed position, are making a subsegment in first string. And you just need to count how much exist chars different to fixed one in this subsegment.

      When you step from currently fixed position to next one, the subsegment is moving to the right. So just maintain the count of chars of each type in current segment and advance it carefully.

      • »
        »
        »
        »
        8 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Even better. Make a segment tree to count 1 and 0, and call for each index in a.

        • »
          »
          »
          »
          »
          8 years ago, # ^ |
            Vote: I like it +3 Vote: I do not like it

          Even better. Make an array with prefix sums to count 1 and 0, and call for each index in a. :P

          • »
            »
            »
            »
            »
            »
            8 years ago, # ^ |
              Vote: I like it +3 Vote: I do not like it

            Agreed

          • »
            »
            »
            »
            »
            »
            8 years ago, # ^ |
            Rev. 2   Vote: I like it 0 Vote: I do not like it

            Even better :). You need an array only for counting 0s because the 1s for some segments are equal to = length of segment — number of 0s for this segment.

            • »
              »
              »
              »
              »
              »
              »
              8 years ago, # ^ |
                Vote: I like it 0 Vote: I do not like it

              That was what I meant, one array is enough, our statements are the same :)

      • »
        »
        »
        »
        8 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        "Fix some position in second string, and the first string will be shifting relatively to second one."
        How the first string is shifting relatively to the second string if the position in the second string is fixed?

        • »
          »
          »
          »
          »
          8 years ago, # ^ |
          Rev. 2   Vote: I like it 0 Vote: I do not like it

          I mean imagine the process of taking differences of A and substrings in B as imposing A to some place in B. You can shift such a place and the imposing part is shifting too, consider all shifts, which overlay fixed position.

  • »
    »
    8 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    The same for me.

»
8 years ago, # |
Rev. 3   Vote: I like it -18 Vote: I do not like it

How to solve Div2D? I think it is dp[from][to] but I kept getting WA #14 :)

PS: I realized where my mistake was :)

»
8 years ago, # |
  Vote: I like it +14 Vote: I do not like it

Well, no need to wait for systests, it's back to Div 2 for me.

I'll try to boost my self-esteem with a virtual contest...

»
8 years ago, # |
  Vote: I like it +5 Vote: I do not like it

Lagged at the last 10 sec and couldn't submit B. I think the solution is correct. I hate when something like this happens :/

»
8 years ago, # |
  Vote: I like it +8 Vote: I do not like it

»
8 years ago, # |
  Vote: I like it +13 Vote: I do not like it

when will the system test start?

»
8 years ago, # |
  Vote: I like it +1 Vote: I do not like it

I solved B Div2 with prefix sums

  • »
    »
    8 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Your code looks sharp and understandable to me.
    Could you, please, explain how did you come up with the solution?
    Do you have some napkin drawings left? :)

»
8 years ago, # |
Rev. 2   Vote: I like it -10 Vote: I do not like it

Can someone help me figure out where my code fails for 2C? https://code.hackerearth.com/a0bb04m?key=71b2fc5852347cfd361c5a3802736190

  • »
    »
    8 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    You need to sort pairs before doing binary search and dynamics.

    • »
      »
      »
      8 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      damn... rookie mistake.

      • »
        »
        »
        »
        8 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Ugggh got me too. I spent forever trying to figure out what went wrong they were all presented in order until pretest #9.

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I solved problem C(div2) by binary search? How do you think will it pass?

»
8 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Could someone tell me what's wrong with my code for div2 C? http://codeforces.com/contest/608/submission/14957339

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Thanks every one...

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

 I wanna be the best hero!

»
8 years ago, # |
  Vote: I like it -6 Vote: I do not like it

tourist come back............? tourist.........3374 TooSimple...... 3112

»
8 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Rating changes please.

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

thanks for completed quickly system testing and also will be so happY if rating update quickly.

»
8 years ago, # |
  Vote: I like it +254 Vote: I do not like it
  • »
    »
    8 years ago, # ^ |
      Vote: I like it +84 Vote: I do not like it

    -_-.....

    How poor testing must have been so that such solution passes :|??

  • »
    »
    8 years ago, # ^ |
    Rev. 2   Vote: I like it +41 Vote: I do not like it

    LOL. The test setter probably thought that div 1 guys know complexities well and would not attempt to write such a solution :)

    Even funnier is that these ineffective solutions have the best running time :D Don't waste your time preprocessing, mr. coder.

  • »
    »
    8 years ago, # ^ |
      Vote: I like it +6 Vote: I do not like it

    The slowest it gets is 171 ms with a TL of 3.5s. That's messed up.

  • »
    »
    8 years ago, # ^ |
      Vote: I like it +15 Vote: I do not like it

    I was in charge of tests for this problem and made the mistake of generating queries randomly, which gives them on average a very low complexity. We failed to catch this during our internal testing due to the fact that our sample brute force had O(N) updates and O(1) queries (instead of the O(1), O(N) like here). My deepest apologies, I'll definitely be more careful in the future.

  • »
    »
    8 years ago, # ^ |
      Vote: I like it -31 Vote: I do not like it

    Blue -> purple -> yellow :) Just in 3 contests

    • »
      »
      »
      8 years ago, # ^ |
        Vote: I like it +5 Vote: I do not like it

      It seems that there is a new test now, a rejudge, and you're 166th. Adding tests for the archive is commendable, but I do not approve of messing with the scoreboard :>

    • »
      »
      »
      8 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Try to resubmit your solution!

    • »
      »
      »
      8 years ago, # ^ |
        Vote: I like it +8 Vote: I do not like it

      От души братан :)

»
8 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Can anyone tell me how to solve div2 C?I think it is at least not bad to boom ith beacon if activate it will destroy k beacons(k>1),so I do it by something like Prefix sum ,but keep WAing on test#11 QAQ.Is my thought totally wrong for this problem?

  • »
    »
    8 years ago, # ^ |
    Rev. 3   Vote: I like it 0 Vote: I do not like it

    Don't get your solution, but my AC was like that:

    For each beacon from 0 to n calc how much beacons would be destroyed if i-th beacon is starting one, using dynamic programming (we have calced all lower ones before i-th, so could be reused) and binary search (to find how many beacons destroyed by i-th). Complexity here is O(n * logN).

    After that try to disable from 1 to n beacons and calc best sum using data from the previous step. Complexity here is O(n).

  • »
    »
    8 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    my AC was : http://ideone.com/z8dqVj ( No Binary Search )
    consider this dp state ,
    dp[present_pos] = total_beacons_affected_by_present_beacon + dp[previous_unaffected_beacon]
    here, previous unaffected beacon means the beacon which is unaffected by the present beacon
    After that try to disable beacons from present pos to n and calc best using the previous data
    i.e., min of total_beacons-total_beacons_until_this_beacon+dp[present_beacon] all positions .

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

matthew99 first. LOL:))

»
8 years ago, # |
  Vote: I like it -8 Vote: I do not like it

Hi everyone, this is my first contest on codeforces. Someone could tell me when the editorial will be posted? And when the ranks are updated?

»
8 years ago, # |
  Vote: I like it +7 Vote: I do not like it

Rating is a precalculated result.But why every time it should be given so late. Above 2 hours..but it should not be updated.

»
8 years ago, # |
  Vote: I like it +18 Vote: I do not like it

And after every contest there is a dilemma: go to sleep or wait until raitings are updated...

»
8 years ago, # |
  Vote: I like it -6 Vote: I do not like it

Ratings updated.

»
8 years ago, # |
  Vote: I like it +72 Vote: I do not like it

Why DemiGuo's rating did not change being in TOP 5?

  • »
    »
    8 years ago, # ^ |
      Vote: I like it +14 Vote: I do not like it

    It seems that her submits are skipped... so strange! it's impossible! She was 1st for a while in contest! MikeMirzayanov , what's going on?

  • »
    »
    8 years ago, # ^ |
      Vote: I like it +151 Vote: I do not like it

    I'll be happy to read explanations about the submissions:

    • »
      »
      »
      8 years ago, # ^ |
      Rev. 4   Vote: I like it -26 Vote: I do not like it

      I'd wager coincidence! The programs are small, and it seems highly unlikely for someone in Demi's position to consider cheating. Sadly I also can't offer much towards improving cheat detection.

      Edit: a friend of mine thinks the similarity is "clearly not a coincidence". Sigh... how does one reason about the probabilities involved here? Could be a scientific research question. Perhaps the users involved will make a statement, unclear what good that would do. I thought it better to give the benefit of the doubt, but hey at least we're not banning users.

      • »
        »
        »
        »
        8 years ago, # ^ |
          Vote: I like it +35 Vote: I do not like it

        Have you taken a closer look?

        These parts:

        	p = 0;
        	for (int i = 2; i <= n; i++) {
        		for (; p && A[p + 1] != A[i]; p = Next[p]);
        		if (A[p + 1] == A[i])
        			p += 1;
        		Next[i] = p;
        	}
        	p = 0;
        	for (int i = 1; i <= n; i++) {
        		for (; p && A[p + 1] != B[i]; p = Next[p]);
        		if (A[p + 1] == B[i])
        			p += 1;
        	}
        	if (p)
        		printf("NO\n");
        	else
        		printf("YES\n");
        

        differ only by replacing a with A, b with B and nxt with Next. This is NOT a coincidence.

        • »
          »
          »
          »
          »
          8 years ago, # ^ |
          Rev. 2   Vote: I like it +26 Vote: I do not like it

          Also, they both have unused variables named now1 and now2. As much as I want to believe this is a coincidence, this is really hard to explain away.

        • »
          »
          »
          »
          »
          8 years ago, # ^ |
          Rev. 9   Vote: I like it 0 Vote: I do not like it

          It's possible you're right; it just seems weird from a psychology angle. Keep in mind there are a lot of pairwise comparisons to be made on Codeforces, so unlikely events can happen. A lot of the similarities are very natural simplifying choices to make (i.e. low entropy). We should check for stylistic consistency with her other submissions; that might "explain away" some of the coincidences.

          I'm just having trouble imagining someone with legit skills wanting to do this (especially when you're female so the whole world is watching you as sort of an example); even if it were, the code could have been disguised a lot better.

          Edit: I didn't notice that now1 and now2 are unused :/ Damn whyyyyy

          If we assume that cheating did take place, what happens next? It looks like you can get away with cheating if you have the skills and take effort to obfuscate the source. Will Demi and others just get better at it? Do many orange/red members already do it??? Deterrence is hard if people with actual skills cheat.

          • »
            »
            »
            »
            »
            »
            8 years ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            When someone doesn't try to hide the fact that they're cheating, they really don't care about consequences.

      • »
        »
        »
        »
        8 years ago, # ^ |
          Vote: I like it +3 Vote: I do not like it

        AC submissions are not only ones should be looking at.

        Consider submissions:

        They both WA9 and use such algorithm simulate first string, simulate second string, simulate first string again (the first submission contains original reference to now1 and now2). The second submission simulates second, first, second (probably because the first got WA9).

    • »
      »
      »
      8 years ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      i didn't want to say this just because i didn't want to attract attention but you guys made me say it ;D, from what i see from the coding style of both accounts the owner is the same person!

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Why do I have TL with O(n*log n) solution on div2c? http://codeforces.com/contest/608/submission/14955285

  • »
    »
    8 years ago, # ^ |
    Rev. 2   Vote: I like it -11 Vote: I do not like it

    could be an anti-quicksort test case. (quick sort has worst case n*n)

»
8 years ago, # |
  Vote: I like it +36 Vote: I do not like it

Div1C was a very elegant problem, I really liked it.

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Div1C http://codeforces.com/contest/608/submission/14965956 Who tell me what is the wrong? I try to get the 30th data,the last 10 letters of the first string and the second,using this method if(n==999999&&a[0]=='W'&&a[1]=='N'&&a[2]=='W'&&a[3]=='W'){ puts(a+n-10); puts(b+n-10); } but I failed,because I find the 20th data is same with the 30th I also have try to run other's program to compare with mine using random data,but never find the difference. Who can help me ?

»
20 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Saitama Sensei!