跳到正文

剪贴板

剪贴板 celiofzw

原文
剪贴板信息

剪贴板信息

收录
更新
代码
          :iiruU5uuYuJjjU1F1urii,
                 .7uJr.:irvJv7i::::::::::::irLuUY7i. iL27:
               i@B@B@B@Bu::,,.,...........,.,,::iiuB@B@B@B@L
              rM2777vUG@BY ........,...,.,.,.... iB@Bq2vi:7BF
              :..:r:.  i@B, ..................,..M@Y..:;Li  :
              ,r7r:,..  vBi. ....................@U  .,:rjui
            .rvri,..... :r. .....................Ji ,,,,:ivuU:
           .7Li:......       ................... ....,.:,::7jS7
          .ri:i:iiriiii::.. .   . ......... .     ::iiriiiii7LS1:
       .:rrYr.         ..,:i::.  ............:i7v:           .:rLv:
     :7,kB@B@M               ,i:. ........:.L@@B@B,              .rv:
    :J  N@@@B@                 ::  ......i. r@B@B@.                ,L
    :v   L8PL,.,::ii:::,,..    ,i ..... .i.  ;GE2:..:::::::.,..    .L
     ri:..     . .  ...,,::::i::.  ......,,:,.    .... ....,,:::::,i7
     .L:... ....,..               .........       ....,::::::,,::::rJ.
     ivriiiiiiiiii:::.       . . ..............,.,.,:iirirrr;r;77vvuu,
    :Lr::irii:i:::ii;i. ... . ................,....:r;;iii;ir;77rir7Lr.
    i1i::::::::::::::,.... . . ..................,.::i:::i:i:ii;ii;rv5:
    rji::,,.,.,.,.... . ........................,.,..,::::::::iiiirrv5i
   .ivi:::,,...... . ..........................,.,.,,,,:,:,:,::ii;ir71i
   .iri::,:.,.. ..............................,.,.,,:,:,:,:,::iiiir;7ji
   :;7i:::,,.,...............................,.,.,,,,:,:::,::i:ii;ir7j:.
   ,;ri:::,.,.............................,.,.,.,,:,:,::::::i:i:iirivui.
   ,ivii::.::..,.,.......................,.,.,.,,,,:,::::::i:iri:i;r71i.
   .7ji:::.i7.....,...........,.........,.,.,,,,,,:,::::::i:::j;:ir;vFr.
   .7Fii::.v2. ,.....,...............,.,.,.,.,,,,:,::::i:i:i,ik7:i;r7ki.
   .rur:i:,i5r....,.,.,...........,.,.,.,,,.:,:,::::::::i::,:YFr:irrLL:
   .:77;:::.7@: ...,.,.,.,.,.,.,.,.,.,,,,,,,,::::::::::::::,v@i,:;rLur..
    ,rSri::.,F@i .,.,.,.,.,.,.,.,,,.:,,,:,:,::::::::::i::,.L@u::i;rLki.
    .iLvii::..G@;  ..,.,.,,,.,,,,,,,,:,:,:,:::::::::::::..Y@k.,iir7u7:
     .r57ii:: .0@F. ..,.,,,,,,,.,,:,:,::::::::::::::::,.:Z@5 .:irrjUi.
     .:Lu7ii::. j@@7.  ..,,,,:,:,:,:,:,:::::::::::::..:uB@7..::rrJUr,.
      .i2j7iii:. ,BB@J. ....,,:,:,:::::::::::::,:...:F@@Z. .::rrLUJ:.
       ,i5uriiii,  rM@BZ7,  .....,,:,:,:::,,.....:YOB@Gi .:::rr71u:.
       .:r1U7iiii:.  :GB@BBur::.... . .....,::v5@B@@P,  ,:::rrL1ui,
        .:r2U7;;iii:.  .rX@@B@B@EPS5JLJSFPG@B@@@MFi. ..:::irrY1Yi,
          ,iU2Lrri;ii::.   :rLPM@B@B@B@@@B@OSv;:   .::::i;77u5Y:,
           ,iL127r;;iiii::.     ....,:,....     .::::::i;7YS2v:.
            .:7USuviriii;iiii::.... . . ....::::::::iirrY1SYr:.
             .,i7FkUvr;riri;iriiiiiiii:i:i:i:::iiiirr7LFkUri..
               .:iY2SSjr7r;iri;iii;iiiiiiiii;iiirr77UkFu7:,.
                 .,i7U5q5jvvrriri;iririririr;r7LLukP2uri,.
                   .::rvu5NX1uUjJvvv7r7vLLujUuFPq2u7;:,.
                     ..,:irLY5SPSXSk121XFPkXF5Yv;i:,.
                         ..,::i;77vLJLYvv7rii::..
                             . ....,,:,,.,.. .
https://www.luogu.com.cn/record/204929999 祭

