
数学
文章平均质量分 81
大唐忽悠
高山仰止,景行行止
展开
-
Codeforces Round #415 (Div. 1) A Do you want a date?
A. Do you want a date?time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLeha decided to move to a quiet town Vičkopoli原创 2017-05-23 10:11:48 · 454 阅读 · 0 评论 -
水题--整数解 HDU 2092
HDU 2092有二个整数,它们加起来等于某个整数,乘起来又等于另一个整数,它们到底是真还是假,也就是这种整数到底存不存在,实在有点吃不准,你能快速回答吗?看来只能通过编程。例如: x + y = 9,x * y = 15 ? 找不到这样的整数x和y 1+4=5,1*4=4,所以,加起来等于5,乘起来等于4的二个整数为1和4 7+(-8)=-1,7*(-8)=-56,所以,原创 2017-07-19 20:06:07 · 495 阅读 · 0 评论 -
大数模板
原文为吉林大学ACM模板。但是乘除我自己测试了几个样例好像有点问题于是自己在许多地方都改了改。其思想依然是数组储存数位,然而每一位是万进制。这样存的数范围大了很多,但是输出输入比较麻烦。实现了加减乘除比较和取余。除法采用二分的方法查找结果。期中取余在除法函数里已经实现了。#include #include #include using namespace std;c转载 2017-09-05 15:22:09 · 640 阅读 · 0 评论 -
Codeforces Round #432 B. Arpa and a list of numbers
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputArpa has found a list containing n numbers. He calls a list bad if and onl原创 2017-09-08 14:44:45 · 277 阅读 · 0 评论 -
Casinos and travel[智力和快速幂]
Casinos and travelJohn has just bought a new car and is planning a journey around the country. Country has N cities, some of which are connected by bidirectional roads. There are N - 1 roads原创 2017-11-20 18:55:37 · 361 阅读 · 0 评论 -
求从0到n一共有多少个1
除了1最高位为1,每增加10^x次方答案增加的数目是恒定的xi。递归处理第一位,比如第一位数字是a,那么我们先考虑a00000以前的所有,再递归加上a右边的位数就是答案了原创 2017-11-16 21:56:47 · 1971 阅读 · 0 评论