- 博客(10)
- 收藏
- 关注
原创 Strange fuction HDU - 2899
Now, here is a fuction: F(x) = 6 * x^7+8*x^6+7*x^3+5*x^2-y*x (0 Can you find the minimum value when x is between 0 and 100.InputThe first line of the input contains an integer T(1OutputJus
2017-02-17 16:25:41
420
原创 Pie HDU - 1969
My birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are coming to my party and each of
2017-02-17 09:53:23
278
原创 最短的名字 CSU - 1115
在一个奇怪的村子中,很多人的名字都很长,比如aaaaa, bbb and abababab。名字这么长,叫全名显然起来很不方便。所以村民之间一般只叫名字的前缀。比如叫'aaaaa'的时候可以只叫'aaa',因为没有第二个人名字的前三个字母是'aaa'。不过你不能叫'a',因为有两个人的名字都以'a'开头。村里的人都很聪明,他们总是用最短的称呼叫人。输入保证村里不会有一个人的名字是另外一个人名字
2017-02-14 20:02:22
375
原创 十进制-十六进制 CSU - 1160
把十进制整数转换为十六进制,格式为0x开头,10~15由大写字母A~F表示。Input 每行一个整数x,0Output 每行输出对应的八位十六进制整数,包括前导0。Sample Input01023Sample Output0x000000000x000003FFHint参考大神的代码,有两种方法。
2017-02-14 10:27:50
507
原创 strcmp函数
strcmp C/C++函数,比较两个字符串设这两个字符串为str1,str2,若str1==str2,则返回零;若str1若str1>str2,则返回正数。一般形式strcmp(字符串1,字符串2)定义在#include中当s1当s1==s2时,返回值=
2017-02-14 09:55:53
396
原创 一二三 CSU - 1100
你弟弟刚刚学会写英语的一(one)、二(two)和三(three)。他在纸上写了好些一二三,可惜有些字母写错了。已知每个单词最多有一个字母写错了(单词长度肯定不会错),你能认出他写的啥吗? Input第一行为单词的个数(不超过10)。以下每行为一个单词,单词长度正确,且最多有一个字母写错。所有字母都是小写的。 Output对于每组测试数据,
2017-02-12 10:02:56
422
原创 机器人的指令 CSU - 1112
G - 机器人的指令 CSU - 1112 我的代码(写不下去了):#include int main(){ int T, t, loc = 0; char order; scanf("%d", &T); while (T--) { scanf("%d", &t); while(t--) { sc
2017-02-11 21:57:41
516
原创 CSU-1111 三家人
F - 三家人 CSU - 1111 这道题感觉很简单,但是不会算数学………………后来看了一位大神的解题才知道为什么,贴上这位大神的运算部分~~ s=(x+y)/3.0; //三人都做每人应做的天数 a=x-s; //A多做的天数 b=y-s; //B多做的天数 pay=a/(a+
2017-02-11 18:06:47
339
原创 sort函数
C语言sort函数如何使用最佳答案C语言中没有预置的sort函数。如果在C语言中,遇到有调用sort函数,就是自定义的一个函数,功能一般用于排序。一、可以编写自己的sort函数。如下函数为将整型数组从小到大排序。1234567891
2017-02-10 15:03:55
594
原创 2月10日测验
A - Cow Multiplication Bessie is tired of multiplying pairs of numbers the usual way, so she invented her own style of multiplication. In her style, A*B is equal to the sum of all poss
2017-02-10 14:31:50
409
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人