摘要: 1.买铅笔 代码: #include<bits/stdc++.h> #define ll long long using namespace std; int n,ans=1e9,a,b; int main(){ cin>>n; for(int i=1;i<=3;i++){ cin>>a>>b; a 阅读全文
posted @ 2023-05-22 22:20 天雷小兔 阅读(36) 评论(0) 推荐(0)
摘要: 1.成绩 原题:https://www.luogu.com.cn/problem/P3954 代码: #include<bits/stdc++.h> #define ll long long using namespace std; int a,b,c; int main(){ cin>>a>>b> 阅读全文
posted @ 2023-05-22 16:54 天雷小兔 阅读(38) 评论(0) 推荐(0)
摘要: 滑动窗口是一种和双指针密切相关的算法,两个指针指向的元素之间形成一个窗口,这就是滑动窗口。 下面列举几道例题 1.力扣3 题目链接:https://leetcode.cn/problems/longest-substring-without-repeating-characters/ 代码: cla 阅读全文
posted @ 2023-05-21 16:56 天雷小兔 阅读(44) 评论(0) 推荐(0)
摘要: 1.标题统计 原题:https://www.luogu.com.cn/problem/P5015 #include<bits/stdc++.h> #define ll long long using namespace std; string s;int ans=0; int main(){ get 阅读全文
posted @ 2023-05-21 15:08 天雷小兔 阅读(44) 评论(0) 推荐(0)
摘要: 1.P1739 表达式括号匹配 题目:https://www.luogu.com.cn/problem/P1739 代码: #include<bits/stdc++.h> #include<iostream> #include<cstdio> #include<cstring> #include<a 阅读全文
posted @ 2023-05-20 17:36 天雷小兔 阅读(98) 评论(0) 推荐(0)
摘要: 1.分糖果 原题:https://www.luogu.com.cn/problem/P7909 原代码: #include<bits/stdc++.h> #define ll long long using namespace std; ll n,l,r; int main(){ cin>>n>>l 阅读全文
posted @ 2023-05-20 10:23 天雷小兔 阅读(127) 评论(0) 推荐(0)
摘要: 1.植树节 原题:https://www.luogu.com.cn/problem/U285015 代码: #include<bits/stdc++.h> #define ll long long using namespace std; const int N = 1e6+255; int a[N 阅读全文
posted @ 2023-05-19 20:37 天雷小兔 阅读(517) 评论(0) 推荐(0)
摘要: 1.数字游戏 原题: https://www.luogu.com.cn/problem/P5660 代码: #include<bits/stdc++.h> #include<iostream> #include<cstdio> #include<cstring> #include<algorithm 阅读全文
posted @ 2023-05-19 19:41 天雷小兔 阅读(78) 评论(0) 推荐(0)
摘要: 1.优秀的拆分 原题:https://www.luogu.com.cn/problem/P7071 代码: #include<bits/stdc++.h> #define ll long long using namespace std; const int N = 1e4+255; ll n,x= 阅读全文
posted @ 2023-05-18 23:29 天雷小兔 阅读(79) 评论(1) 推荐(0)
摘要: 1.乘方 原题:https://www.luogu.com.cn/problem/P8813 代码: #include<bits/stdc++.h> #define ll long long using namespace std; const int XN = 1e9; ll a,b,ans=1; 阅读全文
posted @ 2023-05-17 23:45 天雷小兔 阅读(194) 评论(0) 推荐(0)