9352022-01-29 15:04:25tomi7Tükörtojás (75 pont)cpp11Wrong answer 0/758ms3504 KiB
#include <bits/stdc++.h>
using namespace std;

int main(){
   int n;
   cin>>n;
   string s;
   string finish;
   cin>>s>>finish;
   int valasz=0;
   for(int i=n-1;i>=0;i--){
       char ssz=s[i];
       char fsz=finish[i];
       if(ssz!=fsz){
           //cout<<"Most itt vagyok!"<<' ';
           for(int j=0;j<i;j++){
               if(s[j]=='F'){
                  s[j]=='S';
               }else{
                  s[j]=='F';
               }
           }
           valasz++;
       }
   }
   cout<<valasz-1<<'\n';
}
SubtaskSumTestVerdictTimeMemory
base0/75
1Accepted0/02ms1740 KiB
2Wrong answer0/03ms2180 KiB
3Wrong answer0/51ms1940 KiB
4Wrong answer0/51ms1948 KiB
5Wrong answer0/51ms1960 KiB
6Wrong answer0/51ms1964 KiB
7Wrong answer0/51ms1964 KiB
8Wrong answer0/51ms1972 KiB
9Wrong answer0/51ms1976 KiB
10Wrong answer0/51ms1988 KiB
11Wrong answer0/51ms1980 KiB
12Wrong answer0/56ms2620 KiB
13Wrong answer0/56ms2700 KiB
14Wrong answer0/54ms2892 KiB
15Wrong answer0/56ms3160 KiB
16Wrong answer0/58ms3420 KiB
17Wrong answer0/58ms3504 KiB