Why can't I flip all the 1's in the string, that way number of '01' substrings == number of '10' substrings == 0 ?

# | User | Rating |
---|---|---|

1 | tourist | 3817 |

2 | jiangly | 3628 |

3 | Benq | 3584 |

4 | slime | 3498 |

5 | maroonrk | 3486 |

5 | djq_cpp | 3486 |

7 | Radewoosh | 3438 |

8 | cnnfls_csy | 3427 |

9 | zh0ukangyang | 3423 |

10 | orzdevinwang | 3399 |

# | User | Contrib. |
---|---|---|

1 | -is-this-fft- | 183 |

2 | awoo | 178 |

3 | dario2994 | 168 |

4 | SecondThread | 167 |

5 | Um_nik | 165 |

6 | maroonrk | 164 |

7 | adamant | 162 |

7 | kostka | 162 |

9 | antontrygubO_o | 158 |

10 | errorgorn | 155 |

I have followed a pattern for practicing problems. When I started I used to practice 800 rating problems, then when I was able to solve A problem in 2-3 Div2 contests, I moved on to solve 1000-1100 rating problems and when I was able to solve B problem in 2-3 Div2 contests I moved on 1200-1300 rating problems.

But, I have noticed that most of Div2 C problems are of 1600-1700 rating (I may be wrong). So, should I start solving 1600-1700 rating problems? Also, will jumping from 1300 to 1700 be actually beneficial for me?

Highest rating: 1201

Current rating: 1159

Number of 1200-1300 problems solve: 70(1200), 15(1300)

My Approach:

Only make the first element of vector A less than vector B. So if B[0] < A[0], iterate over A and find the first element smaller than B[0] by this we will also know the number of swaps required to change the first element of A. Then iterate over B and find the first element greater than A[0] by this we will know the number of swaps required to change the first element of B. Print the minimum number of swaps.

solution Link ,546th test case fails.

Codeforces (c) Copyright 2010-2022 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Dec/10/2022 01:57:15 (k2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|