副主页(东西太多这里放不完)

编自己的游戏

string KMP c++图形化 珂朵莉树 背包 c++在线ide vector 指针 随机数 bitset用法(疑似二进制) 图论 printf和scanf用法大全 Ascll 哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈^{哈}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}

友链


Litter_Yin

TJHtjh

C++
//万能头
#include<bits/stdc++.h>
using namespace std;
#define made_in return
#define China 0;
#define int long long
signed main(){

	made_in China
}
#include<bits/stdc++.h>
using namespace std;
//新生将在这里出现?
int main(){//噩梦开始了

	return 0;//结束了?
}
//关机
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main(){
	cout<<"关机程序\n";
	if(MessageBox(NULL,"是否运行?","它将关掉你的电脑!",MB_YESNO|MB_ICONEXCLAMATION)==IDYES){
		system("shutdowm -s -t 30");
		cout<<"30秒后关机!";
	}
	else{
		cout<<"运行失败......";
	}
	return 0;
}
//高精度
#include<iostream>
#include<vector>
#include<string>
using namespace std;
struct Wint:vector<int>//用标准库vector做基类,完美解决位数问题,同时更易于实现
{
    //将低精度转高精度的初始化,可以自动被编译器调用
    //因此无需单独写高精度数和低精度数的运算函数,十分方便
    Wint(int n=0)//默认初始化为0,但0的保存形式为空
    {
        push_back(n);
        check();
    }
    Wint& check()//在各类运算中经常用到的进位小函数,不妨内置
    {
        while(!empty()&&!back())pop_back();//去除最高位可能存在的0
        if(empty())return *this;
        for(int i=1; i<size(); ++i)
        {
            (*this)[i]+=(*this)[i-1]/10;
            (*this)[i-1]%=10;
        }
        while(back()>=10)
        {
            push_back(back()/10);
            (*this)[size()-2]%=10;
        }
        return *this;//为使用方便,将进位后的自身返回引用
    }
};
//输入输出
istream& operator>>(istream &is,Wint &n)
{
    string s;
    is>>s;
    n.clear();
    for(int i=s.size()-1; i>=0; --i)n.push_back(s[i]-'0');
    return is;
}
ostream& operator<<(ostream &os,const Wint &n)
{
    if(n.empty())os<<0;
    for(int i=n.size()-1; i>=0; --i)os<<n[i];
    return os;
}
//比较,只需要写两个,其他的直接代入即可
//常量引用当参数,避免拷贝更高效
bool operator!=(const Wint &a,const Wint &b)
{
    if(a.size()!=b.size())return 1;
    for(int i=a.size()-1; i>=0; --i)
        if(a[i]!=b[i])return 1;
    return 0;
}
bool operator==(const Wint &a,const Wint &b)
{
    return !(a!=b);
}
bool operator<(const Wint &a,const Wint &b)
{
    if(a.size()!=b.size())return a.size()<b.size();
    for(int i=a.size()-1; i>=0; --i)
        if(a[i]!=b[i])return a[i]<b[i];
    return 0;
}
bool operator>(const Wint &a,const Wint &b)
{
    return b<a;
}
bool operator<=(const Wint &a,const Wint &b)
{
    return !(a>b);
}
bool operator>=(const Wint &a,const Wint &b)
{
    return !(a<b);
}
//加法,先实现+=,这样更简洁高效
Wint& operator+=(Wint &a,const Wint &b)
{
    if(a.size()<b.size())a.resize(b.size());
    for(int i=0; i!=b.size(); ++i)a[i]+=b[i];
    return a.check();
}
Wint operator+(Wint a,const Wint &b)
{
    return a+=b;
}
//减法,返回差的绝对值,由于后面有交换,故参数不用引用
Wint& operator-=(Wint &a,Wint b)
{
    if(a<b)swap(a,b);
    for(int i=0; i!=b.size(); a[i]-=b[i],++i)
        if(a[i]<b[i])//需要借位
        {
            int j=i+1;
            while(!a[j])++j;
            while(j>i)
            {
                --a[j];
                a[--j]+=10;
            }
        }
    return a.check();
}
Wint operator-(Wint a,const Wint &b)
{
    return a-=b;
}
//乘法不能先实现*=,原因自己想
Wint operator*(const Wint &a,const Wint &b)
{
    Wint n;
    n.assign(a.size()+b.size()-1,0);
    for(int i=0; i!=a.size(); ++i)
        for(int j=0; j!=b.size(); ++j)
            n[i+j]+=a[i]*b[j];
    return n.check();
}
Wint& operator*=(Wint &a,const Wint &b)
{
    return a=a*b;
}
//除法和取模先实现一个带余除法函数
Wint divmod(Wint &a,const Wint &b)
{
    Wint ans;
    for(int t=a.size()-b.size(); a>=b; --t)
    {
        Wint d;
        d.assign(t+1,0);
        d.back()=1;
        Wint c=b*d;
        while(a>=c)
        {
            a-=c;
            ans+=d;
        }
    }
    return ans;
}
Wint operator/(Wint a,const Wint &b)
{
    return divmod(a,b);
}
Wint& operator/=(Wint &a,const Wint &b)
{
    return a=a/b;
}
Wint& operator%=(Wint &a,const Wint &b)
{
    divmod(a,b);
    return a;
}
Wint operator%(Wint a,const Wint &b)
{
    return a%=b;
}
//顺手实现一个快速幂,可以看到和普通快速幂几乎无异
Wint pow(const Wint &n,const Wint &k)
{
    if(k.empty())return 1;
    if(k==2)return n*n;
    if(k.front()%2)return n*pow(n,k-1);
    return pow(pow(n,k/2),2);
}
//通过重载运算符,还可以实现++、--、^、!、逻辑运算符等很多运算,十分简单,此处都不写了
int main()//你完全可以像int一般便捷地使用Wint,如下
{
    Wint a,b;
    //可以把b改成int型,仍能正常使用
    cin>>a>>b;
    cout<<(a<b)<<endl
        <<(a==b)<<endl
        <<a+b<<endl
        <<a-b<<endl
        <<a*b<<endl
        <<a/b<<endl
        <<a%b<<endl
        <<pow(a,b);
}

