ACM
文章平均质量分 52
你的肩上有片枫叶
兴趣是最好的老师
展开
-
codeforces round #760 (div. 3)AB题
题目链接 题意:给7个从小到大的数,是由x,y,z,x+y,x+z,y+z,x+y+z组成的,求出x,y,z; 思路:由于是从小到大给的序列,所以第一个数就是三个数当中最小的,假设序列从大到小依次为a[0]-a[6];所以x就是a[6],而第三大的数就是a[2]就是x+y,所以y就等于a[2]-a[6],就差一个z不知道,但是知道三个数的和以及x,y的和,所以a[0]-a[2]就是z的值 #include<bits/stdc++.h> using namespace std; int main(原创 2021-12-15 18:45:10 · 1524 阅读 · 0 评论 -
2021-11-23
A - On and Off 题意:输入三个数,第一个代表灯开启的时间,第二个代表灯关闭的时间,输入第三个数之后判断在这个时间灯是不是亮着的。 思路:二十四小时制,所以要先进行判断是在哪个时间段,再判断x在不在这个区间当中,符合条件就是yes,否则就是no #include<bits/stdc++.h> using namespace std; int main() { int s,t,x; cin>>s>>t>>x; if(s<原创 2021-11-23 20:25:00 · 618 阅读 · 0 评论 -
2021-10-03
10.3训练 题目链接 题意:输入 A B C 在A和B之间找C的倍数,随便输出一个就行,找不到就输出-1 注意包含A也包含B循环条件要加等于号 #include<bits/stdc++.h> using namespace std; int main() { long long a,b,c; bool k=true; cin>>a>>b>>c; for(long long i=a;i<=b;i++) {原创 2021-10-03 22:17:02 · 59 阅读 · 0 评论 -
9.26总结
把之前做过的题在做一遍并且写题解,因为有的题做过第一次第二次拿过来就不一定还能做出来。 The Balance of the World The world should be finely balanced. Positive vs. negative, light vs. shadow, and left vs. right brackets. Your mission is to write a program that judges whether a string is balanced with原创 2021-09-29 21:23:44 · 197 阅读 · 0 评论