首页 > 日期小助手
头像 nazike_嘉娜
发表于 2020-04-18 17:42:40
F 日期小助手母亲节在8到14之间变动,父亲节在15到21之间变动,注意闰年对日期变动的影响,以及,2100年不是闰年,刚开始在2100卡死也是够了。 #include<bits/stdc++.h> using namespace std; int main(){ int t; 展开全文
头像 s_r_f
发表于 2020-04-18 18:50:45
组询问 每组询问给你一个日期要求你输出在这个日期之后最近的一次父亲节或者母亲节按照题目要求的格式输出 模拟题 难点大概在找出年的所有父亲节/母亲节的日期 和 按格式输出 复杂度赛时代码没有优化直接了 #include <bits/stdc++.h> using namespace 展开全文
头像 朱俊辉
发表于 2020-04-18 18:54:20
直接手动打表。。。虽然很蠢 #include<bits/stdc++.h> using namespace std; typedef long long ll; ll i,n,y,m,d,rq; ll t=2000; ll mo[102]={14,13,12,11,9,8,14,13,1 展开全文
头像 Meul
发表于 2020-04-19 00:22:06
Question 已知:母亲节在每年 5 月的第 2 个周日;父亲节在每年 6 月的第 3 个周日。输入2000 年 1 月 1 日 到 2100 年 12 月 31 日间的合法日期,求最近的母亲节或父亲节在哪天? Solution 打表英语日期:除了11,12,13之外其他所有的以1,2,3结尾的 展开全文
头像 mohaod2
发表于 2020-04-18 18:10:49
#include<iostream> #include<algorithm> #include<cstring> #include<cmath> using namespace std; typedef long long ll; const int 展开全文