uva 10054 The Necklace
My little sister had a beautiful necklace made of colorful beads. Two successive beads in the necklace shared a common color at their meeting point. The figure below ...
分类:
其他好文 时间:
2015-01-26 19:26:10
阅读次数:
98
uva 10129 Play on Words
Description
Play on Words
Some of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because th...
分类:
其他好文 时间:
2015-01-26 17:15:55
阅读次数:
202
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1695题目解析:Given 5 integers: a, b, c, d, k, you're to find x in a...b, y in c...d that GCD(x, y) = k.题目又说...
分类:
其他好文 时间:
2015-01-25 16:27:29
阅读次数:
175
Play on WordsTime Limit:1000MSMemory Limit:10000KTotal Submissions:10056Accepted:3447DescriptionSome of the secret doors contain a very interesting wo...
分类:
其他好文 时间:
2015-01-24 11:23:30
阅读次数:
193
题意: Kamal每天早上都要从A点走到B点。从A点到B点有很多条路, 他每天早上都要先选择好一条路线,
这条路线从A点走到B点,再从B点走回A点。 这条路线不能重复地经过同一条路。 两个地点间可能会有多条路。 比如多次出现了从A到B的路线, 那么表示每次出现的都是不同的路
并查集做法:
#include
#include
#include
#include
#inclu...
分类:
其他好文 时间:
2015-01-22 18:07:31
阅读次数:
187
Description新年快到了,“猪头帮协会”准备搞一个聚会,已经知道现有会员N人,把会员从1到N编号,其中会长的号码是N号,凡是和会长是老朋友的,那么该会员的号码肯定和N有大于1的公约数,否则都是新朋友,现在会长想知道究竟有几个新朋友?请你编程序帮会长计算出来。Input第一行是测试数据的组数C...
分类:
其他好文 时间:
2015-01-20 20:28:45
阅读次数:
171
A -CoprimesTime Limit:250MSMemory Limit:4096KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeSGU 102Appoint description:DescriptionFor given integer...
分类:
其他好文 时间:
2015-01-20 13:31:06
阅读次数:
141
主要是求能否形成联通的欧拉回路并查集+ 欧拉回路判断一开始用dfs判断联通,死活A不出来,Wa了好多次………哭……并查集一次就AC了感觉还是并查集代码好写一点,因为dfs还要判断入口在哪里……2333333判断欧拉回路:1.判断联通(dfs|并查集)2.判断欧拉回路的条件(1.要么所有的点出度等于入...
分类:
其他好文 时间:
2015-01-17 09:58:20
阅读次数:
197
四元数与欧拉角之间的转换在3D图形学中,最常用的旋转表示方法便是四元数和欧拉角,比起矩阵来具有节省存储空间和方便插值的优点。本文主要归纳了两种表达方式的转换,计算公式采用3D笛卡尔坐标系:图1 3D Cartesian coordinate System (from wikipedia)定义分别为绕...
分类:
其他好文 时间:
2015-01-16 23:35:36
阅读次数:
175