93282024-02-20 14:23:50Leventusz09Vetélkedő (75 pont)csharpTime limit exceeded 5/75601ms35812 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(){
            /*
            //V1
            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);*/

            int N = int.Parse(Console.ReadLine());
            string temp = "";
            Dictionary<string, int> dic = new Dictionary<string, int>();
            for(int i=0; i<N; i++) {
                char[] x = Console.ReadLine().OrderBy(a => a).ToArray();
                temp = "";
                foreach (char y in x) temp += y;
                if(dic.Keys.Contains(temp)) dic[temp]++;
                else dic.Add(temp, 1);
            }
            foreach (string j in dic.Keys) if (dic[j] == 1){
                Console.WriteLine(j);
                break;
            }
            
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base5/75
1Accepted0/037ms22112 KiB
2Time limit exceeded0/0601ms10620 KiB
3Wrong answer0/537ms23084 KiB
4Wrong answer0/535ms23368 KiB
5Wrong answer0/535ms23852 KiB
6Wrong answer0/535ms23636 KiB
7Wrong answer0/541ms27048 KiB
8Wrong answer0/543ms28084 KiB
9Accepted5/546ms28808 KiB
10Wrong answer0/5356ms33668 KiB
11Wrong answer0/5425ms35084 KiB
12Wrong answer0/5483ms35404 KiB
13Time limit exceeded0/5558ms35812 KiB
14Time limit exceeded0/5564ms13244 KiB
15Time limit exceeded0/5556ms13212 KiB
16Time limit exceeded0/5577ms13296 KiB
17Time limit exceeded0/5569ms13392 KiB