Skip to main content

Posts

2017

qt 5.x初探 (3)

·677 words·2 mins
update3: 终于知道了正确的学习姿势… 用百度把要用的东西大概描述出来,然后总能找到一个是你要的。。。

g++ 编译多个源文件(转载)

·1369 words·3 mins
参考资料 一. 常用编译命令选项 假设源程序文件名为test.c。 无选项编译链接 用法:#gcc test.c 作用:将test.c预处理、汇编、编译并链接形成可执行文件。这里未指定输出文件,默认输出为a.out。

qt 5.x 学习笔记 (2)

·3095 words·7 mins
先来放一波过程中用到的资料和官方文档好了。 basic layout_qt5.8 QBoxLayout Class_qt5.8 QString Class 5.8 QChar Class qt 5.8

qt 5.x 初探(1)

·477 words·1 min
嘛。。为了系统安全课来学一波qt… 现在算是写出了一个可以打开文件,保存文件的记事本。

codeforces #413 C. Fountains (BIT维护前缀max)

·960 words·2 mins
题目链接 题意:有2种货币,分别为C和D.给出n种资源的代价和美丽度,每种资源只能用其中一种资源购买。现在拥有货币C的数量是c,拥有货币D的数量是d.然后恰好买2个资源,问最大美丽度,不能的话输出0.

codeforces #413 B T-shirt buying (贪心)

·699 words·2 mins
题目链接 题意:有n个T恤,每个价格都不同,有三种颜色,分别用1,2,3表示,每件T恤给出前xiong和后背的颜色。现在有m个顾客排成一队,对于每个顾客,给出他喜欢的颜色,只要一个T恤的前xiong或者后背的颜色之一满足该颜色即可。顾客总希望买符合他喜欢颜色的T恤中价格最低的。现在问每个顾客买到的T恤的价格,如果某个顾客没有买T恤,输出-1

codeforces #413 A. Carrot Cakes (模拟)

·391 words·1 min
题目链接 题意:初始有一个锅,每t分钟可以做好k个饼,现在需要N个饼。还可以另外建一个锅,花费d时间,建好以后两个锅可以并行烙饼。问是否应该建锅?(以期减少烙饼时间)

20170504近况

·630 words·2 mins
啊。。在准备考试QAQ 明天约了鹅厂面试。。。然而从四月就开始一直考试考试考试….感觉药丸啊?

20140419

·117 words·1 min
最让你恶心痛苦的那些人,你必要从他们身上学到最重要和有用的东西。 所有的痛苦都不能白受,克我者必生我。

leetcode 228. Summary Ranges

·412 words·1 min
Given a sorted integer array without duplicates, return the summary of its ranges. For example, given [0,1,2,4,5,7], return ["0->2","4->5","7"]. 题意:把连续的数连续表示

leetcode 75. Sort Colors

·628 words·2 mins
Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.

leetcode 11. Container With Most Water (two pointer)

·328 words·1 min
Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water.