Comments
0

nope, him

0

telegram friend blocked him in March

On mistake12 → CM Journey: 1261-1900+, 3 years ago
+43

this is from ongoing contest

On Alphx → CSES DP section Editorial, 3 years ago
+1

this is kartik arora's, code and explanation If i'm not wrong.

No, brother, Why sorry.

You even tried to help me a lot.

Thanks

#include <bits/stdc++.h>
using namespace std;
void f()
{
    int n;
    cin >> n;
    int x;
    cin >> x;
    string A, B;
    cin >> A >> B;
    int cnt = 0;
    for (int i = 0; i < n; i++)
    {
        if (A[i] != B[i])
            cnt++;
    }
    if (cnt & 1)
    {
        cout << -1 << '\n';
        return;
    }
    int cost = 0;
    vector<int> a;
    for (int i = 0; i < n; i++)
    {
        if (A[i] != B[i])
            a.push_back(i);
    }
    int k = a.size();
    for (int i = 0; i < k / 2 - 1; i++)
    {
        cost += min(x, a[2 * i + 1] - a[2 * i]);
        cost += min(k, a[k] - a[1]);
    }
    cout << cost << '\n';
}

signed main()
{
    int t = 1;
    cin >> t;
    while (t--)
        f();
}

What is wrong here, can you pls help me to fix

n = 6 , K = 2 A = 101011 B = 010010

Output: 3

n = 4, k = 3 A = 1010 B = 0001

Output: -1

getting wrong :)

me too, how to buy this, please anyone

wow bro, such a great job. Thanks

i don't think so

he's earning more than 2,00,000 per month, by mentoring.

just by making others fool through linkedIn.

another cheater

https://codeforces.me/contest/1822/submission/203336956 skipped

just look at the cheating technique, some useless loops after each and every line,,

according to his graph, looks like genuine

but although a cheater

+24

CheaterStark