UVa 10340 All in All (水题,匹配)】的更多相关文章

题目 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1281 题意 问字符串a能否是字符串b的子序列 思路 明显,计数对的上就行 感想 因为忘了break错了一次 代码 #include <algorithm> #include <cassert> #include <cmath> #include &…
题意:给你一个数,让你求需要复制粘贴多少次才能达到这个数. 析:这真是一个水题,相当水,很容易知道每次都翻倍,只要大于等于给定的数就ok了. 代码如下: #include <iostream> #include <cstdio> #include <cmath> using namespace std; int main(){ int n, kase = 0; while(scanf("%d", &n) && n >=…
看题传送门 Problem E All in All Input: standard input Output: standard output Time Limit: 2 seconds Memory Limit: 32 MB You have devised a new encryption technique whichencodes a message by inserting between its characters randomly generatedstrings in a c…
题目:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=430题意:两个字符串,第二个不能错七次,不能重复 思路:今天是帮学弟看题的,没帮学弟看出错误来...真惭愧... 于是自己写了一个.. #include <iostream> #include <cstring> using namespace std; int…
题意:給定兩個小寫的字串a與b,請印出皆出現在兩字串中的字母,出現的字母由a~z的順序印出,若同字母出現不只一次,請重複印出但不能超過任一字串中出現的次數.(from Ruby兔) 很水,直接比较输出即可. 代码: #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxn = 1001; int main() { char a[maxn],…
Cancer or Scorpio Time Limit: 1 Sec  Memory Limit: 256 MB 题目连接 http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3098 Description Alice and Michael is a young couple who are planning on having their…
题目链接:UVA - 11100 题意描述:n个旅行箱,形状相同,尺寸不同,尺寸小的可以放在尺寸大的旅行箱里.现在要求露在最外面的旅行箱的数量最少的同时满足一个旅行箱里放的旅行箱的数量最少.求出这样满足要求的任意一种方案. 算法分析:首先我们可以确定最少的旅行箱的数量cnt:即n个旅行箱里按照尺寸大小分类(尺寸相同的在同一类),数量最多的那一类的数量.然后把cnt看成有cnt个堆,第二个要求就是要让这cnt个堆里最大旅行箱数量最小,直接用vector处理即可. 等AC之后突然想到,三个旅行箱尺寸…
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2456 题目大意: 给出两个数a,b(a<=b<=100000),求在a和b之间有多少个完全平方数(包括a和b) 思路: 打表啊打表. #include<cstdio> #include<cstring> #include<cmath> cons…
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAB1QAAAMcCAIAAABo0QCJAAAgAElEQVR4nOydW7msuhKF2wIasIAHJK…
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAB3gAAAM+CAIAAAB31EfqAAAgAElEQVR4nOzdO7KtPJum69GEpAcVQQfSoA80ATddvDLSogMV9ICINLaJkUZZ2NvAKGtH4FcQZaZR9IFtvP96fy0OQkgCxuG+rO9bc86BACGJBw3xmgEAAAAAAAAAcPD/7Xg9XTAAAAAAAAAAwGcgaAYAAAAAAAAABCFoBgAAAAAAAAAEIWgGAAAAA…