• QNX---Interrupt vector numbers(原创!!!)

    时间:2022-06-30 05:27:10

    InterruptintrDescription0AclockthatrunsattheresolutionsetbyClockPeriod()1Keyboard2Slave8259—youcan'tattachtothisinterrupt.3Com24Com15Netcard/soundcard...

  • [LeetCode&Python] Problem 628. Maximum Product of Three Numbers

    时间:2022-06-12 12:49:51

    Givenanintegerarray,findthreenumberswhoseproductismaximumandoutputthemaximumproduct.Example1:Input:[1,2,3]Output:6Example2:Input:[1,2,3,4]Output:24Not...

  • Codeforces CF#628 Education 8 D. Magic Numbers

    时间:2022-06-05 10:08:24

    D.MagicNumberstimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputConsiderthedecimalpresentationofaninteger.Le...

  • UVA 11481 - Arrange the Numbers 数学

    时间:2022-06-01 21:19:37

    Considerthissequence{1,2,3,...,N},asainitialsequenceoffirstNnaturalnumbers.Youcanearrangethissequenceinmanyways.TherewillbeN!differentarrangements.Youha...

  • poj3292-Semi-prime H-numbers(筛法打表)

    时间:2022-05-30 15:52:04

    一,题意: 一个H-number是所有的模四余一的数。(x=4*k+1) 如果一个H-number是H-primes当且仅当它的因数只有1和它本身(除1外)。一个H-number是H-semi-prime当且仅当它只由两个H-primes的乘积表示。H-number剩下其他的数均为H-composi...

  • 文章13称号 Add Two Numbers

    时间:2022-05-29 14:25:56

    Youaregiventwolinkedlistsrepresentingtwonon-negativenumbers.Thedigitsarestoredinreverseorderandeachoftheirnodescontainasingledigit.Addthetwonumbersand...

  • LeetCode - 386. Lexicographical Numbers

    时间:2022-05-25 14:01:22

    Givenaninteger n,return1- n inlexicographicalorder.Forexample,given13,return:[1,10,11,12,13,2,3,4,5,6,7,8,9].Pleaseoptimizeyouralgorithmtouselesstimea...

  • LeetCode Add Two Numbers II

    时间:2022-05-25 06:00:42

    原题链接在这里:https://leetcode.com/problems/add-two-numbers-ii/题目:Youaregiventwolinkedlistsrepresentingtwonon-negativenumbers.Themostsignificantdigitcomesfi...

  • 445 Add Two Numbers II 两数相加 II

    时间:2022-05-25 06:01:00

    给定两个非空链表来代表两个非负整数。数字最高位位于链表开始位置。它们的每个节点只存储单个数字。将这两数相加会返回一个新的链表。你可以假设除了数字0之外,这两个数字都不会以零开头。进阶:如果输入链表不能修改该如何处理?换句话说,你不能对列表中的节点进行翻转。示例:输入:(7->2->4-&...

  • [leetcode]445. Add Two Numbers II 两数相加II

    时间:2022-05-25 06:00:54

    Youaregiventwo non-empty linkedlistsrepresentingtwonon-negativeintegers.Themostsignificantdigitcomesfirstandeachoftheirnodescontainasingledigit.Addthe...

  • Uva 10006 Carmichael Numbers (快速幂)

    时间:2022-05-21 12:01:21

    题意:给你一个数,让你判断是否是非素数,同时a^n%n==a(其中a的范围为2~n-1)思路:先判断是不是非素数,然后利用快速幂对每个a进行判断代码:#include<iostream>#include<cmath>#include<cstdio>#include...

  • CF401D 【Roman and Numbers】

    时间:2022-05-15 23:46:24

    题意将n(n<=10^18)的各位数字重新排列(不允许有前导零) 求 可以构造几个modm等于0的数字解法状压f[S][k]表示选用的位数集合为S,modm为k的方案数注意不能有前导0但是这样做是有缺陷的状压本质上是将每个数按下标强行看作不同的数因此有重复统计的情况比如n=11,方案只有1种,...

  • C - Reduced ID Numbers 寒假训练

    时间:2022-05-15 06:10:05

    T.ChurteachesvariousgroupsofstudentsatuniversityU.EveryU-studenthasauniqueStudentIdentificationNumber(SIN).ASINsisanintegerintherange0≤s≤MaxSINwithMax...

  • leetcode-【中等题】2. Add Two Numbers

    时间:2022-05-05 09:23:03

    题目Youaregiventwolinkedlistsrepresentingtwonon-negativenumbers.Thedigitsarestoredinreverseorderandeachoftheirnodescontainasingledigit.Addthetwonumbersa...

  • poj2196---Specialized Four-Digit Numbers

    时间:2022-04-24 17:20:11

    #include<stdio.h>#include<stdlib.h>intmain(){inti,sum,sumOfH,sumOfd,tmp1,tmp2,tmp3;for(i=;i<;i++){sum=;sumOfd=;sumOfH=;tmp1=i;tmp2=i;tm...

  • (Problem 42)Coded triangle numbers

    时间:2022-04-04 20:29:57

    The nth termofthesequenceoftrianglenumbersisgivenby, tn =½n(n+1);sothefirsttentrianglenumbersare:1,3,6,10,15,21,28,36,45,55,...Byconvertingeachletteri...

  • Palindromic Numbers LightOJ - 1205

    时间:2022-03-28 15:54:18

    题目大意:求区间内的回文数个数题目思路:数位dp,先枚举前一半数字,然后填上相应的后一半数字。#include<cstdio>#include<cstring>#include<iostream>#include<algorithm>#include&...

  • 【BZOJ1662】[Usaco2006 Nov]Round Numbers 圆环数 数位DP

    时间:2022-03-22 05:20:16

    【BZOJ1662】[Usaco2006Nov]RoundNumbers圆环数Description正如你所知,奶牛们没有手指以至于不能玩“石头剪刀布”来任意地决定例如谁先挤奶的顺序。她们甚至也不能通过仍硬币的方式。所以她们通过"roundnumber"竞赛的方式。第一头牛选取一个整数,小于20亿。...

  • POJ1995 Raising Modulo Numbers(快速幂)

    时间:2022-03-21 12:20:37

    POJ1995RaisingModuloNumbers计算(A1B1+A2B2+...+AHBH)modM.快速幂,套模板/**Created:2016年03月30日23时01分45秒星期三*Author:Akrusher**/#include<cstdio>#include<cs...

  • UVA 11481 Arrange the Numbers(组合数学 错位排序)

    时间:2022-03-09 17:15:54

    题意:长度为n的序列,前m位恰好k位正确排序,求方法数前m位选k个数正确排,为cm[m][k],剩余m-k个空位,要错排,这m-k个数可能是前m个数中剩下的,也可能来自后面的n-m个数考虑这样一个问题,共n个数,前i位错排的方法数,显然dp[i][0]=i!递推考虑:处理到第i个数时,等价于前i-1...