随笔分类 -  tricky

摘要:(在队友怂恿下写了LeetCode上的一个水题) 传送门 题意 Validate if a given string is numeric. Some examples: "0" => true " 0.1 " => true "abc" => false "1 a" => false "2e10" 阅读全文
posted @ 2016-06-17 20:45 Pat 阅读(237) 评论(0) 推荐(0)
摘要:传送门 A. Ariel time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output King Triton really likes wa 阅读全文
posted @ 2016-06-06 23:32 Pat 阅读(310) 评论(0) 推荐(1)
摘要:传送门 E. Epic Fail of a Genie time limit per test 0.5 seconds memory limit per test 64 megabytes input standard input output standard output Aladdin had 阅读全文
posted @ 2016-06-06 16:47 Pat 阅读(223) 评论(0) 推荐(0)
摘要:Problem Description 小明在旅游的路上看到了一条美丽的河,河上有许多船只,有的船只向左航行,有的船只向右航行。小明希望拍下这一美丽的风景,并且把尽可能多的船只都完整地拍到一张照片中。 小明位于河的边上,并且可以在河边的任意位置进行拍照,照相机的视野恰好为90度角,只能以垂直于河边的 阅读全文
posted @ 2016-05-30 23:31 Pat 阅读(315) 评论(0) 推荐(0)
摘要:传送门 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 在 Warcraft III 之冰封王座中,毁灭者是不死族打三本后期时的一个魔法飞行单位。 毁灭者的核心技能之一,叫做魔法吸收(Absorb Mana): 现在让我们来考虑下面的问题: 假设你拥有 n 个魔法单位, 阅读全文
posted @ 2016-04-24 13:30 Pat 阅读(1410) 评论(1) 推荐(0)
摘要:传送门 Time Limit: 3 Sec Memory Limit: 128 MB Description Alice likes playing games. So she will take part in the movements of M within N days, and each 阅读全文
posted @ 2016-04-19 23:16 Pat 阅读(328) 评论(0) 推荐(0)
摘要:Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description After inventing Turing Tree, 3xian always felt bo 阅读全文
posted @ 2016-04-19 22:59 Pat 阅读(200) 评论(0) 推荐(0)
摘要:Description 有一个N个整数的序列(每个数的初值为0)。每个数都是整数。你有M次操作。操作有两种类型: ——Add Di Xi 从第一个数开始每隔Di 个位置增加Xi ——Query Li Ri 回答当前序列Li项到Ri项的和 有一个N个整数的序列(每个数的初值为0)。每个数都是整数。你有 阅读全文
posted @ 2016-04-17 20:35 Pat 阅读(211) 评论(0) 推荐(0)
摘要:传送门 time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Little Petya is now fond of data com 阅读全文
posted @ 2016-03-15 21:37 Pat 阅读(368) 评论(0) 推荐(0)
摘要:time limit per test 1 second time limit per test 1 second memory limit per test 256 megabytes memory limit per test 256 megabytes input standard input 阅读全文
posted @ 2016-03-11 19:16 Pat 阅读(289) 评论(0) 推荐(0)
摘要:传送门 确定比赛名次 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 17915 Accepted Submission(s): 7169 Pro 阅读全文
posted @ 2015-09-17 15:09 Pat 阅读(798) 评论(0) 推荐(0)
摘要:传送门 Even the most successful company can go through a crisis period when you have to make a hard decision — to restructure, discard and merge departme 阅读全文
posted @ 2015-08-06 11:33 Pat 阅读(470) 评论(0) 推荐(0)
摘要:2015年辽宁省赛热身赛有一道高精度乘法 传送门:NEUOJ 1574 A*B 1574: A * B 题目描述 Calculate $a \times b$. Calculate $a \times b$. 输入 Your program will be tested on one or more 阅读全文
posted @ 2015-07-06 20:49 Pat 阅读(1187) 评论(0) 推荐(0)
摘要:题目大意是:给出 $N$ 个正整数,其中至多有一个数只出现一次,其余的数都出现了两次。判断是否有某个数只出现一次,若有输出这个数,否则输出“-1”。 $1\le N\le 5000000$ 这道题的正解是用位运算中的异或 XOR (^) 位运算有一个重要性质:与顺序无关。 证明:1^0=1, 0^0 阅读全文
posted @ 2014-10-17 19:57 Pat 阅读(158) 评论(0) 推荐(0)