The Last Practice Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 9185    Accepted Submission(s): 1947 Problem Description Tomorrow is contest day, Are you all ready? We have been training for…
B. Chat Order time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Polycarp is a big lover of killing time in social networks. A page with a chatlist in his favourite network is made so that wh…
Doubles Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4266    Accepted Submission(s): 2945 Problem Description As part of an arithmetic competency program, your students will be given randoml…
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=2094 注意每组数据处理前,map要清空. #include<cstdio> #include<iostream> #include<string.h> #include<algorithm> #include<math.h> #include<stdbool.h> #include<time.h> #include<st…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1263 题目大意: Problem Description 夏天来了~~好开心啊,呵呵,好多好多水果~~Joe经营着一个不大的水果店.他认为生存之道就是经营最受顾客欢迎的水果.现在他想要一份水果销售情况的明细表,这样Joe就可以很容易掌握所有水果的销售情况了.   Input 第一行正整数N(0<N<=10)表示有N组测试数据.每组测试数据的第一行是一个整数M(0<M<=100),表示工…
http://acm.hdu.edu.cn/showproblem.php?pid=5012 发现一个问题 假设Sting s = '1'+'2'+'3'; s!="123"!!!!!!  而是有乱码 先贴一份自己的TLE 代码, 超时应该是由于: 1.cin 2.map判重 map find太花时间 3.string花时间 4.事实上不用两个都旋转,仅仅要旋转一个即可,这样能够省下非常多时间 包含少用了make_pair pair的判重等等....哎  二笔了  太暴力了 #incl…
传送门 题意:从输入开始,1.输入样例数:2.然后输入一组样例中的行数n:3.前n-1行为定义变量(之间使用空格隔开),只需要map存进去就可以了(这里有覆盖的情况,故使用mp["s"] = "***"的方法赋值,因为insert的方法如果里面存在的话,插不进入数值):4.然后就是最后一行输入计算式子(之间使用空格隔开). 思路:我使用的字符流的方法分割的的字符串,因为题中说了使用空格隔开的: 变量的储存使用map就可以,在最后一行输入计算式子之后,同样使用字符流分…
第一眼看到这题就直接BFS爆搜,第一发爆了内存,傻逼了忘标记了,然后就改,咋标记呢. 然后想到用map函数,就8!个不同的排列,换成字符串用map标记.然后又交一发果断超时,伤心,最恨超时,还不如来个wa算了. 然后卡着了,后来上网上搜,要用康托展开,康托展开是什么鬼?然后学习了一下,就是个映射,感觉和map差不多. http://blog.csdn.net/zhongkeli/article/details/6966805这个学习一下康托展开. 其实本题的关键不是康托展开,而是置换. 以123…
Let the Balloon Rise Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 104108    Accepted Submission(s): 40046 Problem Description Contest time again! How excited it is to see balloons floating ar…
题目 用map写超便捷 也可以用字典树来写 我以前是用map的: #include<stdio.h> #include<string.h> #include<algorithm> #include<string> #include<math.h> #include <iostream> #include<map> using namespace std; ]; int main() { ,n,len,j; map<s…
题目 参考了     1     2 #define _CRT_SECURE_NO_WARNINGS //用的是STL中的map 和 multiset 来做的,代码写起来比较简洁,也比较好容易理解. //multiset可以允许重复 //multiset<int>::iterator it; 用来遍历 #include<stdio.h> #include<string.h> #include<algorithm> #include<iostream&g…
Problem Description As the increase of population, the living space for people is becoming smaller and smaller. In MagicStar the problem is much worse. Dr. Mathematica is trying to save land by clustering buildings and then we call the set of buildin…
Problem Description Long long ago, there is a gunner whose name is Jack. He likes to go hunting very much. One day he go to the grove. There are n birds and n trees. The i−thbird stands on the top of the i−th tree. The trees stand in straight line fr…
Problem Description 给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的.   Input 输入n,m,点的编号是1~n,然后是m行,每行4个数 a,b,d,p,表示a和b之间有一条边,且其长度为d,花费为p.最后一行是两个数 s,t;起点s,终点.n和m为0时输入结束.(1<n<=1000, 0<m<100000, s != t)   Output 输出 一行有两个数…
Sample Input5 //Tgreenredblueredred 统计颜色的次数 输出最多的颜色3pinkorangepink0 Sample Outputred pink # include <iostream> # include <cstdio> # include <cstring> # include <string> # include <map> using namespace std ; int main () { // f…
Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will count the balloons of each color…
Skip the Class Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1028 Accepted Submission(s): 599 Problem Description Finally term begins. luras loves school so much as she could skip the class happ…
解题报告:有一群人在打乒乓球比赛,需要在这一群人里面选出一个冠军,现在规定,若a赢了b,b又赢了c那么如果a与c没有比赛的话,就默认a赢了c,而如果c赢了a的话,则这三个人里面选不出冠军,还有就是如果一个人没有输给别人,但是存在一个人跟这个人之间的输赢关系不能确定的话,也是作为选不出冠军的情况,现在输入一群人的比赛情况,要你确定,利用这组比赛情况能不能确定一个冠军,能的话输出Yes,否则输出No. 感觉这题应该有很多种不同的解法,其中由于输入的是选手的名字,所以还要用到map容器.我的做法是枚举…
Collecting one's own plants for use as herbal medicines is perhaps one of the most self-empowering things a person can do, as it implies that they have taken the time and effort to learn about the uses and virtues of the plant and how it might benefi…
MapReduce几个小应用 上篇文章已经介绍了怎么去写一个简单的MR并且将其跑起来,学习一个东西动手还是很有必要的,接下来我们就举几个小demo来体验一下跑起来的快感. demo链接请参照附件:http://files.cnblogs.com/files/wangkeustc/demo.tar.gz 排序: 问题:将sort_input文件夹下的多个文件中的数据按照从小到大排序 设计思路:shuffle阶段会将发送到reduce的数据自动排序,所以我们这边只要保证在每个partiton中数字都…
Description We all use cell phone today. And we must be familiar with the intelligent English input method on the cell phone. To be specific, the number buttons may correspond to some English letters respectively, as shown below: 2 : a, b, c    3 : d…
String Given a string S and two integers L and M, we consider a substring of S as “recoverable” if and only if   (i) It is of length M*L;   (ii) It can be constructed by concatenating M “diversified” substrings of S, where each of these substrings ha…
Electronic Document Security Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 172    Accepted Submission(s): 94 Problem Description The Tyrell corporation uses a state-of-the-art electronic docu…
没用过baidu的map api其实挺简单,申请一个key,然后根据坐标在地图上生成对象,看了官方的dome多少知道有些什么功能了,没什么可说的直接贴效果. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport&quo…
产生冠军 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 26204    Accepted Submission(s): 11751 Problem Description 有一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛.球赛的规则如下:如果A打败了B,B又打败了C,而A与C之间没有进行过比赛,那么就认定,A一定能打败…
首次遭遇Json格式,缘由项目中用到Json数据,需要进行解析,为此,将Json数据转为了自己较为熟悉的DataTable格式,以此展示至DataGridView中,验证是否成功. 直接上代码: /// <summary> /// JSON数据转换为datatable类型数据 /// </summary> /// <param name="strjson">JSON数据字符串</param> /// <returns>转换为D…
1.初试: <html> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html> 2.标题: HTML 标题(Heading)是通过 <h1> - <h6> 等标签进行定义的.显然由大标题变为小标题.... <html> <body> <h1>This is…
SpringBoot 也算AI吧,它根据您架构中引用的依赖,自动化地按默认方案帮您完成了Spring那些复杂繁琐的配置工作.为了让您不会看低此 AI 水平,还特地喊出了“约定大于配置”的口号.从这个角度看,SpringBoot 就是基础架构搭建工具,与系统业务逻辑实现没什么关系,这和Maven有点类似. 既然是搭建,SpringBoot 当然推荐 Maven 或 Gradle.另外,SpringBoot 要求 JDK1.8+ 环境. SpringBoot 提供一系列基于spring-boot-s…
curl http://xxx.com/address/addresslist\?search\=%40 --cookie oa_cookie=123 -s| node parss .js js 代码 var jsdom = require('jsdom') ,fs = require('fs') process.stdin.setEncoding('utf8'); var html = '' process.stdin.on('readable', function() { var chunk…
说明:具体代码操作我就不贴了.官方有正规的例子!bootstrap-table-examples传送 使用注意事项: 传入的id和pid可以是string类型的(我后台返回的是Long类型转换成string来显示的),开始看到有的地方说必须使用number类型,走了不少弯路.去研究js中String转Long精度丢失的问题了..... 顶级节点的parentId值得问题.官方默认的判断方式为如果parentId为空(null或者"")时,此行就是顶级节点.但是结合我自己的情况.我在设计…