CSU

Shining Gems

思路:简单模拟

#include 
#include 
#include 
#include 
#include 
using namespace std;
#define M 1005
#define INF 1<<29
#define CLS(x,v)  memset(x,v,sizeof(x))
#define filer  freopen("C:\\Users\\sq\\Desktop\\1.txt","r",stdin);
bool isequal(char a,char b,char c)
{
    return (a==b&&b==c);
}
int n,m;
char s[M][M];
int Comb()
{
    for(int i=0;i


printf 这道题很有意思,注意负数的情况!!

char *p;
int input()
{
    int ret=0,flag=1;
    while(*p<'0'||*p>'9')
    {if(*p=='-')flag=-1; p++;}
    while(*p>='0'&&*p<='9')
    {
        ret=ret*10+(*p-'0');
        p++;
    }
    return flag*ret;
}
int main()
{
    int a[3],len;
    char s[200];
    int start, End;
    while(gets(s))
    {
        len=strlen(s);
        start=0;
        // printf("->>%s\n",s);
        for(int i=0; i



你可能感兴趣的:(ACdream&NYOJ)