码农吃枇杷
码农吃枇杷
全部文章
题解
归档
标签
去牛客网
登录
/
注册
码农吃枇杷的博客
全部文章
/ 题解
(共5篇)
题解 | #空调遥控#
解法一:滑动窗口 // src:https://ac.nowcoder.com/acm/problem/229310 #include <climits> #include <complex> #include <iostream> #include <a...
C++
双指针
二分查找
2024-05-24
0
485
题解 | #打怪#
数学,o(1)时间复杂度 #include <iostream> using namespace std; using ll = long long; ll T, h, a,H,A; void solve() { cin>>h>>a>>H&...
C++
数学
2024-05-14
0
497
题解 | #非对称之美#
贪心 #include <bits/stdc++.h> using namespace std; string s; // 判断是否全是相同字母 bool CheckSame() { for(int i=0;i<s.size();++i) if(s[i]...
C++
贪心
脑筋急转弯
2024-05-11
0
579
题解 | #对称之美#
双指针+哈希模拟 #include <bits/stdc++.h> using namespace std; int T; vector<string> words; bool check() { bool flag=false; int left=0,...
C++
双指针
哈希表
2024-05-11
0
639
题解 | #比那名居的桃子3种解法#
// 暴力解法 #include<bits/stdc++.h> using namespace std; const int N = 1e5+10; using ll = long long; ll n, k, a[N], b[N]; int main() { cin>&g...
C++
双指针
前缀和
滑动窗口
2024-05-10
1
429