Floating-Point Hazard 题目描述 Given the value of low, high you will have to find the value of the following expression: \(\sum_{i=low}^{high}(\sqrt[3]{(i+10^{-15})}-\sqrt[3]i)\) If you try to find the value of the above expression in a straightforward w…
Communication 题目描述 The Ministry of Communication has an extremely wonderful message system, designed by the President himself. For maximum efficiency, each office in the Ministry can send a message directly to some, but not necessarily all, other off…
Janitor Troubles Problem Description While working a night shift at the university as a janitor, you absent-mindedly erase a blackboard covered with equations, only to realize afterwards that these were no ordinary equations! They were the notes of t…
As rich as Crassus 题目链接 题目描述 Crassus, the richest man in the world, invested some of his money with the Very Legitimate International Bank. The Bank offered a remarkable interest rate. They promised that given an initial investment of x, the balance…
Bus Stop 题目描述 In a rural village in Thailand, there is a long, straight, road with houses scattered along it. (We can picture the road as a long line segment, with an eastern endpoint and a western endpoint.) The Thai government is planning to set up…
Evolution Game 题目描述 In the fantasy world of ICPC there are magical beasts. As they grow, these beasts can change form, and every time they do they become more powerful. A beast cannot change form completely arbitrarily though. In each form a beast ha…
第一次作业 需求简要说明 针对符合规定的多项式表达式输出其符合格式规定的导函数多项式,格式错误输出WRONG FORMAT! 带符号整数 支持前导0的带符号整数,符号可省略,如: +02.-16>.19260817等. 幂函数 一般形式 由自变量x和指数组成,指数为一个带符号整数,如:x ^ +2. 省略形式 当指数为1的时候,可以采用省略形式,如:x. 项 变量项 带有系数的幂函数,如:2 * x ^ 2.-1 * x. 系数为1的时候,可以省略系数或表示为正号开头的形式,如:x ^ 2.+…
作业1-1 包含简单幂函数的多项式导函数的求解 I. 基于度量的程序结构分析 1)程序结构与基本度量统计图 2)分析 ​ 本人的第一次作业的程序实现逻辑十分简单,但是OOP的色彩并不强烈,程序耦合度过高. Homewk类: judge():输入合法性判断: process(),getTerm():输入处理: output():输出处理: main():主函数: Term类: division():将Term识别为二元数组: derivation():实现Term的求导: II. 程序BUG分析…
figure:first-child { margin-top: -20px; } #write ol, #write ul { position: relative; } img { max-width: 100%; vertical-align: middle; } button, input, select, textarea { color: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit…
一.程序设计思路 在我的三次作业中都采用了类的分层结构,采用逐项匹配,分层求导的思路. (一). 第一次作业中构建了Polynimial(多项式)类,在类的构造器中就完成了对非法空格的判断并对合法表达式进行删除空格处理.由于第一次作业仅含有带有系数的幂函数与常数项,因而我就没有专门构建针对每一个项的类,而是在本类中就定义了getitem方法,用正则表达式逐项匹配出符合要求的项.在第一次作业中我求导的基本单位为项,在构造正则表达式时我对表达式中可能出现项的类型进行枚举,分别为:(1)系数与指数均有…