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

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

Google Code Jam 2018 qualification round will start soon and run for 27 hours. Don't miss it!

Before you start, you may have a look at an old version of the new Code Jam system. Looks like the admins have just forgotten to take it down. If this page doesn't open, you can at least look at some screenshots.

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

»
6 лет назад, # |
Rev. 3   Проголосовать: нравится +18 Проголосовать: не нравится

use mozilla firefox

»
6 лет назад, # |
  Проголосовать: нравится +48 Проголосовать: не нравится
Compile error.
The compilation output of your code contains non-ASCII characters and is therefore not displayed.

Google, what is this?

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +8 Проголосовать: не нравится

    I had the same problem because my java main class wasn't called Solution

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    use the correct compiler might help

  • »
    »
    6 лет назад, # ^ |
    Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

    One of my friends has this error when he forgot to include "cstring" library, the absence of which doesn't affect the local compilation on a MacBook.

»
6 лет назад, # |
  Проголосовать: нравится +25 Проголосовать: не нравится

How can I see friends' ranking?

»
6 лет назад, # |
  Проголосовать: нравится +48 Проголосовать: не нравится

Any one facing the problem in submitting solution.I am getting this message "A Problem occured,Please try again later"

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

Compile error. The compilation output of your code contains non-ASCII characters and is therefore not displayed What this mean?

»
6 лет назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

Not being able to download contestants' solutions is quite a sad thing (although they say it will be possible someday), but not worse than not being able to download the tests! Will the tests be revealed at least?

Anyway, if Google decides to close their judge system (like they do now for the practice round) and if it's allowed for us to upload their problems, we will consider uploading problems from this year (at least the interactive ones)

  • »
    »
    6 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится -12 Проголосовать: не нравится

    What's the point of having a competition if they let you steal another person's solution? The solutions become available when the contest ends I think. Can't remember if it's Google or Facebook where I saw last year's solutions

    • »
      »
      »
      6 лет назад, # ^ |
        Проголосовать: нравится +31 Проголосовать: не нравится

      The FAQ says "downloading other contestants' code after the contest" as one of the features they would add as soon as they can.

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +8 Проголосовать: не нравится

    We're not sure if we are allowed to do this, but the only interactive problem Go, Gopher! is now available here: https://oj.uz/problem/view/GCJ18Q_gogopher

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

Taking too much time for judgment, anyone else facing this issue ?

»
6 лет назад, # |
  Проголосовать: нравится +42 Проголосовать: не нравится

The website is performing very poorly for me. Can't make submissions and it keeps signing me out.

»
6 лет назад, # |
  Проголосовать: нравится +17 Проголосовать: не нравится

"A problem occurred. Please try again." This is now irritating... I've been waiting for 15 minutes now.

»
6 лет назад, # |
  Проголосовать: нравится +15 Проголосовать: не нравится

Why did they change the submission system :/ The previous one was quite unique for codejam and was fun (though somewhat unfair). And less buggy..

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +29 Проголосовать: не нравится

    Oh wow. My submission did not appear first (**disappeared** from the list), so I submitted again. And now the first one appeared and I have penalty.

»
6 лет назад, # |
Rev. 3   Проголосовать: нравится +90 Проголосовать: не нравится

Is it just me or the website is extremely slow?

  1. after hitting submit it's "submitting..." for tens of seconds,
  2. after switching to a different tab ("problems", "submissions", "scoreboard"), it says "Updating..." for tens of seconds; this is inconsistent: sometimes it completes in under a second, sometimes in a few seconds, sometimes it takes 30 seconds,
  3. submissions stay "Awaiting judgment..." for minutes,
  4. also, cmd+click on "problems", "submissions", "scoreboard" doesn't work: it neither opens in a new tab nor follows the link in the current tab,
  5. "A problem occurred. Please try again." — the "please try again" part is misleading because it's better to not try again immediately but instead check the "submissions" tab to see if it was actually submitted.
