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

Автор csacademy, 8 лет назад, перевод, По-русски

Привет, Codeforces!

Мы предлагаем вашему вниманию новую платформу на csacademy.com. Наш проект ориентирован на онлайн-образование. Мы разработали принципиально новую площадку для соревнований по программированию.

Наш первый контест состоялся в январе (IOI-style) с заданиями средней сложности, вы можете найти их в нашем архиве. Для этого надо зарегистрироваться, используя ваш действующий e-mail. Вы также можете войти с помощью Facebook или Google+. После регистрации, вы можете подключиться к своему аккаунту на Codeforces здесь. Мы уже зарезервировали для вас все имена юзеров с сайта ;). Подключившись один раз, за вами закрепляется имя юзера с Codeforces или вы можете выбрать любое другое, на ваше усмотрение.

Наш второй раунд состоится в пятницу, 04.03.2016 в 20:00 (MSK). Если вы хотите принять участие в соревновании, вам необходимо войти и зарегистрироваться перед началом соревнования. Как и в предыдущем раунде, уровень сложности будет средним (похожим на codeforces Div.2). Вам предлагается решить 6 задач за 2 часа и 30 минут. Но на этот раз формат раунда будет несколько отличаться:

  • Вы будете видеть ваш результат в режиме онлайн, сразу после выполнения задания в таблице результатов;
  • Задачи не будут засчитываться частично: то есть, либо вы выполнили задание, либо нет (ACM-ICPC-style);
  • Оценки будут присваиваться в динамике: в зависимости от количества пользователей, которые справились с заданием, оценка будет варьироваться от 100 до 1000.
  • Вторым критерием оценки, помимо баллов, будет время и количество ошибок для каждого участника. Проще говоря, если в конце двое или более участников будут иметь одинаковое количество баллов, побеждает тот, кто совершил наименьшее количество ошибок (только для выполненных заданий), а также будет учитываться время, потраченное на решение последнего правильно выполненного задания.

Подробнее о нашей платформе:

  • Для корректной работы сайта, мы рекомендуем использовать Google Chrome. Сайт работает в бета-версии, поэтому в других браузерах возможны ошибки и сбои.
  • Вы можете использовать C++14, Java8, Python2 и Python3. Но мы рекомендуем использовать преимущественно С++ и Java, т.к. Python может тормозить.
  • У нас есть довольно крутой онлайн редактор. Мы используем его сами, надеемся вам тоже понравится;)

Если вы обнаружите какие-либо ошибки, пожалуйста, сообщите нам по адресу [email protected]

CS Academy это мы:

Вы можете найти нас на Facebook, ВКонтакте и Twitter

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

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

Once you have an account you can choose a username, but all Codeforces handles are already reserved

Why? :(

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

    We did this so that people already known to this community and their friends by a certain name can automatically claim it. Users can claim their Codeforces handles from their profile page. Unfortunately, some usernames (any starting with a non-alphanumeric character) are not allowed. Sorry about it. We can manually link some usernames if you make a good case for it. Email us.

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

why i cannot see any problems in past contest ?

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

Using Codeforces to popularize its competitor....shrewd.

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

    Nothing can beat Codefoces.Even Topcoder fails to beat us ;) Codeforces is the best. No doubt at all <3

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

      We're not trying to beat Codeforces, we just wanted to create a platform based on our personal needs.

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

        yeah, I know. Best of luck :)

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

        personal needs? For example? I just want to know, why people need so many online judge platform, as we notice that the number of OJ is increasing day by day?

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

it would be really cool if workspace opened with user's program template already typed in it.

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

Just registered. Look like will have fun :)

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

Even after logging in All i see are empty pages . I use chrome on windows 10

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

I use Internet Explorer 11 and have same problem as SarvagyaAgarwal

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

So, what is the difference of your platform and codeforces (or similar ones)?

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

    We're planning to concentrate more on the educational aspects. We have created some interactive lessons, but we haven't made them public yet as we had to prepare these two rounds. We'll get the lessons up and running next week.

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

Seem cool,hope to have fun together.

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

Looks Okey . And Interface is also good . Hope to have some nice problem and to have a Nice Contest to all the Registrant . I am hoping to have some new experience specially about the Dynamic Scoreboard .

All the Best & Keep it Up . It is a great Initiative .

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

Are the contests rated? JK, JK before all the downvotes come.

I really like the interface. I am a high school (ages 13-18) CS teacher, and am very interested in watching this project grow and see if it would integrate into our competitive programming course.

Good luck!

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

    We have a rating algorithm, but we are still tuning the constants behind it. This round will be a great opportunity for us to test the algorithm.

    So yes, this round will be rated retroactively.

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

      I wasn't really concerned about that. It just seems like everyone here wants them to be rated but honestly what does a rating mean? I don't care.

      What I really would like to see from this, and I don't know if this is what you are planning, but a way to look up a tutorial of a concept and a ton of problems that you could do on that topic. All ordered in a way that matches how it was explained and slowly require students to make small adjustments then when they are making pretty large adjustments or combining things.

      Atleast that is the site I would like to find for competitive programming.

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

