yzc001 @ 2024-08-10 12:49:21
#include<bits/stdc++.h>
#include "testlib.h"
int out,t1[35],t2[17],r,h,l;
int main(int argc, char* argv[]) {
registerTestlibCmd(argc, argv);
srand(time(0));
r=rand()%33+1;
for(int i=1;i<=6;i++){
while(t1[r])r=rand()%33+1;
t1[r]=1;
}
t2[rand()%16+1]=1;
for(int i=1;i<=6;i++){
out = ouf.readInt();
if(t1[out])t1[out]=0,h++;
}
out = ouf.readInt();
if(t2[out])t2[out]=0,l++;
if (h+l>4)
quitf(_ok, "The answer is correct.");
else if(h+l>3)
quitp(0.1,"Partially Correct get %d percent", 10);
else if(l)
quitp(0.05,"Partially Correct get %d percent", 5);
else
quitf(_wa, "The answer is wrong: expected = %f, found = %f", jans, pans);
}
by Y_zhao111 @ 2024-08-10 13:00:38
@yzc001 你的
by Y_zhao111 @ 2024-08-10 13:01:53
@yzc001 加上:
double pans = ouf.readDouble();
double jans = ans.readDouble();
by yzc001 @ 2024-08-10 13:33:07
加上还能用吗QWQ