ZOJ
萧瑟1
这个作者很懒,什么都没留下…
展开
-
ZOJ Problem Set - 4060 Flippy Sequence
当有0个连续区间的时候,答案为n*(n+1)/2 当有1个连续区间的时候,答案为(n-1)*2 当有两个连续区间的时候,答案为6 当有三个及以上的时候,答案为0 代码如下: #include <cstdio> #include <cstring> #include <algorithm> #include <iostream&...原创 2018-11-12 20:00:16 · 169 阅读 · 0 评论 -
ZOJ - 3710 Friends 暴力
题目: Alice lives in the country where people like to make friends. The friendship is bidirectional and if any two person have no less than k friends in common, they will become friends in several days...原创 2019-03-30 10:17:21 · 119 阅读 · 0 评论 -
ZOJ - 3715 Kindergarten Election 枚举+贪心
题目: At the beginning of the semester in kindergarten, the n little kids (indexed from 1 to n, for convenience) in class need to elect their new leader. The ith kid will vote for his best friend fi (...原创 2019-03-30 14:12:54 · 125 阅读 · 0 评论 -
ZOJ - 3705 Applications 模拟
题目: Recently, the ACM/ICPC team of Marjar University decided to choose some new members from freshmen to take part in the ACM/ICPC competitions of the next season. As a traditional elite university i...原创 2019-03-31 14:13:49 · 197 阅读 · 0 评论 -
zoj 2952 Find All M^N Please 暴力
题目: Recently, Joey has special interest in the positive numbers that could be represented as M ^ N (M to the power N), where M and N are both positive integers greater than or equal to 2. For example...原创 2019-03-27 14:37:14 · 168 阅读 · 0 评论 -
zoj 2954 Hanoi Tower 模拟
题目: You all must know the puzzle named "The Towers of Hanoi". The puzzle has three pegs (peg 1, peg 2 and peg 3) and N disks of different radii. Initially all disks are located on the first peg, orde...原创 2019-03-27 14:40:04 · 153 阅读 · 0 评论 -
zoj 2955 Interesting Dart Game 缩小范围+完全背包
题目: Recently, Dearboy buys a dart for his dormitory, but neither Dearboy nor his roommate knows how to play it. So they decide to make a new rule in the dormitory, which goes as follows: Given a num...原创 2019-03-27 19:52:37 · 175 阅读 · 0 评论 -
ZOJ - 4032 Magic Points
题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4032 所要连成的直线一定是斜率不相等并且交点一定是两个直线相交。 按照下面图的规律找点就可以了。 代码如下: //include <bits/stdc++.h> #include <set> #include <ma...原创 2019-04-27 16:03:49 · 288 阅读 · 1 评论