93242024-02-20 13:43:41Leventusz09Vetélkedő (75 pont)csharpTime limit exceeded 5/75575ms41784 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;
            for(int i=0, j; i<N; i++){
                tmp = false;
                o1 = A[i];
                for(j = i; j<N; j++){
                    if (i != j && A[i] == A[j]){
                        tmp = true;
                        break;
                    }
                }
                if (!tmp) break;
            }
            
            Console.WriteLine(o1);
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base5/75
1Accepted0/029ms20652 KiB
2Time limit exceeded0/0560ms14348 KiB
3Accepted5/530ms21772 KiB
4Wrong answer0/529ms22296 KiB
5Wrong answer0/530ms22536 KiB
6Wrong answer0/529ms23296 KiB
7Wrong answer0/535ms25528 KiB
8Wrong answer0/537ms26024 KiB
9Wrong answer0/539ms26924 KiB
10Wrong answer0/5310ms36892 KiB
11Wrong answer0/5367ms38432 KiB
12Wrong answer0/5412ms39540 KiB
13Wrong answer0/5469ms40092 KiB
14Time limit exceeded0/5526ms41484 KiB
15Time limit exceeded0/5569ms17484 KiB
16Time limit exceeded0/5575ms17696 KiB
17Time limit exceeded0/5527ms41784 KiB