This commit is contained in:
ljcjames 2022-08-17 10:22:11 +08:00
parent d3aeb63e05
commit 4b55907332
44 changed files with 359 additions and 13 deletions

BIN
8.16/A-Frog/A.pdf (Stored with Git LFS) Normal file

Binary file not shown.

12
8.16/A-Frog/Readme.md Normal file
View File

@ -0,0 +1,12 @@
# 题目
* 链接
### 题意
### 做法
### 关键词
### 易错点
*
### 工具箱
*

View File

@ -0,0 +1 @@
#

14
8.16/A-Frog/main.cpp Normal file
View File

@ -0,0 +1,14 @@
//weiwancheng
#include <iostream>
#include<cstdio>
#include<algorithm>
#include <cmath>
#include <cstdlib>
using namespace std;
int x,y,m,n,l;
int main()
{
scanf("%d",&x,&y,&m,&n,&l);
return 0;
}

0
8.16/A-Frog/test/in.txt Normal file
View File

0
8.16/A-Frog/test/in2.txt Normal file
View File

0
8.16/A-Frog/test/in3.txt Normal file
View File

7
8.16/A-Frog/test/out.txt Normal file
View File

@ -0,0 +1,7 @@
## z:\Chao\src\Template\test\in.txt
2020/03/14 ÖÜÁù 11:41:28.68
Hello Easy C++ project!
-----------------------------------------------
Process exited after 200 ms with return value 0

BIN
8.16/H-Relatives/H.pdf (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,12 @@
# 题目
* 链接
### 题意
### 做法
### 关键词
### 易错点
*
### 工具箱
*

View File

@ -0,0 +1 @@
#

20
8.16/H-Relatives/main.cpp Normal file
View File

@ -0,0 +1,20 @@
#include <iostream>
#include<cstdio>
#include<algorithm>
#include <cmath>
using namespace std;
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int n;
scanf("%d",&n);
for(int i=1;i<=n; i++)
{
}
}
return 0;
}

View File

View File

View File

View File

@ -0,0 +1,7 @@
## z:\Chao\src\Template\test\in.txt
2020/03/14 ÖÜÁù 11:41:28.68
Hello Easy C++ project!
-----------------------------------------------
Process exited after 200 ms with return value 0

View File

@ -4,13 +4,15 @@
#include <cmath>
#include <cstdlib>
using namespace std;
const int N=1e7+5;
int pr[N/10];//存质数
const int N=1e7+5,M=7e5+5;
int pr[M];//´æÖÊÊý
bool b[N];//是不是质数
int q,n;
int n;
int n2;
int t1=0,t;
int cnt=0;
void prime()
int res;
inline void prime()
{
for(int i=2;i<N;i++)
{
@ -28,22 +30,36 @@ void prime()
}
}
}
void ce()
{
cout<<cnt;
//void ce()
//{
// cout<<cnt;
// for(int i=1;i<=cnt;i++)
// {
// cout<<pr[i]<<" ";
// }
//}
inline int doit()
{
res=0;
n2=n/2;
for(int i=1;pr[i]<=n2;i++)
{
if(!b[n-pr[i]])
{
res++;
}
}
return res;
}
int main()
{
prime();
ce();
// scanf("%d",&t);
// while(t--)
// {
// scanf("%d",&n);
// }
// ce();
scanf("%d",&t);
while(t--)
{
scanf("%d",&n);
printf("Case %d: %d\n",++t1,doit());
}
return 0;
}

BIN
8.16/K-GoldbachsConjecture/K.pdf (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,12 @@
# 题目
* 链接
### 题意
### 做法
### 关键词
### 易错点
*
### 工具箱
*

View File

@ -0,0 +1 @@
#

View File

@ -0,0 +1,20 @@
#include <iostream>
#include<cstdio>
#include<algorithm>
#include <cmath>
using namespace std;
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int n;
scanf("%d",&n);
for(int i=1;i<=n; i++)
{
}
}
return 0;
}

View File

View File

View File

View File

@ -0,0 +1,7 @@
## z:\Chao\src\Template\test\in.txt
2020/03/14 ÖÜÁù 11:41:28.68
Hello Easy C++ project!
-----------------------------------------------
Process exited after 200 ms with return value 0

View File

