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

Автор NBAH, история, 9 лет назад, По-русски

Всем привет!

26 ноября в 19:05 MSK состоится рейтинговый раунд Codeforces #448 для участников из второго дивизиона. Традиционно, участники из первого дивизиона приглашаются поучаствовать в соревновании вне конкурса.

Автором всех 5 задач являюсь я. Это мой второй раунд на Codeforces! Советую участникам ознакомиться с условиями всех задач. Надеюсь каждый найдет себе задачу по вкусу.

Хочется выразить благодарность координатору раунда vintage_Vlad_Makeev за помощь в подготовке контеста и igdor99 за помощь в разработке задач, а также MikeMirzayanov за замечательные платформы Codeforces и Polygon. Ну и, конечно, Tommyr7, Arpa, 300iq за прорешивание раунда.

Разбалловка: 500-1000-1750-2000-2250

Удачи и высокого рейтинга всем!

UPD: Соревнование завершено! Скоро будет опубликован разбор.

UPD: Разбор

Поздравляем победителей!!!

Div1

  1. uwi

  2. Benq

  3. irkstepanov

  4. dreamoon_love_AA

  5. JustasK

  6. eddy1021

  7. yancouto

  8. chemthan

  9. Nephren_Ruq_Insania

  10. KrK

Div2

  1. Nephren_Ruq_Insania

  2. Mahan_sh

  3. lsrothy

  4. ngfam

  5. georgerapeanu

  6. ZalBinHassan

  7. mtkaya

  8. Bodo

  9. szhouan

  10. fchirica

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

»
9 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +16 Проголосовать: не нравится

Why this post is not on the main codeforces page? UDP: now it appears :P

»
9 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +36 Проголосовать: не нравится

I think you should update "other testers" soon to show your respect and thank to them.

»
9 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +13 Проголосовать: не нравится

Too late for chinese! It will take place at 00:05(UTC+8). So I can't take part in this contest. But I also hope everyone high rating!

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +285 Проголосовать: не нравится

short sad story

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

So many rated contests, thanks to last 2 week contests I was upgraded my RATING very much!

Hope everyone will get high rating and wish codeforces polygon luck!

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

glhf

»
9 лет назад, скрыть # |
← Rev. 3  
Проголосовать: нравится -26 Проголосовать: не нравится

You also like this sound of dislikes

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +18 Проголосовать: не нравится

High ratings to everybody! _______What a sad story..T_T

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

I hope no large queue like the last educational round , I should't be wating 15 min+ to know whether my solution passes pretests .

»
9 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +11 Проголосовать: не нравится

Wish Everyone will get high scores! NBAH's previous contest Codeforces Round 367 (Div. 2) was wonderfull and gave high ratings at the end. I hope this one will be more than wonderfull for everyone. Good Luck and High Ratings.

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

Good luck!!!

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -31 Проголосовать: не нравится

is this contest rated ?

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

Wish you can get high rating!

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

Thanks for scoring ! This round is now enough special to remember it a long time :)

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

Отчисление-отчислением, а контест — по расписанию

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

I have noticed that Arpa is mentioned/thanked in every blog post. Great job man.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

1750 points for problem C... Seemed like a challenging contest. Still wish for the best for everyone ;)

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

GL & HF

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

Wish you can get more and more score.

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

good luck and have fun every one :D

»
9 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +17 Проголосовать: не нравится

The best thing about the blog is — not using this line
As usual, the scoring will be announced shortly before the start of the contest.

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

Best of luck to all!!

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -26 Проголосовать: не нравится

Is it rated?

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

ПУЗЫРЬ!!! Это ты? :)

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

WTH , NOt able to hack

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

 lol

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

No hacking, problems are too hard. Great contest...

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

As predicted, problem C is much more difficult than usually.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

Go no rating...

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

Good problem set.

Happy_minus_Rating

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

Is it Div-1 contest ?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +18 Проголосовать: не нравится

Is it Div-1 contest ?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +28 Проголосовать: не нравится

The first A-B-C problems should be B-C-D.

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

что-то второй уже раунд немного тяжеловат для див2

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

"High ratings to everybody!"

Problems are way harder than usual.

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

