码迷,mamicode.com
首页 >  
搜索关键字:hdu 4056 draw a mess    ( 32795个结果
HDU 6608
HDU 6608 题意:给以你一个质数,求小于它的最大质数的阶乘。 分析:Miller-Rabin快速判断素性,找到这个最大素数。此外,加上威尔逊定理推式子就好了。威尔逊定理描述的内容是对于一个正素数p: ? \((k-1)!modk$\)= k-1$ 有了这个定理,我们就可以很容易得到小于k最大素 ...
分类:其他好文   时间:2020-07-29 00:42:21    阅读次数:80
HDU-3652(数位dp)
#pragma warning (disable : 4996) #include<iostream> #include<algorithm> //#include<unordered_map> #include<fstream> #include<iomanip> #include<string> ...
分类:其他好文   时间:2020-07-29 00:41:30    阅读次数:78
HDU 6797 Tokitsukaze and Rescue
Princess CJB has lived almost her entire life in the isolated town of Ertona, where CJB uses her unique ability to recognize where crystals of materia ...
分类:其他好文   时间:2020-07-28 22:14:42    阅读次数:73
Piggy-Bank(完全背包)
HDU - 1114 题目翻译: 在acm能够做任何事情之前, 必须编制预算并获得必要的财政支持。这一行动的主要收入来自IBM。这个想法其实很简单,每当一些会员有一点小钱时,他就会把所有的硬币都扔到小猪存钱罐里。这个过程是不可逆转的, 除非打破猪,否则硬币不能拿出来。过了足够长的时间, 存钱罐里应该 ...
分类:其他好文   时间:2020-07-28 22:08:26    阅读次数:76
数位dp之f(x)
HDU - 4734 题目大致意思:我们定义十进制数x的权值为f(x) = a(n)*2^(n-1)+a(n-1)*2(n-2)+...a(2)*2+a(1)*1,a(i)表示十进制数x中第i位的数字。 题目给出a,b,求出0~b有多少个不大于f(a)的数。 这个f(x)计算就和数位计算是一样的,就 ...
分类:其他好文   时间:2020-07-28 22:05:32    阅读次数:69
HDU 1518 Squre
Given a set of sticks of various lengths, is it possible to join them end-to-end to form a square? InputThe first line of input contains N, the number ...
分类:其他好文   时间:2020-07-27 09:42:59    阅读次数:80
hdu 2544 最短路(floyd)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2544 题意 给出一个 $n$ 点 $m$ 边的带权无向图,找出结点 $1$ 到结点 $n$ 的路径最小权。($n \le 100, m \le 10000$) 题解 $n$ 的范围较小,可以用 $O_{ ...
分类:其他好文   时间:2020-07-27 09:38:16    阅读次数:51
HDU 2846 Repository
When you go shopping, you can search in repository for avalible merchandises by the computers and internet. First you give the search system a name ab ...
分类:其他好文   时间:2020-07-27 09:29:30    阅读次数:82
hdu1325-并查集
//判断输入的数字是否可以构成一棵树 //前一个数是后一个的父亲节点,树的定义:有且仅有一个总根节点,根节点到其他任意节点路径唯一,每个节点只能被其根指向,入度只能为1 #include <stdio.h> #include <string.h> #define maxn 10002 int in[ ...
分类:其他好文   时间:2020-07-27 09:18:05    阅读次数:68
2020杭电HDU-6756多校第一场Finding a MEX(图的分块)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6756 CSDN食用链接:https://blog.csdn.net/qq_43906000/article/details/107590312 Problem Description Given an ...
分类:其他好文   时间:2020-07-26 15:58:23    阅读次数:139
32795条   上一页 1 ... 11 12 13 14 15 ... 3280 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!