一开始出了点bug能看见排行榜,于是我看见我半个小时就A掉了前两题,信心场QAQ

  T1字符串题就不说了qwq

#include<iostream>
#include<cstring>
#include<cstdlib>
#include<cstdio> 
#include<algorithm>
#define ll long long 
using namespace std;
const int maxn=500010,inf=1e9;
int n,m,x,y,z,tot;
char c;
int main()
{
    int daxie=1;
    while((c=getchar())!=EOF)
    {
        if(('a'<=c&&c<='z')||('A'<=c&&c<='Z'))
        {
            if(daxie)
            {
                if('a'<=c&&c<='z')putchar(c-'a'+'A');
                else putchar(c);
                daxie=0;
            }
            else 
            {
                if('a'<=c&&c<='z')putchar(c);
                else putchar(c-'A'+'a');
            }
        }
        else if(c=='.')daxie=1,putchar('.');
        else putchar(' ');
    }
    return 0;
}
View Code

相关文章: