It is a piece of cake for a master-hand...but I just a new here, even a new in programming. Link:http://mirror.codeforces.com/problemset/problem/112/A
I got an AC only try it once,it seems that I find the right way at first. When I'm face with the 149.A got the WA a whole night...= = The code?I don't know how to put it here...I will try it.... ~~~~~ 1200663 ~~~~~
#include <iostream>
#include <string>
#include <cstdio>
#include <cstring>
using namespace std;
char a1[110];
char a2[110];
char b1[110];
char b2[110];
int Cmp(char *pstr1,char *pstr2)
{int i,t;
for(i=0;pstr1[i]!='\0';i++)
if(pstr1[i]>='A'&&pstr1[i]<='Z')
*(pstr1+i)=*(pstr1+i)+32;
for(i=0;pstr2[i]!='\0';i++)
if(pstr2[i]>='A'&&pstr2[i]<='Z')
*(pstr2+i)=*(pstr2+i)+32;
t=0;
for(i=0;i<strlen(pstr1);i++)
{if(*(pstr1+i)>*(pstr2+i))
{t=1;break;}
if(*(pstr1+i)<*(pstr2+i))
{t=-1;break;}
if(*(pstr1+i)>*(pstr2+i))
continue;
}
return t;
}
int main()
{int t;
gets(a1);
gets(a2);
t=Cmp(a1,a2);
if(t==1) cout<<1;
if(t==-1)cout<<-1;
if(t==0)cout<<0;
cin.get();
cout<<endl;
return 0;
}
请讲英语
Seems like links with Chinese anchor text do not work. That one was to Google Translate.
Why do I have to type my words in English?
The translation on Google is a word-by-word translation, so I considerate that even you can do it successfully you won't be able to understand the translation..
原来可以输中文
是啊是啊,试试发现可以
It seems that everyone hates Chinese...
But I don't hope that.
It seems that it is the regulation..but I wanna say like 1900 in the movie...
I don't know what you mean clearly...
That sentence is:f**k the rules