//Floyd
void floyd(){
	 for(int k=1;k<=n;k++){
	 	for(int i=1;i<=n;i++){
	 		for(int j=1;j<=n;j++){
	 			g[i][j]=min(g[i][j],g[i][k]+g[k][j]);
			 }
		 }
	 }
}

//01背包问题:

//无优化
for(int i=1;i<=n;i++)
{
    for(int c=0;c<=m;c++)
    {
        f[i][c]=f[i-1][c];
        if(c>=w[i])
        f[i][c]=max(f[i][c],f[i-1][c-w[i]]+v[i]);
    }
}
//一维数组优化:

for(int i=1;i<=n;i++)
{
    for(int c=m;c>=0;c--)
    {
        if(c>=w[i])
        f[c]=max(f[c],f[c-w[i]]+v[i]);
    }
}
//更进一步的常数优化:

for(int i=1;i<=n;i++)
{
    sumw+=w[i];
    bound=max(m-sumw,w[i]);
    for(int c=m;c>=bound;c--)
    {
        if(c>=w[i])
        f[c]=max(f[c],f[c-w[i]]+v[i]);
    }
}
//完全背包问题:

for(int i=1;i<=n;i++)
{
    for(int c=0;c<=m;c++)
    {
        if(c>=w[i])
        f[c]=max(f[c],f[c-w[i]]+v[i]);
    }
}
//多重背包问题:

