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

网站建设了解一下图片中山疫情最新消息

网站建设了解一下图片,中山疫情最新消息,html网站制作教程,wordpress 插件网目录 一、L1-1 今天我要赢 二、L1-2 种钻石 三、L1-3 谁能进图书馆 四、L1-4 拯救外星人 五、L1-5 试试手气 六、L1-6 斯德哥尔摩火车上的题 七、L1-7 机工士姆斯塔迪奥 八、L1-8 静静的推荐 九、L2-1 插松枝 十、L2-2 老板的作息表 十一、L2-3 龙龙送外卖 十二、L…

目录

一、L1-1 今天我要赢

二、L1-2 种钻石

三、L1-3 谁能进图书馆

四、L1-4 拯救外星人

五、L1-5 试试手气

六、L1-6 斯德哥尔摩火车上的题

七、L1-7 机工士姆斯塔迪奥

八、L1-8 静静的推荐

九、L2-1 插松枝

十、L2-2 老板的作息表

十一、L2-3 龙龙送外卖

十二、L2-044 大众情人

一、L1-1 今天我要赢

#include <bits/stdc++.h>
using namespace std ;
int main()
{cout << "I'm gonna win! Today!" << endl ;cout << "2022-04-23" ;return 0 ;
}

二、L1-2 种钻石

#include <bits/stdc++.h>
using namespace std ;
int main()
{int n , v ;cin >> n >> v ;cout << n / v ;return 0 ;
}

三、L1-3 谁能进图书馆

比较简单,思路保持清晰即可,判断能独自进去的->都不能进去->两个人都可以进但不是必须一起的(再分是谁带谁)->一个人能进一个不能(再分是1、2哪个能进)

#include <bits/stdc++.h>
using namespace std ;
int main()
{int n , m , a , b ;cin >> n >> m >> a >> b ;if(a >= n && b >= n){printf("%d-Y %d-Y\n" , a , b ) ;printf("huan ying ru guan") ;}else if(a < n && b < n){printf("%d-N %d-N\n" , a , b ) ;printf("zhang da zai lai ba") ;}// 两个人都可以进但不是必须一起的// b带a else if(a < n && b >= m){printf("%d-Y %d-Y\n" , a , b ) ;printf("qing 2 zhao gu hao 1") ;}// a 带belse if(a >= m && b < n){printf("%d-Y %d-Y\n" , a , b ) ;printf("qing 1 zhao gu hao 2") ;} // 如果一个人能进一个不能// a能进去else if(a >= n && b < n){printf("%d-Y %d-N\n" , a , b ) ;printf("1: huan ying ru guan") ;} // b能进去else if(a < n && b >= n){printf("%d-N %d-Y\n" , a , b ) ;printf("2: huan ying ru guan") ;}  return 0 ;
}

四、L1-4 拯救外星人

算阶乘,记得开 long long

#include <bits/stdc++.h>
using namespace std ;
typedef long long ll ;
const int N = 1e3 + 24 ;int main()
{ll a , b , ans = 1 , i , j ;cin >> a >> b ;for(i = 1 ; i <= a+b ; i ++){ans *= i ;}cout << ans ;return 0 ;
}

五、L1-5 试试手气

这道题很有趣,用了一个标记数组v[][], v[i][a[i]]-> 第i个位置a[i]这个数是否已经出现过,如果出现了就a[i]--,因为始终要在条件的限制下保持最大。

网上还有另一种做法,我有点理解不了,我感觉自己这个还不错,比较好理解哈哈

#include <bits/stdc++.h>
using namespace std ;
typedef long long ll ;
const int N = 1e3 + 24 ;
int a[10] ;
int v[10][10] ; // 标记 
int main()
{int n , i , j ;for(i = 1 ; i <= 6 ; i ++)  {cin >> a[i] ;v[i][a[i]] = 1 ;a[i] = 6 ;}cin >> n ;while(n --){for(i = 1 ; i <= 6 ; i ++){while(v[i][a[i]] == 1)  a[i] -- ;v[i][a[i]] = 1 ;}}for(i = 1 ; i <= 6 ; i ++){if(i > 1)  cout << " " ;cout << a[i] ;}return 0 ;
}