»
6 лет назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

In the submissions tab,its showing "awaiting judgement" since last 20 minutes. WTH has gone wrong?

»
6 лет назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

All issues of the new interface aside, I really like the problem Go, gopher!

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +57 Проголосовать: не нравится

    Interactiveness is much fun! Though this problem is quite boring. Looking forward for next rounds.

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +19 Проголосовать: не нравится

    I like the idea of growing AVL trees, Red black trees etc. in the orchard.

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +5 Проголосовать: не нравится

    What do you think the optimal solution is in terms of probability of failure? The optimal solution in my eyes should do at least the following:

    1. Pick the patch with the least number of filled in spots to deploy.

    2. Dynamically adjust the target rectangle. For instance, use the first filled in spot as a corner.

    3. Try to minimize perimeter of the target rectangle, since spots on the interior can be filled from more places than spots on the border. However given 200 is not a perfect square, we need to factor in the increase in area due to imperfect factorizations.

    Are there any techniques I missed?

»
6 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

"A note on server delays Our servers are currently experiencing a very heavy load. We are very sorry for the delays, and we encourage you to try back later in the contest window if your submit requests do not go through; repeatedly submitting or refreshing will exacerbate the issue. We apologize for any penalty attempts accrued during this time; in the Qual Round, only points matter, not your rank, so these will not affect your chances of advancement."

»
6 лет назад, # |
  Проголосовать: нравится +36 Проголосовать: не нравится
»
6 лет назад, # |
  Проголосовать: нравится +16 Проголосовать: не нравится

Some people have a correct code for the small input, but are already displayed as "Incorrect for the large" (e.g. a bunch of people who have 90 points). Is this a display bug, did Google accidentally judge their large submission, or do they know something I don't to avoid submitting your solution to the Large Input ?

  • »
    »
    6 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится +26 Проголосовать: не нравится

    1) Submit a solution such that you know it will pass the first test set but not the second one.

    2) Get AC verdict on the first one, and "will be revealed later" verdict on the second one: then the scoreboard assumes you will pass all test sets.

    3) Submit once again in order to have a submission that will really pass all test sets.

    4) Get WA on the first test set: then the contest judge will take into account your earliest submission that passed all visible test sets, and count points on visible test sets only.

    I hope this answers your question.

    • »
      »
      »
      6 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Oh OK, I thought Google automatically tried your "latest submission that passed the small tests" on the large tests, but indeed if it tries your "latest submission if it passed the small tests and nothing if your latest submission didn't pass small", it makes sense, thanks.

»
6 лет назад, # |
  Проголосовать: нравится +52 Проголосовать: не нравится

Didn't expect Google out of all organisations to have such a poorly managed website.

»
6 лет назад, # |
  Проголосовать: нравится +128 Проголосовать: не нравится

>mfw

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

I can't load the dashboard. I've tried Chrome, Firefox and Chromium on Ubuntu 16.04 LTS. Those who couldn't load the problems initially, what did you do afterwards? Also, can someone please share the problem statements?

UPD: I could load dash and submit. Just wait for 10-20 minutes for loading the dash, and for submitting. Don't press refresh or anything, just wait.

»
6 лет назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

Found this in the developers' console: "Failed to load https://codejam.googleapis.com/poll?p=e30: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://codejam.withgoogle.com' is therefore not allowed access. The response had HTTP status code 502."

Seems like a CORS issue?

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    No, it isn't. It means server is down, so it cannot respond either to regular requests or CORS requests

»
6 лет назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

I rewrote my algorithm part for 10+ times for problem C and D because I don't have any idea what went wrong with a pathetic feedback "TIME_LIMIT_EXCEEDED" or "Wrong answer."

..... Until I just now found out i accidentally put an extra "print " somewhere in my code.

So if ur facing the same issue, DONNOT PUT ANYTHING IN STDOUT except the required case output .....