How to solve D? I thought of fixing first position where a[i] < c[i] < b[i] but c[i] can be equal to b[i] and become less later(for example ab bc answer is 1(ba)).

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

    DP[position in permutation][is current permutation already grater than a flag (0 or 1)][is current permutation already less than b flag (0 or 1)].

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

      How to calculate dp[position in permutation][1 (current permutation is already greater then a )][1(current permutation already less then b)] ???? If we somehow know the remaining count of each letter then this equal number of permutations of remaining letters, but we don't know the remaining count of each other, So how to calculate this??

      Thanks in advance!

  • »
    »
    9 лет назад, скрыть # ^ |
    ← Rev. 4  
    Проголосовать: нравится 0 Проголосовать: не нравится

    Consider a function f(stringx, 26 - numbers) which returns number of strings s constructed with characters which is given in the input, that s < x

    f(x, 26numbers) can be solved using the first position that you said and the answer is f(b, (a - characters)) - f(a, (a - characters)) - 1

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -58 Проголосовать: не нравится

the contest was very bad it was like div 1 please dont ever write a contest and please make it unrated because it was bullshit

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

Pretest 9 for C?

»
9 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится
»
9 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

what is the 8th pretest for b ? What is wrong in this ? https://ideone.com/dIQKbm

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

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

Is solution of E based on sqrt decomposition?

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

How did people solve C? Unable to access other submissions as of now.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -41 Проголосовать: не нравится

this contest was awful! so sad!

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

Hack for the first problem: 5 72 72 73 74 69 Ans: 66

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

Somebody please explain div2 A ,as it had the worst explanation ever :/

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

    Select a continuous subsegment such that the difference between the sum of the selected slices and the sum of the unselected slices is as small as possible.

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

    The problem gives you N pieces of pizza, with sizes in array 'a'. The sum of all these sizes add up to 360. Now, the problem is asking for the minimum difference between 2 section if we split the pizza into 2 contiguous sections. We can start from position 1 and iterate through, keep track of the sum before called 'SUM'. Since we know the total sum is 360, we can find the sum of the other piece by doing 360 — SUM. We then take ans = min(ans, abs(SUM — (360 — SUM)). The pizza is circular, so we can start from all possible starting positions (1...n) and do the same thing. The answer is then the minimum over all starting positions.

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

Problems were harder than usual ( specially A and B )

»
9 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +3 Проголосовать: не нравится

How to solve div 2 problem A and B?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +22 Проголосовать: не нравится

Very interesting tasks, I enjoy a lot of solving this problems !

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

Do you think B will pass If I used map instead of index compression? I had map<int,int> which tells me this: if map[a] = b, it means that b numbers have exactly a numbers strictly smaller than them, divisible by x.

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

Do you think my solution for B will pass time limit, I used map<int,int> instead of index compression?

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

Gah problem B apparently had so many edge cases, I kept getting stuck at the later tests

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

What's the hack for B?

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

PEOPLE ON CODEFORCES ARE GOOD AT SARCASM

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +7 Проголосовать: не нравится

Very hard contest but problems were very interesting.

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

What's the answer of B:- 5 3 1 1 2 3 4 5

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

any idea about this code bug(bug'S)???-problem B-


#include<bits/stdc++.h> #define F first #define S second using namespace std; const int maxn=1e5+7; int a[maxn];//,r[maxn],l[maxn]; map<int,int>mp,cnt; pair<int,int>b[maxn]; vector<pair<int,int> >vec; int32_t main(){ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); int n,x,k;cin>>n>>x>>k; for(int i=1;i<=n;i++)cin>>a[i],cnt[a[i]]++; sort(a,a+n); int ans=0; for(int i=1;i<=n;i++){ if(a[i]==a[i-1])vec.back().S++; else vec.push_back({a[i],1}); } for(int i=1;i<vec.size();i++)vec[i].S+=vec[i-1].S,b[i]=vec[i]; for(int i=0;i<vec.size();i++){ int l=upper_bound(b,b+vec.size(),make_pair(b[i].F+k*x,0))-b-1; int r=upper_bound(b,b+vec.size(),make_pair(b[i].F+k*x,0))-b-1; ans+=(vec[r].S-(l-1?vec[l-1].S:0)+1)*vec[i].S; // cout<<r<<" "<<l<<" "<<cnt[a[i]]<<endl; } cout<<ans; }
»
9 лет назад, скрыть # |
 
Проголосовать: нравится +18 Проголосовать: не нравится

excellent problem set!

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

div1.7-1.8

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

Can anyone help explain why my solution to B times out on case 14? Thanks in advance!

32692235

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

what is pretest 8 in prob A. solved nothing today. I calculated two segments with the min difference between them like partition problem but that is apparently not the case.

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

How does this contest fit into the pizza of life?

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +34 Проголосовать: не нравится

In problem B statement, did you guys notice that previously it was written find the number of different UNordered pairs of indexes (i, j) which killed me. After the contest, it shows ordered. In the beginning, I realised that the solution would be with lower/upper bounds, but that very statement confused me and pushed me to thinking in terms of self-balancing trees & adding elements from end towards start, which I spent a lot of time and coded. After that in the test case 3, realised that it's not like that :(

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

Problem B: Is this

Spoiler

complexity optimal?

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

hmm

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

What is the idea of problem C?

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

    If we use naive bitmask dp for each prime, it is O (N)*2^19 (because there are 19 primes between 1 and 70) which results time exceed. The idea is if the number is a prime which exceed 35, it must be grouped with a same number. So it can be pre-processed. Since there are 11 primes between 1 and 35, this solution is O (N)*2^11 which gives AC. P.S.Be careful of using % while implmenting it -it gives TLE

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -6 Проголосовать: не нравится

Many people will get rating rise just for solving A :v

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

A contest where the one can be proud of solving A & B

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

Good Questions , i really enjoyed it..hope others too ;-)

»
9 лет назад, скрыть # |
 
Проголосовать: нравится -11 Проголосовать: не нравится

Bitmasks + some knowledge of Combinatorics is Div.2 C now? What's the world coming to?

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

For Problem A in

Test case 50:

7

41 38 41 31 22 41 146 Output: 14

Is it correct? and how Explain please

Thanks :)

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