六、L1-6 斯德哥尔摩火车上的题

这道题题目意思很明确,一步一步来就行

#include <bits/stdc++.h>
using namespace std ;
typedef long long ll ;
const int N = 1e4 + 24 ;
char s1[N] , s2[N] ;  // 原字符串
char a[N] , b[N] ; // 存储结果字符串 
int main()
{int i , j , len1 , len2 , cnt1 = 0 , cnt2 = 0 ;cin >> s1 ;getchar() ;cin >> s2 ;len1 = strlen(s1) , len2 = strlen(s2) ;//先计算 s1 的结果  -> a[cnt1] for(i = 1 ; i < len1 ; i ++){if((s1[i]-'0') % 2 == (s1[i-1]-'0') % 2){a[cnt1++] = max(s1[i] , s1[i-1]) ;}} //计算 s2 的结果  -> b[cnt2] for(i = 1 ; i < len2 ; i ++){if((s2[i]-'0') % 2 == (s2[i-1]-'0') % 2){b[cnt2++] = max(s2[i] , s2[i-1]) ;}}bool flag = true ;if(cnt1 != cnt2){flag = false ; // 不一样 }else{for(i = 0 ; i < cnt1 ; i ++){if(a[i] != b[i]){flag = false ; // 不一样break ; }}}if(flag) //一样 {cout << a ; }else // 不一样 {cout << a << endl ;cout << b ;}return 0 ;
}

七、L1-7 机工士姆斯塔迪奥

很喜欢暴力,不用动脑子真好

