80822024-01-12 12:26:39Leventusz09Tükörtojás (75 pont)csharpTime limit exceeded 45/75300ms22720 KiB
using System;

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

            //bool[] S2 = new bool[N];

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

            int o1 = 0;

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

            Console.WriteLine(o1);
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base45/75
1Accepted0/027ms20516 KiB
2Time limit exceeded0/0300ms4700 KiB
3Accepted5/525ms21076 KiB
4Accepted5/525ms21376 KiB
5Accepted5/525ms21428 KiB
6Accepted5/527ms21960 KiB
7Accepted5/526ms22280 KiB
8Accepted5/526ms22720 KiB
9Accepted5/526ms22428 KiB
10Accepted5/526ms22288 KiB
11Accepted5/526ms22332 KiB
12Time limit exceeded0/5300ms6804 KiB
13Time limit exceeded0/5268ms7068 KiB
14Time limit exceeded0/5272ms7560 KiB
15Time limit exceeded0/5261ms7864 KiB
16Time limit exceeded0/5272ms8340 KiB
17Time limit exceeded0/5259ms8392 KiB