(And YES I HATE THIS NEW PLATFORM)

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится -24 Проголосовать: не нравится

    Hi festony, For problem D, the input is 1.414213 which is not exactly sqrt(2) but the final answer they show is only possible for an exact value of sqrt(2). Didn't you face this problem of precision?

»
6 лет назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

Very slow servers...

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

Still can't sumbit anything. I hope they will increase the duration.

UPD: started working for me.

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

I managed to submit everything, but the accepted submissions keep disappearing and reappearing, so I go up and down on the scoreboard every few minutes. Super weird.

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

Wait, there is no way to tell whether a person has genuinely attempted large testset or not now? They do realize this makes the scoreboard more or less meaningless now?

Although I think they did, because it's so slow anyway.

UPD: Also lol. They wanted to issue the announcement on slow servers, but since they got rid of announcements/questions and presented it as "to keep things fair for all contestants"; they now had to append the announcement to every problem statement. I'm crying.

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +5 Проголосовать: не нравится

    Scoreboard is meaningless anyway, since all you have to do is to get 50 points.

    • »
      »
      »
      6 лет назад, # ^ |
        Проголосовать: нравится +20 Проголосовать: не нравится

      This will matter heavily in further rounds, where your estimate place will affect what you'll be working on.

      • »
        »
        »
        »
        6 лет назад, # ^ |
          Проголосовать: нравится +3 Проголосовать: не нравится

        The only info it gives you is "who submitted on the small dataset", so it's useless in the latter rounds as well.

        • »
          »
          »
          »
          »
          6 лет назад, # ^ |
            Проголосовать: нравится +62 Проголосовать: не нравится

          I disagree. People didn't tend to submit large solutions for fun -- so you could try an estimate your place by estimating how many people would get the large wrong. With this scoreboard you have no idea how many people are attempting to solve the full problem. Heck, you can't even tell easily what are people working on, since the person who just quickly solves the small sets will ALWAYS be on top -- you'd have to find tourist somewhere deep down in the scoreboard (since you can't have friends) and look at his penalty times to guess what he submitted.

          • »
            »
            »
            »
            »
            »
            6 лет назад, # ^ |
              Проголосовать: нравится +6 Проголосовать: не нравится

            I disagree.

            With what? You're saying the same thing I do — the current scoreboard is useless for reasons you listed, as compared to the old one, which gives info about who actually hopes to solve large.

    • »
      »
      »
      6 лет назад, # ^ |
        Проголосовать: нравится +3 Проголосовать: не нравится

      Isn't it 25 points? If you talk about Optimistic score, then that's not true either, since you can solve B and C, for (8+15+10+20=)53 points optimistic score, but if both large fail, you end up with just 18 points and that's not enough.

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится -11 Проголосовать: не нравится

    It's like other competitive contests. Larger test set = like the hacking stage

    • »
      »
      »
      6 лет назад, # ^ |
      Rev. 2   Проголосовать: нравится +5 Проголосовать: не нравится

      There is a small nuance. Yes, small test set is like Codeforces pretests; and large test set is final testing/hacking.

      But. You get no points on Codeforces for passing pretests, so no one would submit solutions on Codeforces just passing the pretests. As such on Codeforces, if you see a submission you can be reasonably certain that this is a genuine attempt to solve the "large test set".

      On Code Jam you do get points for small test set.

      • »
        »
        »
        »
        6 лет назад, # ^ |
          Проголосовать: нравится -13 Проголосовать: не нравится

        But that's the way it always was apparently. People complaining about no separate solutions. If you submit a correct large solution faster than someone who submits small (faster than you) then corrects issues for large then you get a higher score

        • »
          »
          »
          »
          »
          6 лет назад, # ^ |
            Проголосовать: нравится +21 Проголосовать: не нравится

          You are right, that's the way it always was before. But the significant difference this time is that large gets automatically submitted when small gets accepted. Where as in the previous format, participants had the option to separately attempt large after small passed. The new format creates the following problem.

          It is no longer possible to distinguish how many people are genuinely attempting large. Small and large often had drastic change in difficulties and now we can no longer guess from the scorecard just how much.

          • »
            »
            »
            »
            »
            »
            6 лет назад, # ^ |
              Проголосовать: нравится +28 Проголосовать: не нравится

            This new system has two disadvantages compared to the old one. As you mention, other competitors cannot see whether you are genuinely attempting large. The other disadvantage is when you are not sure whether you will solve the large in time. In the old format, you could solve the small, then work on some other problem, and then work on the large and submit it. You can do the same in the new format, but (as far as I can tell) you get an undeserved penalty, since your first submission will still count.

            I think it would be the best to give the submitter a choice of whether/which hidden tests to submit to. For example, suppose there is 1 visible test and 2 hidden tests. You submit (A) for the visible test only first, and it passes. Then you submit (B) for hidden-1 only, and then, you submit (C) for hidden-2 only. Everything passes, and you get no penalties. You could mark (A) to be both for the visible test and the hidden test, but then you get 2x penalty because you have resubmitted the hidden tests. If you had another submission before (A) for all the tests which fails the visible test, you get a single penalty (it is not considered as a submission for hidden tests, since it fails the visible ones).

            Do the GCJ organizers read this forum, or should they be notified of all the issues with the new system? Another minor issue that seems to not have been mentioned yet is that it is hard to see how the problems are scored -- it is not on the main page, on the submission page it is shown only for the attempted problems; only the scoreboard has it right.

            The old format also allowed some other strategies. You could scan your output for any obvious incorrect answers (e.g., negative ones) and fix and re-run and submit during the 4 or 8 minutes. If you failed the small case, it could be helpful for debugging -- in a very subtle way, as there was no correct answer, and you did not know which particular subtest was failed. A difference rather than disadvantage, though.

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

