摘要: #include using namespace std; int range(int row, int col) { if(row>0 && row0 && col=row) { return -1; } if(c=row) { return -1; } return 0; } int crinmat(... 阅读全文
posted @ 2016-12-30 13:11 Hardsoftware 阅读(149) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int main() { int N; cin>>N; int first = 1; int last = N; int start = 1; int length = 4; int curr = 1; char str[100]; cin... 阅读全文
posted @ 2016-12-30 12:37 Hardsoftware 阅读(204) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; void solve(char *str) { vector v; char tmp[100]; int tmpcount = 0; for(int i=0; str[i]!='\0'; i++) { if(str[i]==' ' || st... 阅读全文
posted @ 2016-12-29 22:46 Hardsoftware 阅读(155) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int compareStr(string str1, string str2) { int num1 = str1.length(); int num2 = str2.length(); if(num1>num2) return 1; if(num1str2[i]) ... 阅读全文
posted @ 2016-12-29 21:42 Hardsoftware 阅读(233) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; struct Data { int index; int value; }; struct myComp { bool operator()(const Data &a, const Data &b) { return a.index dataset; i... 阅读全文
posted @ 2016-12-29 16:30 Hardsoftware 阅读(192) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int main() { int N; cin>>N; list li; int head; cin>>head; li.push_back(head); for(int i=0; i>a>>b; list::iterator itr; ... 阅读全文
posted @ 2016-12-29 13:37 Hardsoftware 阅读(147) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int dp[100][100]; int min(int a, int b) { if(a>str1>>str2; int num1 = strlen(str1); int num2 = strlen(str2); if(str1[0]==str2[0]) dp... 阅读全文
posted @ 2016-12-28 21:57 Hardsoftware 阅读(334) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include using namespace std; bool lessthan(char a, char b) { if(b=='*' || b=='/' ) { return true; } if(a=='+' || a=='-' ) { return t... 阅读全文
posted @ 2016-12-28 21:55 Hardsoftware 阅读(338) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; struct record{ string name; int line; int count; }; string getname(string str) { int sz = str.length(); int i; for(i=sz-1; i... 阅读全文
posted @ 2016-12-28 21:52 Hardsoftware 阅读(144) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; int countA=0; int countB=0; int countC=0; int countD=0; int countE=0; int countError=0; int countPrivate=0; void get(char *str) { int num = strle... 阅读全文
posted @ 2016-12-28 21:09 Hardsoftware 阅读(312) 评论(0) 推荐(0) 编辑