跳到正文

_LanFeng_

65190

长恨此身非我有,何时忘却营营?

资料、奖项与版本

资料

编号
65190
抓取

奖项

2021 NOIP
一等奖

784318034

骗分

平板电视教程

Latex数学公式

百密一疏啊!!!

百密二疏啊!!!

百密三疏啊!!!

希望我能弥补自己之前犯下的错误

西江月·证明

即得易见平凡,仿照上例显然。留作习题答案略,读者自证不难。 反之亦然同理,推论自然成立,略去过程QED,由上可知证毕。

博客

C++
#include<cstdlib>                                         //加入这个包才能使用随机函数rand()
#include<cstdio>
#include<ctime>                                           //加入这个包就能以时间为种子初始化随机函数
#include<iostream>
using namespace std;
int main()
{
    freopen("data.in","w",stdout);                        //注意:该程序生成的数据到data.in中
    srand(time(NULL));                                          //重要:初始化随机函数,以时间为种子
    int n=rand()%10000+1;                                 //生成一个1到10000之间的随机整数n
    int m=rand()%10000+1;
    printf("%d %d\n",n,m);
    for(int i=1;i<=n;i++)printf("%d ",rand()%20000-rand()%10000);//生成-10000到10000间的数字
    printf("\n");
    for(int i=1;i<=m;i++)
    {
           int x=rand()%n+1;                                     //保证生成的数据是x<=y
           int y=x+rand()%n+1;
           if(y>n)y=n;
           printf("%d %d\n",x,y);
    }
}
C++
int read()
{
    int x=0,f=1;char s=getchar();
    while(s<'0'||s>'9'){if(s=='-')f=-f;s=getchar();}
    while(s>='0'&&s<='9'){x=x*10+s-48;s=getchar();}
    return x*f;
}
C++
#define getchar()(p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)
char buf[1<<21],*p1=buf,*p2=buf;
template <typename T>
inline void read(T& r) {
	r=0;bool w=0; char ch=getchar();
	while(ch<'0'||ch>'9') w=ch=='-'?1:0,ch=getchar();
	while(ch>='0'&&ch<='9') r=r*10+(ch^48), ch=getchar();
	r=w?-r:r;
}
共 1 篇
  1. 题解

    学校食堂

    看到b的范围只有7,可以往搜索和状压方向想 因为搜索出现频率太低,先考虑状压 显然应该将b的意义设为状压集合 所以设f[i][j][k]表示现在打完饭的人是[1,i-1]以及j所表示的集合(这里j所表示的集合不太好解释,举个例子,如j在二进制表示下为1010,则表示i+1,i+3…