Compile error. The compilation output of your code contains non-ASCII characters and is therefore not displayed What this mean?

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

Okay so this has been by far the most frustrating experience for me in an online contest. Seems like the hardest problem in this contest is essentially in submitting the solution itself. I can understand and be somewhat empathetic about the delay in judging. But seriously, how hard is it to design an interface to submit a file or plain text?

Why do I freaking need to wait for more than 1 minutes and even then sometimes get "A Problem occurred, Please try again later" message. And the funny part is, the code still gets submitted sometimes even after this message is displayed and I can only see this when I click on the Submissions tab which also takes an awful lot of time to load and often updates incorrectly.

And there are tons of random problems and glitches, some are already mentioned in the comments above. Besides them, I was also getting stuck in some weird limbo zone between sign in and sign out. After clicking on submitting sometimes the option to submit solutions were disappearing, and I got a button that said "Sign in" instead. The weird thing is that a pop up just loads and instantly disappears when I click on that and additionally I still had the option to "Sign out" in the upper right corner and nothing happens when I click there. This happened to me multiple times and had to clear browser data and sign in again to solve this problem. Also why the hell do we need to click on the Scoreboard to see the points for each problem? This is a really bad design overall.

Please Google, do refrain from launching a new platform when the work is clearly unfinished and rushed. Such a poorly designed contest platform, even when its not compared to the standard of Google. A new platform should be enriched with more features, preferably faster and easier to use. Where as this is the complete opposite, does not have most features of the old one, slower than Java and full of bugs.

