Crontab
哈哈本人的不及格代码(暂留):
1 #include<iostream> 2 #include<queue> 3 #include<cmath> 4 #include<map> 5 #include<cstring> 6 using namespace std; 7 int n; 8 __int64 s,t; 9 char command[21][6][100]; 10 11 map<string,int> mapmonth; 12 map<string,int> mapweek; 13 14 bool month[21][13]; 15 bool week[21][7]; 16 bool minute[21][61]; 17 bool hour[21][24]; 18 bool day[21][32]; 19 20 void judgeMon(bool* mon,char *tm,map<string,int> mymap,int len) 21 {///判断月或是周是否符合条件 22 if(tm[0]=='*'){ 23 memset(mon,true,len); 24 return; 25 } 26 for(int i=0;i<strlen(tm);) 27 { 28 if(tm[i] == ',') i++; 29 ///如果是数字的话 30 int mon1 = 0; 31 while('0'<=tm[i] && tm[i]<='9') 32 { 33 mon1 = mon1*10 + tm[i++]-'0'; 34 } 35 ///如果是字母的话 36 char monstr[100];int temp = 0;bool flag = false; 37 while('A'<=tm[i]&&tm[i]<='Z' || 'a'<=tm[i]&&tm[i]<='z') 38 { 39 monstr[temp++] = tm[i++]; 40 flag = true; 41 } 42 monstr[temp] = '