- 博客(11)
- 资源 (1)
- 收藏
- 关注
原创 1095-- Cars on Campus (30)
1006 感谢https://www.nowcoder.com/discuss/478对我的帮助和启发。 题目: 题目描述 Zhejiang University has 6 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the c...
2019-02-28 21:35:19
402
原创 1094-- The Largest Generation (25)
1005 题目: 题目描述 A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the same generation. Your task is to find the generation with the largest po...
2019-02-27 16:00:05
201
原创 1091-Acute Stroke (30)
1004 题目 题目描述 One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of image analysis in which the core regions are identified in each MRI slice, ...
2019-02-27 14:28:23
295
原创 1090- Highest Price in Supply Chain (25)
1003 题目: 题目描述 A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer. Starting from one root supplier...
2019-02-26 19:22:25
225
原创 1087-All Roads Lead to Rome(30)
题目: 题目描述 Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most happiness. 输入描述: Each in...
2019-02-25 19:03:52
289
原创 1018——Public Bike Management Center
题目描述 1001 There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any station and return it to any other stat...
2019-02-23 16:50:40
221
原创 Python中常用的基本语法(一)
p.s. 最近在做NLP的任务,用熟悉的C++做发现C++有很多不方便的地方,尤其是中文编码的转化,非常繁琐。故采用Python。本文主要就基本数据结构、控制流等几个基本语法方面,给出总结。 参考资料:《Python编程:从入门到实践》 目录 print——基本输出 input()——基本输入(字符串) 字符串和数值的相互转换 if——条件语句 while——循环语句 注释 字符...
2019-01-03 20:24:17
408
原创 哈希表分离链接法--两种初始化方法及其对比
在教材中多为第一种方法。实际上可以改变,减少h->tablesize次的malloc()操作 下面是声明:typedef int ElementType; /* hashSep.h */ #ifndef HashSep_H #define HashSep_H typedef unsigned int Index; //Hash()散列函数的返回类型 struct listnode; t
2017-10-06 18:16:12
737
原创 【书中示例】-《C程序设计语言》第三章:控制流
/* binsearch(),二分查找,在v[0]<=v[1]...<=v[n-1]中查找x */ int binsearch(int x, int v[], int n) { int low, high, mid;//! low = 0; high = n - 1; while (low <= high) { mid = (low + high) / 2; if (v[m
2017-09-21 20:11:51
558
原创 【书中示例】--《C程序设计语言》第二章:类型、运算符、表达式
/* string(),返回字符串s的长度 */ int string(char s[]) { int i; for (i = 0;s[i] != '\0';i++) ; return i; } /* 判断是否为闰年 */ if ((0 == year % 4 && 0 != year % 100) || 0 == year % 400) printf("%d is a
2017-09-18 17:54:02
529
原创 拷贝构造函数----深拷贝、浅拷贝
拷贝构造函数----深拷贝、浅拷贝 【何时调用拷贝构造函数】: 1-函数的参数时该对象时(按值传入) 2-函数的返回值是该对象时 3-该类对象的其中一个对象需要通过另一个对象进行初始化时。 【浅拷贝复制的缺陷】: 当复制的对象为动态申请内存的对象时,浅拷贝复制的对象,乍一看时对象进行了复制,其实是对其指针进行了复制。
2017-09-10 15:06:03
353
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