I think it will be wiser for me to skip this year's codejam and focus on the upcoming Codeforces round. Thanks for wasting a shitload of my time today Google. I apologize if it came out harsh and anyone gets butthurt, but its only the truth which I am sure many others would also agree with.

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится -9 Проголосовать: не нравится

    You haven't been in enough contests to say it's worst :) Problems were good and correct, and the technical difficulties didn't prevent advancement.

    • »
      »
      »
      6 лет назад, # ^ |
        Проголосовать: нравится +18 Проголосовать: не нравится

      Not sure how you can deduce the fact that I haven't been in enough contests, you don't really know a thing or two about me, And regardless of that, one does not have to be in enough contests to say its the worst.

      Problems were good and correct, you are spot on. No one is arguing they were not, right? Technical difficulties didn't prevent advancement, and how do you know exactly? I know at least 2 people in person who quit because of experiencing significant technical difficulties. Have you read some other comments in this post? And if technical difficulties don't prevent advancements, that makes it okay to have so many technical difficulties and say it was a good contest? And it was not just technical difficulties like server delay in this contest.

      If its a good contest I don't mind saying kudos, well done organizers. Similarly, if its a bad contest I will not hesitate to say thanks for this piece of crap.

      • »
        »
        »
        »
        6 лет назад, # ^ |
          Проголосовать: нравится -33 Проголосовать: не нравится

        Not the worst contest !=> Contest is good; Having technical difficulties !=> Thinking it's OK to have technical difficulties; Knowing you like to overreact !=> Not know a thing or two about you.

        • »
          »
          »
          »
          »
          6 лет назад, # ^ |
            Проголосовать: нравится +15 Проголосовать: не нравится

          Not the worst contest according to you !=> Not the worst contest according to me; Thinking it's OK to have technical difficulties !=> Thinking it's NOT OK to point out these problems;

          I was merely stating some facts and some personal opinions. Please point out where do you see "overreacting" in that? Sure, you can call it criticism, expressing frustration or even random whining, but "overreacting"?

          This is the second time you make some personal remarks about me, and based on what? If you don't like what I'm saying, don't read it, ignore me. Heck if you can't do that and feel like you have an obligation to take stand, do point out and argue constructively against the points I mentioned. What you don't get to do is come out of nowhere and tell me baseless stuff like I haven't been in to enough contests, and even worse, I'm overreacting when I'm clearly not.

          If you lack the ability to engage in a logical discussion without pointing fingers by making up fabricated stuff, please stop here and don't reply any further.

          Have a good day.

          • »
            »
            »
            »
            »
            »
            6 лет назад, # ^ |
              Проголосовать: нравится -23 Проголосовать: не нравится

            I pointed two obvious logical fallacies of yours in my previous comment and you accuse me of being illogical? To prove the third, that you don't overreact, continue your rant against me on DM, we don't have to engage the whole CF in this.

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

Looks become modern, but horrible UI, slow server... is this the second TopCoder?

»
6 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Wait a second, did they actually turn on C++14?! https://code.google.com/codejam/resources/faq#language-details

  • »
    »
    6 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    I've ACed my c++14 code even in practice round
    Don't know about c++17, haven't used any new features in these rounds

»
6 лет назад, # |
  Проголосовать: нравится +44 Проголосовать: не нравится

It's sad that for the last problem (the one with cube projection) if you forget the newline after "Case #1:" and print a space like you always do, this counts as "Wrong Answer" and a penalty instead of some kind of formatting issue.

I mean come on, can't we at least have a checking system that is tolerant to white spaces?..

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    ugh -_- wasted at least 30 minutes on this.

    • »
      »
      »
      6 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      So did I. I ended up looking for an online 3D plotting tool to display rotated cube points — I was hoping to see that one of the vertices was completely off, for example. However, I had no luck with online tools and ended up with matplotlib only to see that everything was good. Only then it came to me that output format could be different.

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

Lol . My system timer is ahead by 5.5 hrs and now gcj says contest has ended and there is no submit button for me at all.Finally this helps me come out of laziness to change my system time.Also it says that large are evaluated to not true.If this is the case and so many other problems.I think facebook hackercup getting delayed is good rather than do so irritating work.

Anyways one doubt: why doesnt google just realise they likely are gonna fuck up gcj this year and go back old version and then come back strong next year with new version.

