CSP开代码
CAndrew
·
·
个人记录
#include<bits/stdc++.h>
using namespace std;
string ist(int i){
if(i){
return ist(i / 10) + char(i % 10 + 48);
}
return "";
}
string add0(int i){
string s = "";
int n = 4;
while(i /= 10){
n--;
}
while(n--)s+='0';
return s;
}
string ss, sss, ss1;
const string path1 = "C:\\Users\\user\\Desktop\\answers", path2 = "D:\\subway1500-1600", problem = "hub", province = "GD", difficult = "S";
signed main(){
int nn = 1562;
// for(int i = 1 + nn; i <= nn + 100; i++){
for(int i = nn; i <= nn; i++){
ss1 = "copy ";
ss1 += path1 + "\\" + province + "-" + difficult + add0(i) + ist(i) + "\\" + problem + "\\" + problem + ".cpp " + path2 + "\\" + problem + province + difficult + add0(i) + ist(i) + ".cpp";
char *st2 = const_cast<char *>(ss1.c_str()) ;
system(st2);
ss = path2 + "\\" + problem + province + difficult + add0(i) + ist(i) + ".cpp";
sss = "if exist " + ss + " (start " + ss + ")";
char *st1 = const_cast<char *>(sss.c_str()) ;
cout << sss << "\n";
// system();
system(st1);
}
return 0;
}