4 條題解

  • -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; }

    資訊

    ID
    921
    時間
    1000ms
    記憶體
    256MiB
    難度
    1
    標籤
    (無)
    遞交數
    85
    已透過
    42
    上傳者