can someone please explain for the pizza separation ques why the ans for the below sample test is 120 !!

5

30 60 180 60 30

what should be the ans for this ?? ans can be zero when the 1 continuous sector contains 60 +30 +30+ 60 = 180 (starting from the 2 last 30 to the first 30 in anticlockwise order) and the 2 continuous sector contains only 180 so 180-180=0 (minimal possible difference) But my code fails for this system test case ,it is showing the ans 120 but i think minimal diff 0 can be achieved .. plzz anyone tell me i cant find where i am wrong in logic or thinking ("ANY HELP WILL BE APPRECIATED")

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +46 Проголосовать: не нравится

Good contest, Very good contest, the problems where good and where fun to solve, thank you NBAH for this good contest. But please keep in mind that the problems where too hard for a div2 contest

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

Can anyone explain why my solution to B gets WA on case 21? 32682296 Thanks.

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

why here UndefinedBehavior http://codeforces.me/contest/895/submission/32691004 ? but here everything is normal http://codeforces.me/contest/895/submission/32693522 . changed only this

auto x=lower_bound(a.begin(),a.end(),lp);
auto y=upper_bound(a.begin(),a.end(),rp);
ans=ans+y-x;
auto x=lower_bound(a.begin(),a.end(),lp);
auto y=upper_bound(a.begin(),a.end(),rp);
ll p=(ll)(y-x);
ans+=p;

he in int started to count all?

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

    Note that y could be equal to a.end().
    std::vector::end() is a special kind of iterator.
    I think it is not specified what happens if you add an integer to it (as you do in ans+y part of 32691004).

    Regardless, I would use parentheses to avoid unnecessary integer-iterator addition (as well as the subsequent subtraction): ans=ans+(y-x);

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

Albeit I didn't manage to solve D in time, the contest was really cool. The only thing to bother me was the unclear statement of B. Keep it up :D

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

Писать автору задач не решился(я ведь просто нубас с 1.2к), поэтому спрошу тут. Разве важен в задаче А порядок кусков пиццы? К примеру инпут 5 90 89 88 87 6. 90+89 образуют ближайший к 180-и угол из возможных, ответ (180-179*)2, то бишь 2. Окей, все понятно, но вот такой инпут: 5 90 87 88 89 6. Тут уже поинтереснее, хотя куски такие же. Если порядок имеет значение, то ответ 6: abs(180-(6+90+87))*2. Но если порядок значения не имеет, то ответ тот же 2. Для интереса проверил несколько скриптов гуру с 1-й странице, все решают линейно, с тем же порядком. Так и должно быть? Если порядок не имеет значения, то все эти решения улетят в пропасть, нужно будет решать по-другому(рекурсивно, например, обходя неюзанные куски, пока сумма <180).

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

