8045 2024. 01. 12 11:26:00 Leventusz09 Tükörtojás (75 pont) csharp Időlimit túllépés 45/75 280ms 22496 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tükörtojás{
    class Program{
        static void Main(){
            int N = int.Parse(Console.ReadLine());
            //s = true                    f= false
            string in1 = Console.ReadLine();
            bool[] S = new bool[N];

            string in2 = Console.ReadLine();
            bool[] S2 = new bool[N];

            for (int i = 0; i < N; i++) if (in1[i] == 'S')  S[i] = true;
            for (int i = 0; i < N; i++) if (in2[i] == 'S') S2[i] = true;

            int o1 = 0;

            for(int i=N-1; i>=0; i--){
                if(S[i] != S2[i]){
                    o1++;
                    for(int j=0; j<i; j++){
                        S[j] = !S[j];
                    }
                }
            }

            Console.WriteLine(o1);
        }
    }
}
Részfeladat Összpont Teszt Verdikt Idő Memória
base 45/75
1 Elfogadva 0/0 27ms 20296 KiB
2 Időlimit túllépés 0/0 264ms 4952 KiB
3 Elfogadva 5/5 25ms 21132 KiB
4 Elfogadva 5/5 25ms 21288 KiB
5 Elfogadva 5/5 25ms 21752 KiB
6 Elfogadva 5/5 25ms 21804 KiB
7 Elfogadva 5/5 25ms 21484 KiB
8 Elfogadva 5/5 26ms 22048 KiB
9 Elfogadva 5/5 26ms 21740 KiB
10 Elfogadva 5/5 26ms 22032 KiB
11 Elfogadva 5/5 27ms 22496 KiB
12 Időlimit túllépés 0/5 273ms 7276 KiB
13 Időlimit túllépés 0/5 272ms 7472 KiB
14 Időlimit túllépés 0/5 261ms 7412 KiB
15 Időlimit túllépés 0/5 268ms 8076 KiB
16 Időlimit túllépés 0/5 280ms 8444 KiB
17 Időlimit túllépés 0/5 256ms 8408 KiB