随笔分类 -  基本算法-枚举

摘要:A. Rounding time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasya has a non-negative inte 阅读全文
posted @ 2017-12-22 19:36 Roni_i 阅读(166) 评论(0) 推荐(0)
摘要:【题意】:给你一个数k,求所有使得1/k = 1/x + 1/y成立的x≥y的整数对。 【分析】:枚举所有在区间【k+1, 2k】上的 y 即可,当 1/k - 1/y 的结果分子为1即为一组解。 【代码】: 阅读全文
posted @ 2017-12-18 17:01 Roni_i 阅读(172) 评论(0) 推荐(0)
摘要:【题意】:乘积最大的子序列。n∈[1,10],s∈[-10,10] 【代码】: 阅读全文
posted @ 2017-12-18 16:37 Roni_i 阅读(176) 评论(0) 推荐(0)
摘要:【题意】:输入正整数n,用0~9这10个数字不重复组成两个五位数abcde和fghij,使得abcde/fghij的商为n,按顺序输出所有结果。如果没有找到则输出“There are no solutions for N.”。这里2<=n<=79。 【分析】: 1.因为n>=2,且abcde=fgh 阅读全文
posted @ 2017-12-18 16:11 Roni_i 阅读(215) 评论(0) 推荐(0)
摘要:Description A ring is composed of n (even number) circles as shown in diagram. Put natural numbers 1,2,3,...,n into each circle separately, and the su 阅读全文
posted @ 2017-12-18 12:46 Roni_i 阅读(311) 评论(0) 推荐(0)
摘要:A. Hungry Student Problem time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Ivan's classes 阅读全文
posted @ 2017-12-13 01:36 Roni_i 阅读(391) 评论(0) 推荐(0)
摘要:Accept: 1040 Submit: 2314Time Limit: 1000 mSec Memory Limit : 32768 KB Accept: 1040 Submit: 2314Time Limit: 1000 mSec Memory Limit : 32768 KB Problem 阅读全文
posted @ 2017-12-10 17:51 Roni_i 阅读(223) 评论(0) 推荐(0)
摘要:A. Minimum Difficulty time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. Minimum Difficu 阅读全文
posted @ 2017-12-08 13:36 Roni_i 阅读(307) 评论(0) 推荐(0)
摘要:题目描述 因为151既是一个质数又是一个回文数(从左到右和从右到左是看一样的),所以 151 是回文质数。 写一个程序来找出范围[a,b](5 <= a < b <= 100,000,000)( 一亿)间的所有回文质数; 输入输出格式 输入格式: 第 1 行: 二个整数 a 和 b . 输出格式: 阅读全文
posted @ 2017-12-03 15:44 Roni_i 阅读(379) 评论(0) 推荐(0)
摘要:A. Flipping Game time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Iahub got bored, so he i 阅读全文
posted @ 2017-12-01 21:10 Roni_i 阅读(269) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-12-01 19:37 Roni_i 阅读(1) 评论(0) 推荐(0)
摘要:A. Buy a Shovel time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. Buy a Shovel time limi 阅读全文
posted @ 2017-12-01 16:08 Roni_i 阅读(162) 评论(0) 推荐(0)
摘要:A. New Year and Hurry time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. New Year and Hur 阅读全文
posted @ 2017-12-01 14:32 Roni_i 阅读(237) 评论(0) 推荐(0)
摘要:A. I_love_%username% time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya adores sport 阅读全文
posted @ 2017-12-01 11:44 Roni_i 阅读(402) 评论(0) 推荐(0)
摘要:A. IQ test time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. IQ test time limit per tes 阅读全文
posted @ 2017-12-01 10:49 Roni_i 阅读(235) 评论(0) 推荐(0)
摘要:A. Kefa and First Steps time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. Kefa and Firs 阅读全文
posted @ 2017-11-30 13:13 Roni_i 阅读(223) 评论(0) 推荐(0)
摘要:A. Beautiful Year time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. Beautiful Year time 阅读全文
posted @ 2017-11-29 22:52 Roni_i 阅读(212) 评论(0) 推荐(0)
摘要:A. Lucky Division time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. Lucky Division time 阅读全文
posted @ 2017-11-29 01:17 Roni_i 阅读(287) 评论(0) 推荐(0)
摘要:time limit per test 1 second memory limit per test 64 megabytes input standard input output standard output time limit per test 1 second time limit pe 阅读全文
posted @ 2017-11-29 00:53 Roni_i 阅读(180) 评论(0) 推荐(0)
摘要:A. Pizza Separation time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Students Vasya and Pe 阅读全文
posted @ 2017-11-27 10:41 Roni_i 阅读(374) 评论(0) 推荐(0)