摘要:
//水题#include #include using namespace std;const int N = 1e4 + 10;int a[N], b[N];int main(){ int k, n; scanf("%d", &k); for (int c = 1;... 阅读全文
posted @ 2017-08-20 15:21
mofushaohua
阅读(165)
评论(0)
推荐(0)
摘要:
/* 看来我思维方面还是...可能做题太少,还没建立题感,别人能想到想明白的,我却很难才能相通 就题论题...这题的关键是,胖兄弟有n张牌,也就有n种出牌的可能,把这n种情况下,可能得到的点数总和求出来,再除n得期望 点数总和怎么算? 把maze的所有... 阅读全文
posted @ 2017-08-20 15:17
mofushaohua
阅读(307)
评论(0)
推荐(0)
摘要:
/* 这题比较坑啊,有些数据是没用的,可我经验不足,一开始还没发现 1. 首先,因为Fat Brother知道所有的牌,他抽到的总是当前最利于他的,换句话说,游戏进行了几轮,他就会拿到几分(题目有说 Note that the integers written... 阅读全文
posted @ 2017-08-20 15:12
mofushaohua
阅读(184)
评论(0)
推荐(0)
摘要:
/* 题解:入门经典P82*/#include #include using namespace std;const int maxn = 105;int a[maxn], n, k, m;//逆时针走t步,步长为d,d为-1表示顺时针走,返回新位置int go(i... 阅读全文
posted @ 2017-08-20 15:08
mofushaohua
阅读(115)
评论(0)
推荐(0)
摘要:
/* 具体题解见入门经典P83-85 总结下这题碰到的知识点: 1.数据输入的处理,尤其特殊字符,EOF,'\n','\r'等等 (以及,如果单独写出一个函数,来处理这些特殊的输入方式,会使得代码书写变得简洁很多,见该题中的 readchar()函数) ... 阅读全文
posted @ 2017-08-20 15:06
mofushaohua
阅读(164)
评论(0)
推荐(0)