生后的国度,有各种面值的钱币。现在手上有30枚硬币,他们的面额分别是: 1 4 3 4 8 8 4 2 5 1 405 363 197 470 59 121 443 329 111 93 63 16 290 367 154 192 98 234 163 434 请问凑不出最小的金额是多少? 提示:将 ...
分类:
编程语言 时间:
2019-02-26 19:41:17
阅读次数:
259
递归枚举当前01串,返回值分三种:返回1,表示当前01串为I串,即全部为1;返回0,表示当前01串为B串,即全部为0;返回3,表示当前01串为F串,即全部为3 ...
分类:
其他好文 时间:
2019-02-05 09:13:21
阅读次数:
179
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> using namespace std; char s[10][10]; int panduan(int row,int cew) { for ...
分类:
其他好文 时间:
2019-01-30 16:12:53
阅读次数:
125
今有物不知其数,三三数之剩二,五五数之剩三,七七数之剩二。问物几何? https://www.cnblogs.com/freinds/p/6388992.html https://blog.csdn.net/niiick/article/details/80229217 void exgcd(int ...
分类:
其他好文 时间:
2019-01-23 01:29:30
阅读次数:
175
传送门:http://codeforces.com/contest/1105/problem/C C. Ayoub and Lost Array time limit per test 1 second memory limit per test 256 megabytes input standa ...
分类:
其他好文 时间:
2019-01-21 21:02:46
阅读次数:
206
E - Dominant Indices CodeForces - 1009F You are given a rooted undirected tree consisting of nn vertices. Vertex 11 is the root. Let's denote a depth ...
分类:
其他好文 时间:
2019-01-21 16:12:18
阅读次数:
221
Vijos P1448 校门外有很多树,学校决定在某个时刻在某一段种上一种树,保证任一时刻不会出现两段相同种类的树,现有两种操作: K=1,读入 l,r 表示在 l 到 r 之间种上一种树,每次操作种的树的种类都不同; K=2,读入 l,r 表示询问 l 到 r 之间有多少种树。 注意:每个位置都可 ...
分类:
其他好文 时间:
2019-01-20 12:02:44
阅读次数:
195
题目描述 给你n根火柴棍,你可以拼出多少个形如“A+B=CA+B=C”的等式?等式中的AA、BB、CC是用火柴棍拼出的整数(若该数非零,则最高位不能是00)。用火柴棍拼数字0-90?9的拼法如图所示: 注意: 加号与等号各自需要两根火柴棍 如果A≠BA≠B,则A+B=CA+B=C与B+A=CB+A= ...
分类:
其他好文 时间:
2019-01-18 18:36:44
阅读次数:
125
题目描述 给出一个长度为NNN的非负整数序列AiA_iAi?,对于所有1≤k≤(N+1)/21 ≤ k ≤ (N + 1) / 21≤k≤(N+1)/2,输出A1,A3,…,A2k?1A_1, A_3, …, A_{2k - 1}A1?,A3?,…,A2k?1?的中位数。即前1,3,5,…1,3,5 ...
分类:
其他好文 时间:
2019-01-13 11:42:28
阅读次数:
167
写在前面: 记录了个人的学习过程,同时方便复习 整理自网络 非原创部分会标明出处 by blackgryph0n 目录 结论 证明 拓展 实现 结论 证明 拓展 实现 结论 Miller-Rabin算法可以在O(k log2(n))的时间内检测一个超级大的正整数n是否是素数,k为自己设定的检测的次数 ...
分类:
编程语言 时间:
2019-01-06 15:39:51
阅读次数:
238