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

Ended

Participants:188

Verdict:Accepted
Score:100 / 100
Submitted:2017-10-08 14:28:07

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 <stdio.h>
#include <string.h>
#include <iostream>
#include <algorithm>
using namespace std;
char str[1000];
bool pd(int i){
    if((str[i] >= 'A' && str[i] <= 'Z' )||(str[i]>='a'&&str[i]<='z')) return true;
    return false;
}
int main()
{
   // cin>>str;
    gets(str);
    int len  = strlen(str);
    //cout<<str<<endl;
    bool flag = true;
    for(int i=0; i<len;)
    {
        if(str[i] == '@')
        {
            i = i + 1;
            if(!flag&&pd(i))
            {
                cout<<" ";
            }
            while(pd(i))
            {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX