#include
#include
#include
#include
using namespace std;
int dp[110][210],dis,t,n;
int d[110],p[110];
char str[100];
void input()
{
gets(str);
n=0;
d[0]=0;
sscanf(str,"%d",&dis);...
分类:
其他好文 时间:
2015-01-21 20:09:28
阅读次数:
153
1.关于C语言输入函数的注意事项 1.当输入单个字符时,用getchar或scanf("%c")时,要注意吸收换行符(因为换行符也是字符,其ASCII值为10)。 所以,比如要scanf("%d",&x),在此之后还要getchar()或gets()的话,那么要在它们之间一定要增加一...
分类:
其他好文 时间:
2015-01-14 00:40:41
阅读次数:
273
1.getchar:原型为int getchar(void).它从stdin里读取一个字符。返回值为用户输入的ASCⅡ码,出错返回-1。eg:c=getchar().2.putchar:原型为unsigned int putchar(char).在stdout上输出一个字符。当输出正确的时候,返回输...
分类:
其他好文 时间:
2015-01-11 17:44:42
阅读次数:
223
JSONObject allresult; allresult = new JSONObject(strResult); String result = allresult.getString("result"); String uInfo = allresult.getS...
分类:
移动开发 时间:
2015-01-09 14:16:00
阅读次数:
244
#include#includeusing namespace std;int n;char s[100001],table[]="luvletter";int main(){ scanf("%d",&n); getchar(); for(;n;--n) { gets(s); int...
分类:
其他好文 时间:
2015-01-06 11:28:24
阅读次数:
152
1、cin>>
用法1:最基本,也是最常用的用法,输入一个数字:
#include
using namespace std;
main ()
{
int a,b;
cin>>a>>b;
cout<<a+b<> 是会过滤掉不可见字符(如 空格 回车,TAB 等)
cin...
分类:
其他好文 时间:
2015-01-06 10:03:14
阅读次数:
144
Description In reward of being yearly outstanding magic student, Harry gets a magical computer. When the computer begins to deal with a process, it w....
分类:
其他好文 时间:
2015-01-05 12:32:12
阅读次数:
251
统计一个给定字符串中指定的字符出现的次数
#include
#include
#include
int main()
{
char source[80],dest[5];
int len_s,len_d,*count;
int temp,i,j;
while(1)
{
gets(dest);
gets(source);
if (strcmp(dest,"#")==...
分类:
其他好文 时间:
2015-01-04 23:08:06
阅读次数:
253
功能描述:将字符串中的字母全部替换成字母的下一个字母,要是最后一位是z或Z则替换为a或A。
* 输入:aBxyZ
* 输出:bCyzA
#include
#include
int main()
{
char a[100];
gets(a);
int len = strlen(a);
for(int i=0;i<len;i++)
...
分类:
其他好文 时间:
2015-01-03 13:18:31
阅读次数:
184
poj 2886 Who Gets the Most Candies?
Description
N children are sitting in a circle to play a game.
The children are numbered from 1 to N in clockwise order. Each of them has a card with ...
分类:
其他好文 时间:
2014-12-30 23:42:05
阅读次数:
310