日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

自动AC机

發布時間:2023/12/18 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 自动AC机 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

僅供學習,請勿在任何時候使用

首發于洛谷,我就是作者!
主程序

#include<bits/stdc++.h> #define MAXX (9999) using namespace std;string a="edit";char b[1000],c[1000];//edit為題目名稱 void hhh(){gets(b);a+=b[0];a+=".out";for(int i=0;i<a.length();i++){b[i]=a[i]; cout<<b[i];b[i+1]='\0'; }} int main(){system("start 未命名2.exe");//捆綁軟件名稱 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];}fclose(stdin);fclose(stdout);return 0; }

捆綁程序

#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"; char b[1000],c[1000];int b1,b2;//edit為題目名稱 void hhh() {cin>>b1;freopen("x.txt","w",stdout);cout<<b1+1;freopen("edit.out","w",stdout);b[0]=b1+'0';a+=b[0];a+=".out";cout<<b[0]<<"\n";cout<<a;for(int i=0; i<a.length(); i++) {b[i]=a[i];b[i+1]='\0';}} int main() {freopen("x.txt","r",stdin);//計數文件名:x.txt,記得創建并將其設為0hhh();freopen(b,"r",stdin);gets(c);freopen("edit.out","w",stdout);int i,j;for(i=0; i<strlen(c); i++) {cout<<c[i];}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。

再次更新

總結

以上是生活随笔為你收集整理的自动AC机的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。