原题链接:http://acm.timus.ru/problem.aspx?space=1&num=17801780. Gray CodeTime limit: 0.5 secondMemory limit: 64 MBDenis, Vanya and Fedya gathered at their...
分类:
其他好文 时间:
2015-08-13 20:06:14
阅读次数:
136
题目链接:http://acm.timus.ru/problem.aspx?space=1&num=17741774. Barber of the Army of MagesTime limit: 0.5 secondMemory limit: 64 MBPetr, elected as a war...
分类:
其他好文 时间:
2015-08-13 20:02:51
阅读次数:
198
俄罗斯乌拉尔大学在线题库 是一个可以使用C#语言的在线ACM题库,有兴趣的朋友可以去试试。
Problem 1000. A+B Problem 是入门,就是简单地求整数
A 和 B 的和就行了,答案如下:
1 using System;
2
3 // http://acm.timus.ru/problem.aspx?space=1&num=1000
4 clas...
分类:
编程语言 时间:
2015-08-04 08:13:23
阅读次数:
308
最近一段时间,我在 Timus Online Judge 网站做
ACM 题。
首先,让我们看一下 Timus 1114. Boxes:
这道题要求计算出将两种颜色的球放到盒子中的各种组合的数目。我们发现用同样的算法,C# 程序居然比 C++ 程序慢 62 倍。
真的是 C# 应用程序的性能就一定很差吗?不是的。实际上在这道题中,使用的算法是非常高效的。上面的 0.0...
分类:
编程语言 时间:
2015-08-04 08:11:12
阅读次数:
202
问题来源
Timus Online Judge 网站上有这么一道题目:1356.
Something Easier。这道题目的输入是一组 2 到 109 之间整数,对于每个输入的整数,要求用最少个数的素数的和来表示。这道题目的时间限制是 1 秒。
问题解答
我们知道著名的哥德巴赫猜想是:
任何一个充分大的偶数都可以表示为两个素数之和
于是我们有以下的 C 语言程序(...
分类:
编程语言 时间:
2015-08-03 14:46:45
阅读次数:
177
问题来源
Timus Online Judge 网站上有这么一道题目:1073.
Square Country。这道题目的输入是一个不大于 60,000 的正整数,要求计算出该正整数最少能够使用多少个正整数的平方和来表示。这道题目的时间限制是 1 秒。
问题解答
《数论导引(第5版)》([英]G.H.Hardy、E.M.Wright 著,人民邮电出版社,2008年10...
分类:
编程语言 时间:
2015-08-03 14:46:01
阅读次数:
261
1057. Amount of Degrees
Time limit: 1.0 second
Memory limit: 64 MB
Create a code to determine the amount of integers, lying in the set [X;Y] and being a sum of exactlyK different integer de...
分类:
其他好文 时间:
2015-07-25 10:45:25
阅读次数:
133
通道:http://acm.timus.ru/problem.aspx?space=1&num=1519题意:单回路,经过全部可达点,有阻碍点。代码:#include #include #include using namespace std;const int MAX_N = 13;const i...
分类:
其他好文 时间:
2015-07-10 18:56:11
阅读次数:
111
http://acm.timus.ru/problem.aspx?space=1&num=1057
1057. Amount of Degrees
Time limit: 1.0 second
Memory limit: 64 MB
Create a code to determine the amount of integers, lying in the set...
分类:
其他好文 时间:
2015-05-18 23:05:14
阅读次数:
237
Let’s consider K-based numbers, containing exactly N digits. We define a number to be valid if its K-based notation doesn’t contain two successive zeros. For example:1010230 is a valid 7-digit number;...
分类:
其他好文 时间:
2015-05-14 22:10:44
阅读次数:
191