Wow !! This was one of the best contests I have ever participated in <3. All the problems were very , very nice ! I really enjoyed the round as well as the problems.

Take my heartiest love NBAH <3 <3 Hope we will get such awesome problems from you in the future. Keep up the good work man :)

And many many thanks for such nice round and all your efforts in it :)

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

I have trained for 5 days and became specialist. I am looking forward to next contest

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

http://codeforces.me/contest/895/submission/32679304 is judged an error, but works in my compiler?

»
9 лет назад, скрыть # |
← Rev. 3  
Проголосовать: нравится +5 Проголосовать: не нравится

[update: ACCEPTED] Where is my wrong approach for problem B 32694817

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

Contest : Omae wa mou shindeiru.
Me : Nani?

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

delete2/32687180, coutinho/32687203, OutSpace/32688038, blindspot/32689194

LOL, this is 4 photo machines. I was canceled for using the ideone for C. And these 4 people have found, then they copy my code. My fail but I hate their, LOL

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

Can someone please suggest some cases(possibly small n so that I can debug) for my code (Problem C) http://codeforces.me/contest/895/submission/32711673

It is giving correct answer till n=1000 (in System cases) but I don't know why it is giving WA for n around 10e5

»
9 лет назад, скрыть # |
← Rev. 6  
Проголосовать: нравится 0 Проголосовать: не нравится

Can anyone tell me what's wrong with this code?

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

int main() {
	long long n;
	cin>>n;
	vector<long long> a(2*n);
	for(int i = 0 ; i < n; i++) {
		cin>>a[i];
		a[i+n] = a[i];
	}
	int mindiff = 360;
	for(int i = 0; i < 2*n; i++) {
		int curr = 0;
		for(int k = i; i < 2*n && curr < 180; k++) {
			curr+=a[k];
			mindiff = min(mindiff, 2*abs(180-curr));
		}
	}
	cout<<mindiff<<endl;
	return 0;
}

Running fine on local. :(

Test: #1, time: 0 ms., memory: 1844 KB, exit code: 0, checker exit code: 1, verdict: WRONG_ANSWER Input

4 90 90 90 90

Output -664469436

Answer 0

Checker Log wrong answer 1st numbers differ — expected: '0', found: '-664469436'

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

THIS IS VERY IMPORTANT !!!

I submitted my solution for problem A during the contest and it passed the pretests then I got RTE on test 49 during system test phase, after the contest I resubmitted the exact same code and I got ACCEPTED !!!!

submission during contest : http://codeforces.me/contest/895/submission/32683171 submission after the contest : http://codeforces.me/contest/895/submission/32733925

PLEASE NBAH CHECK THIS PROBLEM !

THANKS.

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

    I belive that you accessed invalid position on the array as you used

    for (int j=i; j<N+i; j++)

    N+i-1 will be outside of bounds since the array has only N positions and, by accessing not allocated memory you get an undefined behviour, which means that anything could happen, even geting AC even though it is wrong. That is actually a very common doubt for begginers, in his last post Mike talked about that. In his words:

    "Many Codeforces visitors are already tired of the questions of less experienced participants: "Why does my solution not work on some test on the Codeforces servers, if I locally launch it and it works correctly? You have the wrong compiler/servers!" In 99% of cases this is an example of undefined behavior in a program."

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

One of the most informative rounds ever. Thanks for your efforts!

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

Can anyone explain Meet in the middle solution for C?

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

What's the idea behind this submission 32677264 for problem C?

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

What is a smaller form of test case 13 for C? My program keeps outputting 1000000006 and I don't know why. A lot of other people also have the same wrong output.

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

There's a small bug in the winners.The rank9 of div1 is the same as the rank1 of div2.

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

Why is problem A wrong? test case 8 says answer is 40 while the true answer is 0. Come on guys no one wants to correct it??? :(

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

    Considering that there are more than 3000 people who have solved the problem, it's more likely that you're wrong. :) Did you split the pizza into two continuous sectors?