自动AC机
僅供學習,請勿在任何時候使用
首發于洛谷,我就是作者!
主程序
捆綁程序
#include<bits/stdc++.h>//捆綁軟件,作用是計數 #define MAXX (9999) using namespace std; int i,j,a; int main(){freopen("x.txt","r",stdin);cin>>a;freopen("x.txt","w",stdout);cout<<a+1;fclose(stdin);fclose(stdout);return 0; }—————————————————————————————
這個是弱化版的,畢竟一直閃也會被發現 。
強化版:
自動強化版:
#include<bits/stdc++.h> #define MAXX (9999) using namespace std; string a="edit",s,z; char b[1000],e,c[1000]; char* d; int b1=99,b2;//edit為題目名稱 void hhh() {cin>>b1;if(b1==99) {if(freopen("edit0.out","r",stdin)==NULL) {freopen("x.txt","w",stdout);cout<<2;b1=1;} else {freopen("x.txt","w",stdout);cout<<1;b1=0;}} else {freopen("x.txt","w",stdout);b2=b1+1;cout<<b2;}s+=a; // cout<<b1;freopen("edit.out","w",stdout);if(b1<=9) {b[0]=b1+'0';if(b1==9) {b2=10;s+=1+'0';s+=0+'0';} else {s+=b[0]+1;}a+=b[0];s+=".out";const char *p=s.data();a+=".out";for(int i=0; i<a.length(); i++) {b[i]=a[i];b[i+1]='\0';}} else {b[0]=b1/10+'0';b[1]=b1%10+'0';s+=b[0];s+=b[1]+1;a+=b[0];a+=b[1];a+=".out";s+=".out";const char *p=s.data();for(int i=0; i<a.length(); i++) {b[i]=a[i];b[i+1]='\0';}} } int main() {if(freopen("edit.cpp","r",stdin)==NULL) {b1=1;b[0]=b1+'0';s+=b[0];a+=b[0];s+=".out";a+=".out";for(int i=0; i<a.length(); i++) {b[i]=a[i];b[i+1]='\0';}freopen(b,"r",stdin);gets(c);const char *p=s.data();freopen("edit.out","w",stdout);int i,j;for(i=0; i<strlen(c); i++) {cout<<c[i];}return 0;} else {freopen("x.txt","r",stdin);//計數文件名:x.txt.現在為全自動,不用手動。hhh();freopen(b,"r",stdin);gets(c);freopen("edit.out","w",stdout);int i,j;for(i=0; i<strlen(c); i++) {cout<<c[i];}const char *p1=s.data();if(freopen(p1,"r",stdin)==NULL) {system("del /q x.txt");system("del /q edit.cpp");//freopen("edit.out","w",stdout);//銷毀文件請將以上三行的注釋去掉}fclose(stdin);fclose(stdout);return 0;} } //現在只需要使用替換將文件名替換即可,修復了一個bug。再次更新
總結
- 上一篇: 南京审计学院计算机专业老师,南京审计学院
- 下一篇: 已经出狱的李一男和即将出狱的王欣,还能赶