题目分类:数学基础
NickHdx
有一口气点一盏灯
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
UVa:113 - Power of Cryptography
作为初学者,二分查找能有如此的原创 2014-09-18 22:13:44 · 496 阅读 · 0 评论 -
UVa:11044 - Searching for Nessy
easy……#includeint main(){ int t; while(scanf("%d", &t) != EOF){ while(t--){ int m, n; scanf("%d%d", &n, &m); int xc = (n - 2) % 3 ? (n - 2) / 3 +原创 2015-04-19 22:01:40 · 570 阅读 · 0 评论 -
UVa: UVA - 10719 Quotient Polynomial
以前遇到过类似的情况——在未知数组长度的情况下输入数组各元素,解决问题的关键是如何判断数组何时输入结束,经验以为OJ会以EOF结束输入,但RE了,以'\n'结束输入AC#includeconst int MAXN = 10100;int p[MAXN];int main(){ int k; while(scanf("%d", &k) != EOF){ in原创 2015-04-12 10:12:10 · 661 阅读 · 0 评论 -
UVa:573 - The Snail
需要注意的地方是:1.原创 2014-10-19 21:56:49 · 518 阅读 · 0 评论 -
UVa:107 - The Cat in the Hat
刚开始没读懂题目,后来百度了一下中文翻译原创 2014-10-18 22:42:47 · 631 阅读 · 0 评论 -
UVa:846 - Steps
注意:“The length of a step must be nonnegative and can be by one bigger than, equal to, or by one smaller than the length of the previous step.”相邻的原创 2014-11-01 14:49:51 · 549 阅读 · 0 评论 -
UVa:591 - Box of Bricks
#includeint a[60];int main() { int n, c = 0; while(scanf("%d", &n) != EOF) { if(!n) break; c++; a[0] = 0; for(int i=1; i <= n; i++){ s原创 2014-09-23 11:02:26 · 626 阅读 · 0 评论 -
UVa:621 - Secret Research
好水……本以为会是道细节题……还有原创 2014-09-19 19:52:12 · 594 阅读 · 0 评论 -
UVa:10025 - The ? 1 ? 2 ? ... ? n = k problem
让1到n的数做算术运算(加)原创 2014-09-22 22:41:36 · 631 阅读 · 0 评论 -
UVa:253 - Cube painting
#includeint main(){ char c1[6],c2[6],c[13]; while(scanf("%s",c)!=EOF){ for(int i=0;i<6;i++){ c1[i]=c[i]; c2[i]=c[i+6]; } int t; for(int原创 2014-09-18 22:20:36 · 570 阅读 · 0 评论 -
UVa:10161 - Ant on a Chessboard
找规律……#include#includeint main(){ int time; while(scanf("%d",&time)!=EOF){ if(!time) break; int s=ceil(sqrt(time)); int N=s*s; if(s%2){原创 2014-09-18 22:18:31 · 478 阅读 · 0 评论 -
UVa:10790 - How Many Points of Intersection?
数学推导即可。。。(等差数列求和)刚开始WA了一次,样例过了,但没注意到int型不能隐性转换为long long型(不知道为什么,求解!??!),强制转换后AC#includeint main(){ long long sum; int a, b; int t = 1; while(scanf("%d%d", &a, &b) != EOF){原创 2015-04-08 13:01:56 · 473 阅读 · 0 评论
分享