Russian conditions problems? I'm google-translate-man.

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

    Unfortunately we don't have translate support yet (not even for our native language, Romanian). Hopefully in the next year or so we'll be able to add multi-language support. Russian is first on the list.

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

Just want to point out how cool it is that the CF site put this post on the front page, it really goes to show how they care more about the coding community that just say themselves. I feel that a lot of other places would not allow other sites/people to promote themselves, for instance I don't think topcoder would ever put post about another independent site on its front page. So it is very nice that we have CF as an nonprofit site that does not care about making money and all that, allows everything to be much more objective that way.

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

Seems interesting, I will give Iit a try :D

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

It's really cool of Codeforces to share other contests' websites. It shows how Codeforces is not commercially oriented but rather trying to be helpful and supportive to the competitive programming community.

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

I want to change my handle to ATofighi (It's was my old handle) in your site... How can I do it?

Thanks

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

Thank you Codeforces and MikeMirzayanov for all the help. Your support for the community is greatly appreciated.

Starting yesterday we've had a large number of new registered users. Actually, there have been so many new users that we decided to migrate to a new server. It might take a while for the DNS to update, so you might experience problems trying to access csacademy.com for the next half an hour.

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

It would be cool if you could also link the Codeforces handle to the Topcoder handle.

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

    We wanted to do that but in the meanwhile TopCoder decided to remove the private message functionality. If you have any idea how to check account ownership please let us know.

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

why all pages are blank ??

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

I registered and it only asked my email for registration. I confirmed the email and signed out. Where is the option to set a password?? I cannot sign in using that email again

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

Is it possible that out-of-contest submissions can be implemented?

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

    We'll add the problems in the archive when the contest ends. During the contest you can read the statements but you cannot submit unless you are registered.

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

Всё ровно CF лучше

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

No content in the contest page.

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

I was sign in with Google chrome, i also register Arhiva & round 2. but i cann't see any thing in Arhiva aslo in round 2 page...

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

We're really sorry for all the users who cannot access our content. It's a browser compatibility problem that we're not going to be able to solve in time for the contest.

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

In case anyone has the same problem as me: (for me) under linux it's not working under either firefox or google chrome but it's working under chromium.

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

What browser do I have to use to access the contest? I want to take part.

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

Nice problems, and the site worked perfectly, it didn't shut down, I expected it to as this was the first contest with such registers, i hope it will grow up more and more...

Waiting for Beta Round#3 ^_^

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

May I submit the problems after the contest? I haven't noticed such opportunity.

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

    You can find all the tasks in the archive.

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

      Thank you! Words of gratitude for the contest and your work! I really admire your site. Wish you an enormous inspiration for a fast improvement and developing!

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

How to solve Lightbulbs

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

    The editorial will be published in a few minutes.

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

    I don't know how to prove it, but I found the pattern by doing a DP and trying out a few test cases. Add to a vector all the bits that are turned on in the initial state (count bits from left to right starting with 1). Then for every bit 'b' in that vector, add 2b - 1 to the answer if position in the vector is even, or subtract it if it's odd.

    I'd like a proof though.

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

Interesting problems and amazing visualization tools, never seen such things before! Thank you for your work! I am wondering how to view other's code after the contest?

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

    Thank you very much! Unfortunately you can't see other's source code for now. Still working on it.

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

Thanks! Really nice contest. System worked really fast, never seen that before. UI is pretty cool too. Keep working guys! =)

Waiting for updates and third beta-round =)

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

I checked the scoreboard at the end of the round and i was fifth, the penalty for wrong submissions was 25 minutes.

Now i checked i am 7th with 10 minutes penalty for wrong submissions.

My handle on the scoreboard is Ahmed Ossama.

Was the penalty for wrong submissions changed after the contest or did i miss anything?

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

    Initially the penalty for a problem was log2(no_of_bad_submissions) * 25. We changed it after the contest to log2(no_of_bad_submissions) * 15. We decided that 25 was a bit too harsh. We hope these kind of changes don't bother you so much, as we are still trying to find the best constants.

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

wow :D Awesome experience :D

I enjoyed the contest very much :)

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

I only had like 10-15 minutes to be in the contest, but looking at your website, it sounds really cool, I'll be sure to participate in your future rounds.

Note: Safari on OSX does not work. ( it gives a blank page on everything except the homepage). Yet it works perfectly on chrome.

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

