93252024-02-20 13:53:15Leventusz09Vetélkedő (75 pont)csharpTime limit exceeded 35/75586ms26948 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Vetélkedő{
    class Program{
        static void Main(){
            int N = int.Parse(Console.ReadLine());
            string[] A = new string[N];
            
            for(int i=0, j; i<N; i++){
                string in1 = Console.ReadLine();
                List<char> temp = new List<char>();
                for(j=0; j<in1.Length; j++) {
                    temp.Add(in1[j]);
                }
                temp.Sort();
                foreach (char k in temp) A[i] += k;
            }
            string o1 = "";
            bool tmp;
            Array.Sort(A);
            for(int i=0; i<N; i+=2){
                o1 = A[i];
                if (i == N - 1) break;
                if (A[i] != A[i + 1]) break;
            }
            
            Console.WriteLine(o1);
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base35/75
1Accepted0/035ms21644 KiB
2Time limit exceeded0/0586ms14220 KiB
3Accepted5/532ms22600 KiB
4Accepted5/534ms23184 KiB
5Accepted5/534ms23192 KiB
6Accepted5/534ms23292 KiB
7Accepted5/550ms25608 KiB
8Accepted5/554ms26028 KiB
9Accepted5/564ms26948 KiB
10Time limit exceeded0/5570ms13548 KiB
11Time limit exceeded0/5579ms14252 KiB
12Time limit exceeded0/5565ms15040 KiB
13Time limit exceeded0/5569ms15492 KiB
14Time limit exceeded0/5580ms15920 KiB
15Time limit exceeded0/5564ms16348 KiB
16Time limit exceeded0/5564ms16268 KiB
17Time limit exceeded0/5560ms16116 KiB