• Linux error numbers

    时间:2023-12-23 14:57:35

    Linux error numbers, straight from the horse's mouth.#define EPERM 1 /* Operation not permitted */#define ENOENT 2 /* N...

  • POJ 1142 Smith Numbers(史密斯数)

    时间:2023-12-18 21:39:54

    Description题目描述While skimming his phone directory in 1982, Albert Wilansky, a mathematician of Lehigh University, noticed that the telephone number of...

  • POJ3292 Semi-prime H-numbers

    时间:2023-12-17 13:35:56

    传送门:刷《数论一本通》时看到的题,简单记录一下。题目大意(照抄书上的):形如4n+1的数被称为H数,乘法在H数组成的集合内是封闭的。在这个集合中是能被1和本身整除的数叫H-素数,其余的数被称为H合数,1个H-合成数是一个能且只能被分解成两个H-素数乘积的H合数,求0-h内有多少个H合成数。题解:首...

  • 【树】Sum Root to Leaf Numbers

    时间:2023-12-13 17:58:15

    题目:Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2-&g...

  • poj 3252 Round Numbers 【推导·排列组合】

    时间:2023-12-12 20:43:25

    以sample为例子 [2,12]区间的RoundNumbers(简称RN)个数:Rn[2,12]=Rn[0,12]-Rn[0,1] 即:Rn[start,finish]=Rn[0,finish]-Rn[0,start-1] 所以关键是给定一个X,求出Rn[0,X] 现在假设X=10100100  ...

  • pat 1100 Mars Numbers(20 分)

    时间:2023-12-05 10:36:05

    1100 Mars Numbers(20 分)People on Mars count their numbers with base 13:Zero on Earth is called "tret" on Mars.The numbers 1 to 12 on Earch is called "...

  • Poj 1316 Self Numbers(水题)

    时间:2023-12-02 21:52:50

    一、DescriptionIn 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. For any positive integer n, define d(n)...

  • Triangular numbers

    时间:2023-12-01 19:00:35

    http://codeforces.com/problemset/problem/47/A Triangular numbers time limit per test 2 seconds memory limit per...

  • 找规律/数位DP HDOJ 4722 Good Numbers

    时间:2023-12-01 12:12:47

    题目传送门 /* 找规律/数位DP:我做的时候差一点做出来了,只是不知道最后的 is_one () http://www.cnblogs.com/crazyapple/p/3315436.html 数位DP:http://blog.csdn.n...

  • HDU 4722 Good Numbers

    时间:2023-12-01 12:10:04

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4722Good NumbersTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Tota...

  • hdu 4722 Good Numbers 数位DP

    时间:2023-12-01 12:01:26

    数位DP!!!代码如下: #include<iostream> #include<stdio.h> #include<algorithm> #include<iomanip> #include<cmath> #include<cstr...

  • HDU 4722:Good Numbers(数位DP)

    时间:2023-12-01 11:59:54

    类型:数位DP题意:定义一个Good Number 为 一个数所有位数相加的和%10==0.问[A,B]之间有多少Good Number.方法:正常“暴力”的定义状态:(i,d,相关量)定义dp[i][d][mod] 为 d开头的i位数中,%10==mod的数的个数dp[i][d][mod] = s...

  • hdu 4722 Good Numbers 规律 数位dp

    时间:2023-12-01 11:52:21

    #include<iostream>#include<cstring>#include<cstdio>#include<vector>#include<queue>using namespace std;#define ll long lo...

  • SPOJ BALNUM Balanced Numbers 平衡数(数位DP,状压)

    时间:2023-11-30 19:38:56

    题意:平衡树定义为“一个整数的某个数位若是奇数,则该奇数必定出现偶数次;偶数位则必须出现奇数次”,比如 222,数位为偶数2,共出现3次,是奇数次,所以合法。给一个区间[L,R],问有多少个平衡数?思路:这题比较好解决,只有前导零问题需要解决。如果枚举到011,那么其前导零(偶数)出现了1次而已,而...

  • Humble Numbers HDU - 1058

    时间:2023-11-30 19:31:29

    A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24...

  • Numbers、Strings、Lists 笔记<一>

    时间:2023-11-29 20:21:36

    下一篇:流程控制<二>阅读链接:官方Python3.7教程废话:最近开始阅读python3.7文档,希望把容易混淆的知识记下来。除法总是返回一个浮点数>>> 8/24.0>>> 4/60.6666666666666666>>>可以使用...

  • PAT甲题题解-1120. Friend Numbers (20)-水题

    时间:2023-11-28 19:58:02

    博主欢迎转载,但请给出本文链接,我尊重你,你尊重我,谢谢~http://www.cnblogs.com/chenxiwenruo/p/6789775.html特别不喜欢那些随便转载别人的原创文章又不给出链接的所以不准偷偷复制博主的博客噢~~水题,就是统计n个数的数位和有多少个不同的,并且输出即可。#...

  • [LeetCode] 628. Maximum Product of Three Numbers_Easy

    时间:2023-11-27 19:08:20

    Given an integer array, find three numbers whose product is maximum and output the maximum product.Example 1:Input: [1,2,3]Output: 6Example 2:Input: [...

  • Binary Numbers(HDU1390)

    时间:2023-11-27 11:14:16

    Binary Numbers点我Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3820    Accepted Submission(s)...

  • UVa #11582 Colossal Fibonacci Numbers!

    时间:2023-11-25 20:12:52

    巨大的斐波那契数The i'th Fibonacci number f (i) is recursively defined in the following way:f (0) = 0 and f (1) = 1f (i+2) = f (i+1) + f (i)  for every i ≥ 0Y...