题目传送门 1 /* 2 题意:找出符合 A^B > max (A, B) 的组数; 3 位运算:异或的性质,1^1=0, 1^0=1, 0^1=1, 0^0=0;与的性质:1^1=1, 1^0=0, 0^1=0, 0^0=0; 4 假设A B(即0^1=1)...
分类:
其他好文 时间:
2015-04-26 12:17:43
阅读次数:
138
题目链接:ZOJ 3866 Cylinder Candy
题意:抽象出来就是求一个圆柱体外面加一层厚度为d的巧克力,求包装完这个立体图形的体积和表面积。
剖析:
以下是包装后的三视图:
图3
接下里就是积分了
2*V1是图3绕y轴的体积
V2是中间的半径为(r+d)的圆柱体积
S1是中间的半径为(r+d)的圆柱的表面积
S2是上下两个半径为r的圆的面积
S...
分类:
其他好文 时间:
2015-04-26 11:00:03
阅读次数:
222
解题报告 之 ZOJ 2332 Gems 构图 最大流
Wealthy alsomagic!
Supernatural alsomagic!
But also poor alsomagic!
Because he is now puzzled by a problem, and will go crazy if you can't help him.
alsomagic has a lot of gems with different colors and shapes. His supernatu...
分类:
其他好文 时间:
2015-04-26 09:27:51
阅读次数:
128
Beauty of Array
Time Limit: 2 Seconds
Memory Limit: 65536 KB
Edward has an array A with N integers. He defines the beauty of an array as the summation of all distinct integers in the a...
分类:
其他好文 时间:
2015-04-26 09:21:18
阅读次数:
156
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define LL long long
#define INF 0x7fffffff
using namespace std;
int bit[100005...
分类:
其他好文 时间:
2015-04-25 19:52:34
阅读次数:
148
As a university advocating self-learning and work-rest balance, Marjar University has so many days of rest, including holidays and weekends. Each weekend, which consists of Saturday and
Sunday, is a...
分类:
其他好文 时间:
2015-04-25 19:51:48
阅读次数:
150
这题的意思是给你 n 道菜,第 i 道菜需要 Ai 步才能完成每次你能对 m 道菜分别完成一步,请问最少需要几次?这题暴力写肯定是不行的,去年省赛的时候就是没写出来这题,今天再把思路理一理吧。首先我们需要明确的是1. n m ①此时我们不难发现这个现象,如果 sum (A[i]) 能被 m 整除.....
zoj 3344 Card Game
题意:
把n张写有数字(数字范围为1~n,且互不相同)的卡片打乱顺序,然后放到编号为1~n的盒子里,每轮进行的动作如下:先从剩余的编号最小的盒子里取出卡片,设卡片写着k,如果第k个盒子还没有被打开过,则继续打开第k个盒子,取出卡片...直到没有盒子可以被打开。取完最后一个盒子的为胜利者。
EZ想知道他在m轮之内能赢得游戏的概率。
限制:
1
...
分类:
其他好文 时间:
2015-04-24 14:28:21
阅读次数:
151
//本来是想练一下欧拉回路的,结果紫书上那题是大水题!!!!!题意:给出n个单词,是否可以把单词排列成每个单词的第一个字母和上一个单词的最后一个字母相同解:欧拉通路存在=底图联通+初度!=入度的点至多只有两个(分别为入点和出点) 1 #include 2 #include 3 #include 4 ...
分类:
其他好文 时间:
2015-04-24 14:14:51
阅读次数:
125
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3757
题面:
Strange Country II
Time Limit: 1 Second Memory Limit: 32768 KB Special Judge
You want to visit a st...
分类:
其他好文 时间:
2015-04-24 09:05:43
阅读次数:
164