I am a slow walker,but I never walk backwards. Abraham Lincoln

GeekZRF

04 2017 档案

Codeforces 798C. Mike and gcd problem 模拟构造 数组gcd大于1
摘要:C. Mike and gcd problem time limit per test: 2 seconds memory limit per test: 256 megabytes input: standard input output: standard output C. Mike and 阅读全文

posted @ 2017-04-27 20:54 GeekZRF 阅读(173) 评论(0) 推荐(0)

Codeforces 796C. Bank Hacking
摘要:C. Bank Hacking time limit per test: 2 seconds memory limit per test: 256 megabytes input: standard input output: standard output Although Inzane succ 阅读全文

posted @ 2017-04-11 18:04 GeekZRF 阅读(496) 评论(0) 推荐(0)

Codeforces 792B. Counting-out Rhyme
摘要:B. Counting-out Rhyme time limit per test: 1 second memory limit per test: 256 megabytes input: standard input output: standard output B. Counting-out 阅读全文

posted @ 2017-04-10 20:22 GeekZRF 阅读(298) 评论(0) 推荐(0)

从1~N中任选出三个数,最小公倍数最大
摘要:已知一个正整数N,问从1~N中任选出三个数,它们的最小公倍数最大可以为多少。 当n为奇数:n、n-1、n-2这是三个最大数,并且它们两两互质。因为连续的奇、偶、奇,互质。连续的两个数互质是因为它们的公约数只有1,因为大于等于2的公约数n必须两个数至少相差n;连续的两个奇数互质也是因为它们的公约数只有 阅读全文

posted @ 2017-04-07 21:14 GeekZRF 阅读(533) 评论(0) 推荐(1)

表达式计算
摘要:计算一个包含+ - * / ( ) 的合法表达式的值 思路:数字栈num,运算符栈op。当前操作符优先级不大于栈顶操作符优先级,则数字栈num和运算符栈op出栈,处理后的数字和当前运算符继续与栈顶操作符比较,直至当前运算符的优先级大于栈顶,处理后的数字和当前运算符入栈。 代码: 阅读全文

posted @ 2017-04-06 20:05 GeekZRF 阅读(161) 评论(0) 推荐(0)

Codeforces 545E. Paths and Trees 最短路
摘要:E. Paths and Trees time limit per test: 3 seconds memory limit per test: 256 megabytes input: standard input output: standard output Little girl Susie 阅读全文

posted @ 2017-04-06 17:24 GeekZRF 阅读(409) 评论(0) 推荐(0)

导航