摘要:#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...
阅读全文
摘要:#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...
阅读全文
摘要:#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; ...
阅读全文
摘要:#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...
阅读全文
摘要:#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...
阅读全文
摘要:shell的if判断 2012-03-16 14:53:05 分类: Python/Ruby 1 概要 有时候你需要指定shell脚本中的依靠命令的成功与否来实施不同过程的行为。 if 结构允许你来指定这样的条件。 最精简的 if 命令的语法是: if TEST-COMMANDS; then CON
阅读全文