摘要: 当使用stack等stl库时,如果使用s.pop(),s.top(),则必须判定stack是否为空。 阅读全文
posted @ 2016-12-30 17:08 Hardsoftware 阅读(898) 评论(0) 推荐(0) 编辑
摘要: #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) 编辑