摘要: /*比较需要注意的是这句话* Every line (except perhaps the last one) contains the initials of 80 cows ('A'..'Z') in the new line. 没有特殊处理格式的话,就很容易... 阅读全文
posted @ 2017-08-24 19:40 mofushaohua 阅读(106) 评论(0) 推荐(0)
摘要: //这题的思路十分巧妙,两只蚂蚁同时反方向走,因为所有蚂蚁速度一致,可以看作是没有反向,而是继续按原方向走,直到下落...相当于将每只蚂蚁看作是独立运动的(挑战P20)#include using namespace std;const int N = 1e6 + 1... 阅读全文
posted @ 2017-08-24 19:39 mofushaohua 阅读(149) 评论(0) 推荐(0)
摘要: //可谓是非常水的题了,没什么可说的#include using namespace std;int main(){ int k, r; while (cin >> k >> r) { int i = 1; for (i = 1; ;i++) { int t... 阅读全文
posted @ 2017-08-24 19:38 mofushaohua 阅读(194) 评论(0) 推荐(0)
摘要: //水题,并且我用的这种方法,太过死板了...反正不太好...#include #include #include const int N = 1e8;using namespace std;char a[N], b[N];int main(){ while (cin... 阅读全文
posted @ 2017-08-22 21:04 mofushaohua 阅读(100) 评论(0) 推荐(0)
摘要: /*代码似有点细节问题,但解析挺细致的bloghttp://www.cnblogs.com/xcw0754/p/4754015.htmlhttp://blog.163.com/xifan_jiang/blog/static/251140042201671887586/... 阅读全文
posted @ 2017-08-22 20:59 mofushaohua 阅读(132) 评论(0) 推荐(0)