
Codeforces
快乐风男hasaki
希望一切都值得
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
CodeForces - 1041B
CodeForces - 1041B 思路 将x,y求最大公约数g,然后化为最简。 最大公约数用辗转相除法求解 ll gcd(ll a,ll b) { if(b!=0)return gcd(b,a%b); else return a; } 代码 #include <bits/stdc++.h> #define ll long long using namespace std; ll gcd(ll a,ll b) { if(b!=0)return gcd(b,a%b);原创 2020-11-01 19:40:53 · 218 阅读 · 0 评论 -
Planning The Expedition
Planning The Expedition Natasha is planning an expedition to Mars for n people. One of the important tasks is to provide food for each participant. The warehouse has m daily food packages. Each package has some food type ai. Each participant must eat exact原创 2020-10-20 00:18:55 · 170 阅读 · 0 评论 -
Educational Codeforces Round 86 (Rated for Div. 2)A-C
写在前面 我的码风有时候会比较奇怪,你可能会看到一些奇奇怪怪的define方法,请不要介意,请根据思路走,如果有误或者不懂得地方,可以评论留言,我看到了就会回复。 A. Road To Zero 题目链接:A. Road To Zero 一道比较坑的水题,我刚刚开始题目没有看清楚,停顿了很久,然后仔细看了一遍,结果我就把答案作为longlong类型,WA了一发,全改成longlong就过了。 #i...原创 2020-05-01 16:06:57 · 209 阅读 · 0 评论