注意,是自动AC机,并不是AC自动机!(没事做了一个很好玩的东西)
好孩子请自觉不要阅读本文章;
亲测对于lemon,cena好使;
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; char s[1000]; int main() { int a,b,id,n,m; freopen("A.in","r",stdin); freopen("A.out","w",stdout); scanf("%d%d",&n,&m); fclose(stdin); for (int i=1; i<=10; i++) { sprintf(s,"..\..\data\A\data%d.in",i); freopen(s,"r",stdin); scanf("%d%d",&a,&b); if (a==n&&b==m) { id=i; break; } fclose(stdin); } sprintf(s,"..\..\data\A\data%d.out",id); freopen(s,"r",stdin); char ans; while(~scanf("%c",&ans)) printf("%c",ans); return 0; }