摘要:
如今我才知道欧拉筛和欧拉函数之间的关系。之前我欧拉函数离线打表一直是n²,亏我一直不T。 先放个纯欧拉筛。prime[1~cnt]记录了cnt个素数,而vis[i]=false表示这个数是素数。 1 const int MAXN=3000001; 2 int prime[MAXN];//保存已经求出 阅读全文
摘要:
二次剩余+快速幂+离线阶乘逆元。朝鲜人的考古题,快速幂年年有,啥时候把这题改成光速幂版本,又能卡死一群。 向金日成综合大学的巨巨们低头。 1 #include<cstdio> 2 #include<cstdlib> 3 #include<algorithm> 4 using namespace st 阅读全文
摘要:
1 def is_sorted1(a): 2 return (True if len([i for i in range(len(a)-1) if a[i]<=a[i+1]])==len(a)-1 else False)\ 3 or (True if len([i for i in range(le 阅读全文
摘要:
1 #include<bits/stdc++.h> 2 using namespace std; 3 #define pf printf 4 #define mem(a,b) memset(a,b,sizeof(a)) 5 #define scand(x) scanf("%llf",&x) 6 #d 阅读全文
摘要:
作业效果图如图: 代码如下: 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title></title> 6 <style> 7 *{ 8 margin:0px; 9 padding:0; 10 } 11 .box{ 阅读全文
摘要:
第一次作业效果图: 代码如下: 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title></title> 6 </head> 7 <body> 8 <table border="1"height="400px"cel 阅读全文
摘要:
最近发现struct板子真的好用。 1 #include<bits/stdc++.h> 2 #define ll long long 3 #define scan(i) scanf("%d",&i) 4 #define scand(i) scanf("%lf",&i) 5 #define scanl 阅读全文
摘要:
1 #include<bits/stdc++.h> 2 #define ll long long 3 #define scan(i) scanf("%d",&i) 4 #define scand(i) scanf("%lf",&i) 5 #define scanl(i) scanf("%lld",& 阅读全文
摘要:
1 from sklearn.model_selection import train_test_split 2 from sklearn.datasets import load_diabetes 3 X,y=load_diabetes().data,load_diabetes().target 阅读全文
摘要:
1 from sklearn.neural_network import MLPClassifier 2 from sklearn.datasets import load_wine 3 from sklearn.model_selection import train_test_split 4 w 阅读全文