
SicilyOJ(SOJ)
文章平均质量分 71
new_wu
这个作者很懒,什么都没留下…
展开
-
SicilyOJ(SOJ) 1128 DICE(模拟)
【题目大意】:告诉你左手骰子是the east face is 1, the north face is 2, and the down face is 3。右手是 the east face is 1, the north face is 2, and the up face is 3.给你一个骰子的情况,问是左手还是右手 【解题思路】:模拟 【代码】: #incl原创 2012-04-05 16:16:48 · 826 阅读 · 0 评论 -
SicilyOJ(SOJ) 1302 Magic Square(Merzirac解奇幻方)
【题目大意】:给出一个奇数n,求n*n的幻方的右下角的数字是什么。 【解题思路】:水题,题目描述了Merzirac是怎么解奇幻方的。所以就是一找规律的水题,顺便学习了一下幻方的解法。 【代码】: #include #include #include #include #include #include #include #include #include原创 2012-04-05 15:30:40 · 2051 阅读 · 0 评论 -
SicilyOJ(SOJ) 5228 Generic Cow Protests(dp+离散化+树状数组优化)
【题目大意】:给出n个数,现在可以按顺序随意的把n个数划分成任意部分,问使得每一部分的和均不小于0的划分方式有多少种。 【解题思路】:dp的转移方程很显然,dp[i]表示前i个数,对其进行任意划分之后满足题设的种类有多少种。则dp[j]=sigema(dp[i]) (0 然后...这样写显然会超时....我们要进行优化。-_-!!!!!~... 我们可以发现,其实每一次dp值的更改其原创 2012-04-01 01:34:42 · 931 阅读 · 0 评论