文章分类 -  牛客

摘要: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] 阅读全文
posted @ 2024-02-29 18:32 0x3ea 阅读(10) 评论(0) 推荐(1)
摘要: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 阅读全文
posted @ 2024-02-29 18:12 0x3ea 阅读(29) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2024-02-29 16:28 0x3ea 阅读(10) 评论(0) 推荐(0)
摘要: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 答案可能是 阅读全文
posted @ 2024-02-27 15:13 0x3ea 阅读(13) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2024-02-26 22:18 0x3ea 阅读(8) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2024-02-16 23:05 0x3ea 阅读(14) 评论(0) 推荐(0)
摘要: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) 阅读全文
posted @ 2024-02-11 21:00 0x3ea 阅读(36) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2024-02-09 20:32 0x3ea 阅读(23) 评论(0) 推荐(0)