/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 0ms 284.0 KiB
#2 Accepted 0ms 320.0 KiB
#3 Accepted 0ms 320.0 KiB
#4 Accepted 1ms 284.0 KiB
#5 Accepted 0ms 284.0 KiB
#6 Wrong Answer 0ms 284.0 KiB

Code

#include <stdio.h>
#include <string.h>

int main() {
    char s[105]; 
    int freq[26] = {0}; 
    scanf("%s", s);

    
    for (int i = 0; i < strlen(s); i++) {
        freq[s[i] - 'a']++;
    }

   
    if (freq['l' - 'a'] >= 2 && freq['e' - 'a'] >= 2 && freq['a' - 'a'] >= 1 &&
        freq['d' - 'a'] >= 1 && freq['i' - 'a'] >= 2 && freq['n' - 'a'] >= 2 &&
        freq['g' - 'a'] >= 1 && freq['u' - 'a'] >= 1 && freq['v' - 'a'] >= 1 &&
        freq['r' - 'a'] >= 1 && freq['s' - 'a'] >= 1 && freq['t' - 'a'] >= 1 &&
        freq['y' - 'a'] >= 1) {
        printf("Leading University\n");
    } else {
        printf("Impossible\n");
    }

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1024 Rearrange Character
Contest
Brain booster #2
Language
C99 (GCC 13.2.0)
Submit At
2024-03-06 15:27:04
Judged At
2024-11-11 03:41:39
Judged By
Score
40
Total Time
1ms
Peak Memory
320.0 KiB