|
0
I saw a similar problem at the IFMO’s Internet Olympiad (russian statements, problem G). Unfortunately, jury’s solution and tests are incorrect. |
|
+48
Awesome and interesting problems, thank you very much! |
|
+5
If so, it looks strange, because such problems usually doesn’t require any skills except very basic school physics. |
|
+14
Could you tell about these tests? What is it like? Contests, yes/no tests or something else? |
|
+7
What is Physics problem? IOI’s olympiad in informatics, isn’t it? |
|
0
Look: you have an array: This idea can help you solving this problem: you run down left border of a substring and then you can calc amount of required substrings in O(1) for each left border. |
|
+1
Try this idea: calculate sums in all prefixes (from empty to the whole sequence) and then sum of elements in a some substring is difference of two numbers. Hope this helps. If not, I can give you detailed solution. |
|
+11
Just good brute-force. |
|
+5
This opportunity was a present from admins in the first days of new year. |
|
+2
May be no, because not so many people have solved E in Div2. |
|
+3
Probably it won’t be. |
|
+7
There are problems with Div1C/Div2E — jury’s solution is incorrect. This problem is under investigation and round can be unrated. |
|
+7
But sometimes they are so sloooooow. |
|
-1
Knapsack problem is NP and it’s not solvable using greedy algorithms. May be there are some special restrictions? |
|
+17
Approximate meaning: 1)I enter Codeforces 2)Here I need to get in Top-300 2)Here I need to get in Top-50 4)When will be the round which I can fail? |
|
+3
No. You not only edges corresponding to works, but also you need edges from t to t + 1. |
|
+39
MinCostFlow. Vertex is a time, and work is a edge with capacity=1 and cost=-C. We need to find minimal cost flow not greater than K. V~1000, E~1000 and you even don’t need Dijkstra’s algorithm with potentials. |
|
+7
There is one unofficial participant above Petr |
|
+5
|
|
+9
It’s a training, not even a contest (created with Codeforces::Gyms). And yes, it’ll be unrated. |
|
0
Floyd’s algorithms gets TLE with TL=1s and V=500. |
|
+1
No, because you didn’t qualify to Round 1. |
|
+48
I think that Wild-card Round 2 will be some kind of marathon with challenging problem. |
|
+8
It’s usable anywhere with Microsoft Visual C++ — on your local machine and so on. |
|
+34
I see. Mike added that penalty is usual — 50 points per resubmission/wrong solution and you cannot be awarded less than 30% of points for correctly solved problem. So, for a solved 1000-points problem you’ll always get at least 300 points no matter of penalties. |
|
+2
As MikeMirzayanov answered above, there is penalty for resubmissions and errors on pretests, except failure on first test (even if there are more than one example test) — it’s ignored, as usual. |
|
+3
Not for qualifications. But problems are usually opened to everyone and you can submit solutions after contest’s end. |
|
+11
It’s UTC time. You can click on it to see what time will it be in your timezone. |
|
+13
Nohow. Stack size is a user limit under GNU/Linux and doesn’t depend on compiler. You can use |
|
+15
The only thing to add is that it’s MS Visual C++-specific and won’t work with GCC. In GCC you should specify |
|
+2
What’s source of the problem? It looks like test question. |
|
+9
For example: if your age is 23 years and 8 months (by the moment of registration), you can compete. If your age is at least 24 years, you cannot. |
|
0
“Note that numeric variables are read into strings and then converted into numbers — this is explained by the compiler specifics which reads numbers in different ways depending on whether they are read from cosole or from file redirected to the program input stream.” |
|
0
Sorry, I’ve mixed it with Kyiv. These DST laws’ changes confuse me. |
|
0
“in 7 hours” means “after 7 hours”. It’s |
|
0
If you use GCC, you can add |
|
+7
|
|
+1
Yes, it does. |
|
+13
Because |
|
0
You can run |
|
0
What’s your problem? You don’t want to click twice, or I misunderstand you? |
|
+8
In fact, when you work with floats/doubles (in spite of compiler), you should remember that any number (including integers) can be stored like X+-EPS. So, pow(3, 3) can be 26.9999999999999. If you cast it to int, it becomes 26, not 27. It’s better to use something like (int)(pow(3, 3) + 1e-9) here. There is a very good article on TopCoder about floating point arithmetics. You can try MSVC++ compiler instead of GCC. GCC’s optimizer can give very strange results with floating point numbers, and they think that it’s well-known not bug |
|
+1
Give a link to your submission (click on the '#' near it). Codeforces uses AJAX and dynamic pages, so the link you gave just takes me to the 'Status' page.
|
|
+3
It will be unrated.
|
|
On Manish-Kumar →
Can it be solved by dp,( topcoder editorial only suggested brute force)., 4 months ago
+8
You have incorrect formula for probability of element's selection.
Correct one is , if we select m elements of n, because each element can be selected equiprobably. |
|
On Manish-Kumar →
Can it be solved by dp,( topcoder editorial only suggested brute force)., 4 months ago
0
I have the following idea: d[n][m1][m2][k] is answer for the problem "what is probability, if n numbers remained, we need to select m1 of them, lotteryholder should select m2 of them and we win if at least k numbers will be selected".
For the first number we have four states, and each of them have fixed probability. So, we have four transitions to different states and solution in O(nm2k) |
|
+22
Never do any searches (binary/ternary/etc) using r-l>EPS. This can result in infinite loop. You can read more about floating point numbers here. P.S. f() can be not convex. Ternary search finds local minimum and maximum. So, it works on any function, that is monotonic both beyond and after some point. For example, it works on such function:
|
|
+3
You can extend your 'point' struct and precalculate angles for points before sorting them. Now you have
calls of atan2, and after precalculation you'll have only O(n2). |
|
+8
You can use macros. For example:
#define debug_var(x) debug(#x ": ", x) So debug_var(2+2); will be compiled to debug("2+2" ": ", 2+2); |
|
+16
Thank you very much.
This solution has the same idea that mine (split into small groups and avoid big arithmetic). Marvelous. I thought that it's impossible to improve in ints/long longs. |
|
0
Wow, cool.
Can you tell about it? |
|
0
Ratings have been updated already.
|
|
0
Excluded: Real and complex numbers, general conics (parabolas, |
|
+3
As I know, different flow problems are excluded by syllabus. Even bipartite graphs are excluded.
By the other hand, big numbers arithmetic is excluded too, but one problem from IOI2011 cannot be solved without it. |
|
+6
My opinion is that QWERTY is much more popular than Dvorak, and it will be very hard to get a keyboard with Dvorak's layout if you need a one on a onsite competition.
|
|
+1
Integer can be negative.
|
|
+1
Read the problem's statement once more. It'll help
|
|
+12
I can see an algorithmic bug in your code.
You can double-click on your submission ID and it will show you test, expected answer and your program's output. If you still sure that something is going wrong, you'd better to give a link to submission. Like this: [[ submission : 123456 ]], or just click '#' near your submission |
|
+3
You'd better to read competition rules. It means that someone found test on which your solution works wrong. You cannot see this test, but it is added to your pretests.
|
|
+8
Labels on the first picture are:
Neurologist ... Neurologist Korotkevich Gennady Vasilyevich Traumatologist ... |
|
+3
In which form do you have this number? Is there any limitations on modulo?
|
|
+3
|
|
+3
I think you'd better ask MikeMirzayanov. Looks like your acc has broken one of Codeforces' rules, but I can't see any such thing.
|
|
+34
Russian. This word doesn't mean anything, it's interjection.
There is a very popular Soviet cartoon named "Tryam! Hello!" :) |
|
0
I haven't heard anything about such plugin.
You're welcome to implement and share it :) |
|
+7
Unfortunatelly, no.
May be your blog is a such place, but if care about your "contribution" you'd better to ask Google first :) What IDE/OS do you use? |
|
+4
|
|
0
May be you should try to enter date in the DD.MM.YYYY format?
|
|
+3
I think that this buggy GCC optimizer is guilty. If you change your for with iterators to
for (int i = 0; i < a[u].size(); i++) it'll work. |
|
+3
Never mind. |
|
0
Can you tell us a little bit more about it?
|
|
+23
I think it's because not oblivious tradition on Codeforces of personlal blog usage.
Here it's more like a forum, where you can ask (of cause, you need to try to find answer yourself first) and get some answers, and not like a personal blog where you can post everything you want. To do that, just save your post in drafts. I see you have post with rating -6. Well, it's quite enough. May be you have comments with negative rating too. Just try don't worry and ignore it - it's rather strange system yet. |
|
+9
Also you can do something like this:
|
|
+4
Sure, thank you
|
|
+5
|
|
-3
Double post |
|
0
What browser/OS do you use? I think this information can help admins
|
|
0
'Friends' on Codeforces is like your own private bookmarks - you can add anyone to this list without asking permission.
|
|
+5
There is O(m*log(m)) algorithm.
The main idea is:
|
|
+3
Yes, it can give different results. There're several problems here:
|
|
+8
Intrigue...
We'll know results after the award ceremony. |
|
+5
I think you have a pretty big chances next year :)
|
|
+1
You always need to use eps. All floating point numbers are saved with some error. In computer 0.333333333333333333 can be equal to 1.0 / 3.0. It's not really good idea to hope that this error is less than type's precision and we don't need eps.
|
|
+5
Do you have -O2 enabled? If yes, it's very common effect. Optimizer is guilty. This cout 'foribs' optimization of some code. It can change execution result, if you have arrays overflow or something like this. Try to compile the first one without optimization and compare results. |
|
-4
Not end of string but end of line.
End of string char is '\0' and it's automatically appended to end of all strings in your program. |
|
0
Yes, thank you.
|
|
+5
2 Select 7,8,10,11 and 6,9. |
|
Russian team:
Egor Suvorov CF: yeputons TC: yeputons Aleksandr Timin CF: timinaleksandr TC: AlTimin Pavel Kunyavskiy CF: kuniavski TC: kuniavski Dmitry Egorov CF: Dmitry_Egorov TC: Dmitry_Egorov |
|
For me - no, because it's about one year old only :)
|
|
0
Yes, because in this case 'port' is a port of your proxy server, not TopCoder's.
If your proxy supports SOCKS (or smth), Arena will connect to port 5001. If you select 'HTTP Tunnel A/B", it'll use HTTP protocol (like any browser does) and 80-th port. |
|
+69
Admins have a lot of fun already
|
|
0
You can run this code inside JVM:
// Get current size of heap in bytes long heapSize = Runtime.getRuntime().totalMemory(); // Get maximum size of heap in bytes. The heap cannot grow beyond this size. // Any attempt will result in an OutOfMemoryException. long heapMaxSize = Runtime.getRuntime().maxMemory(); // Get amount of free memory within the heap in bytes. This size will increase // after garbage collection and decrease as new objects are created. long heapFreeSize = Runtime.getRuntime().freeMemory(); |
|
+5
1)Nohow. It's impossible. All information you have is that your solution have been hacked and this test does not contain in pretests. 2)You need to lock any of solved problems first. To do this click on the lock near problem's name. After that you are unable to resend your solution even if it is hacked. But you can view others' solutions and try to hack its. To do this simply double-click on someone's score in the score table. |
|
+2
How to solve the D problem?
|
|
+21
|
|
0
Read the license. It's available through the 'FAQ' link in the main menu.
|
|
+10
Well, last contest problems C-E for Div.2 was A-C for Div.1
May be you are right, I think that problems are quiet harder that usual. |




, if we select 
calls of atan2, and after precalculation you'll have only