for(int i=1;i<=n;i++)
{
    if(w[i]*a[i]>m)
    {
        for(int c=0;c<=m;c++)
        {
        if(c>=w[i])
        f[c]=max(f[c],f[c-w[i]]+v[i]);
        }
    }
    else
    {
         k=1;amount=a[i];
         while(k<amount)
         {
             for(int c=k*w[i];c>=0;c--)
             {
                 if(c>=w[i])
                 f[c]=max(f[c],f[c-w[i]]+k*v[i]);
             }
             amount-=k;
             k<<=1;
         }
         for(int c=amount*w[i];c>=0;c--)
         {
             f[c]=max(f[c],f[c-w[i]]+amount*v[i]);
         }
    }

//小根堆

#include<cstring>

template<typename item>
class smallest_heap{
	private:
		item heap[10001];
		int len;
	public:
		smallest_heap();
		void push(item const &);
		void pop();
		item top();
		int size();
		bool empty();

};

template<typename item>
smallest_heap<item>::smallest_heap(){
	len=0;
	memset(heap,0,sizeof(heap));
}

template<typename item>
void smallest_heap<item>::push(item const &n){
	heap[++len]=n;
	int son=len,father=son/2;
	while(heap[son]<heap[father] && father>=1){
		swap(heap[son],heap[father]);
		son=father,father=son/2;
	}
}

template<typename item>
void smallest_heap<item>::pop(){
	swap(heap[1],heap[len]);
	heap[len--]=0;
	int father=1,son=2;
	while(son<=len){
		if(son<len && heap[son]>heap[son+1]) son++;
		if(heap[father]>heap[son]){
			swap(heap[father],heap[son]);
			father=son,son=father*2;
		}else break;
	}
}

template<typename item>
item smallest_heap<item>::top(){
	return heap[1];
}

template<typename item>
int smallest_heap<item>::size(){
	return len;
}

template<typename item>
bool smallest_heap<item>::empty(){
	return len;
}
//大根堆

#include<cstring>

template<typename item>
class largest_heap{
	private:
		item heap[10001];
		int len;
	public:
		largest_heap();
		void push(item const &);
		void pop();
		item top();
		int size();
		bool empty();

};

template<typename item>
largest_heap<item>::largest_heap(){
	len=0;
	memset(heap,0,sizeof(heap));
}

template<typename item>
void largest_heap<item>::push(item const &n){
	heap[++len]=n;
	int son=len,father=son/2;
	while(heap[son]>heap[father] && father>=1){
		swap(heap[son],heap[father]);
		son=father,father=son/2;
	}
}

template<typename item>
void largest_heap<item>::pop(){
	swap(heap[1],heap[len]);
	heap[len--]=0;
	int father=1,son=2;
	while(son<=len){
		if(son<len && heap[son]<heap[son+1]) son++;
		if(heap[father]<heap[son]){
			swap(heap[father],heap[son]);
			father=son,son=father*2;
		}else break;
	}
}

template<typename item>
item largest_heap<item>::top(){
	return heap[1];
}

template<typename item>
int largest_heap<item>::size(){
	return len;
}

template<typename item>
bool largest_heap<item>::empty(){
	return len;
/*同时也可以支持自己编写的类,但须提供“<”或“>”的运算符重载,例如*/

class T{
	private:
		int a;
	public:
		bool operator<(T const &type){
			return a<type.a;
		}
};
smallest_heap<T> heap;
//每日运势测评
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
string sf;
int a;
void s(string sb){
	for(int j=0;j<sb.size();j++){
		cout<<sb[j];
		Sleep(30);
	}
}
void shan(int x,int y){
	system("cls");
	for(int i=1;i<=x;i++){
		cout<<y<<"%";
		Sleep(10);
		system("cls");
		Sleep(10);
	}
}
void jingdutiao(){
	for(int i=1;i<=99;i++){
		cout<<i<<"%";
		srand(time(0));
		int t=rand()%5;
		if(t==0)shan(50,i);
		else Sleep(1);
		if(i<99)system("cls");
	}
	shan(3000/20,99);
	system("cls");
	cout<<"100%";
}
int set;
int main(){
	s("每日运气测评!!!\n");
	Sleep(1000);
	system("pause");
	system("cls");
	srand(time(0));
	a=rand()%100+1;
	srand(time(0));
	int u=rand()%10;
	s("开始测评!\n");
	Sleep(1500);
	system("cls");
	jingdutiao();
	system("cls");
	if(u==0){
		s("啊哦~~~\n服务器爆炸了,按F11再试一次吧");
	}
	else{
		s("测出来了!!!\n");
		Sleep(1500);
		s("你今天的运气值是:");
		cout<<a;
		cout<<endl;
		s("你的运势是:");
		if(a==100){
			cout<<"巨吉!";
		}
		if(a>=85&&a<=99){
			cout<<"大吉!";
		}
		if(a>=60&&a<85){
			cout<<"中吉!";
		}
		if(a>=50&&a<60){
			cout<<"小吉!";
		}
		if(a>=35&&a<50){
			cout<<"中平!";
		}
		if(a>=20&&a<35){
			cout<<"凶!";
		}
		if(a>0&&a<20){
			cout<<"大凶!";
		}
	}
	return 0;
}
  //http://namerena.github.io/#
C++
//欧拉线性筛
bool IsPrime[10000001];
int Pri[2000001],PriN;
int FindPrime ( int MaxN ) {
    for( int i = 2 ; i <= MaxN ; ++i ){
        if( IsPrime[ i ] )
            Pri[ PriN++ ]=i; //将这句话放在下面的循环前以保证PriN和Pri值的完整性
        for(int j=0;j<PriN;++j){
            if( i*Pri[ j ] > MaxN )
                break; //当过大了就跳出
            IsPrime[ i * Pri[ j ] ] = 0;
            //筛去素数
            if( i % Pri[ j ] == 0 ) break;
            //这里是关键,如果i是一个合数(这当然是允许的)而且i mod prime[j] = 0
            //那么跳出,因为i*prime[ (- over -)j ]一定已经被筛去了,被一个素因子比i小的数
        }
    }
}
//快速幂
while(p>0){
    if(p%2!=0)
    s=s*b%k;
    b=b*b%k;
    p=p>>1;
}
s%=k;

//并查集
int father[x];
int getfather(int x)
{
  if(father[x]==x) return x; father[x]=getfather(father[x]);
  return father[x];
}
void he(int x,int y)
{  int a,b;
   a=getfather(x);
   b=getfather(y);
   if(a!=b)father[a]=b;
}
void judge(int x,int y)
{  int a,b;
   a=getfather(x);
   b=getfather(y);
   if(a==b)return true;
        else return false;
}
void chu(int n){
	for(int i=1;i<=n;i++)father[i]=i;
}