3 solutions

  • -1
    @ 2024-9-8 10:24:27

    #include<bits/stdc++.h> using namespace std; const int N=1000; 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
    60
    Accepted
    27
    Uploaded By