93562024-02-21 09:07:58Leventusz09Váltakozó (75 pont)csharpWrong answer 7/75589ms69940 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Váltakozó{
    class Program{
        static void Main(){
            string str = Console.ReadLine();
            int N = str.Length;
            int[] C = new int[26];
            int e = 0;
            foreach (int i in str) C[i - 97]++;

            string o1 = "";
            for (int i=0, last = -1; i<N; i++){
                for(int j=e; last != j && j<26; j++){
                    if(C[j] > 0){
                        C[j]--;
                        o1 += (char)(j+97);
                    }
                }
            }
            Console.WriteLine(o1);
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base7/75
1Wrong answer0/026ms19892 KiB
2Wrong answer0/028ms22380 KiB
3Partially correct2/326ms20556 KiB
4Partially correct2/326ms20648 KiB
5Accepted3/326ms21208 KiB
6Wrong answer0/325ms21448 KiB
7Wrong answer0/3425ms69940 KiB
8Time limit exceeded0/3551ms30492 KiB
9Time limit exceeded0/3589ms31080 KiB
10Time limit exceeded0/3568ms31372 KiB
11Wrong answer0/329ms31104 KiB
12Wrong answer0/328ms31480 KiB
13Wrong answer0/328ms31088 KiB
14Wrong answer0/328ms31356 KiB
15Time limit exceeded0/3508ms32160 KiB
16Time limit exceeded0/3588ms32684 KiB
17Time limit exceeded0/3586ms32516 KiB
18Time limit exceeded0/3508ms32568 KiB
19Time limit exceeded0/3582ms32592 KiB
20Time limit exceeded0/3569ms32612 KiB
21Time limit exceeded0/3586ms32828 KiB
22Time limit exceeded0/6569ms32800 KiB
23Time limit exceeded0/6580ms32812 KiB
24Time limit exceeded0/6573ms33076 KiB