摘要: 1001 数组中和等于K的数对 基准时间限制:1 秒 空间限制:131072 KB 分值: 5 难度:1级算法题 给出一个整数K和一个无序数组A,A的元素为N个互不相同的整数,找出数组A中所有和等于K的数对。例如K = 8,数组A:{-1,6,5,3,4,2,9,0,8},所有和等于8的数对包括(- 阅读全文
posted @ 2017-08-04 10:11 #忘乎所以# 阅读(134) 评论(0) 推荐(0)
摘要: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2041 这题就是找出一组数据中出现次数最多的次数,然后就从第一个开始,以那个数循环输出就成了,当然 一开始 阅读全文
posted @ 2017-08-04 10:03 #忘乎所以# 阅读(210) 评论(0) 推荐(0)
摘要: Seek the Name, Seek the Fame Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 20198 Accepted: 10515 Description The little cat is so famous, 阅读全文
posted @ 2017-08-03 22:54 #忘乎所以# 阅读(145) 评论(0) 推荐(0)
摘要: 给出两个字符串A B,求A与B的最长公共子序列(子序列不要求是连续的)。 比如两个串为: abcicba abdkscab ab是两个串的子序列,abc也是,abca也是,其中abca是这两个字符串最长的子序列。 Input 第1行:字符串A 第2行:字符串B (A,B的长度 <= 1000) Ou 阅读全文
posted @ 2017-08-03 10:13 #忘乎所以# 阅读(572) 评论(0) 推荐(0)
摘要: B. Petya and Exam time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output It's hard times now. T 阅读全文
posted @ 2017-08-03 09:57 #忘乎所以# 阅读(334) 评论(0) 推荐(0)
摘要: https://vjudge.net/contest/173966#problem/E题目确实不好说,反正用大数加法+字典树就可以了,哇了N次我就不说什么了,主要是还说我的大数写错了,然后单独验证了,没毛病,但是貌似我之前的赋值是有问题的,然后不想写了,过了一天还是又翻出来了。 1 #include 2 #include 3 using namespace std; 4 strin... 阅读全文
posted @ 2017-08-02 16:00 #忘乎所以# 阅读(144) 评论(0) 推荐(0)
摘要: Fence Repair Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 51375 Accepted: 16865 Description Farmer John wants to repair a small length o 阅读全文
posted @ 2017-08-01 22:54 #忘乎所以# 阅读(224) 评论(0) 推荐(0)
摘要: C. Star sky time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output The Cartesian coordinate sys 阅读全文
posted @ 2017-08-01 18:21 #忘乎所以# 阅读(260) 评论(0) 推荐(0)
摘要: B. The number on the board time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Some natural 阅读全文
posted @ 2017-08-01 09:32 #忘乎所以# 阅读(303) 评论(0) 推荐(0)
摘要: A. Key races time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Two boys decided to compete 阅读全文
posted @ 2017-08-01 09:27 #忘乎所以# 阅读(214) 评论(0) 推荐(0)