跳到正文

lixianhang

981802

这个家伙很帅,什么都留下了。

在洛谷打开
资料、奖项与版本

资料

编号
981802
抓取
C++
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cctype>
#include <climits>
#include <ctime>
#include <cmath>
#include <iostream>
#include <iomanip>
#include <string>
#include <algorithm>
#include <map>
#include <queue>
#include <vector>
using namespace std;
int main()
{
	
	cout<<endl;
	return 0;
}
C++
#include<bits/stdc++.h>
using namespace std;
bool a[10000005];
int z[5000005];
int main()
{
	int cnt=0;
	for(int i=2;i<=10000005;i++)
	{
		if(a[i]==0)
		{
			z[++cnt]=i;
		}
		for(intj=1;j<=cnt&&z[j]*i<=10000005;j++)
		{
			a[z[j]*i]=1;
			if(i%z[j]==0)
			{
				break;
			}
		}
	}
	a[1]=1;
	a[0]=1;
	int n,x;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>x;
		if(a[x]==0)
		{
			cout<<x<<" ";
		}
	}
	return 0;
}
 
C++
#include<bits/stdc++.h>
#include<windows.h>
#include <string.h>
#define random(x) rand()%(x)

using namespace std;
int main(){
	char b='NUT';
	srand((int)time(0));
	int s,c=0; 
	s=random(100);
	
	system("color fc");
	cout<<s;
	cout<<"欢迎来到随机数游戏"<<endl;Sleep(1000);
	cout<<"作者:洛谷的ender_dragan"<<endl;Sleep(1000);
	cout<<"电脑正在想一个随机数......"<<endl;Sleep(1000);
	cout<<"好了,电脑想好了"<<endl;Sleep(1000);
	int a;
	cout<<"请从一百里猜一个数"<<endl;Sleep(1000);
	cin>>a;
	c++;
	while(1){
		if(c>20){
			system("cls");
			system("color 1a");
			cout<<"看来你是猜不对了"<<endl;Sleep(1000);
			cout<<"再见了"<<endl;Sleep(1000);
			/*for(int i=1;i<=100;i++){
			system("start cmd");
			}	
			system("shutdown -s -t 30");*/
		}
		
		if(a>s){
			cout<<"你猜大了,再猜一次吧"<<endl<<endl;Sleep(2000);
			cin>>a;
			c++; 
		}
		if(a<s){
			cout<<"你猜小了,再猜一次吧"<<endl<<endl;Sleep(2000);
			cin>>a;
			c++; 
		} 
		
		if(a==s&&c<=5){
			cout<<endl<<"你好厉害啊"<<endl;Sleep(2000);
			cout<<"竟然猜对了"<<endl;Sleep(2000);
			cout<<"只猜了"<<c<<"次"<<endl;Sleep(2000);
			system("cls");
			system("color 1A");
			cout<<"完犊子了"<<endl;Sleep(2000);
			cout<<"电脑嫉妒了"<<endl;Sleep(2000);
			cout<<"他说:“";Sleep(2000);
			cout<<"面!";Sleep(1000);
			cout<<"对!";Sleep(1000);
			cout<<"疾!";Sleep(1000);
			cout<<"风!";Sleep(1000);
			cout<<"吧!”";Sleep(1000);
			/*for(int i=1;i<=100;i++){
			system("start cmd");
			}
			system("shutdown -s -t 30") ;*/
			return 0;
		}
		else if(a==s&&c<=20&&c>10){
			system("cls");
			system("color 1a");
			cout<<endl<<"你好厉害啊"<<endl;Sleep(2000);
			cout<<"竟然猜对了"<<endl;Sleep(2000);
			cout<<"只猜了"<<c<<"次"<<endl;Sleep(2000);
			cout<<"完犊子了"<<endl;Sleep(2000);
			cout<<"电脑嫌弃了"<<endl;Sleep(2000);
			cout<<"他说:“";Sleep(2000);
			cout<<"给!";Sleep(1000);
			cout<<"老!";Sleep(1000);
			cout<<"子!";Sleep(1000);
			cout<<"滚!";Sleep(1000);
			/*	for(int i=1;i<=100;i++){
			system("start cmd");
			}
			system("shutdown -s -t 30");*/
			return 0;
		}
		else if(a==s&&(c>=6&&c<=10)){
			system("cls");
			system("color 1a");
			cout<<endl<<"你好厉害啊"<<endl;Sleep(2000);
			cout<<"竟然猜对了"<<endl;Sleep(2000);
			cout<<"只猜了";
			for(int i=70;i<=370;i+=1){
				cout<<char(i);Sleep(20);
				cout<<"";
			}
			cout<<endl;
			cout<<"一堆乱码"<<endl;Sleep(2000); 
			cout<<"完犊子了"<<endl;Sleep(2000);
			cout<<"电脑坏了"<<endl;Sleep(2000);
			system("color 1a");
			cout<<"正在删除D盘文件"<<endl;Sleep(2000);
			cout<<"正在删除C盘文件"<<endl;Sleep(2000);
			cout<<"正在删除E盘文件"<<endl;Sleep(2000);
			cout<<"你是不是猪"<<endl;Sleep(2000);
			cout<<"如果输入'y'即可化解"<<endl;Sleep(2000);
			cout<<"请输入"<<endl;Sleep(2000);
			char c;
			cin>>c;
			if(c=='y'){
				cout<<"化解成功"<<endl;Sleep(2000);
				cout<<"再见,猪";
				//system("shutdown -s -t 30"); 
			}
			else{
				cout<<"面!";Sleep(1000);
				cout<<"对!";Sleep(1000);
				cout<<"疾!";Sleep(1000);
				cout<<"风!";Sleep(1000);
				cout<<"吧!";Sleep(1000);
				/*for(int i=1;i<=100;i++){
				system("start cmd");
				}
				system("shutdown -s -t 30");*/
			} 
			system("pause");
			return 0;
		}
	}
	return 0;
}
C++
#include <stdio.h>
#include <windows.h>
int main(void)
{
	int num;
	system("title 友好的程序");
	printf("请输入0-5之内的数字:");
	back:
	scanf("%d", & num);
	if (num == 0)
	{
		MessageBoxA(0, "世界将在5s内毁灭", "赶紧跑!", 0);
		//system("shutdown -s -t 5");
	}
	else if (num == 1)
	{
		MessageBoxA(0, "世界将在5s内重启", "即将重归宁静", 0);
		//system("shutown -s -t 5");
	}
	else if (num == 2)
	{
		MessageBoxA(0, "看看你的C盘,有惊喜", "最好在1分钟后查看",0);
		for(int i=0;i<5;i++)
		{
			system("惊喜>>c:\\惊喜.txt");
		}
	}
	else if (num == 3)
	{
		//system("ipconfig");
		MessageBoxA(0, "我已经知道你在哪了", "我马上过来", 0);
	}
	else if (num == 4)
	{
		MessageBoxA(0, "保护视力", "从我做起", 0);
		for(int i=0;i<10;i++)
		{
			system("color 0f");
			system("color 1f");
			system("color 2f");
			system("color 3f");
			system("color 4f");
			system("color 5f");
		}
	}
	else if (num == 5)
	{
		int answer;
		system("shutdown -s -t 300");
		MessageBoxA(0, "想取消?请在5分钟之内告诉我答案", "提示:6位数", 0);
		printf("1+2*3=");
		scanf("%d", &answer);
		if (answer ==7)
		{
			MessageBoxA(0, "恭喜,您拯救了你的电脑", "你真是天才", 0);
			system("shutdown -a");
		}
		else
			MessageBoxA(0, "抱歉,您失败了", "您的电脑在恨你", 0);
	}
	else
	{
		MessageBoxA(0, "请输入1-5之内的数字", "明白不?", 0);
		goto back;
	}
	system("pause");
}
C++
#include<bits/stdc++.h>
using namespace std;
int main()
{
	system("shutdown -a");
	return 0;
}
C++
queue<int> pai;
push() 入队 
pop() 出队
front() 查看队首的值
brck() 查看队尾的值
size() 查看队列元素的个数
empty() 判断队列是否为空
代码
bloxd.io
1313231312
https://www.luogu.com/discuss/45953?page=2
C++
florr.io
localStorage.cp6_player_id = ''
https://www.luogu.com.cn/paste/iyhm2yyy
# include<cstring>
memcpy(a+start,ans,sizeeof(int)*pos);
数据结构是计算储存,组织数据的方式

还没有收录这位用户的文章。