4 solutions

  • 0
    @ 2026-4-1 10:22:04

    #include <bits/stdc++.h> using namespace std; const int N=10; char s[N]; int main() { cin.getline(s,N); int n=strlen(s); for(int i=0,j=n-1;i<j;i++,j--) { if(s[i]!=s[j]) { cout<<"no"; return 0; } } cout<<"yes"; return 0; }

    Information

    ID
    921
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    (None)
    # Submissions
    81
    Accepted
    40
    Uploaded By