摘要:
点击查看代码 #include<iostream> using namespace std; int n, m, ans = 0; void dfs(int x, int y) { if (x == n && y == m) ans ++; else { if (y < m) dfs(x, y + 阅读全文
摘要:
点击查看代码 #include<iostream> using namespace std; int n, ans = 0; void f(int k) { if (k == n) ans ++; else if (k < n) { f(k + 1); f(k + 2); } } int main( 阅读全文
摘要:
点击查看代码 #include<iostream> using namespace std; const int N = 200; string str[N]; int n ; int main() { while (cin >> n, n) { int len = 1000; for (int i 阅读全文
摘要:
点击查看代码 #include<iostream> using namespace std; string s, s1, s2; int main() { char c; while (cin >> c, c != ',') s += c; while (cin >> c, c != ',') s1 阅读全文
摘要:
点击查看代码 #include<iostream> using namespace std; string str; int main() { while (cin >> str, str != ".") { int len = str.size(); for (int n = len; n; n- 阅读全文
摘要:
点击查看代码 #include<iostream> #include<algorithm> using namespace std; string a, b; int main() { cin >> a >> b; if (a.size() < b.size()) swap(a, b); for ( 阅读全文
摘要:
点击查看代码 #include<iostream> using namespace std; string str, res; int main() { while (cin >> str) { if (str.back() == '.') str.pop_back(); if (str.size( 阅读全文
摘要:
点击查看代码 #include<iostream> using namespace std; string str; int n; int main() { cin >> n; while (n --) { cin >> str; int cnt = 0; char c; for (int i = 阅读全文
摘要:
点击查看代码 #include<iostream> #include<sstream> using namespace std; string s, a ,b; int main() { getline(cin ,s); cin >> a >> b; stringstream ssin(s); st 阅读全文