F.A.Qs Home ProblemSet Status Ranklist Contest LoginRegister
Notice:祝各位Oier新年快乐,Rp++!
大视野在线测评-欢迎您
[ New Thread ]
Problem 3534 >> 求问为什么答案保留五位WA,保留10位就对了
wjyi @ 2016-04-13 21:04:49
[ Quote ] [ Edit ] [ Delete ] 1#
RT
(怀疑special judge写错了
Gvolv @ 2016-04-13 21:05:42
[ Quote ] [ Edit ] [ Delete ] 2#
同疑
fqwerz @ 2016-04-13 21:11:59
[ Quote ] [ Edit ] [ Delete ] 3#
Gvolv @ 2016-04-13 21:12:49
[ Quote ] [ Edit ] [ Delete ] 4#
火钳留名%楼上神犇
lavendir @ 2016-04-13 21:13:14
[ Quote ] [ Edit ] [ Delete ] 5#
SPJ如下
#include <cstdio>
#include <cstring>
#include <cmath>
#define OJ_AC 0
#define OJ_WA 1
#define OJ_PE 5
int main(int argc, char* argv[]){
FILE *fi,*fo,*fu;
fi=fopen(argv[1],"r");
fo=fopen(argv[2],"r");
fu=fopen(argv[3],"r");
double n1, n2;
fscanf(fo, "%lf", &n1); fscanf(fu, "%lf", &n2);
if (fabs(n1 - n2) >n1* 0.0001) return OJ_WA;
return OJ_AC;
}
wjyi @ 2016-04-13 21:20:43
[ Quote ] [ Edit ] [ Delete ] 6#
为什么不是if (fabs(n1 - n2) > 0.0001) return OJ_WA;
return OJ_AC;
stdafx @ 2016-04-14 06:10:51
[ Quote ] [ Edit ] [ Delete ] 7#
这是相对误差 不是绝对误差
liujunhao @ 2017-04-27 12:00:26
[ Quote ] [ Edit ] [ Delete ] 8#
为啥不是相对误差或者绝对误差
OwenOwl @ 2017-09-21 14:24:35
[ Quote ] [ Edit ] [ Delete ] 9#
这题spj不是有nan吗
Troywar @ 2018-01-03 14:58:36
[ Quote ] [ Edit ] [ Delete ] 10#
相对误差……
[Top] [Previous Page] [Next Page]

HOME Back