当前位置: 首页 > news >正文

做网站可以用思源字体吗网络营销策划方案案例

做网站可以用思源字体吗,网络营销策划方案案例,专业做律师网站的公司,音乐展示网站建设平台文章目录 蓝桥杯日期统计特殊日期#xff08;位数之和#xff09;2023特殊日期#xff08;倍数#xff09;跑步锻炼 蓝桥杯 日期统计 日期统计 如果暴力枚举100个数的八次循环那就是1016次运算#xff0c;时间复杂度太高了#xff0c;好在前四次的2023是确定的#xf… 文章目录 蓝桥杯日期统计特殊日期位数之和2023特殊日期倍数跑步锻炼 蓝桥杯 日期统计 日期统计 如果暴力枚举100个数的八次循环那就是1016次运算时间复杂度太高了好在前四次的2023是确定的所以我们优化一下前四次循环不等于2023的就直接进入下一个循环现在只需要108次运算了注意有不少日子是重复的所以还需要我们使用set去重一下。 也可以不使用set我们之间对2023年的365天遍历如果数组中有满足2023年日期范围的数我们直接这样不仅减少了循环的次数一共需要大概365*10036500次循环也避免了去重。 #includebits/stdc.h using namespace std;#if 0 int main() {int arr[100] {5, 6, 8, 6, 9, 1, 6, 1, 2, 4, 9, 1, 9, 8, 2, 3, 6, 4, 7, 7,5, 9, 5, 0, 3, 8, 7, 5, 8, 1, 5, 8, 6, 1, 8, 3, 0, 3, 7, 9,2, 7, 0, 5, 8, 8, 5, 7, 0, 9, 9, 1, 9, 4, 4, 6, 8, 6, 3, 3,8, 5, 1, 6, 3, 4, 6, 7, 0, 7, 8, 2, 7, 6, 8, 9, 5, 6, 5, 6,1, 4, 0, 1, 0, 0, 9, 4, 8, 0, 9, 1, 2, 8, 5, 0, 2, 5, 3, 3};int months[13] {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};setint ret;for(int i0;i100;i){if(arr[i]!2) continue;for(int ji1;j100;j){if(arr[j]!0) continue;for(int kj1;k100;k){if(arr[k]!2) continue;for(int lk1;l100;l){if(arr[l]!3) continue;for(int al1;a100;a){for(int ba1;b100;b){for(int cb1;c100;c){for(int dc1;d100;d){int datearr[a]*1000arr[b]*100arr[c]*10arr[d];int montharr[a]*10arr[b];int dayarr[c]*10arr[d];if(month1month12day1daymonths[month]){ret.insert(date);//coutdateendl;}}}}}}}}}coutret.size()endl;return 0; } #endif #if 1 int main() {int arr[100] {5, 6, 8, 6, 9, 1, 6, 1, 2, 4, 9, 1, 9, 8, 2, 3, 6, 4, 7, 7,5, 9, 5, 0, 3, 8, 7, 5, 8, 1, 5, 8, 6, 1, 8, 3, 0, 3, 7, 9,2, 7, 0, 5, 8, 8, 5, 7, 0, 9, 9, 1, 9, 4, 4, 6, 8, 6, 3, 3,8, 5, 1, 6, 3, 4, 6, 7, 0, 7, 8, 2, 7, 6, 8, 9, 5, 6, 5, 6,1, 4, 0, 1, 0, 0, 9, 4, 8, 0, 9, 1, 2, 8, 5, 0, 2, 5, 3, 3};int months[13] {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};int ret 0;for (int month1;month12;month){for(int day1;daymonths[12];day){int target[8]{2,0,2,3,month/10,month%10,day/10,day%10};int count0;for(int i0;i100;i){if(arr[i]target[count]){count;}if(count8){ret;break;}}}}coutretendl;return 0; } #endif 特殊日期位数之和 特殊日期 我们根据题意直接暴力即可注意一下闰年的判断year%4000||(year%40year%100!0) 继续将年份的数字之和和月份天数的日子和做比较。 #includebits/stdc.h using namespace std;int months[13]{0,31,28,31,30,31,30,31,31,30,31,30,31};void is_gap_month(int year,int month) {if(month2year%4000||(year%40year%100!0))months[2]29;else months[2]28; }int is_target(int year,int month,int day) {int sum10,sum20;while(year){int cntyear%10;sum1cnt;year/10;}sum2month/10month%10day/10day%10;return sum1sum2?1:0; }int main() {int ret0;for(int year1900;year9999;year){for(int month1;month12;month){is_gap_month(year,month);for(int day1;daymonths[month];day){if(is_target(year,month,day)){ret;}}}}coutretendl;return 0; }2023 2023 将每一个数从后向前依次取下末尾的数字依次和3 2 0 2进行比较如果这个数中完全包含2023ret。最后将所有的数减去完全包含的数剩下的就是完全不包含的数注意这里 98765432 - 12345678 之后还要加一。 #include iostream using namespace std;int is_target(int n) {while (n){int tmp1 n % 10;n / 10;if (tmp1 3){while (n){int tmp2 n % 10;n / 10;if (tmp2 2){while (n){int tmp3 n % 10;n / 10;if (tmp3 0){while (n){int tmp4 n % 10;n / 10;if(tmp4 2)return 1;}}}}}}}return 0; }int main() {int ret 0;for (int i 12345678; i 98765432; i){if (is_target(i)){//coutiendl;ret;}}cout 98765432 - 12345678 - ret1;//cout85959030;return 0; }特殊日期倍数 特殊日期 #include iostream using namespace std;int main() {int ret0;int months[13]{0,31,28,31,30,31,30,31,31,30,31,30,31};for(int year2000;year2000000;year){for(int month1;month12;month){if(year%month0){if(month2(year%4000||(year%40year%100!0))){months[2]29;}else{months[2]28;}for(int day1;daymonths[month];day){if(year%day0){ret;}if(year2000000month1day1){coutretendl;}}}}}//cout35813063endl;return 0; }跑步锻炼 跑步锻炼 #include iostream using namespace std;int is_gap_year(int n) {if((n%4000)||(n%40n%100!0))return 1;else return 0; }int main() {int ret0;int months[13]{0,31,28,31,30,31,30,31,31,30,31,30,31};int year0,month0,day0;int week6;for(int i2000;i2020;i){for(int j1;j12;j){if(j2is_gap_year(i)) months[2]29;else months[2]28;for(int k1;kmonths[j];k){if(week8){ week1;}if(week1||k1) {ret2;}else{ ret1;}week;if(i2020j10k1)coutret;}}}return 0; }
http://www.w-s-a.com/news/357173/

