c - 工作负载分配公式中字符 's' 代表什么

标签 c function

我有一个问题,我试图理解它,但我用谷歌搜索但找不到相关答案。

For any distribution, if a is the total time required by the 1st TA, b is the total time required by the second TA and c is the total time required by the 3rd TA, minimize z = abs(a-b)+abs(b-c)+abs(c-a).

Input The first input is N, the number of test cases. Each test case has 1st input as Q, the number of questions. Then exactly Q numbers (space separated) in 1 line, each denoting the time required for every question. Output For every test case, one number in a line, z, the minimum value which is possible.

有人能告诉我公式中的s是什么吗?

最佳答案

正如您可能想象的那样,

abs() 不是 a*b*s。这是C library function计算 absolute value一个整数。

它的原型(prototype)位于 stdlib.h 中。

关于c - 工作负载分配公式中字符 's' 代表什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29071225/

相关文章:

c - 访问冲突读取位置 0x000000xx - c 结构属性 - Visual Studio

c - 在我退出之前处理 sigaction 时我的打印品没有出现

c - 动态函数名称 - 无法解析外部符号

c - 将普通的 C 函数调用包装在另一个静态内联函数中?

function - 如何为VLookup函数传入Range参数?

iphone - iOS 将输出浮点参数传递给函数

javascript - 如何阻止 JS 函数在移动设备上运行?

c++ - Visual C++ 上的 _nextafterf

vba - 带有 IF 语句和 INDEX 的 Excel 自定义公式,MATCH 返回 #VALUE 错误

python 2.7 用字典中的值替换 raw_input 字符串