[原创]POJ 1091 跳蚤 [容斥原理]【组合数学】
[原创]POJ 1091 跳蚤 [容斥原理]【组合数学】 2016-09-21 20:04:19 Tabris_ 阅读数:375 博客爬取于2020-06-14 22:43:11 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52612567 题目链接:http://poj.org/problem?id=1091 ---------------------------------. 1234567891011121314151617181920212223242526跳蚤Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 9828 Accepted: 2996DescriptionZ城市居住着很多只跳蚤。在Z城市周六生活频道有一个娱乐节目。一只跳蚤将被请上一个高空钢丝的正中央。钢丝很长,可以看作是无限长。节目主持人会给该跳蚤发一张卡片。卡片上写有N+1个自然数。其中最后一个是M, ...
[原创]POJ 2429 GCD&LCM Inverse [pollard_rho]【数论】
[原创]POJ 2429 GCD&LCM Inverse [pollard_rho]【数论】 2016-09-21 18:29:01 Tabris_ 阅读数:237 博客爬取于2020-06-14 22:43:13 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52611426 题目链接:http://poj.org/problem?id=2429 -----------------------------. GCD & LCM Inverse Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 13908 Accepted: 2572 Description Given two positive integers a and b, we can easily calculate the greatest common divisor (GCD) and the ...
[原创]大素数统计1e11以内 【数论】
[原创]大素数统计1e11以内 【数论】 2016-09-20 17:32:57 Tabris_ 阅读数:653 博客爬取于2020-06-14 22:43:14 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52598186 算法原理:https://en.wikipedia.org/wiki/Prime-counting_function 素数统计 这是一篇对素数问题描述非常详细的一篇博客了 代码一: 复杂度大概O(n^(3/4)) 123456789101112131415161718192021222324# include <bits/stdc++.h># define ll long longusing namespace std;ll f[340000],g[340000],n;void init(){ ll i,j,m; for(m=1;m*m<=n;++m)f[m]=n/m-1; f ...
[原创]HDU 5895&&2016 ACM/ICPC Asia Regional Shenyang Online1004 Mathematician QSC [矩阵加速+欧拉降幂]【数论】
[原创]HDU 5895&&2016 ACM/ICPC Asia Regional Shenyang Online1004 Mathematician QSC [矩阵加速+欧拉降幂]【数论】 2016-09-19 20:02:35 Tabris_ 阅读数:454 博客爬取于2020-06-14 22:43:15 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52588817 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5895 ------------------------. Mathematician QSC Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 222 Accepted Submission(s): ...
[原创]HDU 5898&&2016 ACM/ICPC Asia Regional Shenyang Online/ odd-even number [数位DP]【动态规划】
[原创]HDU 5898&&2016 ACM/ICPC Asia Regional Shenyang Online/ odd-even number [数位DP]【动态规划】 2016-09-18 22:01:52 Tabris_ 阅读数:316 博客爬取于2020-06-14 22:43:16 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52578407 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5898 -----------------------------------------------------------. odd-even number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 125 ...
[原创]POJ 2142 The Balance [不定方程和最小的正整数解]【数论】
[原创]POJ 2142 The Balance [不定方程和最小的正整数解]【数论】 2016-09-16 17:15:30 Tabris_ 阅读数:1428 博客爬取于2020-06-14 22:43:17 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52556618 题目链接:http://poj.org/problem?id=2142 --------------------------------------------. The Balance Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 5998 Accepted: 2610 Description Ms. Iyo Kiffa-Australis has a balance and only two kinds of weights to measure a dose of medicine. For e ...
[原创]POJ 2689 Prime Distance [筛法选取素数]【数论】
[原创]POJ 2689 Prime Distance [筛法选取素数]【数论】 2016-09-16 14:01:15 Tabris_ 阅读数:677 博客爬取于2020-06-14 22:43:18 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52555267 题目链接:http://poj.org/problem?id=2689 -------------------------. Prime Distance Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 16728 Accepted: 4450 Description The branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the intere ...
[原创]codeforces 714C Sonya and Queries [思维]【STL】
[原创]codeforces 714C Sonya and Queries [思维]【STL】 2016-09-14 14:25:00 Tabris_ 阅读数:700 博客爬取于2020-06-14 22:43:19 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52537683 题目链接:http://codeforces.com/contest/714/problem/C -------------------------------------. C. Sonya and Queries time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Today Sonya learned about long integers and invited all her friends to shar ...
[原创]POJ 3233 Matrix Power Series [矩阵快速幂]【数论】[水]
[原创]POJ 3233 Matrix Power Series [矩阵快速幂]【数论】[水] 2016-09-13 17:00:13 Tabris_ 阅读数:278 博客爬取于2020-06-14 22:43:20 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52527503 题目链接 : http://poj.org/problem?id=3233 -----------------------------------------. Matrix Power Series Time Limit: 3000MS Memory Limit: 131072K Total Submissions: 20930 Accepted: 8760 Description Given a n × n matrix A and a positive integer k, find the sum S = A + A2 + A3 + … + Ak. Inpu ...
[原创]POJ 2115 C Looooops [扩展欧几里得]【数论】[水]
[原创]POJ 2115 C Looooops [扩展欧几里得]【数论】[水] 2016-09-13 12:29:47 Tabris_ 阅读数:405 博客爬取于2020-06-14 22:43:21 以下为正文 版权声明:本文为Tabris原创文章,未经博主允许不得私自转载。 https://blog.csdn.net/qq_33184171/article/details/52524819 题目链接:http://poj.org/problem?id=2115 ----------------------------------. C Looooops Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 24028 Accepted: 6658 Description A Compiler Mystery: We are given a C-language style for loop of type for (variable = A; variable != B; variable += C) s ...