文章分类 - 牛客
摘要:A void solve() { string s1, s2; cin >> s1 >> s2; int a = 0, b = 0; if (s1[0] <= 'z' && s1[0] >= 'a') a = s1[0] - 'a'; else a = s1[0] - 'A'; if (s2[0]
阅读全文
摘要:A 模拟 map<int, int> mp; void solve() { mp[100] = 0; mp[150] = 1; mp[200] = 2; mp[29] = 0; mp[30] = 0; mp[31] = 0; mp[32] = 0; mp[34] = 1; mp[36] = 1; m
阅读全文
摘要:A void solve() { string a, b; cin >> a >> b; set<string> s; s.insert(a); s.insert(b); s.insert(a + b); s.insert(b + a); cout << s.size() << endl; for
阅读全文
摘要:A void solve() { int n; cin >> n; int cnt = 0; for (int i = 1; i <= n; i++) { int x; cin >> x; if (x == 1) cnt++; } cout << n - cnt << endl; } B 答案可能是
阅读全文
摘要:A void solve() { vector<int> pr; vector<bool> not_pr(N); auto getpr = [&](int n) { for (int i = 2; i <= n; ++i) { if (!not_pr[i]) pr.push_back(i); for
阅读全文
摘要:A void solve() { int n; cin >> n; vector<ll> a(n + 1); for (int i = 1; i <= n; i++) cin >> a[i]; ll chk = 0; for (int i = n; i >= 1; i--) { if (i % 2
阅读全文
摘要:A void solve() { ll v, x, y; cin >> v >> x >> y; cout << v / x * y << endl; } B 总共三种情况,直接模拟计算 void solve() { vector<vector<char>> a(4, vector<char>(4)
阅读全文
摘要:A #include <bits/stdc++.h> #define endl '\n' #define x first #define y second using namespace std; typedef long long ll; typedef pair<int, int> pii; t
阅读全文

浙公网安备 33010602011771号