UPD: On changing timer to correct time it gives back submit button.

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится

    Count yourself lucky if you can update your system with wrong system time. And use some security features. "Whoops, you don't have permission to view this — your certificate has expired. Seems it's only valid until 2025, but it's 1.1.2050 right now!"

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +16 Проголосовать: не нравится

    Makes me wonder what would happen if I delay my timer and try submitting some seconds after the end of a contest.

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

3d geometry x.x

»
6 лет назад, # |
  Проголосовать: нравится -25 Проголосовать: не нравится

When you pass the qualification round with 33-34 points:

»
6 лет назад, # |
  Проголосовать: нравится +69 Проголосовать: не нравится

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

Will the testdata be available

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

Can someone please post a sample Java submission that the solver accepts? I spent the last 30 minutes of the competition trying to submit but I was getting Runtime Error and I can't figure out what's causing it. I'm using stdin/stdout, flushing output, etc. I ran extensive simulations and didn't get runtime errors on my machine. What's the magic trick to get GCJ solver to accept Java solutions?

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

Can anyone share their approach for 2nd Problem. Does the algorithm given will get accepted ???

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Try doing a dry run over some handmade cases. You'll get the logic

    Spoiler
  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    sort elements at even places and elements at odd places individually and then merge them ,it should be equal to original sorted array

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

Can I view other's code for a particular problem after the contest is finished?

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

Is there a practise session for submitting solutions for the Qualification round ?

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

Beside all the problems mentioned above, I really liked the old platform. The reason is, you can find lots of online judges that you submit your code and it will be ran in judge server (of course the best among them is Codeforces) but Google code jam was unique(as far as I know) for solving small and large input files separately and sending only the output result.

»
6 лет назад, # |
  Проголосовать: нравится +66 Проголосовать: не нравится

Question to Chinese competitors: how does the interface work behind GFW? I will be in Beijing for ICPC, and would like to know whether participating from there would be an issue?

»
6 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Is there any tricky edge case for D? I did a binary search on the rotation angle and the small was accepted. But large is rejected, and the new interface is useless for figuring out what's wrong. :/

Also, can anyone spot the error in this on for A-large? https://pastebin.com/bNZVK765

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Your priority queue is a min-queue. Max-queue (which you want) is the default, with std::less<>.

»
6 лет назад, # |
  Проголосовать: нравится -21 Проголосовать: не нравится

Pretty disappointed with my Gopher screw up :/ I had the right idea (3x3) but I moved 1 to the right rather than 3 because of the "use as few as possible"

Can someone who coded in Java share their Trouble Sort solution here~ I used Arrays.sort() then compared the two after so still O(n^2)

Can't even be bothered to read #4, refused to learn Geometry for this xD

  • »
    »
    6 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    Arrays.sort() is Quicksort, so should be O(n log n).

    • »
      »
      »
      6 лет назад, # ^ |
      Rev. 3   Проголосовать: нравится -8 Проголосовать: не нравится

      Yes but I had 2 arrays. My approach was:

      1. Arrays.sort(sorted); // O(n lg n)

      2. do Trouble Sort on unsorted // O(n^2)

      3. loop through both comparing them // O(n)

      I don't really get with the comparing before Trouble Sort is completed so was hoping to see a code example

      • »
        »
        »
        »
        6 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        You don’t actually perform trouble sort for the large test set.

        int[] even = new int[(V.length + 1) / 2];
        int[] odd = new int[V.length / 2];
        for (int i = 0; i < V.length; i += 2) even[i / 2] = V[i];
        for (int i = 1; i < V.length; i += 2) odd[i / 2] = V[i];
        Arrays.sort(even);
        Arrays.sort(odd);
        for (int i = 0; i < even.length; i++) V[i * 2] = even[i];
        for (int i = 0; i < odd.length; i++) V[1 + i * 2] = odd[i];
        String answer = "OK";
        for (int i = 0; i < V.length - 1; i++) {
            if (V[i] > V[i + 1]) {
                answer = String.valueOf(i);
                break;
            }
        }
        System.out.println(answer);
        

        I literally just wrote this, so I haven’t tested this code.

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

