How was your lunchtime

How was your lunchtime?
This contest was good enough for me.
Rank 270.

Wasted a bit of time in the second one. Third was a good problem

5 Likes

literally rank 11 again

15 Likes

@galencolin you can become red today! right?

2 Likes

can anyone explain the 3rd one? convert the string??

2 Likes

I don’t know if it’s enough, so now I get to anxiously await rating changes

3 Likes

it was my first time and i scored 130 :disappointed::

3 Likes

orzz

2 Likes

only orz if I get red

1 Like

yeah may be

1 Like

sadly I didnt see the bound on A[i] in TREDIFF :(.
It was so easy :frowning:

6 Likes

Got stuck on this. Wanted to get 30points but couldn’t get it.
I wrote this beautiful code, so anyone kind enough could help me and tell where I went wrong.

1 Like

Lets wait for editorial.I was getting WA in it!

1 Like

Lol

Escape one seems so simple yet so hard lol

3 Likes

yeah

1 Like

when both their total distance walked are same and both A[i] and B[i] are same

1 Like
while(t--) {
lli n;
cin>>n;
lli a[n],b[n];
scanarr(a,n);
scanarr(b,n);
lli prea[n];
prea[0]=a[0];
for(lli i=1;i<n;i++){
    prea[i] = prea[i-1]+a[i];
}
lli preb[n];
preb[0]=b[0];
for(lli i=1;i<n;i++){
    preb[i] = preb[i-1]+b[i];
}
lli cnt=0;
for(lli i=0;i<n;i++){
    if(prea[i]==preb[i] and a[i]==b[i])
        cnt+=a[i];
}
cout<<cnt<<endl;
 }
1 Like

stucked in q3 :frowning_face:

2 Likes

you have to convert the first string to second string using minimum operation and operation is like you have to take a subset and replace that subset with its smallest character, like String A=aaab and String B=aaaa if you choose index 2 & 3 you got sub set from String A as (ab) here in this subset you have a as smallest so you can convert it to aa and put this subset back to original String thus making it aaaa.

i dont know the editorial approach but i selected largest character from B and reduce all non matching character of A to that chatacter of B and then did same for second largest and so on…

2 Likes

same here bro😁

1 Like