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

Автор vovuh, история, 2 года назад, По-русски

1674A - Преобразование числа

Идея: BledDest

Разбор
Решение (BledDest)

1674B - Словарь

Идея: BledDest

Разбор
Решение (BledDest)

1674C - Бесконечная замена

Идея: BledDest

Разбор
Решение (awoo)

1674D - A-B-C Сортировка

Идея: BledDest

Разбор
Решение (adedalic)

1674E - Уничтожение стены

Идея: BledDest

Разбор
Решение (fcspartakm)

1674F - Упорядочивание рабочего стола

Идея: vovuh

Разбор
Решение (vovuh)

1674G - Удали ориентированные ребра

Идея: BledDest

Разбор
Решение (awoo)
Разбор задач Codeforces Round 786 (Div. 3)
  • Проголосовать: нравится
  • +85
  • Проголосовать: не нравится

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

Thank you codeforces for this Round, Good to see many Div-3, and the standard of questions was perfect for the level of div-3

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

Hello MikeMirzayanov,BledDest,vovuh,adedalic.

I find out some plagiarism activity in Codeforces Round 786 (Div. 3).

Please check out submissions of problem 1674B - Словарь,submissions are 155621247 and 155678427 They both have same function with same variable but just comment down it and wrote it again with some variable change. Please look out at it.

Proofs given below and also you can check submissions...

»
2 года назад, # |
Rev. 3   Проголосовать: нравится -7 Проголосовать: не нравится

I think problem F will be done with Fenwick tree,too.

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

For problem E: is there some binary search solution?

»
2 года назад, # |
  Проголосовать: нравится -10 Проголосовать: не нравится

It's interesting how none of the first three problems required loop.

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

Can anyone tell why I'm getting runtime error: Exit code is 2147483647 for submission: 155822852 I tried a lot but not understanding what's wrong.

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

After the contest, I successfully hacked most people with this example

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

Условие задачи F на русском языке мне показалось каким-то неполным. В английской версии пишется, что иконки занимают префикс полных столбцов. Тогда как в русской версии нигде это не упоминается. Лично я понял условие так, что одинаковый префикс каждого из i столбцов заполнен иконками, а в префиксе i+1 может быть еще несколько подряд идущих иконок.

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

Cheaters !

Please check out submissions of problem 1674B - Словарь,submissions are 155621247 and 155678427 They both have same function with same variable but just comment down it and wrote it again with some variable change. Please look out at it.

Proofs given below and also you can check submissions...

MikeMirzayanov vovuh System

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

If you prefer command line, checkout CF Doctor for more flexibility and faster feedback.

If you are/were getting a WA/RE verdict on problems from this contest, you can get the smallest possible counter example for your submission on cfstress.com. To do that, click on the relevant problem's link below, add your submission ID, and edit the table (or edit compressed parameters) to increase/decrease the constraints.

If you are not able to find a counter example even after changing the parameters, reply to this thread (only till the next 7 days), with links to your submission and ticket(s).

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

It is a good trick that converts the strings into one string. My solution is based on string [] and has to deal with the boundary carefully.

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

Anyone overcame testcase 32 of Problem E after getting WA? Or, any equivalent short length testcase please?

»
23 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

can i any one tell what is wrong in my code for question infinite replacement void solved(){ string s; cin>>s; string t; cin>>t; bool infinite=false; if(t=="a") { cout<<"1\n"; return;} for(int i=0;i<t.size();i++){ if(t[i]=='a') { infinite=true; break; } } if(infinite){ cout<<"-1\n";

} else{ int ans = 1; for(int i=1;i<=s.size();i++){ ans = (ans*2)%Mod; if(ans<0) ans = ans+Mod; } cout<<ans<<"\n"; }

} int main(){ int t; cin>>t; while(t--){ solved(); } return 0; }

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

    You are taking mod, thats why its giving WA for the cases where answer is >= Mod. The problem does not ask to take mod.

»
20 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I know I'm quite late, but I don't see my solution to G.There is maybe a simpler (not sure if its simpler) solution to G. 1. Remove all edges u,v such that (inDegree[u]==1 || outDegree[v]==1). 2. Now the answer is the longest possible path in this new graph. Proof is also quite simple. Here is my 171163896

»
15 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Question F so simple... why rated 1800? It suits problem B or even A div2.

»
9 месяцев назад, # |
  Проголосовать: нравится -14 Проголосовать: не нравится

My solution for F using segment tree 214543084

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

For problem D, I tried to simulate the problem. It's giving WA on 1611th TC. I tried to stress test my solution to find a test case where my code is failing. I couldn't find any. Can anyone tell what is wrong with my logic or where my code is failing? Thanks! Code: link

»
3 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

My approach to problem F: We can convert the given matrix to a 1-d array while traversing the matrix for each column from 1st row to the last nth row and placing 1 for a '*' and 0 for '.'

Let the current number of 1's in our array be x. So now we have to find the number of empty positions in our 1-d array in the range [0 , x — 1] , as we have to place 1's at that positions from the rest of the array

This can be easily done either with a rangeSum segment tree link or an ordered set link