What is wrong with the formulas for D-small:

y = s / 2 - x

and points: (0, 0, 0.5), (x, y, 0), ( - y, x, 0). I was pretty sure that the formulas are correct. But it didn't pass.

Also: No official solutions, tests, participiants solutions, possibility of submitting after the contest. So when you don't know what went wrong, you can be frustrated forever.

Also my very first submission: https://pastebin.com/W5UMV3Cr was exactly the same as in analysis and of course it didn't pass. Then I wrote bin-search solution with no-luck, and at the end I wrote the above formulas. Any ideas what is wrong?

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +21 Проголосовать: не нравится

    I think another comment said that having a space after the "Case #x: " gives a wrong answer.

    • »
      »
      »
      6 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      LOL, thanks. So probably all aproaches were correct.

    • »
      »
      »
      6 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Not quite. Not having a newline after "Case #x: " for the last problem gives a wrong answer. I think the space itself is fine as long as you have a newline after it.

»
6 лет назад, # |
  Проголосовать: нравится +31 Проголосовать: не нравится

I got a RTE after submitting in default language (bash) instead of C++. Any good way to avoid that?

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    Any way to practice/re-submit qualifier problems now?

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +6 Проголосовать: не нравится

    be mindful and don't forget to change language, ofc (:

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +125 Проголосовать: не нравится

    writing your solution in bash would definitely help with that

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +10 Проголосовать: не нравится

    I'm not sure if I remembered wrongly but I don't remember changing language in the Qualification Round (I changed the language for all problems in the Practice Round). I have C++ set under the question "What language do you feel most comfortable coding in?" in my profile page. Not sure if this affects things.

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +50 Проголосовать: не нравится

    The best way would be forcing Google to fix their shit.

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

For A — Saving the Universe Again What is wrong with https://codeshare.io/2KPJzz It worked for Test case 1 , but WA for other.

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I think the error is on the following line:

    c[i]=c[i-1];c[i-1]=0ULL;

    • »
      »
      »
      6 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      I used vector c(l); to store the corresponding increments(doubling charge) whenever 'C' is encountered in string and keeping it 0ULL if 'S' is present. Now when on I find "CS" on traversing right to left, the damage is reduced ans=ans-(c[i-1]/2ULL); and c[i]=c[i-1];c[i-1]=0ULL; shifts the doubling charge index. What is wrong in this approach? It passed sample tests but WA for test case 2.

      • »
        »
        »
        »
        6 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        Here is a test case which your code does not solve correctly:

        5 SCCSSC

        Your code will output 3 when the correct answer should be 2.

        I think adding a break into the loop will fix this ;)

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

Are there nice angles for maximum shadow area of the cube?

