Chinese Girls' Amusement Time Limit:1000MS     Memory Limit:64000KB     64bit IO Format:%lld & %llu Submit Status Practice ACdream 1210 Description       You must have heard that the Chinese culture is quite different from that of Europe or Russia.…
题意:有n个女孩围成一个圈从第1号女孩开始有一个球,可以往编号大的抛去(像传绣球一样绕着环来传),每次必须抛给左边第k个人,比如1号会抛给1+k号女孩.给出女孩的人数,如果他们都每个人都想要碰到球一次,那么这个k应该是多少(满足 1 ≤ K ≤ N/2 且 k必须尽量大)?   例如:n=7,那么1号开始拿球,抛球的顺序是 1, 4, 7, 3, 6, 2, 5, 1.  当球重新回到1女孩手中时,每个人刚好只玩了一次.注:这个数字相当大(3 ≤ N ≤ 102000) 思路: 方法(1): 暴…
Chinese Girls' Amusement Time Limit: 2000/1000MS (Java/Others)Memory Limit: 128000/64000KB (Java/Others) SubmitStatisticNext Problem Problem Description You must have heard that the Chinese culture is quite different from that of Europe or Russia. So…
题目传送门 /* 杭电一题(ACM_steps 2.2.4)的升级版,使用到高精度: 这次不是简单的猜出来的了,求的是GCD (n, k) == 1 最大的k(1, n/2): 1. 若n是奇数,则k = (n-1) / 2: 2. 若n是偶数,讨论(n-1)/2 的奇偶性,若不是奇数,则是n/2-2: 详细解释(证明):http://www.xuebuyuan.com/1552889.html */ #include <cstdio> #include <iostream> #i…
A - Chinese Girls' Amusement Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others) SubmitStatus Problem Description       You must have heard that the Chinese culture is quite different from that of Europe or Russia. So som…
Description       You must have heard that the Chinese culture is quite different from that of Europe or Russia. So some Chinese habits seem quite unusual or even weird to us.       So it is known that there is one popular game of Chinese girls. N gi…
You must have heard that the Chinese culture is quite different from that of Europe or Russia. So some Chinese habits seem quite unusual or even weird to us. So it is known that there is one popular game of Chinese girls. N girls stand forming a circ…
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1313 题目意思:有 N 个人(编号依次为1~N)围成一个圆圈,要求求出最大的 K (1 ≤ K ≤ N/2),表示从编号为1的人开始,将球传递给他后一个人数起的第K个人,第K个人又传递给往后数的第K个人......要求这样传递下去,且每个人都有机会接到球.也就是不存在当未使得全部人都接到一次球的情况下,某个人接收到两次以上的球. 详细的解题报告在这里: http:/…
/* 实际上就是求一个k,满足k<=n/2,且gcd(n,k)=1 如果n为奇数,k为[n/2] 如果n为偶数,k=n/2-1-(n/2)%2 */ #include <iostream> using namespace std; string s; void div2() { string t; int l = s.size() - 1, tem = s[0] - '0'; if (tem > 1) t += '0' + tem / 2; tem &= 1; for (i…
http://acm.sgu.ru/problemset.php?contest=0&volume=1 101 Domino 欧拉路 102 Coprime 枚举/数学方法 103 Traffic Lights 最短路 104 Little Shop of Flowers 动态规划 105 Div 3 找规律 106 The Equation 扩展欧几里德 107 987654321 Problem 找规律 108 Self-numbers II 枚举+筛法递推 109 Magic of Dav…
开始套题训练,第一套ASC题目,记住不放过每一题,多独立思考. Problem A ZOJ 2313 Chinese Girls' Amusement 循环节 题意:给定n,为圆环长度,求k <= n/2,从1出发,每次顺时针方向走k步,即1->k+1->2*k+1,直到遇到一个已经走过的点结束,要求最终把所有点访问一遍,最后回到1,使得k尽量大. 代码: Problem B ZOJ 2314 Reactor Cooling 无源汇上下界网络流 题意:经典题,有上下界无源无汇的可行流,对…
Note 2: Complain 1. The collection of Linkun's [1]: 1.1suck If someone says that something sucks, they are indicating that they think it is very bad. [V] [feelings] [Informal] [RUDE]E.g., The system sucks. 1.2sick and tired of ... 1.3terrible 1.4horr…
环境: mysql:mysql-5.1.65 centos:centos 6.5 编译命令: gcc -o chinesetopinyin chinesetopinyin.c -L/usr/lib/mysql -lmysqlclient -I/usr/include/mysql 源代码: #include <mysql/mysql.h> #include <stdio.h> #include <string.h> void ChineseToPinyin(char *p…
  文房四宝 笔墨纸砚是中国古代文人书房中必备的宝贝,被称为“文房四宝”.用笔墨书写绘画在 中国可追溯到五千年前.秦(前221---前206)时已用不同硬度的毛和竹管制笔:汉代(前206—公元220)以人工制墨替代了天然墨:有了纸张之后,简牍锦帛逐失其用:砚台则随笔墨的使用而发展.“文房四宝”到宋朝(960--1279)以后特指湖笔(浙江湖州).徽墨(安徽徽州).宣纸(安徽宣州).端砚(广东肇庆,古称端州).可以说文房四宝书写了整个中华文明. The writing brush, inkstic…
