07 2018 档案

摘要:问题:给出两条线段,问两线段是否相交? 向量叉乘(行列式计算):向量a(x1,y1),向量b(x2,y2): 首先我们要明白一个定理:向量a×向量b(×为向量叉乘),若结果小于0,表示向量b在向量a的顺时针方向;若结果大于0,表示向量b在向量a的逆时针方向;若等于0,表示向量a与向量b平行。(顺逆时 阅读全文 »
posted @ 2018-07-30 14:25 特务依昂 阅读(69198) 评论(1) 推荐(14) 编辑
摘要:题意:n个点连成的生成树(n个点,n-1条边,点与点之间都连通),如果某个点在两点之间的路径上,那这个点的繁荣度就+1,问你在所有点中,最大繁荣度是多少?就比如上面的图中的C点,在A-B,A-D,A-E,A-F,B-D,B-E,B-F的路径上,所以繁荣度为7。 思路:我们可以想一下,繁荣度是怎么来的 阅读全文 »
posted @ 2018-07-29 10:54 特务依昂 阅读(247) 评论(0) 推荐(0) 编辑
摘要:题意:给出了你由n个数组成的序列,让你将这个序列分为成m个集合,使得每一个集合的最大值减最小值的差相加最小。(如果某集合只有一个数字,则最大值减最小值为0) 。 思路:首先我们不难想到,最优的分配方法一定是先给这n个数排序,然后将排序好的数分成m段。因为和一个数相差最小的数,就是在有序序列中与它相邻 阅读全文 »
posted @ 2018-07-27 16:41 特务依昂 阅读(234) 评论(0) 推荐(0) 编辑
摘要:1459 迷宫游戏 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注 你来到一个迷宫前。该迷宫由若干个房间组成,每个房间都有一个得分,第一次进入这个房间,你就可以得到这个分数。还有若干双向道路连结这些房间,你沿着这些道路从一个房间走到另外一个房间需要一些时间。 阅读全文 »
posted @ 2018-07-25 17:03 特务依昂 阅读(313) 评论(0) 推荐(0) 编辑
摘要:Three Palindromes Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1948 Accepted Submission(s): 68 阅读全文 »
posted @ 2018-07-25 13:18 特务依昂 阅读(248) 评论(0) 推荐(0) 编辑
摘要:Little X used to play a card game called "24 Game", but recently he has found it too easy. So he invented a new game. Initially you have a sequence of 阅读全文 »
posted @ 2018-07-24 10:41 特务依昂 阅读(347) 评论(0) 推荐(0) 编辑
摘要:Little Artem is fond of dancing. Most of all dances Artem likes rueda — Cuban dance that is danced by pairs of boys and girls forming a circle and dan 阅读全文 »
posted @ 2018-07-24 10:24 特务依昂 阅读(157) 评论(0) 推荐(0) 编辑
摘要:1057 N的阶乘 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注 输入N求N的阶乘的准确值。 Input 输入N(1 <= N <= 10000) Output 输出N的阶乘 Input示例 5 Output示例 120思路:按照乘法运算的规则进行模拟,声 阅读全文 »
posted @ 2018-07-20 13:48 特务依昂 阅读(545) 评论(0) 推荐(0) 编辑
摘要:Each month Blake gets the report containing main economic indicators of the company "Blake Technologies". There are n commodities produced by the comp 阅读全文 »
posted @ 2018-07-19 12:19 特务依昂 阅读(407) 评论(0) 推荐(0) 编辑
摘要:Statements Vitaly works at the warehouse. The warehouse can be represented as a grid of n × mcells, each of which either is free or is occupied by a c 阅读全文 »
posted @ 2018-07-18 14:27 特务依昂 阅读(168) 评论(0) 推荐(0) 编辑
摘要:Farey Sequence Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 18507 Accepted: 7429 Description The Farey Sequence Fn for any integer n wit 阅读全文 »
posted @ 2018-07-17 11:17 特务依昂 阅读(347) 评论(0) 推荐(0) 编辑
摘要:Longge's problem Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9190 Accepted: 3073 Description Longge is good at mathematics and he likes 阅读全文 »
posted @ 2018-07-17 11:01 特务依昂 阅读(201) 评论(0) 推荐(0) 编辑
摘要:N皇后问题 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 32229 Accepted Submission(s): 13874 Problem 阅读全文 »
posted @ 2018-07-15 09:49 特务依昂 阅读(279) 评论(0) 推荐(0) 编辑
摘要:The wizards and witches of Hogwarts School of Witchcraft found Prof. Binn's History of Magic lesson to be no less boring than you found your own histo 阅读全文 »
posted @ 2018-07-11 16:20 特务依昂 阅读(186) 评论(0) 推荐(0) 编辑
摘要:Thanks a lot for helping Harry Potter in finding the Sorcerer's Stone of Immortality in October. Did we not tell you that it was just an online game ? 阅读全文 »
posted @ 2018-07-10 09:45 特务依昂 阅读(175) 评论(0) 推荐(1) 编辑
摘要:1298 圆与三角形 题目来源: HackerRank 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注 给出圆的圆心和半径,以及三角形的三个顶点,问圆同三角形是否相交。相交输出"Yes",否则输出"No"。(三角形的面积大于0)。 Input 第1行:一个数 阅读全文 »
posted @ 2018-07-09 20:00 特务依昂 阅读(596) 评论(0) 推荐(0) 编辑
摘要:给出长度为N的数组,找出这个数组的最长递增子序列。(递增子序列是指,子序列的元素是递增的) 例如:5 1 6 8 2 4 5 10,最长递增子序列是1 2 4 5 10。 Input 第1行:1个数N,N为序列的长度(2 <= N <= 50000) 第2 - N + 1行:每行1个数,对应序列的元 阅读全文 »
posted @ 2018-07-09 10:43 特务依昂 阅读(195) 评论(0) 推荐(0) 编辑
摘要:There are K hours left before Agent Mahone leaves Amman! Hammouri doesn't like how things are going in the mission and he doesn't want to fail again. 阅读全文 »
posted @ 2018-07-08 10:53 特务依昂 阅读(190) 评论(0) 推荐(0) 编辑
摘要:Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 51056 Accepted: 21551 Description Flip game is played on a rectangular 4x4 field 阅读全文 »
posted @ 2018-07-07 14:59 特务依昂 阅读(794) 评论(2) 推荐(1) 编辑
摘要:After the data structures exam, students lined up in the cafeteria to have a drink and chat about how much they have enjoyed the exam and how good the 阅读全文 »
posted @ 2018-07-06 12:28 特务依昂 阅读(446) 评论(0) 推荐(1) 编辑
摘要:AbdelKader enjoys math. He feels very frustrated whenever he sees an incorrect equation and so he tries to make it correct as quickly as possible! Giv 阅读全文 »
posted @ 2018-07-06 11:16 特务依昂 阅读(275) 评论(0) 推荐(1) 编辑

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