I rotated it by π / 4 around X axis and then by 6091 / 7575π around Z axis (the coefficient is binary searched) to get the required maximum 1.73+. The fraction's convergents result in smaller area (e.g. 4/5, 37/46, 41/51).

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Yeah, I'd also like to know what the true constant is. My code used binary search from PI/2.0 to PI/5.1, but what's the rationale behind 5.1 except experimental evidence, I don't know.

    • »
      »
      »
      6 лет назад, # ^ |
        Проголосовать: нравится +8 Проголосовать: не нравится

      The actual value is , which doesn't seem to be any nice multiple of π.

    • »
      »
      »
      6 лет назад, # ^ |
      Rev. 3   Проголосовать: нравится +8 Проголосовать: не нравится

      is close to , the solution to (wolframalpha).

      For simplicity say the cube is actually 2x2x2 so that if we start off by rotating it 45 degrees around the Y axis like the analysis says, it has its lower-right vertex located at and the shadow's area is still the minimum possible 4 units.

      To get to a maximally-sized hexagon shadow we need to rotate it until this vertex is pointing straight down from the centre at . We need to solve for X = 0. With the formula for rotation I'm using, that's . Obviously that's a slightly different formula, but if you used another formula for rotation or another corner, you could have ended up with sin and cos the other way around which would lead to that solution.

      • »
        »
        »
        »
        6 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        For reference, is indeed the exact angle. It is equal to the mentioned above. It is also equal to , which is the expression I got from Mathematica while I was solving the problem.

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится

    A nice formula is "area = 2 · sum of |z|-coordinates of printed vectors".

    I binary-searched a vector with a fixed norm and correct sum of |z|-coordinates (the initial extremes are (0, 0, 1 / 2) and ); this gives 3 out of 9 required numbers, v1..3, z. Then, since the cube can be arbitrarily rotated about the z-axis, we can set v1, y = 0 and compute v1, x from its norm 1 / 2.

    Each vector is the cross product of the other two (multiplied by 2 to normalise it correctly). Since we already know v3, z and we know that v3, z = 2v1, xv2, y - 2v1, yv2, x = 2v1, xv2, y, this lets us compute v2, y (there's a case with very small |v1, x| to watch out for) and, from the norm again, v2, x. Now, v3 can be fully computed as the cross product; vectors v1..3 are the answer.

    I didn't bother much with this problem during the contest because qualification round and geometry, and I can't check if it's right at this point, but it makes sense.

»
6 лет назад, # |
  Проголосовать: нравится +10 Проголосовать: не нравится

lol, I'm reloading scoreboard page, and total number of people varies between 24587 and 24589, and I am moving 2 positions back and forth. It must be too hard for google to sync data for 12 hours past the contest

»
6 лет назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

Anyone know if we can submit solutions anywhere now (upsolving)? Really want to see if my solution to problem 4 will work :(

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +5 Проголосовать: не нравится

    I'm wondering the same, I can't believe there's no way to upsolve!

    • »
      »
      »
      6 лет назад, # ^ |
        Проголосовать: нравится +5 Проголосовать: не нравится

      yeah, it's weird. I imagine and hope that they're planning to implement it, and just haven't gotten around to it yet. The previous platform had upsolving, I'm pretty sure. I also emailed the team asking about it, but haven't gotten a response yet.

      • »
        »
        »
        »
        6 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        The previous platform still has upsolving ;)

      • »
        »
        »
        »
        6 лет назад, # ^ |
          Проголосовать: нравится +10 Проголосовать: не нравится

        "Hi Kevin,

        We're glad you enjoyed the Qual Round! Currently, we don't have that feature available on our site, but it is on our list of features to add a practice or extended round option. Stay tuned! In the meantime, you can check our Qual Round analysis here."

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +34 Проголосовать: не нравится

    I wrote my own judge for problem #4:

    https://gist.github.com/jamarju/51971d245591f76401444248820c9682

    Requires scipy and numpy.

    It uses the same criteria as stated in the problem (check orthogonality and magnitude of side center vectors, build vertex vectors, calculate convex hull area):

      python cubejudge.py test.in test.out
    

    And here is a testset generator:

    https://gist.github.com/jamarju/04aade251a0c52043070678ebc274518

    To generate 100000 test cases:

      python cubegentest.py 100000
    

    It's very frustrating and opaque that Google won't publish the judges code or at least the test outputs and we have to make up our own :(

»
6 лет назад, # |
  Проголосовать: нравится +96 Проголосовать: не нравится

If you want to filter scoreboard by country or handle you can use this small site https://codejam.herokuapp.com/ It might soon get offline though since it is currently overusing heroku free database plan :)

»
6 лет назад, # |
  Проголосовать: нравится +26 Проголосовать: не нравится

For people who wished to download contestants' solutions, hope you can find my repository useful: https://github.com/salvois/codejam Happy coding and good luck with Round 1!