Since this was beta, I'd like to give some feedback:

  • First of all, thanks for the contest, it was really good!
  • I tried the online editor and I liked it, keep it up! The visualization was nice, although it seemed useful only for lightbulbs.
  • The last line of code is inaccessible to the mouse because it's under the editor buttons.
  • The stderr tab refreshes only after click in it, before that it shows data for previous run.
  • If test 1 passes and test 2 fails it's hard to debug. Writing to stdout causes test 1 fail (so test 2 is not ran) and stderr doesn't show for sample tests. I had to copy the testcase and run it as custom.
  • As someone mentioned, that would be nice to have code template already loaded but that's not a priority.
  • At compilation I get warnings for unused result of scanf. They are not useful and only make compile error list longer and harder to read. I recall there was a flag to g++ to remove these warnings, however I can't find it now.
  • »
    »
    8 лет назад, # ^ |
      Проголосовать: нравится +13 Проголосовать: не нравится

    Also I found that when you type in a question, you cannot delete what you have written i.e the backspace button does not work.

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

    This is such great feedback! Thank you!

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

      After thinking a bit I can also list a few things that would be nice to see (but definitely not a must):

      • Allow adding custom testcases (with expected answer) to the sample tests list. I mean, let them all be available by just one click.
      • Make some defense against missclick submit. The buttons are quite close. One idea is to run samples first and if they fail don't count this for penalty. This would also help those who use local editor and for some reason the outcome is different on their machine.
      • That would be nice if I could run my solution (at least the samples) from keyboard shortcut.

      And one more small issue I forgot: hovering over almost any area in statement/workspace results in a "task" label, which is a bit annoying, especially when it covers text.

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

        We do already run examples first and do not count the submission if your solution fails on those. Thank you again for your feedback! We will do our best to solve those bugs and implements the features you requested.

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

Circular Subarray

How to solve this problem ..??

My idea is to find the sums for 1 — N of K Contiguous element circularly . Then sort the results & find out the median elements as Target sum . Now Subtract other Sums from this Target Sum and Add this Absolute values as Answer .

But through this I found my first & last sample are correct .. Other two test does not give the right Answer . Here is My Sample C++ Code

I don't understand the Test 2 & 3 in the problem set . How they are 12 ( 2nd ) & 6 ( 3rd ) ??

Can someone please help me . It'd be a great favor .

Thanks in Advance .

UPD : I figured out the technique of Test Cases but can't solve it .

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

    My solution uses the idea that 2 consecutive ranges of K elements need to have equal sum, which means that Ai = Ai + k for all i. So we can divide the elements into components, with a DSU for example, and then the problem is reduced to making all elements in each component equal.

    I didn't exploit the fact that the best answer for each component is the median, like the editorial says, so since the function decreases and then increases, I ended up doing a ternary search for every component.

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

I can't enter the account settings page on Safari

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

I wish I could see the results of all tests...

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

Wow! Such positive feedback! And useful features too, like code editor, run examples,etc. Must register now! Two great OJs can co exist in harmony I suppose.

Registered. Great UI!! Keep it up! Kinda felt like you've taken the best of all worlds, but who cares! Its really damn user friendly. :D

Can I suggest something? In c++, please change the default template to

#include<bits/stdc++.h>
using namespace std;

int main()
{
   return 0;
}
»
8 лет назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

I love the "Simulate the problem here" section <3!!
Thanks a lot!

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

for Matrix Exploration is the intended solution O(nm)? I have a O(knm) but I can't understand why it gets TLE, when knm ≤ 500 * 106. What are the specifications of the machine that runs the final tests?

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

    as I know , with our computers(+ online judges) about 10^8 operations take 1 second to perform.so it is not surprising to get TLE.

    If you think more about how bfs works , you can change it a bit to reduce your solution to O(nm).

    ( sorry for my poor english )

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

      Thank you for your response.

      I modified my BFS so that we have k queues, one for every center, and visit the entire matrix by making one step for every queue at a time.

      My solution was accepted, however I am not sure about one thing. I have a global visited array declared like bool vis[500][1000][1000]. If a bool is 8 bits, then this array requires 500*1000*1000*8 bits, which is around 500 MB. Shouldn't that give problems with the memory or I am missing something? It says that maximum memory usage is 46 MB.

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

        No , you are right. C++ optimizer is very powerful and maybe it did some magics! (I asked from my friend).

        I appreciate your fast action.

        Actually you don't need k queues and such large array.

        as you know, BFS begins from start position and first see all places with distance 0(start) , then 1 , 2 , ... So here, you have more than one start position with distance 0 and you can have just one queue that contains all special places initially.

        also sharing all visits in one array can't cause any problem so vis[1000][1000] is enough.

        my code

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

I couldn't see tasks or contest dashboard even my account settings ! all pages are empty! i check this with 2computers and many times :(

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

Hey, great site but I don't like how a bunch of tasks are impossible or much harder in Python because Python runs a bit slower. Can you please check that all tasks are possible to 100% solve in Python? If not then maybe increase time for Python slightly? Thanks

Edit: Really unfair that I got downvoted so hard (-18) for this, I'm top ten on the site and I enjoy using the site, I just want to be able to use it in one of the 3 languages that they offer. Sigh

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

Во время контеста было написано, что будет разбор задач. Но я так и не смог найти разбор задач.

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

Nice judge, good work guys. Solved addition and gcd :D

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

Very nice platform with very interesting problems. I love the website because it is the only place where you can plot a graph or check your ideas on custom made animations. For further information you can try the last 3 problems from Beta round 2.