### nevidomy's blog

By nevidomy, 11 years ago, translation,
Good evening!

Congratulation to all on the day of student, calm sessions, easy exams and a lot of new knowledge! I also want to congratulate those girls (women) whose name is Tatiana on their Angel Day.

I am glad to invite you to participate in Codeforces Beta Round 53. Today's round was prepared Michael Mirzayanov, Nevidomy Vitaliy, Artem Rakhov and Maria Belov, problems author is nevidomy.

Contest is over.
Congratulations to the winner: tourist. After the round he becomes first "General" of Codeforces!!! Link to results: http://codeforces.com/contest/57/standings

Nevidomy Vitaliy and Codeforces team.
Announcement of Codeforces Beta Round #53

• +84

 11 years ago, # |   0 Thanks for the early English post!
 11 years ago, # |   0 I'm trying to hack, but when I click on an run ID, no window pops up... is there some other way to see others' code?
•  11 years ago, # ^ |   0 I even tried going manually to the URL http://codeforces.com/contest/57/challenge/, and no code shows up or anything. I've definitely locked the problems I'm trying to hack...
•  11 years ago, # ^ |   0 are victims of your hack from your room?
•  11 years ago, # ^ |   +1 Ha, not at all. This is my first time with the beta rules. I forgot we were divided into rooms. Thanks!
 11 years ago, # |   0 Is there a way to go out of the competion? I tried to solve one problem, but then my ant came and now I only have 20 minutes left, I think my rating will fall down like an exponential function :(.
•  11 years ago, # ^ |   +3 (only)if you tried to submit any problem your results will be rated.
•  11 years ago, # ^ |   +6 You have a pet ant ? :p
•  11 years ago, # ^ |   0 My thoughts exactly. I would understand the distraction if it was a mosquito, or maybe a wasp... but I think you could distract an ant with a few bits of sugar and deal with it later.
•  11 years ago, # ^ |   0 I was just kidding ;) ... he must have meant 'aunt'
•  11 years ago, # ^ |   +6 may be you meant "aunt" ? :P
•  11 years ago, # ^ |   0 It is interesting what huge diffenrence a small typing mistake can make. :)
 11 years ago, # |   +30 Really nice problemset:) Thank you. It is great to see here other fans of Family guy:P
 11 years ago, # | ← Rev. 2 →   0 It seems the test case 7 in problem D is not valid:  (By mistake, the "..." in the last means ellipsis,but the same as "." in data)Test: #7, time: 10 ms., memory: 48516 KB, exit code: 0, checker exit code: 1, verdict: WRONG_ANSWERInput47 24 ........................ ........................ ........................ ........................ ........................ ........................ X....................... ........................ ....X................... ..........X......Output23.6657545509435892 Answer23.670250896057 Checker Logwrong answer 1st numbers differ - expected: '23.6702509', found: '23.6657546', error = '0.0001900'
•  11 years ago, # ^ |   +1 try this test:AXAAAAAAXAreplace"A" with dotsmy answer is 2.62500000
•  11 years ago, # ^ |   0 Ok, I find my wrong.Thanks.
 11 years ago, # |   +3 It is the first time that my score is not changed after a contest.....冏
 11 years ago, # |   0 Is there a way to see what hacked my code? MY problem C was hacked, but the same code passed the system test after the competition.
