
ACM
文章平均质量分 80
HIT-Lori
一名刚入职的程序媛
展开
-
Mixing Milk
英文题目描述:Since milk packaging is such a low margin business, it is important to keep the price of the raw product (milk) as low as possible. Help Merry Milk Makers get the milk they need in the chea原创 2014-03-12 21:38:29 · 1310 阅读 · 0 评论 -
(LeetCode) Reverse Words in a String
problem :Reverse Words in a StringGiven an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".原创 2014-04-13 09:26:54 · 8761 阅读 · 3 评论 -
The Most Important Algorithms (in CS and Math)
本文是Christoph Koutschan列出来的32类计算机与数学领域最为重要的算法(按字符顺序排列)。覆盖的面很广,评价很精准。链接中加入了自己总结过的文章(或者用到该算法的例子),后面有时间将根据重点算法继续补充。原文转载from:http://www.risc.jku.at/people/ckoutsch/stuff/e_algorithms.html转载 2014-04-27 09:46:24 · 881 阅读 · 0 评论 -
(leetcode) Longest Substring Without Repeating Characters
Question :Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the len原创 2014-04-25 10:41:29 · 735 阅读 · 0 评论 -
(csdn高校俱乐部编程挑战)2的补码
题目详情在计算机中,整数是以2的补码的形式给出的。给出整数A和B,假设计算机是32位机,求从A到B之间的所有二进制数中,一共用了多少个1。输入格式:多组数据,每组数据一行,由两个整数A,B, -2147483648输出格式:每组输出一行,从A到B使用的1的个数。原创 2014-05-08 22:09:05 · 2273 阅读 · 1 评论 -
(leetcode) Two Sum
Question:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to th原创 2014-04-23 14:49:00 · 877 阅读 · 0 评论 -
九度刷题
题目描述: 在一个M * N的矩阵中,所有的元素只有0和1,从这个矩阵中找出一个面积最大的全1子矩阵,所谓最大是指元素1的个数最多。输入: 输入可能包含多个测试样例。对于每个测试案例,输入的第一行是两个整数m、n(1矩阵共有m行,每行有n个整数,分别是0或1,相邻两数之间严格用一个空格隔开。输出: 对应每个测试案例,输出矩阵中面积最大的全1子矩阵的元素个转载 2013-05-19 20:06:30 · 1052 阅读 · 0 评论 -
(leetcode)Median of Two Sorted Arrays
Question:There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).code :class So原创 2014-04-23 17:23:12 · 800 阅读 · 0 评论 -
腾讯2012.9.23校园招聘笔试题
转载地址:http://www.cnblogs.com/sooner/p/3253925.html一、选择题1、数据库表设计最合理的是(A)A、学生{id,name,age} 学科{id,name} 分数{学生id,学科id,分数}分析:数据库里面 一般是 学生,学科,分数 分开放。2、在数据库系统中,产生不一致的根本原因是(D)A.数据存储转载 2014-03-26 22:49:45 · 2772 阅读 · 0 评论 -
腾讯笔试题
转载地址:http://www.cnblogs.com/sooner/p/3254605.html1、解释const的含义及实现机制const的含义及实现机制,比如:const int i,是怎么做到i只可读的?答:const用来说明所定义的变量是只读的。这些在编译期间完成,编译器可能使用常数直接替换掉对此变量的引用。2、买200返100优惠券,实际上折扣是多少?转载 2014-03-26 22:52:22 · 1526 阅读 · 0 评论 -
腾讯2009年笔试题
1、1-20的两个数把和告诉A,积告诉B,A说不知道是多少,B也说不知道,这时A说我知道了,B接着说我也知道了,问这两个数是多少? 答案:2和32、爸爸,妈妈,妹妹,小强,至少两个人同一生肖的概率是多少? 答案:1-12*11*10*9/12*12*12*12 = 1-55/96 = 41/963、计算 a^b 答案:运算符优先级:括号,下标转载 2014-03-26 22:50:44 · 979 阅读 · 0 评论 -
求简单无向图中环的个数
QuestionD. A Simple Tasktime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGiven a simple graph, output the转载 2014-05-03 10:36:18 · 7458 阅读 · 4 评论 -
(leetcode)Max Points on a Line
Question:Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.分析:1、二维空间的任何一条线都可以表示成为y= k x + b 的形式。两点确定一条直线。固定其中一个点,遍历其余的点,斜率一致的即共线。2、求斜率时原创 2014-04-15 16:29:29 · 893 阅读 · 0 评论 -
Add Two Numbers
class Solution { public: ListNode *addTwoNumbers(ListNode *l1, ListNode *l2){ ListNode* phead =new ListNode(0); ListNode* pTail =phead; //int *temp ; int carry = 0; if(!l原创 2014-04-30 17:06:15 · 775 阅读 · 0 评论 -
英雄会第四届在线编程大赛·线上初赛:带通配符的数
题目:给定一个带通配符问号的数W,问号可以代表任意一个一位数字。再给定一个整数X,和W具有同样的长度。问有多少个整数符合W的形式并且比X大?输入格式多组数据,每组数据两行,第一行是W,第二行是X,它们长度相同。在[1..10]之间.输出格式每行一个整数表示结果。答题说明输入样例36?原创 2014-03-16 17:12:30 · 2276 阅读 · 1 评论 -
csdn第四届在线编程大赛·线上初赛:带通配符的数
题目:给定一个带通配符问号的数W,问号可以代表任意一个一位数字。再给定一个整数X,和W具有同样的长度。问有多少个整数符合W的形式并且比X大?输入格式多组数据,每组数据两行,第一行是W,第二行是X,它们长度相同。在[1..10]之间.输出格式每行一个整数表示结果。答题说明输入样例36?原创 2014-03-15 17:02:17 · 3441 阅读 · 12 评论 -
Prime Palindromes(USACO Gateway)的判定
题目英文描述:The number 151 is a prime palindrome because it is both a prime number and a palindrome (it is the same number when read forward as backward). Write a program that finds all prime palindrom原创 2014-03-14 22:36:55 · 2056 阅读 · 0 评论 -
(leetcode)Evaluate Reverse Polish Notation
Question:Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another expression.Some examples:原创 2014-04-14 09:59:40 · 1062 阅读 · 0 评论