境外网站不备案盈利,做解密类网站可行,河南专业网站建设公司排名,现在学网站开发码了一晚上才码出这个#xff0c;有点简陋#xff0c;待更新 注意#xff1a;1、数据路径自己在代码中修改#xff0c;直接重定向即可 2、要配置好环境#xff0c;将cb安装路径里的MinGW\bin路径放到path中 3、三份代码记得先编译一遍#xff0c;再运行这份代码 #include…码了一晚上才码出这个有点简陋待更新 注意1、数据路径自己在代码中修改直接重定向即可 2、要配置好环境将cb安装路径里的MinGW\bin路径放到path中 3、三份代码记得先编译一遍再运行这份代码 #include iostream
#include cstdio
#include cstring
#include cmath
#include algorithm
#include vector
#include queue
#include string
#include stack
#include map
#include set
#include bitset
#include windows.h
#define X first
#define Y second
#define clr(u,v); memset(u,v,sizeof(u));
#define in() freopen(data,r,stdin);
#define out() freopen(ans,w,stdout);
#define Clear(Q); while (!Q.empty()) Q.pop();
#define pb push_back
using namespace std;
typedef long long ll;
typedef pairint, int pii;
const int maxn 1e5 10;
const int INF 0x3f3f3f3f;
void getbat(char* TO)
{FILE *fp fopen(open.bat, w);fprintf(fp, cd %s\n, TO);fprintf(fp, c main.cpp\n);fprintf(fp, a.exe\n);fclose(fp);
}void Run(char* TO)//运行代码
{getbat(TO);ShellExecute(NULL, open, open.bat, NULL, NULL, SW_SHOWNORMAL);
}void Change(char *s)
{int len strlen(s);for (int i 0; i len; i)if (s[i] \\)s[i] /;
}
char str1[maxn], str2[maxn];
int CMP()
{FILE *fp1 fopen(C:/Users/shuhan/Desktop/ans1, r), *fp2 fopen(C:/Users/shuhan/Desktop/ans2, r);if (fp1 NULL || fp2 NULL){puts(NO this file\n);return -1;}while ((fgets(str1, INF, fp1) ! NULL) | (fgets(str2, INF, fp2) ! NULL)){if (strcmp(str1, str2) ! 0){puts(error !);puts(data1 is :);puts(strcmp(str1, ) 0 ? NULL : str1);puts(but data2 is :);puts(strcmp(str2, ) 0 ? NULL : str2);fclose(fp1);fclose(fp2);return 0;}}puts(ok!);fclose(fp1);fclose(fp2);return 1;
}char TOread[100], TOcode1[100], TOcode2[100];
int main()
{printf(请输入输入代码地址);scanf(%s, TOread);Change(TOread);puts();printf(请输入测试代码1地址);scanf(%s, TOcode1);Change(TOcode1);puts();printf(请输入测试代码2地址);scanf(%s, TOcode2);Change(TOcode2);puts();int Case 1;int TINF;//设置执行次数int Time 2000;//等待时间不建议太短do{printf(Case %d: ,Case);Run(TOread);Sleep(Time);//停止2s让文件进行读取Run(TOcode1);Sleep(Time);//停止2s让文件进行读取Run(TOcode2);Sleep(Time);//停止2s让文件进行读取int flag CMP();if (flag -1){puts(Invalid address, please check your address\n);break;}else if (flag 1){puts(answer is right\n);}else{puts(answer is wrong);break;}} while (T--);return 0;
} 转载于:https://www.cnblogs.com/scaugsh/p/6536877.html