12 2015 档案

Advanced C++ --- Compiler Generated Functions
摘要:C++在C的基础上添加了很多新的特性,其中包括了很被人熟知的OOP,范型编程等,但是很多大家不知道的应该是我们的C++编译器在什么时候为我们编写的类自动生成什么函数(赋值函数,析构函数,构造函数等),这些函数的内部又是如何操作的,这里我们就说说C++中类的Costructer, Destruct... 阅读全文

posted @ 2015-12-30 15:46 RookieCoder 阅读(309) 评论(0) 推荐(0)

Advanced C++ -- Logic Constness and Bitwise Constness
摘要:首先介绍一下什么是Logic Constness和Bitwise Constness,Logic Constness指的是function 后的const修饰,我们只知道这个function被const修饰了,但是并没有任何变量被const,Bitwise Constness指的是变量(指针,或... 阅读全文

posted @ 2015-12-30 15:10 RookieCoder 阅读(1071) 评论(0) 推荐(0)

Leetcode OJ --- 322. Coin Change
摘要:You are given coins of different denominations and a total amount of moneyamount. Write a function to compute the fewest number of coins that you need... 阅读全文

posted @ 2015-12-29 20:03 RookieCoder 阅读(2377) 评论(0) 推荐(0)

PAT 1100
摘要:1100. Mars Numbers (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YuePeople on Mars count their numbers with base 13:Zero on Earth is call... 阅读全文

posted @ 2015-12-25 11:03 RookieCoder 阅读(326) 评论(0) 推荐(0)

Leetcode 319. Bulb Switcher
摘要:这是一个非常巧妙的题目,网站称之为brain teaser,意思就是代码写起来会非常简介(就是逗你玩:)),题目如下:There arenbulbs that are initially off. You first turn on all the bulbs. Then, you turn off... 阅读全文

posted @ 2015-12-23 22:04 RookieCoder 阅读(537) 评论(0) 推荐(0)

Advanced C++ --- const function
摘要:上一篇介绍了const修饰的变量或者指针的含义,这篇我们介绍const修饰的函数以及函数参数含义。首先我们看一个例子class Dog{ int age; string name;public: Dog(){ age = 3; name = "dummy... 阅读全文

posted @ 2015-12-19 15:52 RookieCoder 阅读(440) 评论(0) 推荐(0)

Advance C++ -- const
摘要:这条博客基于Bo Qian的YouTube教学教程总结而成,大家可以在YouTube上找到该教程,这里做一个心得总结。这部分,总结一下对const的认识:学过C++的都知道,C++中的const用于修饰常量,也就意味着不可改变,你以为就是这么简单了,但是实际中const可以玩出很多花样:1. con... 阅读全文

posted @ 2015-12-17 21:14 RookieCoder 阅读(485) 评论(0) 推荐(0)

PAT 1014
摘要:1014. Waiting in Line (30)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueSuppose a bank has N windows open for service. There is a yellow l... 阅读全文

posted @ 2015-12-16 14:43 RookieCoder 阅读(145) 评论(0) 推荐(0)

PAT 1013
摘要:1013. Battle Over Cities (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueIt is vitally important to have all the cities connected by hig... 阅读全文

posted @ 2015-12-15 20:59 RookieCoder 阅读(218) 评论(0) 推荐(0)

PAT 1012
摘要:1012. The Best Rank (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueTo evaluate the performance of our first year CS majored students, w... 阅读全文

posted @ 2015-12-15 20:18 RookieCoder 阅读(258) 评论(0) 推荐(0)

PAT 1011
摘要:1011. World Cup Betting (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueWith the 2010 FIFA World Cup running, football fans the world ov... 阅读全文

posted @ 2015-12-12 19:50 RookieCoder 阅读(160) 评论(0) 推荐(0)

PAT 1010
摘要:1010. Radix (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven a pair of positive integers, for example, 6 and 110, can this equation... 阅读全文

posted @ 2015-12-12 19:29 RookieCoder 阅读(191) 评论(0) 推荐(0)

CUDA C 编程指南心得 Chapter1-2
摘要:参考文件:https://docs.nvidia.com/cuda/cuda-c-programming-guide/1. GPU介绍 1.1 根据文档说明,一开始GPU是因为市场上的CPU已经不能满足real-time的3D图像显示带来的巨大计算量,经过这么多年的发展,GPU已经成了并行运算的基石... 阅读全文

posted @ 2015-12-10 20:33 RookieCoder 阅读(848) 评论(0) 推荐(0)

PAT 1009
摘要:1009. Product of Polynomials (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThis time, you are supposed to find A*B where A and B are t... 阅读全文

posted @ 2015-12-10 13:02 RookieCoder 阅读(132) 评论(0) 推荐(0)

PAT 1008
摘要:1008. Elevator (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThe highest building in our city has only one elevator. A request list is... 阅读全文

posted @ 2015-12-09 17:27 RookieCoder 阅读(182) 评论(0) 推荐(0)

PAT 1007
摘要:1007. Maximum Subsequence Sum (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven a sequence of K integers { N1, N2, ..., NK}. A conti... 阅读全文

posted @ 2015-12-09 17:01 RookieCoder 阅读(175) 评论(0) 推荐(0)

PAT 1006
摘要:1006. Sign In and Sign Out (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueAt the beginning of every day, the first person who signs in ... 阅读全文

posted @ 2015-12-08 21:54 RookieCoder 阅读(200) 评论(0) 推荐(0)

PAT 1005
摘要:1005. Spell It Right (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven a non-negative integer N, your task is to compute the sum of ... 阅读全文

posted @ 2015-12-08 19:56 RookieCoder 阅读(151) 评论(0) 推荐(0)

PAT 1004
摘要:1004. Counting Leaves (30)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA family hierarchy is usually presented by a pedigree tree. Your j... 阅读全文

posted @ 2015-12-08 19:42 RookieCoder 阅读(132) 评论(0) 推荐(0)

PAT 1003
摘要:1003. Emergency (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueAs an emergency rescue team leader of a city, you are given a special ma... 阅读全文

posted @ 2015-12-07 15:53 RookieCoder 阅读(162) 评论(0) 推荐(0)

PAT 1002
摘要:1002. A+B for Polynomials (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThis time, you are supposed to find A+B where A and B are two ... 阅读全文

posted @ 2015-12-06 15:18 RookieCoder 阅读(172) 评论(0) 推荐(0)

PAT 1001
摘要:1001. A+B Format (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueCalculate a + b and output the sum in standard format -- that is, the d... 阅读全文

posted @ 2015-12-06 14:39 RookieCoder 阅读(206) 评论(0) 推荐(0)

导航