|
|
|
[成绩][第三阶段成绩]
我把我的程序,和我测试的结果发上来给大家看看 testlbr.exe和提交的答案,仅仅是打印信息的格式从两行变成了1行 1.txt,是我在一台xp机器上面,每个样本跑了20遍的结果 2.txt,是我在我自己电脑上跑A0.exe,跑了20遍的结果(我的电脑是win7系统,a1-a4本身就不能执行) 大家再对比一下评委里面我测试程序的结果,看看误差有多可怕吧 把附件解压到同一目录,运行test.bat > test.txt 来获得结果 |
|
[成绩][第三阶段成绩]
对啊,那你来设计一套计量方法避免误差啊。。。 假设误差是15ms,如果成绩是16ms和21ms,你认为误差可以忽略吗? 假设误差是15ms,如果成绩是1016ms和1030ms,你认为误差可以忽略吗? |
|
|
|
[成绩][第三阶段成绩]
a0 a1 a2增加1000ms是为了避免误差给结果带来的不公平 20楼的代码已经很明显说明了,GetTickCount计算时间在很短的时候,是不精确的,有误差的 48楼的兄弟说了评委在测试方法上面所带来的误差 所以,在程序本身运行时间很短的情况下,这些误差是不能忽略的 加1000ms,这些误差基本上可以忽略,让结果相对公平些 |
|
|
|
[成绩][第三阶段成绩]
加时间是公平的,减小了选手之间的分数差距,同时兼顾了做对的条数 |
|
[成绩][第三阶段成绩]
完全可以,建议用ns级别来计算时间 |
|
|
|
|
|
[成绩][第三阶段成绩]
加10000ms的话,后面两个也要加上9000ms 后两个减1000ms是不公平的,理由我前面说了,GetTickCount是不精确的,小于20ms的都不是其真实时间 看下面的code #include <windows.h> #include <stdio.h> int main() { DWORD t = GetTickCount(); Sleep(1); DWORD t1 = GetTickCount(); printf("time: %d\n", t1 - t); return 0; } 我这里运行,有时候是15,有时候是0,精确吗? 再看下面的code #include <windows.h> #include <stdio.h> int main() { DWORD t = GetTickCount(); Sleep(1000); DWORD t1 = GetTickCount(); printf("time: %d\n", t1 - t); return 0; } 我这里运行,每次都是998,精确度比上面高多了 再看下面的code #include <windows.h> #include <stdio.h> int main() { DWORD t = GetTickCount(); Sleep(10000); DWORD t1 = GetTickCount(); printf("time: %d\n", t1 - t); return 0; } 每次都是10000 |
|
|
|
[成绩][第三阶段成绩]
我对评分标准有些质疑 看A1成绩,16ms和21ms相差5ms,分数相差5分 看A3成绩,1094ms和1130ms相差36ms,分数却相差0.64分 也许你会说A3的基数大了,但是我想说的是,A3题目里面有个Sleep(1000),这个完全不是我们程序所消耗的时间,能把这个因素算作基数里面吗? 另外,我的A1自测情况,有时候是16ms,有时候是8ms,用GetTickCount计算时间,在30ms以下都是不精确的,能否将这两个分数拉出一倍的差距吗? 极端例子请看这个帖子的A1: http://bbs.pediy.com/showpost.php?p=890231&postcount=25 请看第4名和第5名,第4名做对5条,而第5名只做对3条,分数却只相差2分,仔细研究会发现,是前两条测试用例,相差了52ms所导致的,这个公平吗? 这题基本属于猜题类型的,个人觉得,不应该完全用时间来评分 |
|
|
|
[测试程序][第三阶段题目测试程序]
找了台XP测试了一下 C:\tx31>testlbr.exe a0.exe kernel32.dll Beep GetTickCount Time: 78 ms C:\tx31>testlbr.exe a1.exe kernel32.dll IsDebuggerPresent GetCurrentProcessId Time: 31 ms C:\tx31>testlbr.exe a2.exe kernel32.dll IsDebuggerPresent GetCurrentProcessId Time: 218 ms C:\tx31>testlbr.exe a3.exe kernel32.dll IsDebuggerPresent GetCurrentProcessId Time: 1140 ms C:\tx31>testlbr.exe a4.exe kernel32.dll IsDebuggerPresent GetCurrentProcessId Time: 1109 ms |
|
|
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值