•  11 years ago, # ^ |   0 The admin didn't add the hack data to the system test?
•  11 years ago, # ^ |   +3 Now I know the hack data.But my bad code passes the system test.
•  11 years ago, # ^ |   0 But how to get the hack data?
•  11 years ago, # ^ |   0 Sorry. I didn't get the hack data which was actually used to hack my code.I found only what kind of test case hacked my code by viewing my code with cmd's advice.I don't know how to get the hack data.
•  11 years ago, # ^ |   +3 try 59052
•  11 years ago, # ^ |   0 i hacked one guy with that test too :)
•  11 years ago, # ^ | ← Rev. 2 →   0 (someValue - n) % m < 0 in this testmore tests:590528031696493I bruteforce my solution over all n for this bug and hack few people on this
•  11 years ago, # ^ |   0 negative numbers.ans = (2*ans - n)%modin my case, victim wroteif (ans<0) ans+=n; instead of ans+=mod;
•  11 years ago, # ^ |   0 Thank you.My code returns -27166.
•  11 years ago, # ^ | ← Rev. 3 →   0 I got 3 hacks with this case. One of them was lucky and hadn't close his submissions yet and could correct it.
•  11 years ago, # ^ |   +5 It is impossible to consider all probable bugs. We are working on automatic adding of all the hacks in the final tests. It will be introduced soon.
•  11 years ago, # ^ |   +3 That's good news!
•  11 years ago, # ^ |   +5 I know that CodeForces has already hosted many contests in this format butI would like to give a suggestion to change a little bit the hacking system.I think it's pretty unfair that someone gets the lucky of having his solution hacked and get a chance to resubmit while others don't. Taking it to the extrem it can even be seen as working in teams.But, I also thing that it's nice this hacking phase during the programming phase and also the locking feature is important to allow resubmissions if someone noticed a mistake in his own solution before seeing others.So, my suggestion is to don't tell the contestant that his solution has been hacked until he locks it.  He can still resubmit but he needs to recheck the code and find his mistake without other people helping him.
•  11 years ago, # ^ |   +3 I give you my opinion.Today's hack system looks for me as in real life: if someone noticed bug, he will say about it to the author. Or he will wait till the bughaver released his software with this bug, and only after that he says "I saw a bug in your program but didn't tell :p!"? Looks strange if this is a situation in one company, community, like CodeForces are. :-) Yes, you're right, it's a teamwork. :-)
 11 years ago, # |   +3 Very nice problem D...Kudos to the author.
 11 years ago, # | ← Rev. 3 →   0 Can someone explain me how can i solve the C problem because i have no ideea better than O(N^2)? ThxEdit: look here for solution: http://www.codeforces.com/blog/entry/1169
•  11 years ago, # ^ | ← Rev. 2 →   +6 Honestly, during the contest I quickly brute-forced and checked OEIS http://oeis.org/A045992
•  11 years ago, # ^ |   0 How did you know what to search on OEIS for this problem?
•  11 years ago, # ^ |   0 I bruteforced till n=5 and got "1,4,17,66,247". There is only one result from OEIS for this sequence :)
 11 years ago, # |   0 I want to ask...why is c++ compiler giving garbage value....when I use memset()...or malloc() ??
•  11 years ago, # ^ |   0 It was working correctly in my system!!
•  11 years ago, # ^ | ← Rev. 2 →   0 memset is fill bites, not sell of bites. int a[10]; memset(a,1,sizeof(a)); give a[0]=...=a[9] = 00000001 00000001 00000001 00000001 = 16843009
•  11 years ago, # ^ |   0 I initialised with 0see#include #include #include using namespace std;int main(){    long long int n=0,m=0,k=0,soln=0;    long long int *v;        cin >> n >> m >> k;    v = (long long int*)malloc(sizeof(long long int)*n);    memset(v,0,sizeof(v));    for(int i =0 ; i < m;i++){        long long int a=0,b=0,c=0;        cin >> a >> b >> c;                v[a-1]+=c;        long long int f=0;        for(int j=a;j> t;        soln = soln+v[t-1];    }    cout << soln << endl;}whereas...similar code...this one....#include #include #include #include using namespace std;int main(){    long long int n=0,m=0,k=0,soln=0;    cin >> n >> m >> k;    vector v;    for(int i=0;i> a >> b >> c;                v[a-1]+=c;        long long int f=0;        for(int j=a;j> t;        soln = soln+v[t-1];    }    cout << soln << endl;}...this got accepted....I concluded that memset was giving garbage..I dont knw why..!!....
•  11 years ago, # ^ |   0 long long int *v; sizeof(v) is equal to size of pointer to long long intyou need write memset(v,0,sizeof(v[0]) * n); instead ofmemset(v,0,sizeof(v));
•  11 years ago, # ^ |   0 263897 ---- I used vector to initialise...with 0263744----I used memset to initialise with 0....
 11 years ago, # |   +18 The problem statement for B is maybe a little bit hard to understand. It took several minutes for me to completely catch what the problem asked. I think it should've been worded better.
•  11 years ago, # ^ |   +1 Problem B statement not just little bit hard,it was too hard to understand.
•  11 years ago, # ^ |   0 Right. The English version was really troublesome and confusing. I don't know about the russian version but if it was not that the problem was make difficult to understand, then the problem-setters should be more careful.
•  11 years ago, # ^ |   0 The Russian version seemed hard to understand to me as well. I probably spent more time reading the statement rather than coding the solution.
•  11 years ago, # ^ | ← Rev. 2 →   0 Don't worry, the russian version was complicated too =) I read it three times before understood something...