Hi!
A few hours later you're lucky to participate in Codeforces Round #147 for Div.2 participants, but traditionally the others can take part out of the competition. It has been prepared by me (NALP), Igor Kudryashov (Igor_Kudryashov), Pavlik Holkin (HolkinPV), Gerald Agapov (Gerald), Mary Belova (Delinur) and Mike Mirzayanov (MikeMirzayanov).
Traditionally I wish good luck, accepted solutions and successful hacking attempts for you!
The standart scoring system will be used: 500-1000-1500-2000-2500
UPD: The contest has ended, congratulations to the winners:
:-W
Gerald always gives a hand to prepare the problems in recent contests :D
sorry for posting here but,My contribution is -69,I do not know what to do :(
Just be yourself, dude. Don't get upset about any negative numbers :)
choose picture of a pretty girl for your account !
And why don't you do so?
cause i don't care .
Rejoice?
Oh, Poor man, No one can stop me click +1 。。
Have a good contest everyone! :)
What advantages does the stardand scoring system have over the dynamic one?
I prefer dynamic one :D
seems, there is huge change for me to be hacked today.... :P
I want to be in your room in this case.
yes..... after a long time.... none of my solution (A, C) hacked.... :D
Me too, so we can hack each other :) Let hack and find who is the better =]]
Thanks for the good contest
check out my output here http://ideone.com/aCIGH7
when i run it as a custom test here i get this output instead
if I change the 2d arrays to maps instead i get the desired output. Any idea why this happens?
array nums is very small. we can have up to 2500 numbers.
Wow , very fast judging :D
System test is really fast !!!
But rating update so slow!!!
Wow, what a fast judge!
Really enjoyed the contest. And it also helped me identify a bug in our ACM team's notebook. Many thanks to the author :D
i am from China i am sorry i can't use English well i only wrote A problem and C problem The B problem can make a right answer and check with read by computer i don‘t know how to do D AND E who can help me
Problem D was difficult to understand even for those who know English. Can someone explain Problem D with an example.
I think the question had it well explained. The reason for not putting a bit complicated example is that it would be too easy to guess the answer, rather than getting the information from the problem itself :)
Yes, the description was quite clear. The main thing here to understand is the the minimum weight will always be 2. Now just try to think of a way to connect the nodes.
Problem E is Standard Min Cost Max Flow problem.
Today is my unlucky day I save my solution for problem C in file B.cpp but I upload C.cpp to judge
i did the same mistake in a round last month..... :(
I always use the same file to code, after pass the pretest I clear the code and only use my macro.
I don't knw why I am getting "Idleness limit exceeded on test 8"....... for Problem B. Seems mysterious for me..... plz help...
http://www.codeforces.com/contest/237/submission/2434517
Maybe its because the declaration
co place[mo];
where mo is only 101. But it should be 100² + 1 because the number s can be at most 100²Oh thx..... now it is accepted...... I thought I would get RTE for these.... anyway good experience without any penalties...... thx again....
There is no reason to vote negative at this comment, he has the good answer. place[i] is used for store the position on the array of the cell who has number i on it. So, 1<=i<=s, 1<=s<=n*max(ci), 1<=n<=50 and 1<=ci<=50.
Edit: oups, too late: the comment has received new positives votes before I post my comment
You are right cup_of_tea....... this definately help me in future contest.... Thx god it was not rated for me... gdisastery really deserves positive feedback... But I cannot vote twice... maybe I have to try from different ID..... :D
Omg, really fast judge!
I am facing a strange problem in the practice session . My solution for problem C is returning -1 for the first test case when i submit my .cpp file but it returns the correct value ( 3 ) when running in my pc.
Try Custom Test :-)
Did you set all the variables to zero?
I'm looking to be on top10 contributors, could you help me ? =/
Post funny comments with memes (or not) will not suffice for become top contributor. If you really want to progress, you should make interesting posts on your blog, or give interesting answers.
Anyway, Good Luck!
I'm kidding man.
No one could find it out, even when looking at kiddy-kiddy Po on your ava:)
Is it rated?
Why not? There was no mistakes on statements/examples, the server was stable, the contest has not an odd name, so I will be very surprised if it isn't rated...
i think yes
All contests are rated!
I think it's not rated yet!!
Be patient
Testing is fast — very good.
Rating update is slow — not very good.
Just joking
Sucks that I kept getting WA on C because I put == as opposed to >=. On the bright side, you can do C in linear time as opposed to using a binary search.
Really? Remember that the sieve of Eratosthenes is O(n log log n) ;)
In fact sieve of Eratosthenes can be done in O(n) Linear_sieve
Yeah I wasn't taking into account the sieve at the beginning.
I saw a lot of binary searches and I thought maybe my algorithm wrong. Good thing that wasn't the case.
Judging was too fast but rating dont provide yet...I thing something is going WA...:D
it's so slow...
yap...But i just get d rating...:)
Here is a screencast of me solving this round: youtube To watch comfortably (and see clear text), choose 1080p and watch full-screen on a 1920x1080 resolution or higher. I will also provide a file in 1680x1050 for download later if you prefer.
Good, very useful video! thanks
Can you upload your "Hightail" program? It may be useful
It's not yet ready to be called even pre-alpha or something (most of the buttons just outright don't work), but if you're interested: github IF you want to help with development, that would be very very welcome. There is a ready list of tasks (issues) on the github page.
And the file download is ready.
Dude, just keep doing it! I think it would be great to have some alternative on Egor Youtube channel.
Here are the cheaters! wangyedong CHFB_oXbT 389804652 jionghehe Their E Codes are the same!
Registered: 22 minutes ago And you're registered just to say that they're cheaters ?
They pretend to be Japanese, But their function names are in Chinese :(.
waiting for editorial! thanks already
in problem E. Build String , we should write min cost flow algorithm , but what will be in the role of nodes ? From which node to which are we finding flow ?
As I see it, you need n+26+2 nodes: a node for each given string, a node for each distinct letter in t and source and sink. The edges will be:
a) source -> string i, with capacity ai and cost i (no more than ai characters can be erased from the i-th string and each operation costs i).
b) string i -> letter c, with capacity [the number of times c occurs in the i-th string] and cost 0 (to erase at most as many letters as there are in the i-th string).
c) letter c -> sink, with capacity [the number of times c occurs in t] and cost 0 (we shouldn't erase more c-s than there are in t overall).
thanks , i found out now . Firstly i thought flow was going from each string to the main source. :)
Problem E is Standard Min Cost Max Flow problem. China's NOIP don't test it, I think i need not do it now; i also want to know what the problem 4 mear
We are waiting for the editorial.
In the problem C I am using binary search to find the minimum value of l.prime[i] stores the number of prime numbers upto i.I am using the following code to return true or false.
bool check(int l) { for(int x=a;x<=b-l+1;x++) { if(prime[x+l-1]-prime[x-1]>=k) return true; }
return false; } and I am getting the wrong answer. Please tell what is wrong in my approach.
It should be this :
bool check(int l) { for(int x=a;x<=b-l+1;x++) { if(prime[x+l-1]-prime[x-1]<k) return false; } return true; }
@problem setter : Editorial ??
Hi NALP,is there any editorial for this round?
UPD:Could anyone tell me how to solve prob D T-decomposition?
can anbody plzz tell me wats wrong with the following code..its giving wrong ans on pretext 10
include
using namespace std;
define MAX 11111
int a[MAX][2]; int main() { int t; cin>>t; for(int i=0;i<t;i++) cin>>a[i][0]>>a[i][1]; int cash=1; int maxcash=1; for(int i=0;i<(t-1);i++) { if(a[i+1][0]==a[i][0]) { if(a[i+1][1]==a[i][1]) cash++; else { if(maxcash<cash) maxcash=cash; cash=1; } } else { if(maxcash<cash) maxcash=cash; cash=1; } } if(maxcash<cash) maxcash=cash; cout<<maxcash<<endl; return 0; }
plz reply
You are not getting Wrong Answer but Run Time Error. Increase the size of your array : change
#define MAX 11111
to#define MAX 111111
.will we have an editorial for this round?I am not able to solve the young table problem,could someone give a hint?
My approach:sorting
for any young table,like
a1 a2 a3 a4 a5 a6
a7 a8 a9 a10
a11 a12 a13 a14
a15 a16
the following satisified: a(i)>a(i+1)