上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要: 1.分糖果 原题: 解题思路: 这道题类似于辗转相除法,这道题是辗转相减,每次取余数,如果整除,直接计算答案,并退出,否则继续取余 AC代码: #include<bits/stdc++.h> #define ll long long using namespace std; int main(){ 阅读全文
posted @ 2023-05-12 21:20 天雷小兔 阅读(192) 评论(0) 推荐(0)
摘要: 2022市北区程序设计竞赛小学组试题题解 阅读全文
posted @ 2023-05-04 20:37 天雷小兔 阅读(291) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2023-05-03 16:14 天雷小兔 阅读(271) 评论(0) 推荐(0)
摘要: 1.随机数 原题: 解题思路: 求出输入值中的最大值,从这个数输出到6即可 AC代码: #include<bits/stdc++.h> #define ll long long using namespace std; int x,y; int main(){ freopen("random.in" 阅读全文
posted @ 2023-04-30 16:07 天雷小兔 阅读(104) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2023-04-27 22:00 天雷小兔 阅读(19) 评论(0) 推荐(0)
摘要: 1.独木桥 原题: 解题思路: n个人中,每个人越靠近一个端点,就朝着那个方向走到头,求出最大距离即最大时间 AC代码: #include<bits/stdc++.h> #define ll long long using namespace std; const int N = 1e6+5; in 阅读全文
posted @ 2023-04-27 21:59 天雷小兔 阅读(165) 评论(0) 推荐(0)
摘要: 1.取余 原题: 解题思路: 这道题30%的数据可以开longlong去存储计算,但100%的数据最多有3000位,无法存储,所以可以运用同余的性质,(a*b)%p=(a%p*b%p)%p AC代码: #include<bits/stdc++.h> #define ll long long usin 阅读全文
posted @ 2023-04-26 21:41 天雷小兔 阅读(121) 评论(0) 推荐(0)
摘要: 2022青岛市小学组第三题 原题: 代码: #include<bits/stdc++.h> #define ll long long using namespace std; ll n,ans=0,t; int main(){ freopen("turn.in","r",stdin); freope 阅读全文
posted @ 2023-04-22 21:56 天雷小兔 阅读(70) 评论(0) 推荐(0)
摘要: 2021年青岛市小学组第三题 原题: 解题代码: #include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<algorithm> using namespace std; const int N = 阅读全文
posted @ 2023-04-21 22:04 天雷小兔 阅读(64) 评论(0) 推荐(0)
摘要: 1.线性基——最大异或和 例题:洛谷P3812 模板题,代码用的是非高斯消元法来构造线性基的 #include<bits/stdc++.h> #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using 阅读全文
posted @ 2023-04-18 22:35 天雷小兔 阅读(33) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 下一页