![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法笔记PTA
文章平均质量分 68
辛勤的小码农^_^
这个作者很懒,什么都没留下…
展开
-
PAT (Advanced Level) Practice1012 The Best Rank (25分)
1012 The Best Rank (25分) To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algrbra), and E - English. At the mean time, we enco原创 2021-02-01 12:27:37 · 68 阅读 · 0 评论 -
PAT (Basic Level) Practice (中文)1026 程序运行时间 (15分)
1026 程序运行时间 (15分) 要获得一个 C 语言程序的运行时间,常用的方法是调用头文件 time.h,其中提供了 clock() 函数,可以捕捉从程序开始运行到 clock() 被调用时所耗费的时间。这个时间单位是 clock tick,即“时钟打点”。同时还有一个常数 CLK_TCK,给出了机器时钟每秒所走的时钟打点数。于是为了获得一个函数 f 的运行时间,我们只要在调用 f 之前先调用 clock(),获得一个时钟打点数 C1;在 f 执行完成后再调用 clock(),获得另一个时钟打点数 C2原创 2021-01-30 22:44:20 · 92 阅读 · 0 评论