4 条题解

  • 3
    @ 2022-1-24 9:49:20
    #include <math.h>
    #include <stack>
    #include <stdio.h>
    #include <iostream>
    #include <vector>
    #include <iomanip>
    #include <string.h>
    #include <algorithm>
    using namespace std;
    #define LL long long
    const int N = 1e5 + 10;
    const int INF = 0x3f3f3f3f;
    int main()
    {
        char a[1000];
        cin >> a;
        int len = strlen(a);
        bool flag = true;
        for(int i = 0; flag && i < len; i++)
        {
            if(a[i] != a[len - 1 - i])
                flag = false;
        }
        if(flag)
            cout << "yes";
        else
            cout <<"no";
        return 0;
    }```
    • 3
      @ 2022-1-24 9:49:13
      #include <iostream>
      #include <math.h>
      #include <string>
      #include <string.h>
      using namespace std;
      int main()
      {
          char a[1000];
          cin >> a;
          int len = strlen(a);
          bool flag = true;
          for (int i = 0;flag && i < len; i++)
          {
              if (a[i] != a[len - 1 - i])
              {
                  flag = false;
              }
          }
          if (flag)
          {
              cout << "yes";
          }
          else
          {
              cout << "no";
          }
      }
      
      • 3
        @ 2022-1-24 9:48:38
        #include <iostream>
        #include <math.h>
        #include <string>
        #include <string.h>
        using namespace std;
        int main()
        {
            char a[1000];
            cin >> a;
            int len = strlen(a);
            bool flag = true;
            for (int i = 0;flag && i < len; i++)
            {
                if (a[i] != a[len - 1 - i])
                {
                    flag = false;
                }
            }
            if (flag)
            {
                cout << "yes";
            }
            else
            {
                cout << "no";
            }
        }
        
        • 0
          @ 2022-1-24 9:50:43
          #include <iostream>
          #include <string.h>
          #include <stdio.h>
          using namespace std;
          char a[105];
          int main()
          {
          	cin>>a;
          	int len=strlen(a);
          	bool flag=true;
          	for(int i=0;flag&&i<len;i++)
          	{
          		if(a[i]!=a[len-1-i])
          		{
          			flag=false;
          		}
          	}
          	if(flag)
          	{
          		cout<<"yes";
          	}
          	else
          	{
          		cout<<"no";
          	}
          	return 0;
          }
          
          • 1

          信息

          ID
          1121
          时间
          1000ms
          内存
          128MiB
          难度
          3
          标签
          递交数
          44
          已通过
          24
          上传者