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

Автор MikeMirzayanov, 8 лет назад, По-английски

Thanks for taking part in the round. I hope you enjoyed the round. It happens that the statements were really easy to understand (thanks to testers). We've got only 38 questions during a round!

Tutorial is loading...
Code
Tutorial is loading...
Code
Tutorial is loading...
Code
Tutorial is loading...
Code
Tutorial is loading...
Code
Tutorial is loading...
Tutorial is loading...
Code
Tutorial is loading...
Code
Разбор задач Codeforces Round 547 (Div. 3)
  • Проголосовать: нравится
  • +39
  • Проголосовать: не нравится

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

MikeMirzayanov, in code of 1141B - Maximal Continuous Rest should be if (a[i % n] == 1) but there is if (a[i % 2] == 1).

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

Thank you so much MikeMirzayanov for this round... I enjoy the problems a lot...

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

E can be solved using binary search also .

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

Thank you for this good editorial.

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

Can someone please this, why I'm having Memory Limit Exceeded, on the implementation I did, while editorial says the same.

51582194

Thanks, in advance.

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

How should I approach Problem D in Java? I m not able to get the structure of code for this problem in java.

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

For problem "Same Sum Blocks (Hard)" for finding all the possible sum if I do the loop like this

map<ll,vector <pair<ll,ll>> > mymap;
    for(int i=0;i<n;i++){
		 ll tsum=0;
		for(int j=i;j<n;j++){
			tsum+=vec[j];
			mymap[tsum].push_back({i,j});
		}
    }

then I'm trying to find the maximum number of disjoint set but it doesn't give me the optimal answer as you can see here 51596165 can anyone explain why it isn't working?

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

Is there an intended slower solution that was meant to pass F1 but not F2 ?

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

1141A - Game 23 can be also solved using dfs.

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

For problem G I thought of first painting the k vertices which have maximum number of neighbors i.e. to paint the k maximum neighbor vertices with color 1 and then paint rest of the vertices. The number of colors required would be then the maximum number of neighbors of remaining n-k vertices. I don't know how to implement this also whether this approach is correct or not.Has someone else followed this strategy.

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

Anyone else having problem with problem G test 24 ?

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

In code of 1141G — Privatization of Roads in Treeland why was it necessary to set f=-1 after color and f became equal?

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

Can someone explain me what went wrong in this (my solution for problem E)

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

In problem G for (auto p: cnt) if (kk > k) D = p.first, kk -= p.second; else break; how we get that D we get from the above loop is the minimum

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

Interesting problems, thanks.

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

Binary Search Solution for problem G Simple solution

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

"vector<pair<int,int»"