[Offer收割]编程练习赛54 register

Ended

Participants:154

Verdict:Wrong Answer
Score:20 / 100
Submitted:2018-04-08 14:20:28

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <assert.h>
#include <cstring>
#define maxn 100001
#define ls (rt<<1)
#define rs (rt<<1|1)
#define read freopen("in.txt","r",stdin)
using namespace std;
int vis[11];
char str[maxn];
int main()
{
    while(~scanf("%s",str))
    {
        int flag = -1;
        int len = strlen(str);
        int i=0; int j = len-1;
        while(i<j)
        {
            if(str[i]==str[j])
            {
                i++;
                j--;
            }
            else
            {
                if(str[i+1]==str[j]){
                    flag = i;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX