红桃J

用心写好每行完美的代码,远比写一堆更有价值

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2014年8月25日

摘要: 这个题真的很水,但我竟然连错,在此警醒自己!!!写代码改了东边,忘了西边,“认真”这两个字又被我吃了,打脸啪啪啪啪。#includeusing namespace std;int gcd(int a, int b){ int t; while(b) { t = a; ... 阅读全文
posted @ 2014-08-25 16:51 红桃J 阅读(137) 评论(0) 推荐(0) 编辑

摘要: 这题其实就是快速求一个高次幂的模。这是题目的答案#include#includeusing namespace std;int a[45002];int b[45002];int mod(int a, int b, int c){ int z = 1; while(b) { ... 阅读全文
posted @ 2014-08-25 12:32 红桃J 阅读(140) 评论(0) 推荐(0) 编辑