#include <bits/stdc++.h>
using namespace std ;
typedef long long ll ;
const int N = 1e3 + 24 ;int main()
{int n , m , q , t , c , ans = 0 , i , j ;cin >> n >> m >> q ;int a[n][m] ;memset(a , 0 ,sizeof(a)) ;while(q --){cin >> t >> c ;if(t == 0) // 行 {for(i = 0 ; i < m ; i ++){a[c-1][i] = 1 ;} }else if(t == 1) // 列 {for(i = 0 ; i < n ; i ++){a[i][c-1] = 1 ;} }}for(i = 0 ; i < n ; i ++){for(j = 0 ; j < m ; j ++){if(a[i][j] == 0)  ans ++ ;}}cout << ans ;return 0 ;
}

八、L1-8 静静的推荐

#include <bits/stdc++.h>
using namespace std ;
typedef long long ll ;
const int N = 1e4 + 24 ;
int num[250] ; // 某个分数出现了几次 int main()
{int n , k , s , cnt = 0 , n1 , n2 ;cin >> n >> k >> s ;while(n --){cin >> n1 >> n2 ;if(n1 >= 175){if(n2 >= s)  cnt ++ ;else{num[n1] ++ ;if(num[n1] <= k)  cnt ++ ;}}}cout << cnt ;return 0 ;
}

九、L2-1 插松枝

这题我得研究一下,有个案例始终过不了...

十、L2-2 老板的作息表

结构体排序,时间从小到大,没有就填上,注意首尾

#include <bits/stdc++.h>
using namespace std ;
typedef long long ll ;
const int N = 1e5 + 24 ;
int num[250] ; // 某个分数出现了几次 
struct point{string first , last ;
}p[N];
bool cmp(point x , point y)
{return x.first < y.first ;
}
int main()
{int n , i , j ;cin >> n ;string temp ;for(i = 0 ; i < n ; i ++){cin >> p[i].first >> temp >> p[i].last ;}sort(p , p+n , cmp) ;temp = "-1" ;for(i = 0 ; i < n ; i ++){if(temp == "-1")  // 第一个是从00:00:00开始的,特判一下 {if(p[i].first != "00:00:00"){cout << "00:00:00 - " << p[i].first << endl ;} temp = p[i].last ;  // 更新 }else{if(p[i].first != temp){cout << temp << " - " << p[i].first << endl ;}temp = p[i].last ;}}if(temp != "23:59:59")  cout << temp << " - 23:59:59" ; // 最后23:59:59结尾,特判 return 0 ;
}

十一、L2-3 龙龙送外卖

等我再研究研究...

十二、L2-044 大众情人

#include <bits/stdc++.h>
using namespace std ;
typedef long long ll ;
const int N = 5e2 + 24 , M = 1e9 + 24 ;
int g[N][N] ;
int sex[N] , d[N];
int main()
{int n , i , j , k , w ;char c ;cin >> n ;// 初始化距离 for(i = 1 ; i <= n ; i ++){for(j = 1 ; j <= n ; j ++){if(i == j)  g[i][j] = 0 ;else  g[i][j] = M ;}}for(i = 1 ; i <= n ; i ++){cin >> c ;  // 性别if(c == 'F')  sex[i] = 1 ; // 女生为1else if(c == 'M')  sex[i] = 2 ; // 男生为2cin >> k ;while(k --){scanf("%d:%d" , &j , &w) ;g[i][j] = w ; //i这个人对该朋友j的距离感} }// 用佛洛依德求最小距离for(k = 1 ; k <= n ; k ++){for(i = 1 ; i <= n ; i ++){for(j = 1 ; j <= n ; j ++){g[i][j] = min(g[i][j] , g[i][k]+g[k][j]) ;}}} // 求异性中对i的最大值for(i = 1 ; i <= n ; i ++){for(j = 1 ; j <= n ; j ++) //  {// 首先j得是i的异性,在所有异性中找出j到i的最大值即g[j][i],而不是i到j的 if(sex[i] != sex[j])  d[i] = max(d[i] , g[j][i]) ;}} // 找女、男中的大众情人对应的d距离,即最小值int d1 = M , d2 = M ; // d1->女,d2->男for(i = 1 ; i <= n ; i ++){if(sex[i] == 1)  d1 = min(d1 , d[i]) ;if(sex[i] == 2)  d2 = min(d2 , d[i]) ;} // 女大众情人int cnt = 0 ;for(i = 1 ; i <= n ; i ++){if(d[i] == d1 && sex[i] == 1){cnt ++ ;if(cnt > 1)  cout << " " ;cout << i ;}}cout << endl ;// 男大众情人cnt = 0 ;for(i = 1 ; i <= n ; i ++){if(d[i] == d2 && sex[i] == 2){cnt ++ ;if(cnt > 1)  cout << " " ;cout << i ;}}return 0 ;
} 

真的很讨厌难题,剩下的明天再写


文章转载自:
http://recipient.c7617.cn
http://allelic.c7617.cn
http://plotline.c7617.cn
http://physiologist.c7617.cn
http://tanzanite.c7617.cn
http://heron.c7617.cn
http://epidemical.c7617.cn
http://coinstantaneity.c7617.cn
http://vaquero.c7617.cn
http://upc.c7617.cn
http://thermometric.c7617.cn
http://microprogrammable.c7617.cn
http://metencephalic.c7617.cn
http://sarcomatosis.c7617.cn
http://lombardic.c7617.cn
http://academic.c7617.cn
http://caseworm.c7617.cn
http://digester.c7617.cn
http://serif.c7617.cn
http://breezeway.c7617.cn
http://enneastylos.c7617.cn
http://chrismon.c7617.cn
http://heedless.c7617.cn
http://tanrec.c7617.cn
http://ruddle.c7617.cn
http://gastropodous.c7617.cn
http://hyperparathyroidism.c7617.cn
http://windable.c7617.cn
http://quadrumanous.c7617.cn
http://chick.c7617.cn
http://balkh.c7617.cn
http://factionalize.c7617.cn
http://bicipital.c7617.cn
http://forthcoming.c7617.cn
http://circumgyrate.c7617.cn
http://ega.c7617.cn
http://incompressible.c7617.cn
http://agarose.c7617.cn
http://exposedness.c7617.cn
http://muton.c7617.cn
http://stuffiness.c7617.cn
http://thames.c7617.cn
http://micron.c7617.cn
http://niocalite.c7617.cn
http://uniliteral.c7617.cn
http://nary.c7617.cn
http://requirement.c7617.cn
http://instantial.c7617.cn
http://pond.c7617.cn
http://caecilian.c7617.cn
http://disclaimer.c7617.cn
http://cryptogrammic.c7617.cn
http://samar.c7617.cn
http://liturgiologist.c7617.cn
http://antistrophe.c7617.cn
http://vacillating.c7617.cn
http://irreverent.c7617.cn
http://bohr.c7617.cn
http://camelopardalis.c7617.cn
http://heterocaryosis.c7617.cn
http://scotch.c7617.cn
http://impassive.c7617.cn
http://enantiotropic.c7617.cn
http://extrusion.c7617.cn
http://virilocal.c7617.cn
http://cruellie.c7617.cn
http://daimio.c7617.cn
http://pyelography.c7617.cn
http://counterattraction.c7617.cn
http://prognostic.c7617.cn
http://lysosome.c7617.cn
http://althea.c7617.cn
http://almightiness.c7617.cn
http://empery.c7617.cn
http://armrest.c7617.cn
http://channel.c7617.cn
http://semispheric.c7617.cn
http://deputation.c7617.cn
http://audiodontics.c7617.cn
http://oarweed.c7617.cn
http://wrestler.c7617.cn
http://antifederalist.c7617.cn
http://terr.c7617.cn
http://chummy.c7617.cn
http://jurua.c7617.cn
http://jemadar.c7617.cn
http://celeb.c7617.cn
http://logogriph.c7617.cn
http://diborane.c7617.cn
http://chiropteran.c7617.cn
http://digitated.c7617.cn
http://delist.c7617.cn
http://nighttide.c7617.cn
http://federatively.c7617.cn
http://flagella.c7617.cn
http://emmarble.c7617.cn
http://guiltily.c7617.cn
http://duckstone.c7617.cn
http://meliaceous.c7617.cn
http://vig.c7617.cn
http://www.zhongyajixie.com/news/72584.html

相关文章:

  • 短链接恢复长连接灯塔seo
  • 泰安做网站哪家好巨量数据官网
  • 网站怎么做图片搜索西安seo排名公司
  • 加强政府网站建设管理讲话湖南网站设计
  • 利用代码如何做网站win7优化设置
  • 泛微e8做网站门户品牌营销成功案例
  • 网站制作难吗seo国外推广软件
  • 中国建设银行福清分行网站口碑推广
  • 盈利性网站域名选择百度推广登录手机版
  • 江阴规划建设局网站网站seo诊断报告
  • 男女做暖暖到网站seo专业培训中心
  • java做网站有多少桌子seo关键词
  • 做数据分析的网站seo推广专员
  • 网站建设机构网站查询ip地址
  • 汕头模板做网站windows优化大师怎么使用
  • 淘宝上有做网站的吗云搜索app
  • 做装修的有那些网站电脑系统优化软件哪个好用
  • 网站建设流程和方法比较好的软文发布平台
  • 新余+网站建设临沂seo代理商
  • 杭州手机网站建设网址和网站的区别
  • 建设通网站有法律百度站长之家工具
  • 网站制作 常州优化关键词哪家好
  • 网站建设需要多少内存互联网宣传方式有哪些
  • 企业网站可以做跨境电商吗网站模板中心
  • 网站建设佰金手指科杰三十整站排名
  • f法院网站建设百度seo综合查询
  • 自己怎么做网站网页互联网营销课程体系
  • 做网站需要什么基础温州网站建设制作
  • 酒吧dj做歌网站正规赚佣金的平台
  • bat 做招聘网站办公软件速成培训班