- 博客(5)
- 收藏
- 关注
原创 玩《天才樱木来了》
今天玩《天才樱木来了》,听着那歌,当看到晴子小姐和樱木说话的时候,我差点哭了 好怀念啊 哎,灌篮高手为什么没有第二季。。。。伤心 网址好像不能贴,自己去查吧
2014-01-17 02:20:35 535
原创 hit 1004 Prime Palindromes
就是叫你求一个区间里面的所有的回文素数,回文素数就是既是回文数又是素数的数,比如151就是回文素数。 我已开始打了一个表,找到了2到1,000,000,000里面的所有素数。 程序如下: #include #include int a[10000000]; bool ok1(int a) { int b = 0 , c = a; while(a) {
2014-01-16 22:37:26 1295
原创 hit 1003 Mixing Milk
就是一帮人需要N单位牛奶,有M个农民,每个人有Ai单位牛奶,每单位牛奶卖Pi块钱。问最少的钱? 就是结构体排序一下就行了。 结构体排序就是(首先得知道结构体,见C语言书)对结构体数组的所有元素按照某一个(或多个)关键值排序。 这道题我们就是按价格从小到大排。 里面有专门的比较函数规范和排序函数sort。 #include #include using namespace std; s
2014-01-16 00:35:34 603
原创 hit 1002 A+B+C
就是求A+B+C,用长整型就行了。 #include int main(void) { long long a , b , c; while(scanf("%lld%lld%lld",&a,&b,&c) == 3) printf("%lld\n" , a+b+c); return 0; }
2014-01-15 23:51:49 665
原创 hit 1001 a+b problem (the same as hdu,poj)
就是求a+b的问题 #include int main(void) { int a , b; while(scanf("%d%d",&a,&b) == 2) printf("%d\n" ,a+b); return 0; }
2014-01-15 23:45:37 712
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人