17 多校1 Add More Zero 水题】的更多相关文章

Problem Description There is a youngster known for amateur propositions concerning several mathematical hard problems. Nowadays, he is preparing a thought-provoking problem on a specific type of supercomputer which has ability to support calculations…
题目传送:http://acm.hdu.edu.cn/showproblem.php?pid=6043 Problem Description KazaQ wears socks everyday. At the beginning, he has n pairs of socks numbered from 1 to n in his closets. Every morning, he puts on a pair of socks which has the smallest number…
题目传送: Hybrid Crystals Problem Description > Kyber crystals, also called the living crystal or simply the kyber, and known as kaiburr crystals in ancient times, were rare, Force-attuned crystals that grew in nature and were found on scattered planets…
一丢丢思维就ok 题目大意: 魔法师要煮药,有n个等级的药,所需要的药物为a1,a2...an,意为第n级需要多少药物,下一行为库存的不同等级药物,药物可降级使用不可升级. 思路:从高级药物开始解,把没用完的药物存起来放到下一及使用. 代码如下: #include <iostream> #include <string.h> using namespace std; ],b[],all,flag(); long long sum; int main(){ cin>>t;…
In computer science, the Knuth-Morris-Pratt string searching algorithm (or KMP algorithm) searches for occurrences of a "word" W within a main "text string" S by employing the observation that when a mismatch occurs, the word itself em…
11.9 线段树 http://acm.hdu.edu.cn/showproblem.php?pid=6315 求逆序对个数 http://acm.hdu.edu.cn/showproblem.php?pid=6318 必赢博弈 http://acm.hdu.edu.cn/showproblem.php?pid=6312 欧拉回路 http://acm.hdu.edu.cn/showproblem.php?pid=6311 好难的构造题目 http://acm.hdu.edu.cn/showpr…
毒瘤出题人,坑了我们好久,从基本的素数筛选,到埃氏筛法,到随机数快速素数判定,到费马小定理,好好的水题做成了数论题. 结果答案是 2*n=n+3*n,特判1,2. 以下为毒瘤题目: 题目大意: 输入一个数n, 输出两个合数(即非素数)a,b 实现 n+a=b 解题思路 3n=n+2n; 特判1.2 代码: #include<iostream> #include<stdio.h> using namespace std; typedef long long ll; int T; ll…
https://ac.nowcoder.com/acm/contest/888/B 实际上的确是个水题,写个小数据找个规律看看,所谓不同度,其实就是依次插入每个元素后,各种元素出现的最后位置的坐标求和,这个是n²的,考虑算贡献,每个坐标被计算的次数,直到其被覆盖为止,移动多少个位置就有多少贡献. 数据太小,不需要map或者离散化,故复杂度O(n).…
Problem A: The 3n + 1 problem Time Limit: 1 Sec  Memory Limit: 64 MBSubmit: 14  Solved: 6[Submit][Status][Web Board] Description Consider the following algorithm to generate a sequence of numbers. Start with an integer n. If n is even, divide by 2. I…
2018 HDU多校第四场赛后补题 自己学校出的毒瘤场..吃枣药丸 hdu中的题号是6332 - 6343. K. Expression in Memories 题意: 判断一个简化版的算术表达式是否合法. 题解: 注意细节即可. 代码: #include <bits/stdc++.h> using namespace std; int n; char s[505]; int main () { int T; cin>>T; for ( ; T; --T) { scanf(&quo…