/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 1ms 328.0 KiB
#2 Accepted 1ms 328.0 KiB
#3 Accepted 1ms 396.0 KiB
#4 Accepted 1ms 556.0 KiB
#5 Accepted 1ms 516.0 KiB
#6 Wrong Answer 1ms 512.0 KiB

Code

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

int main() {
    char s[100]; 
    int lt[26] = {0}; 

    
    scanf("%s", s);

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

    
    if (lt['l' - 'a'] >= 2 && lt['e' - 'a'] >= 2 && lt['a' - 'a'] >= 1 &&
        lt['d' - 'a'] >= 1 && lt['i' - 'a'] >= 2 && lt['n' - 'a'] >= 2 &&
        lt['g' - 'a'] >= 1 && lt['u' - 'a'] >= 1 && lt['v' - 'a'] >= 1 &&
        lt['r' - 'a'] >= 1 && lt['s' - 'a'] >= 1 && lt['t' - 'a'] >= 1 &&
        lt['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:36:36
Judged At
2024-11-11 03:41:37
Judged By
Score
40
Total Time
1ms
Peak Memory
556.0 KiB