随笔分类 - 题解
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int f[205][205]; int main() { string sa, sb; getline(cin, sa); getline(cin, sb); int la = s
阅读全文
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int len = s.size(), ans = 0; for (int i = 0; i < len; i++)
阅读全文
摘要:题目在主页,如有出错请指出 1. include <bits/stdc++.h> using namespace std; int main() { string s; int cnt = 0; while (cin >> s && s != "*") cnt++; cout << cnt << e
阅读全文
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int main() { int maxn = INT_MIN, minn = INT_MAX; string s, ans1, ans2; while (cin >> s) { i
阅读全文
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int a[15]; int main() { int n; cin >> n; for(int i = 1;i <= n;i++) cin >> a[i]; sort(a + 1,
阅读全文
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; string x = s; reverse(s.begin(), s.end()); if (x == s) cou
阅读全文
摘要:题目在主页,如有出错请指出 1. include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string s, ans; for (int i = 1; i <= n; i++) { cin >> s; an
阅读全文
摘要:题目在主页,如有出错请指出 1. include <bits/stdc++.h> using namespace std; int main() { string s1, s2; cin >> s1 >> s2; int l1 = s1.size(), l2 = s2.size(), ans; if
阅读全文
摘要:题目在主页,如有出错请指出、 1. include <bits/stdc++.h> using namespace std; int main() { string s; getline(cin, s, '*'); reverse(s.begin(), s.end()); cout << s <<
阅读全文
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int a[30]; int main() { string s; getline(cin, s); int len = s.size(); for (int i = 0;i < l
阅读全文
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int main() { string s; getline(cin, s); int len = s.size(), cnt = 0; for (int i = 0;i < len
阅读全文
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int len = s.size(); int n = s[len - 1] - '0'; if (n % 2 !=
阅读全文
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int f[15][305]; int v[15]; int main() { int n, k; scanf("%d %d", &n, &k); for (int i = 1; i
阅读全文
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int v[105], w[105], f[100005]; int main() { int m, n; scanf("%d %d", &m, &n); for (int i =
阅读全文
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; bool pd(int n) { int j = 0, o = 0; bool f = 0; while (n != 0) { if (f != 0) { o += n % 10;
阅读全文
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int v[105], w[105], ans[105][1005]; int main() { int m, n; scanf("%d %d", &m, &n); for (int
阅读全文
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int nextlucky(int n) { if (n < 1) return 1; vector < int > lucky; for (int i = 1; i <= 9; i
阅读全文
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; if (x < y) cout << y - x << endl; else cout <
阅读全文
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; cout << (n + 1) / 2 << endl; return 0; }
阅读全文
摘要:题目在主页,如有出错请指出 include <bits/stdc++.h> using namespace std; int a[105], mark[1005]; bool vis[1005]; vector < int > v[1005]; void dfs(int x) { vis[x] =
阅读全文