Free Contest 79 - PALAGAIN

View as PDF

Submit solution

Points: 0.97 (partial)
Time limit: 1.0s
Memory limit: 256M

Problem type
Allowed languages
C, C++, Go, Java, Kotlin, Pascal, PyPy, Python, Rust, Scratch

In case the statement didn't load correctly, you can download the statement here: Statement

Lưu ý: các bạn không nhập, xuất dữ liệu bằng file kể cả khi đề bài có yêu cầu. Đọc, ghi dữ liệu được thực hiện ở stdin và stdout.


Comments

Please read the guidelines before commenting.



  • 2
    KAKOII  commented on Nov. 30, 2024, 12:31 p.m. edited

    Lời giải:

    Bài này về cơ bản là giải y hệt bài Xâu con chung dài nhất. Ta sẽ thực hiện việc tìm xâu con chung dài nhất của xâu ~S~ và bản đảo ngược của nó.

    Ta dùng short int cho mảng dp[N][N] để không gặp lỗi TLE, MLE.

    Good luck!