Hello everybody.
On the 8th and on the 9th of December there will be local two-stage school competition in Saratov. We decided that it will be interesting to allow everybody to solve problems from it. So I am glad to announce that this weekend there will be two Div2 rounds.
The first round — Codeforces Round #154 (Div. 2) — will start at 14:00 MSK on the 8th of December.
The second round — Codeforces Round #155 (Div. 2) — will start at 14:00 MSK on the 9th of December.
Rounds will be held under usual CF rules, with one condition:
Problems will require file I/O: you have to read data from input.txt and write data to output.txt.
Score distribution will be announced just before the beginning of each round.
Participants from Div1 can take part in rounds out of competition.
UPD Here are links to solutions with file I/O in some languages:
- C++: 2366378
- Pascal: 2454867
- Java: 2366738
- Python: 2387503
- D: 2436251
- Scala: 2385341
- Haskell: 2378010
- C: 2519130
- Ruby: 2375494
- PHP: 2381582
- C# 2716641
UPD2 Score distribution in round 155 will be standard: 500-1000-1500-2000-2500.
UPD3 Tutorial is available for round 154.
UPD4 Unfortunately, in the first half of the contest, it was found that the task C checker does not check the lexicographically minimality of the answer. We offer our apologies for this error. So we adjusted checker. We conducted an investigation and found that the change has affected 53 members from the second division. We believe that a completely fair to make this competition for such participants unrated. This inaccuracy had absolutely no effect to all other.
UPD5 Tutorial is available for round 155.
a typical comment:
wish you all luck !!
Two contests on two days :D. I and a part of CF Users will have two sleepless nights :D
Haha, but I have enjoyed those two contests in the daytime, cool enough!
I am happy to hear it. Thanks for your kindness!
Why At This Time ? That's Too Bad
Any time you choose for contest will be good for some people and bad for other. And there is no way to do something with that.
Will these rounds be rated?
yeah it will be rated
div1?
read the post completely and then ask your questions :)
Participants from Div1 can take part in rounds out of competition.
For the others div2-contests, participants from div1 can take part too, but as non official (non rated). The question is still valid. I would be interested by an official answer.
Oups, sorry, double fail. Didn't seen the end of the sentence ><
at this time i have math :(
Time of the contest is too bad! Couldn't it be taken place at usual CF rounds' time(19:30)?
It is a school contest so the online contest has to be at the exactly same time.By the way,I think it isn't a bad time,at least for Eastern Asian constants,who have to stay up midnight for contests at usual time.
I come from IRI; is IRI in eastern asia?
I can't agree with you more
By the way, I'm the only who likes the time of these contests? :)
No, I like it too =)
and exactly after finishing Codeforces Round 154 we should switch to UVA for ACM ICPC:: Dhaka Regional Semilive! what a busy days, full of contests and programming! but i like being exhausted by contest-based days !
And don't forget Topcoder SRM 563 ;)
http://community.topcoder.com/tc?module=MatchDetails&rd=15185
It starts 10 minutes after the ACM ICPC:: Dhaka Regional Semilive contest. So 2 + 5 + 1.5 hours full of fun!
It seems some new experiences are waiting for us ;)
Wouldn't be a good idea to put sample A+B problem at least for C++ an Java languages, for those who are not familiar with I/O from files?
On C++ just add this code
and after that you can use you favorite read/write methods (cin/scanf, cout/printf)
I think you made mistake "stdout" in second line
yeap, you are right
#include <fstream>
#include <iostream>
using namespace std;
int main()
{
ifstream in("input.txt");
ofstream out("output.txt");
int A,B;
in>>A>>B;
out<<A+B<<endl;
return 0;
}
Russians should practice English a more lot. 30% WAs are due to their problem statements in English. They should check the statements by a native English man.
We will be very happy to have such an opportunity. But I also think that some green coders from Bangladesh should practice solving programming tasks a lot more. The rest 70% WAs are due to their poor skills.
Well this was offensive from both of you. It is not good to have such situations on programming competition site.
I join this site because hear about this contest... :)
and the example code of I/O is very helpful, thanks...
In c++ freopen's are allowed but everytime i was sending a code in java with
System.setIn(new FileInputStream("input.txt")); System.setOut(new PrintStream("output.txt"));
runtime error was coming everytime! Why is that not allowed in Java?
Contest is over, help me, please, with problem C. Did anybody wrote something besides BFS?
Yes
The idea is: Go from r1 to some intermediate row i and then go from that intermediate row i to r2 (using ups or downs), after that get to the right column(using lefts or rights).
Enormous speed of system testing makes me happy :D
Also very good problems
Yeah, really good problems. But much more difficult than the same school olympiad in Novosibirsk :)
I got Runtime error in system test, but I can get the right answer in custom test.... why can this thing happened?
While。。。 It's my fault, I haven't seen that the data was read from input.txt....:-(
I sent the first problem, got TLE (because I used no file) and lost rating. I was thinking failing in test case 1 didn't count as a submission, so I abandoned the contest. :\
EDIT: I would like to ask someone why this happened, since from contest rules:
"If the result of the judging is Compilation Error, Denial of judgement (or similar) or if the solution didn't pass the first pretest, then this solution won't be considered in calculating results."
Did I get it wrong?
You do not get -50 for such submission, but it still counts as participation.
Only integer and int64, and I have failed problem D :(
Weirdly, there's no %lld warning on this problem.
2724941 :D somebody solved D using 2000ms
Looking at the constraints, i thought BFS would TLE for Problem C but i got AC'ed in practice ( 234ms ) :(
I am getting TLE in div2 C with bfs. Can anybody tell why? Here's the link to my solution — http://www.codeforces.com/contest/253/submission/2728384
HashSet? ArrayDeque? Point? Objects, objects everywhere! Of course, it's TLE!
k, seems OOPS is not the way 2 go!
I think your skill isn't good because i got AC in 468 ms
2724998
ok! we've all understood that your programming is very good!
finally AC, had forgotten to override hashcode()!!
Why File I/O style was used in this match? I think that the unusual format only mislead people. Please tell me the reason.
I think, all school olympiads testing systems use file I/O, but, I afraid, the reason of this is unknown
Is it possible to get some more specific details about Compilation Error? My code compiles well locally, but when I try it here it gives Compilation Error without any good explanation of what could've mistaken.
Me too. I tried to submit "Boys and Girls" (#154 Div.2 A) just now. I got 2 "Runtime exceeded" on Test #1 and 1 "Compilation Error". But I put those 3 codes onto the "custom test" provided and input the test case #1 (3 3). It is ok. Can anyone tell me what mistakes I have made?
oh. I have understood already. Because I haven't read the instructions of this contest. Sorry.
Please somebody tell m why i am getting time limit exceeded in the following code,while i could run the exact same code on code::blocks, http://codeforces.me/contest/253/submission/2723001
"Problems will require file I/O: you have to read data from input.txt and write data to output.txt"
My bad..they have mentioned it in the contest post...:(
The score distribution for the round #155 will be the same with #154 ?
Until is not specified differently we suppose is the same.
You did't notice UPD2.
System testing isn't going to show us surprising speed today :)
I'm wondering why the system testing hasn't begun yet? thx~
^-^
^-^
Can anyone tell me how to solve 155 problem C? I stuck in that problem..
Although I did not participated in the contest, But for me solution seems like this.
First you can decide that minimum no of changes part easily. So if you fix min no of changes. Let call it z.
Then for the lexicographic part , Go from sorted order of characters in t , and try doing the change in corresponding character in s , If you can do the change , Then do it. Continue this until you have done z changes.
Although things explained are very high level , But you should try to go into more depth yourself.
Just saw my ranking go down from 304 -> 252 even before systests has started.
What happened?
look UPD4
Thanks man
There is a typo in UPD5.
Nice editorial, I had the idea of E but didn't implement it, I went to hack 4 people instead.
UPD4 Does it mean that this competition should be unrated for me? Bad luck... I solved four problems.
Once again — you didn't solve problem C. Actually you had wrong answer on pretest 9, but system told you invalid response that the solution passed it. It affected only 53 participants (including you).
Oh...Sorry...Next time I will check my solutions more carefully...Thank you...
Challenge Master
Why I'm out of competition?
" UPD5 Tutorial is available for round 154. " Shouldn't it be round 155? Or i make a mistake?
Why I am out of contest? I register the contest before and solved 3 problem during the contest.
Look at UPD4
I'd still have managed a rating increase inspite of the Problem C issue. Bad luck! :D
My rating went up and then dropped back to the previous value, however my color has not changed? What happened?
Ok it seems it is back to normal now, thank you! sorry about that.
Can somebody help me, please?
I am div 1, and i send sources for problems A and C at round 155. For both of em i get WA1.
Now i send the solutions again, and i can't see my answer .. This is my sol for A .. http://codeforces.me/contest/254/submission/2742588
you have to use files instead of standart input\output
You are using iostream You need to read from a file (input.txt) and output to a text file (output.txt) I suggest you use fstream, comment iostream and just add the following lines: ifstream cin("input.txt"); ofstream cout("output.txt");
Ohh .. i just saw the input and the output :(
Sorry .. I thought that was just like in the older CF-s .. with stdin.
I think 28th line isn't funny.
I checked if it writes sth .. :( Sorry ..
the test# 4 in problem E my output is : 17 3 1 3 4 0 5 1 6 8 5 1 6 8 2 7 4 1 6 7 5
i calculate it by hand is correct , but the check log said "wrong answer impossible to feed friend 5 at day number 3."
Why a submission is judged TLE in a test case that passed in the Pretests?
See: 2735059 Passed pretest 9 --> TLE in test 9
Are the same input data?
The exact TLE output depends on the load on the server as well as your code. You should be safe if you actually go for the intended complexity bound of the solution. In this case it is O(n) and yours I presume is O(nlogn). Here luck plays some role.
in round 155 (Div 2) for the problem B why is the greedy algorithm wrong ??
How did you use the greedy algorithm? It's just the maximum number of jurors that have to work at one time.
I got WA in the problem D on the test 57 but I don't know why, and the test data is too huge.. Here is my code 2745258 . :D
Thanks.
Oh..I find my mistake in the "bfs2"... I'm curious about that the code can pass 56 test datas :P
hey why was the server down again???????!I don't wanna waste my time seeing the home page again & again.
I have solved the Physics question and I'm getting the right answer even when I run it under the "Custom Test" tab.. However, I'm getting a run time error or wrong answer error when I submit the solution. What is wrong?
http://codeforces.me/contest/253/submission/2822370
Note the trap: input.txt, output.txt.