09 2017 档案

摘要:Time limit 5000 ms Memory limit 32768 kBXX星球有很多城市,每个城市之间有一条或多条飞行通道,但是并不是所有的路都是很安全的,每一条路有一个安全系数s,s是在 0 和 1 间的实数(包括0,1),一条从u 到 v... 阅读全文
posted @ 2017-09-30 10:11 Assassin_poi君 阅读(107) 评论(0) 推荐(0) 编辑
摘要:Blake is a CEO of a large company called "Blake Technologies". He loves his company very much and he thinks that his company should be... 阅读全文
posted @ 2017-09-29 11:34 Assassin_poi君 阅读(147) 评论(0) 推荐(0) 编辑
摘要:Kris works in a large company "Blake Technologies". As a best engineer of the company he was assigned a task to develop a printer that... 阅读全文
posted @ 2017-09-29 11:30 Assassin_poi君 阅读(166) 评论(0) 推荐(0) 编辑
摘要:1.可以这样理解,加锁的就是安全的,不加锁的就是不安全的(感觉比较生动,不知道对不对,望指出)线程安全 就是多线程访问时,采用了加锁机制,当一个线程访问该类的某个数据时,进行保护,其他线程不能进行访问直到该线程读取完,其他线程才可使用。不会出现数据不一致或者数据污染... 阅读全文
posted @ 2017-09-26 11:22 Assassin_poi君 阅读(336) 评论(0) 推荐(1) 编辑
摘要:今天才知道java中的String 竟然是不可变的,每次我们改变String中的值时实际上是在内存中创建了一个新的字符串,字符串变量将引用新创建的字符串地址。这样的话当我们大量对一个String进行更改时就相当于创建了大量的String。例如: ... 阅读全文
posted @ 2017-09-26 10:41 Assassin_poi君 阅读(153) 评论(0) 推荐(0) 编辑
摘要:Time limit 1000 ms Memory limit 32768 kB The digital root of a positive integer is found by summing the digits of the integer.... 阅读全文
posted @ 2017-09-24 14:22 Assassin_poi君 阅读(170) 评论(0) 推荐(0) 编辑
摘要:Time limit 2000 ms Memory limit 262144 kBKefa decided to make some money doing business on the Internet for exactly n days. He... 阅读全文
posted @ 2017-09-24 13:57 Assassin_poi君 阅读(153) 评论(0) 推荐(0) 编辑
摘要:Time limit 5000 ms Memory limit 262144 kB小Hi最近在追求一名学数学的女生小Z。小Z其实是想拒绝他的,但是找不到好的说辞,于是提出了这样的要求:对于给定的两个正整数N和M,小Hi随机选取一个N的约数N',小Z随机... 阅读全文
posted @ 2017-09-23 22:47 Assassin_poi君 阅读(127) 评论(0) 推荐(0) 编辑
摘要:Time limit 1000 ms Memory limit 512000 kB 《Shui Hu Zhuan》,also 《Water Margin》was written by Shi Nai'an -- an writer of Yuan a... 阅读全文
posted @ 2017-09-23 21:45 Assassin_poi君 阅读(138) 评论(0) 推荐(0) 编辑
摘要:Time limit 1000 ms Memory limit 32768 kBRock-paper-scissors is a zero-sum hand game usually played between two people, in whic... 阅读全文
posted @ 2017-09-23 21:41 Assassin_poi君 阅读(114) 评论(0) 推荐(0) 编辑
摘要:Time limit 1000 ms Memory limit 32768 kB统计给定文本文件中汉字的个数。Input 输入文件首先包含一个整数n,表示测试实例的个数,然后是n段文本。 Output 对于每一段文本,输出其中的汉字的个... 阅读全文
posted @ 2017-09-23 21:37 Assassin_poi君 阅读(130) 评论(0) 推荐(0) 编辑
摘要:Time limit 1000 ms Memory limit 32768 kB 今天的上机考试虽然有实时的Ranklist,但上面的排名只是根据完成的题数排序,没有考虑每题的分值,所以并不是最后的排名。给定录取分数线,请你写程序找出最后通过分数线的考... 阅读全文
posted @ 2017-09-23 21:34 Assassin_poi君 阅读(117) 评论(0) 推荐(0) 编辑
摘要:Time limit 10000 msMemory limit 262144 kB小Ho根据最近在密码学课上学习到的知识,开发出了一款hiho密码,这款密码的秘钥是这样生成的:对于一种有N个字母的语言,选择一个长度为M的单词;将组成这个单词的所有字母按... 阅读全文
posted @ 2017-09-23 21:32 Assassin_poi君 阅读(123) 评论(0) 推荐(0) 编辑
摘要:time limit per test 1 second memory limit per test 256 megabytes input standard input output standard outputLet quasi-palindromic numb... 阅读全文
posted @ 2017-09-22 18:28 Assassin_poi君 阅读(283) 评论(0) 推荐(0) 编辑
摘要:time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard outputDr. Evil kidnapped Mahmou... 阅读全文
posted @ 2017-09-20 12:04 Assassin_poi君 阅读(160) 评论(0) 推荐(0) 编辑
摘要:二分查找的原理非常简单,但写出的代码中很容易含有很多Bug,二分查找一文中讲解过如何实现不同类型的二分查找,但是否一定要自己去实现二分查找呢?答案显然是否定的,本文将讲解STL中与二分查找有关函数的具体使用方法及其实现原理。函数使用STL中与二分查找相关的函数有4个,... 阅读全文
posted @ 2017-09-19 13:05 Assassin_poi君 阅读(162) 评论(0) 推荐(0) 编辑
摘要:体育老师小明要将自己班上的学生按顺序排队。他首先让学生按学号从小到大的顺序排成一排,学号小的排在前面,然后进行多次调整。一次调整小明可能让一位同学出队,向前或者向后移动一段距离后再插入队列。 例如,下面给出了一组移动的例子,例子中学生的人数为8人。 0)初始队... 阅读全文
posted @ 2017-09-18 20:44 Assassin_poi君 阅读(156) 评论(0) 推荐(0) 编辑
摘要:作者: ijrys 单位: 青岛大学 时间限制: 1000ms 内存限制: 64MB 代码长度限制: 16KB连羽疲倦的推开公主阁的门,“啊啊啊,怎么会留这么麻烦的作业。” “既然布置了,那就没有办法了啊,今晚一起算就好了。”连辰拍了拍连羽的背,表示鼓励。 荆盈将做好... 阅读全文
posted @ 2017-09-16 22:59 Assassin_poi君 阅读(125) 评论(0) 推荐(0) 编辑
摘要:原文链接:http://www.wutianqi.com/?p=1081以下是我从网上收集的关于组合博弈的资料汇总:有一种很有意思的游戏,就是有物体若干堆,可以是火柴棍或是围棋子等等均可。两个 人轮流从堆中取物体若干,规定最后取光物体者取胜。这是我国民间很古老的一个游... 阅读全文
posted @ 2017-09-14 20:36 Assassin_poi君 阅读(181) 评论(0) 推荐(0) 编辑
摘要:There are some beautiful girls in Arpa’s land as mentioned before.Once Arpa came up with an obvious problem:Given an array and a numbe... 阅读全文
posted @ 2017-09-14 20:20 Assassin_poi君 阅读(125) 评论(0) 推荐(0) 编辑
摘要:给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度.回文就是正反读都是一样的字符串,如aba, abba等 Input 输入有多组case,不超过120组,每组输入为一行小写英文字符a,b,c…y,z组成的字符串S ... 阅读全文
posted @ 2017-09-11 22:33 Assassin_poi君 阅读(112) 评论(0) 推荐(0) 编辑
摘要:吉哥又想出了一个新的完美队形游戏! 假设有n个人按顺序站在他的面前,他们的身高分别是h[1], h[2] ... h[n],吉哥希望从中挑出一些人,让这些人形成一个新的队形,新的队形若满足以下三点要求,则就是新的完美队形: 1、挑出的人保持原队形的相对顺序不变,... 阅读全文
posted @ 2017-09-11 22:31 Assassin_poi君 阅读(123) 评论(0) 推荐(0) 编辑
摘要:Manacher 算法2017 年 02 月 25 日 • 阅读: 2737 • 技术 一:背景给定一个字符串,求出其最长回文子串。例如: (1):s=”abcd”, 最长回文长度为 1; (2):s=”ababa”, 最长回文长度为 5; (3):s=”abccb”... 阅读全文
posted @ 2017-09-11 22:25 Assassin_poi君 阅读(159) 评论(0) 推荐(0) 编辑
摘要:There are n servers in a laboratory, each of them can perform tasks. Each server has a unique id — integer from 1 to n.It is known tha... 阅读全文
posted @ 2017-09-10 21:47 Assassin_poi君 阅读(203) 评论(0) 推荐(0) 编辑
摘要: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 p... 阅读全文
posted @ 2017-09-10 21:44 Assassin_poi君 阅读(101) 评论(0) 推荐(0) 编辑
摘要:在竞赛中,遇到大数据时,往往读文件成了程序运行速度的瓶颈,需要更快的读取方式。相信几乎所有的C++学习者都在cin机器缓慢的速度上栽过跟头,于是从此以后发誓不用cin读数据。还有人说Pascal的read语句的速度是C/C++中scanf比不上的,C++选手只能干着急... 阅读全文
posted @ 2017-09-08 11:13 Assassin_poi君 阅读(165) 评论(0) 推荐(0) 编辑
摘要:1、碰到next_permutation(permutation:序列的意思)今天在TC上碰到一道简单题(SRM531 - Division Two - Level One),是求给定数组不按升序排列的最小字典序列(Sequence of numbers A is l... 阅读全文
posted @ 2017-09-08 10:14 Assassin_poi君 阅读(138) 评论(0) 推荐(0) 编辑
摘要:ztr loves lucky numbers. Everybody knows that positive integers are lucky if their decimal representation doesn’t contain digits other... 阅读全文
posted @ 2017-09-07 20:33 Assassin_poi君 阅读(177) 评论(0) 推荐(0) 编辑
摘要:Limak is going to participate in a contest on the last day of the 2016. The contest will start at 20:00 and will last four hours, exac... 阅读全文
posted @ 2017-09-07 20:24 Assassin_poi君 阅读(124) 评论(0) 推荐(0) 编辑
摘要:Scanner的useDelimiter方法是支持正则表达式的。假设一个字符串你想通过感叹号或者问号分割,这么写useDelimiter(“[!?]”)就可以了。import java.util.Scanner;public class first { publ... 阅读全文
posted @ 2017-09-07 15:23 Assassin_poi君 阅读(1189) 评论(0) 推荐(0) 编辑
摘要:java.util.Scanner是Java5的新特征,主要功能是简化文本扫描。这个类最实用的地方表现在获取控制台输入,其他的功能都很鸡肋,尽管Java API文档中列举了大量的API方法,但是都不怎么地。一、扫描控制台输入这个例子是常常会用到,但是如果没有Scann... 阅读全文
posted @ 2017-09-07 14:51 Assassin_poi君 阅读(201) 评论(0) 推荐(0) 编辑
摘要:如果你是哈利·波特迷,你会知道魔法世界有它自己的货币系统 —— 就如海格告诉哈利的:“十七个银西可(Sickle)兑一个加隆(Galleon),二十九个纳特(Knut)兑一个西可,很容易。”现在,给定哈利应付的价钱P和他实付的钱A,你的任务是写一个程序来计算他应该被找... 阅读全文
posted @ 2017-09-07 09:55 Assassin_poi君 阅读(179) 评论(0) 推荐(0) 编辑
摘要:A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and ... 阅读全文
posted @ 2017-09-06 10:05 Assassin_poi君 阅读(129) 评论(0) 推荐(0) 编辑
摘要:#include #include #include #include #include #include #include //游戏窗口#define FrameX 4 //游戏窗口左上角的X轴坐标#define FrameY 4 //游戏窗口左上角的Y轴坐... 阅读全文
posted @ 2017-09-01 15:46 Assassin_poi君 阅读(193) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示