@ -0,0 +1,39 @@
#include <iostream>
#include<cstdio>
#include<algorithm>
#include <cmath>
#include <cstdlib>
using namespace std;
const long long M=1e17;
const int N=1e8;
double a[N+5]={0};
int t,n;
int t1;
inline void cun()
{
a[0]=0;a[1]=1;
for(int i=2;i<=N;i++)
{
a[i]=a[i-1]+(1.0/i);
}
}
//void ce()
//{
// cout<<cnt;
// for(int i=1;i<=cnt;i++)
// {
// cout<<pr[i]<<" ";
// }
//}
int main()
{
cun();
// ce();
scanf("%d",&t);
while(t--)
{
scanf("%d",&n);
printf("Case %d: %.8llf\n",++t1,a[n]);
}
return 0;
}

BIN
8.16/N-HarmonicNumber/N.pdf (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,12 @@
# 题目
* 链接
### 题意
### 做法
### 关键词
### 易错点
*
### 工具箱
*

View File

@ -0,0 +1 @@
#

View File

@ -0,0 +1,20 @@
#include <iostream>
#include<cstdio>
#include<algorithm>
#include <cmath>
using namespace std;
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int n;
scanf("%d",&n);
for(int i=1;i<=n; i++)
{
}
}
return 0;
}

View File

View File

View File

View File

@ -0,0 +1,7 @@
## z:\Chao\src\Template\test\in.txt
2020/03/14 ÖÜÁù 11:41:28.68
Hello Easy C++ project!
-----------------------------------------------
Process exited after 200 ms with return value 0

12
8.16/Readme.md Normal file
View File

@ -0,0 +1,12 @@
# 基础数论
* https://vjudge.net/contest/509210#overview
### 题意
### 做法
### 关键词
### 易错点
*
### 工具箱
*

37
8.16/Relatives.cpp Normal file
View File

@ -0,0 +1,37 @@
#include <iostream>
#include<cstdio>
#include<algorithm>
#include <cmath>
#include <cstdlib>
using namespace std;
int q,n;
int t1=0,t;
int main()
{
// scanf("%d",&t);
while(1)
{
scanf("%d",&n);
if(n==0)
{
break;
}
// int len=sqrt(n);
int res=n;
for(int i=2;i*i<=n;i++)//i=2
{
if(n%i==0)
{
res=res-res/i;
}
while(n%i==0)
{
n/=i;
}
}
if(n>1)
res=res-res/n;
printf("%d\n",res);
}
return 0;
}

View File

@ -0,0 +1 @@
#

View File

@ -0,0 +1,62 @@
#include <iostream>
#include<cstdio>
#include<algorithm>
#include <cmath>
using namespace std;
int q,n;
int t1=0,t;
// int i=0;
//n*5!n*5的阶乘
int find5(int n)//WA 以为/5一次就可以把前面*5的个数找出来
{
int res=0;
while(n/5>0)
{
n/=5;
res+=n;
}
return res;
}
int erfen(int l,int r)//TLE 没用二分超时
{
// ++i;
if(l>=r)
{
return l;
}
int mid=l+r;
mid/=2;
int now=mid+find5(mid);
if(now==q)
{
return mid;
}
if(now<q)return erfen(mid+1,r);
else return erfen(l,mid-1);
}
int main()
{
scanf("%d",&t);
while(t--)
{
scanf("%d",&q);
// q=t1+1;
n=erfen(q-find5(q),q);
// while(n+n/5<q)
// {
// ++i;
// n++;
// }
// printf("%d:%d->%d ",i,q-q/5,n);
if(n+find5(n)==q)//WA 这里忘改了
{
printf("Case %d: %d\n",++t1,n*5);
}
else
{
printf("Case %d: impossible\n",++t1);
}
}
return 0;
}

View File

View File

View File

View File

@ -0,0 +1,7 @@
## z:\Chao\src\Template\test\in.txt
2020/03/14 ÖÜÁù 11:41:28.68
Hello Easy C++ project!
-----------------------------------------------
Process exited after 200 ms with return value 0

BIN
8.16/欧几里得算法.pptx (Stored with Git LFS) Normal file

Binary file not shown.

BIN
8.16/欧拉定理.pdf (Stored with Git LFS) Normal file

Binary file not shown.