快读
inline int read(){
int x=0,f=1;
char ch=getchar();
while (ch<'0'||ch>'9'){
if (ch=='-') f=-1;
ch=getchar();
}
while(ch>='0'&&ch<='9'){
x=x*10+ch-48;
ch=getchar();
}
return x*f;
}老虎机代码
#include <iostream>
#include <random>
#include <chrono>
using namespace std;
int main(){
auto seed=chrono::high_resolution_clock::now().time_since_epoch().count();
mt19937 generator(seed);
uniform_int_distribution<int> distribution(0,1);
int randomNumber=distribution(generator);
cout<<randomNumber;
return 0;
}日期计算
#include<bits/stdc++.h>
#define int long long
#define out output(nowy,nowm,nowd,dis)
using namespace std;
int M[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
bool run(int n){return (n%4==0&&n%100!=0)||(n%400==0&&n%3200!=0);}
void output(int ny,int nm,int nd,int dis){cout<<ny<<' '<<nm<<' '<<nd<<' '<<dis;}
signed main(){
ios::sync_with_stdio(0);
cin.tie(0);cout.tie(0);
int y,m,d,dis;
cin>>y>>m>>d>>dis;
int nowy=y,nowm=m,nowd=d;
if(nowd!=1){
int diss=M[nowm]-d+1;
if(nowm==2&&run(nowy))diss++;
nowd=1;
dis-=diss;
nowm++;
if(nowm>12){
nowm=1;
nowy++;
}
}
for(;;){
nowm=!nowm?12:nowm;
if(nowm==2&&run(nowy))M[nowm]++;
if(dis<M[nowm])break;
dis-=M[nowm];
nowm++;
if(nowm>12)nowm=1,nowy++;
if(M[2]!=28)M[2]=28;
}
nowd=++dis;
dis=0;
cout<<"\n目标日:"<<nowy<<" 年 "<<nowm<<" 月 "<<nowd<<" 日";
return 0;
}大事祭
2025/1/25 AC200 祭
2025/1/25 自己出的第一道题 T568205 祭(已丢失)
2025/7/23 首 A 绿祭
2025/8/11 咕值 200+ 祭
2025/8/11 橙名祭
2025/8/14 等级分 1000+ 祭
2025/8/18 rk5k 祭
2025/8/25 红名祭
2025/9/6 发现社区贡献 rk445 祭
2025/9/6 AC300 祭
