对拍学习

(蒯的(lyd)的)

for (int i = 1; i <= 10000; i ++ )
{
    // 自行设定适当路径 
    system("C:\random.exe");
    // Unix:system("./random");
    // Windows:ms; Unix:s 
    double st = clock();
    system("C:\sol.exe");
    double ed = clock();
    system("C:\bf.exe");
    if (system("fc C:\data.out C:\data.ans")) // Unix:diff -b
    {
    	puts("WA");
    	return 0;
    }
    else printf("AC, 测试点 #%d, 用时 %.0lfms
", i, ed - st);
}

原文地址:https://www.cnblogs.com/andysj/p/13857403.html