相关文章:

  • 网站开发工程师介绍设计类的网站
  • 嘉兴seo网站推广中山建网站多少钱
  • 高端汽车网站建设帮别人做网站自己为什么会被抓
  • 网站开发实验室建设方案wordpress 主题丢失
  • 珠宝网站建设平台分析报告郑州最新发布
  • 世界杯最新排名泉州seo网站关键词优
  • 广州公司网站提供如何推广新品
  • 网站建设如何描述沈阳网站建设推广平台
  • 用dw制作个介绍家乡网站学生个人简历
  • 建设银行企业网站访问不了wordpress搬到谷歌服务器
  • 网站建设与网站优化销售别墅庭院园林景观设计公司
  • 沈阳红方城网站建设专业的微网站哪家好
  • 医院网站asp东营信息发布平台
  • 网站全站建设开题报告范文南京本地网站
  • 网站漏洞扫描工具wampserver集成环境搭建了一个织梦cms网站
  • 如何在局域网上做网站宁波设计公司排行榜
  • 自己的电脑做网站服务器吗百度搜索风云榜总榜
  • 做化妆品的一些网站企业网站建设与营运计划书
  • 重庆速代网络科技seo整站优化服务教程
  • 成都比较好的装修设计公司seo3的空间构型
  • 开发商建设审批网站成都创意设计公司
  • 百度快照比网站上线时间早wordpress新建阅读量字段
  • 国家工程建设标准化协会网站网站开发工具有
  • 上海网站建设集中公关公司组织架构图
  • wordpress副标题的作用百度网站标题优化
  • 大连哪家公司做网站比较好wordpress 判断用户组
  • 网站空间1g多少钱东莞公司高端网站建设
  • 网站服务器出错是什么意思做餐饮酒店网站
  • 房地产网站建设策划方案网站建设教程简笔画
  • 3d室内设计软件wordpress本地优化加速版