摘要: 链接:https://www.nowcoder.com/acm/contest/79/E来源:牛客网 题目描述 小欧在上代数课的时候,老师向大家提出了一个问题,不定方程 ax+by=c 的整数解存在的充要条件是什么。 聪明的小欧立即举手给出了老师一个完美的回答,放学后,老师叫住小欧给了他一个思考题。 阅读全文
posted @ 2018-03-29 20:46 hit_yjl 阅读(260) 评论(0) 推荐(0)
摘要: A 题意:判断一个字符串是否存在偶数长度回文子串。 思路:判断是否有两个字符相等即可。O(n)。 1 #include <iostream> 2 #include <fstream> 3 #include <sstream> 4 #include <cstdlib> 5 #include <cstd 阅读全文
posted @ 2018-03-11 15:00 hit_yjl 阅读(349) 评论(0) 推荐(0)
摘要: 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 有一棵包含N个节点的二叉树,节点编号是1~N。 现在我们知道它的中序遍历结果A1, A2, ... AN。 只有中序遍历显然不能确定一棵二叉树的形态, 阅读全文
posted @ 2018-03-04 15:21 hit_yjl 阅读(192) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2018-03-02 23:20 hit_yjl 阅读(1) 评论(0) 推荐(0)
摘要: LCIS Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8225 Accepted Submission(s): 3524 Problem De 阅读全文
posted @ 2018-03-02 15:41 hit_yjl 阅读(191) 评论(0) 推荐(0)
摘要: This is a very popular game for children. In this game, there's a cube, which consists of 3 * 3 * 3 small cubes. We can unwrap the cube, it will becom 阅读全文
posted @ 2018-03-02 15:15 hit_yjl 阅读(475) 评论(0) 推荐(0)
摘要: 1067: [SCOI2007]降雨量 Description 我们常常会说这样的话:“X年是自Y年以来降雨量最多的”。它的含义是X年的降雨量不超过Y年,且对于任意Y<Z<X,Z年的降雨量严格小于X年。例如2002,2003,2004和2005年的降雨量分别为4920,5901,2832和3890, 阅读全文
posted @ 2018-03-02 14:16 hit_yjl 阅读(244) 评论(0) 推荐(0)
摘要: Everybody is fond of computers, but buying a new one is always a money challenge. Fortunately, there is always a convenient way to deal with. You can 阅读全文
posted @ 2018-03-02 14:07 hit_yjl 阅读(264) 评论(0) 推荐(0)
摘要: 1012: [JSOI2008]最大数maxnumber Description 现在请求你维护一个数列,要求提供以下两种操作:1、 查询操作。语法:Q L 功能:查询当前数列中末尾L个数中的最大的数,并输出这个数的值。限制:L不超过当前数列的长度。2、 插入操作。语法:A n 功能:将n加上t,其 阅读全文
posted @ 2018-03-02 14:03 hit_yjl 阅读(141) 评论(0) 推荐(0)
摘要: Bill is developing a new mathematical theory for human emotions. His recent investigations are dedicated to studying how good or bad days influent peo 阅读全文
posted @ 2018-03-02 13:58 hit_yjl 阅读(254) 评论(0) 推荐(0)