Li Shan's oldest son was the perfect candidate to join the throngs of Chinese students studying abroad. But he chose Tsinghua University in Beijing. throng:人群,拥挤,众多 That is an unusual choice for a graduate of the elite Hong Kong International School,…
Chinese companies build iPads, high-speed trains and world-class telecom gear, but they can't seem to make their own fancy handbag. gear:齿轮,装置,工具 It's true that global giants from Prada to Apple source goods from China, but it is difficult to name a…
The Luckiest number Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 980    Accepted Submission(s): 301 Problem Description Chinese people think of '8' as the lucky digit. Bob also likes digit '8…
题目描述 Welcome to the 2017 ACM-ICPC Asia Nanning Regional Contest. Here is a breaking news. Now you have a chance to meet alone with the Asia Director through a game. All boys and girls who chase their dreams have to stand in a line. They are given the…
CSharpGL(28)得到高精度可定制字形贴图的极简方法 回顾 以前我用SharpFont实现了解析TTF文件从而获取字形贴图的功能,并最终实现了用OpenGL渲染文字. 使用SharpFont,美中不足的是: SharpFont太大了,有上千行代码,且逻辑复杂难懂. SharpFont画出的字形精度有限,虽然也很高,但是确实有限.用OpenGL渲染出来后会发现边缘不是特别清晰. SharpFont对加粗.斜体.下划线.删除线如何支持,能否支持?完全不知道. Graphics+Font 最近我…
一.window占用了ctrl+空格的快捷键,影响开发工具的只能提示的使用. 二.解决方式: Go to Start > Type in regedit and start it (打开运行输入regedit) Navigate to HKEY_CURRENT_USER/Control Panel/Input Method/Hot Keys(定位到这个位置) Select the key named:(选择以下俩个语言) 00000070 for the Chinese (Traditional…
题目链接 题意: n个物品全部乱序排列(都不在原来的位置)的方案数. 思路: dp[i]表示i个物品都乱序排序的方案数,所以状态转移方程.考虑i-1个物品乱序,放入第i个物品一定要和i-1个的其中一个交换位置,即:考虑i-2个物品乱序,第i-1个和第i个首先在原来的位置,两种方法使得乱序,一种和第i个交换(不能和前i-2个交换,那样成dp[i-1]),还有一种是第i个先和第i-1个交换,再和前i-2个其中一个交换,即,仔细想想,这个和dp[i-1]是不同的交换方法. 另外: 还有二维的dp写法,…
OpenCascade Chinese Text Rendering eryar@163.com Abstract. OpenCascade uses advanced text rendering powered by FTGL library. The FreeType provides vector text rendering, as a result the text can be rotated and zoomed without quality loss. FreeType al…
NetSuite has a strong report customization application. The standard finance reports has a different layout of Chinese version. Take 3 reports as examples: P&L, Balance Sheet and Cash Flow. Below screenshots shows the capicity of report customization…
重新写一下高精度模板(不要问我为什么) 自认为代码风格比较漂亮(雾 如果有更好的写法欢迎赐教 封装结构体big B是压位用的进制,W是每位长度 size表示长度,d[]就是保存的数字,倒着保存,从1开始 #include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> using namespace std; ,B=1e4,…
FFT 做 高精度乘法 #include <bits/stdc++.h> ); struct complex { double a, b; inline complex( , ) { a = _a; b = _b; } inline friend complex operator + (const complex &a, const complex &b) { return complex(a.a + b.a, a.b + b.b); } inline friend compl…
We Love MOE Girls Time Limit: 1000/500 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 572    Accepted Submission(s): 378 Problem Description Chikami Nanako is a girl living in many different parallel worlds. In this…
BigInteger // 高精度整数 BigDecimal //高精度小数  小数位数不受限制…
c++高精度算法,对于新手来说还是一大挑战,只要克服它,你就开启了编程的新篇章,算法. 我发的这个代码并不是很好,占用内存很多而且运行时间很长(不超过0.02秒),但是很好理解,很适合新手 高精算法的本质就是把数组编程字符串,然后将字符串像竖式减去: #include <iostream> #include <cmath> #include <cstring> using namespace std; int main() { ],b[];//设两个字符串 cin>…
c++高精度算法,对于新手来说还是一大挑战,只要克服它,你就开启了编程的新篇章,算法. 我发的这个代码并不是很好,占用内存很多而且运行时间很长(不超过1秒),但是很好理解,很适合新手 高精算法的本质就是把数组编程字符串,然后将字符串像竖式一样加起来: #include <iostream> #include <cmath> #include <cstring> using namespace std; int main() { ],b[]; cin>>a&g…
对一段代码计时同查通常有三种方法.最简单就是用DateTime.Now来进行比较了,不过其精度只有3.3毫秒,可以通过DllImport导入QueryPerformanceFrequency和QueryPerformanceCounter,实现高精度的计时,请参考<.net平台下获取高精度时间类>.在.NET 2.0中,新增了Stopwatch类处理计时需求,Stopwatch会优先使用高精度计时,仅当系统不支持时才会用DateTime来计时,可通过Stopwatch静态属性IsHighRes…