#pragma GCC optimize(2)
#include<bits/stdc++.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<set>
#include<utility>
#include<string.h>
#include<ext/rope>
#include<queue>
#include<stack>
using namespace std;
using namespace __gnu_cxx;
#define int long long
#define dnt double
#define rep(i,j,k) for(int i=(j);i<=(k);++i)
#define dow(i,j,k) for(int i=(j);i>=(k);--i)
#define pr pair
#define pb push_back
#define mkp make_pair
#define fi first
#define se second
//int gp() {int x;while((x=rand())<=0)srand(time(0));return x%1000;}
inline int read(int &x) {
x=0;int ff=1;char ch=getchar();
while (ch<'0'||ch>'9') {
if (ch=='-') ff=-1;ch=getchar();
}
while (ch>='0'&&ch<='9') {
x=x*10+ch-48;ch=getchar();
}
return x*ff;
}
void write(int x) {
if (x > 9)write(x / 10);
putchar((x % 10) + '0');
}
inline int max(int a,int b) {return a>b?a:b;}
inline int min(int a,int b) {return a>b?b:a;}
inline int exgcd(int a,int b,int&x,int&y) {
if(b==0) {x=1,y=0 ;return a ;}
else {int r=exgcd(b,a%b,x,y);int t=x ;x=y ;y=t-a/b*y ;return r ;}
}
const int N=1000005;
/*struct SuffixAutoMaton{
int last=1,cnt=1;int ch[N<<1][26],fa[N<<1],l[N<<1];
int tong[N<<1];int pai[N<<1];int siz[N<<1];
void ins(int c){
int p=last,np=++cnt;last=np;l[np]=l[p]+1;
for(;p&&!ch[p][c];p=fa[p])ch[p][c]=np;
if(!p)fa[np]=1;
else{
int q=ch[p][c];
if(l[p]+1==l[q])fa[np]=q;
else{
int nq=++cnt;l[nq]=l[p]+1;
rep(i,0,25)
ch[nq][i]=ch[q][i];
fa[nq]=fa[q];fa[q]=fa[np]=nq;
for(;ch[p][c]==q;p=fa[p])ch[p][c]=nq;
}
}
siz[np]=1;
}
void sortt(){
for(int i=1;i<=cnt;i++)tong[l[i]]++;
for(int i=1;i<=cnt;i++)tong[i]+=tong[i-1];
for(int i=1;i<=cnt;i++)pai[tong[l[i]]--]=i;
for(int i=cnt;i;i--){
int u=pai[i];
}
}
}sam;*/
/*
struct matrix {
int n,m;
int num[102][102];
void pri() {
for(int i=1; i<=n; i++) {
for(int j=1; j<=m; j++) {
cout<<num[i][j]<<" ";
}
cout<<endl;
}
}
matrix operator*(matrix y) {
matrix x=*this;
matrix c;
c.n=x.n;
c.m=y.m;
memset(c.num,0,sizeof(c.num));
for(int i=1; i<=x.n; i++) {
for(int k=1; k<=x.m; k++){
if(x.num[i][k])
for(int j=1; j<=y.m; j++){
c.num[i][j]+=x.num[i][k]*y.num[k][j];
// c.num[i][j]+=((x.num[i][k]%mod)*(y.num[k][j]%mod))%mod;
}
}
}
return c;
}
matrix operator ^ (int x) {
matrix c,xx;
xx=*this;
c.m=xx.m;
c.n=xx.n;
for(int i=1; i<=xx.n; i++)
for(int j=1; j<=xx.m; j++)
c.num[i][j]=(i==j);
for(; x; x>>=1) {
if(x&1)
c=c*xx;
xx=xx*xx;
}
return c;
}
};*/
int fpow(int x,int y) {
int ans=1;int base=x;
while(y) {
if(y&1)ans=ans*base;
y/=2;base=base*base;
}
return ans;
}
int mod=1e9+7;
const int maxn=500001;
/*int lim=maxn,tot=0;int prime[maxn];int dr[maxn];
void shai() {
for(int i=2; i<=lim; i++) {if(dr[i] == 0) {prime[++tot] = i;dr[i]=i;}
for(int j=1; j<=tot && i * prime[j] <=lim; j++) {dr[i * prime[j]] = prime[j];if(i % prime[j] == 0) break;}}
} */
int head[maxn];
int id=0;
struct Edge {
int w,v,next;
} e[maxn*5];
void build(int u,int v,int w) {
e[++id].v=v;
e[id].w=w;
e[id].next=head[u];
head[u]=id;return;
}
int f[maxn],a[maxn];int n,m,k;
//加油 注意初始化
void solve(){
}
signed main() {
ios::sync_with_stdio(false),cin.tie(NULL);
//freopen("data.in","r",stdin);
//freopen("T1.out","w",stdout);
int t;
cin>>t;
while(t--){
solve();
}
return 0;
}
color A
echo off
:loop
echo 已运行%a%次
set /a a+=1
datacreator.exe
T1.exe
std.exe
fc T1.out std.out
if not errorlevel 1 goto loop
pause
#include<bits/stdc++.h>
using namespace std;
void copyFile() {
char c[3][7]= {"T1.cpp","T2.cpp","T3.cpp"};
for(int i=0; i<=2; i++) {
FILE *in, *out;
char ch ;
if ((in = fopen("模板.cpp","r")) == NULL) { //in.txt 和out.txt 都在当前工作目录下存放
printf("canot find the in.txt file!\n");
exit(0);
}
if ((out = fopen(c[i],"w"))==NULL) { // 写入数据的文件
printf("canot find the out.txt file!\n");
exit(0);
}
ch = fgetc(in);
// cout<<1<<ch;
while (ch!=EOF) {
fputc(ch,out);
putchar(ch); //使得in.txt 的内容显示在dos窗口 下
ch = fgetc(in);
}
fclose(in); // 关闭文件
fclose(out);
}
char ss[]="datacreator.cpp";
FILE *in, *out;
char ch ;
if ((in = fopen("datacreator模板.cpp","r")) == NULL) {
printf("canot find the in.txt file!\n");
exit(0);
}
if ((out = fopen(ss,"w"))==NULL) {
printf("canot find the out.txt file!\n");
exit(0);
}
ch = fgetc(in);
while (ch!=EOF) {
fputc(ch,out);
putchar(ch);
ch = fgetc(in);
}
fclose(in);
fclose(out);
}
int main() {
copyFile() ;
puts("");
return 0;
}
标签:ch,return,int,base,自用,include,模板,define
From: https://www.cnblogs.com/WXk-k/p/17379133.html