C++#include<bits/stdc++.h>
#include<windows.h>
#define int long long
using namespace std;
void COLOR_PRINT(const char* s,int color)
{
HANDLE handle=GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(handle,FOREGROUND_INTENSITY|color);
printf(s);
SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY|7);
return;
}
int vis[15];
signed main()
{
auto d_int = std::chrono::seconds(5); // 原始 duration 类型为 int64_t
double d_double = std::chrono::duration<double>(d_int).count(); // 转换为 double 类型
int ans=0;
for(int i=1;i<=10;i++)
{
system("std.exe");
system("stop.exe");
auto start = std::chrono::high_resolution_clock::now();
system("lcs.exe");
auto end = std::chrono::high_resolution_clock::now();
if(system("fc 1.out 1.ans")==false)
{
vis[i]=1;
}
if((double)duration.count()>1.0)
{
vis[i]=2;
}
}
for(int i=1;i<=10;i++)
{
if(vis[i]==1)
{
COLOR_PRINT("AC ",2);
}
else if(vis[i]==2)
{
COLOR_PRINT("TLE ",1);
}
else
{
COLOR_PRINT("WA ",4);
}
}
return 0;
}