首页 > TAG信息列表 > Beads

suanpan

The suanpan (simplified Chinese: 算盘; traditional Chinese: 算盤; pinyin: suànpán), is an abacus of Chinese origin first described in a 190 CE book of the Eastern Han Dynasty, namely Supplementary Notes on the Art of Figures written by Xu Yue. However, the

PAT A1092

1092 To Buy or Not to Buy (20 分) Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of beads. However the owner of the shop would only sell the strings in who

1092 To Buy or Not to Buy (20 分)(hash散列)

Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of beads. However the owner of the shop would only sell the strings in whole pieces. Hence Eva must check whe

1461 Poi2010 Beads(Bzoj2081 LOJ2427 LUOGU3498 提高+/省选-) 哈希 顺序逆序字串映射关系 STL map映射容器使用

总目录 在线测评地址(ybt) 在线测评地址(LOJ) 在线测评地址(LUOGU) ybt测试点30运行超时   LOJ AC   LUOGU AC 在浩瀚的题海中,不追求ybt所有测试点的通过,此题就此别过。 ybt 未通过 测试点结果内存时间测试点1答案正确632KB2MS测试点2答案正确636KB2MS测试点3答案正确632KB1

HDU6960. Necklace of Beads题解

HDU6960. Necklace of Beads 题意: 有一串由红、绿、蓝三种颜色的珠子组成的项链,珠子数为\(n\)​​个。 问:在旋转后一样的情形只算一种的条件下,有多少种情况满足相同颜色不相邻且绿珠子不超过\(k\)个。 分析: 题目中对绿色的个数有限制,又有旋转同构的问题存在。 为了方便描述,不妨设

poj 1286 Necklace of Beads 题解

传送门 【题意】 给定 \(n\) 个空位待填的圆环,每个空位可以填入红、蓝、绿任一颜色的珠子。问不同构的方案数为多少? 题目认为旋转、沿坐标轴翻转后相同的两个方案是同构的。 \(n<24\) 【分析】 比较裸的 Polya 定理 旋转和翻转,以及这两个变换的运算构成一个群 \(G\) 。 而原本的

聚甲基丙烯酸甲酯(PMMA)微球PMMA Beads

PMMA Beads聚甲基丙烯酸甲酯(PMMA)微球: PMMA Beads  密度:1.19   w/v%:1  25nm PMMA Beads  密度:1.19   w/v%:1  50nm PMMA Beads  密度:1.19   w/v%:1  75nm PMMA Beads  密度:1.19   w/v%:1  100nm PMMA Beads  密度:1.19   w/v%:1  200nm PMM

循环字符串的最小表示

Once upon a time there was a famous actress. As you may expect, she played mostly Antique Comedies most of all. All the people loved her. But she was not interested in the crowds. Her big hobby were beads of any kind. Many bead makers were working for her

【UOJ105】[APIO2014] Beads and wires(换根DP)

点此看题面 有两种不同的方式来生成一棵树: 将一个新点与一个旧点用红线连接。 把一条红线断开,将一个新点与这两个端点用蓝线连接。 规定一棵树的权值为蓝线权值总和。 给出最后生成的树(不给出颜色),求可能的最大权值。 \(n\le2\times10^5\) 推性质 蓝线必然两两成对,不妨把一对

洛谷 P3498 [POI2010]KOR-Beads 题解

每日一题 day71 打卡 之前家里出了点事,托福学习日记和编程题解都咕了几天,请大家见谅 Analysis 这道题是我学 hash 以来第一道没看题解代码做出来的,只借鉴了思路。 首先既然要实现字符串判重,那我们已知的方法中只有 hash ,所以我们考虑如何用 hash 来解决这道题。 题目中说“and s

PAT Advanced 1092 To Buy or Not to Buy (20分)

Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of beads. However the owner of the shop would only sell the strings in whole pieces. Hence Eva must check whe

珍珠项链 Beads

https://loj.ac/problem/2427 题目描述   给出一段序列\(A\),求一个\(k\)使将序列\(A\)分为\(k\)段(不是倍数最后一段舍去)不同的段数最多。一个串的反转和它本身相同。 思路   这道题\(A\)的长度并不大,我们可以暴力枚举\(k\),对于每个\(k\)计算不同串的数目,再更新答案。需要注意

PAT B1039/A1092 To Buy or Not to Buy

PAT B1039/A1092 To Buy or Not to Buy 题目描述:   Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of beads. However the owner of the shop would only sell the str

Floyd传递背包

Median Weight Bead Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 4170   Accepted: 2159 Description There are N beads which of the same shape and size, but with different weights. N is an odd number and the beads are labeled as 1, 2, .

祖玛(Zuma)

祖玛(Zuma) Description Let's play the game Zuma! There are a sequence of beads on a track at the right beginning. All the beads are colored but no three adjacent ones are allowed to be with a same color. You can then insert beads one by one into the s

PKU 1509 Glass Beads

原文链接:http://www.cnblogs.com/ACAC/archive/2010/05/24/1742997.html 字符串最小表示:   #include<stdio.h>#include<string.h>int min(int a,int b){if(a<b) return a;else return b;}int main(){char str[10001],s[20002];int k,p1,p2,le

hud 6030 Happy Necklace (矩阵快速幂)

Happy Necklace Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 2402    Accepted Submission(s): 984   Problem Description Little Q wants to buy a necklace for his girlfriend. Neck

UVA10054 UVALive2036 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 shows a segment of the necklace:     But, alas! One day, the necklace was torn and the b

Necklace of Beads POJ - 1286

\(\color{#0066ff}{ 题目描述 }\) 一个圈上有n个珠子,有三种颜色可以染,问本质不同的方案数(通过旋转和翻转重合的算一种) \(\color{#0066ff}{输入格式}\) 多组数据,每次一个n,以-1结束 \(\color{#0066ff}{输出格式}\) 每组数据输出一行一个数表示方案数 \(\color{#0066ff}{输入样例}\)