05 2023 档案
摘要:1.珠心算测验 代码: #include<bits/stdc++.h> #define ll long long using namespace std; const int N = 2e4+39+7; int mp[N],n,a[N],ans=0; int main(){ cin>>n; for(
阅读全文
摘要:1.金币 代码: #include<bits/stdc++.h> #define ll long long using namespace std; int ans=0,t=1,n; int main(){ cin>>n; while(n){ for(int i=1;i<=t;i++){ ans+=
阅读全文
摘要: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
阅读全文
摘要: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>
阅读全文
摘要:滑动窗口是一种和双指针密切相关的算法,两个指针指向的元素之间形成一个窗口,这就是滑动窗口。 下面列举几道例题 1.力扣3 题目链接:https://leetcode.cn/problems/longest-substring-without-repeating-characters/ 代码: cla
阅读全文
摘要: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
阅读全文
摘要:1.P1739 表达式括号匹配 题目:https://www.luogu.com.cn/problem/P1739 代码: #include<bits/stdc++.h> #include<iostream> #include<cstdio> #include<cstring> #include<a
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:1.数字游戏 原题: https://www.luogu.com.cn/problem/P5660 代码: #include<bits/stdc++.h> #include<iostream> #include<cstdio> #include<cstring> #include<algorithm
阅读全文
摘要: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=
阅读全文
摘要: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;
阅读全文
摘要:1.分糖果 原题: 解题思路: 这道题类似于辗转相除法,这道题是辗转相减,每次取余数,如果整除,直接计算答案,并退出,否则继续取余 AC代码: #include<bits/stdc++.h> #define ll long long using namespace std; int main(){
阅读全文
摘要:2022市北区程序设计竞赛小学组试题题解
阅读全文
摘要:2.幸运数 原题: 原代码: #include<bits/stdc++.h> #define ll long long using namespace std; const int N = 1e7+5; ll a[505]={0,6,8,66,68,86,88,666,668,686,688,866
阅读全文

浙公网安备 33010602011771号