/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 1ms 540.0 KiB
#2 Wrong Answer 1ms 540.0 KiB

Code

#include <stdio.h>
#include <string.h>
#define MOD 1000000007

int min(int a, int b) {
    return a < b ? a : b;
}

int main() {
    int T;
    scanf("%d", &T);
    
    while (T--) {
        char P[300001];
        scanf("%s", P);
        int N = strlen(P);
        
        long long sum = 0;
        
        for (int center = 0; center < N - 1; center++) {
            int left = center, right = center + 1;
            while (left >= 0 && right < N && P[left] == P[right]) {
                left--;
                right++;
            }
        }
        
        printf("%lld\n", sum % MOD);
    }
    
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1144 Palindromic Distance
Contest
LU IUJPC : Sylhet Division 2024 Replay Contest
Language
C11 (GCC 13.2.0)
Submit At
2024-12-10 12:01:37
Judged At
2024-12-10 12:01:37
Judged By
Score
0
Total Time
1ms
Peak Memory
540.0 KiB