#include<stdio.h>intmain(){int m, n, i, j;int arr[100][100];scanf("%d %d",&m,&n);for(i =1; i <= m; i++){for(j =1; j <= n; j++){scanf("%d",&arr[i][j]);}}int flag =0;for(i =2; i <= m-1; i++){for(j =2; j <= n-1; j++){if(arr[i][j]> arr[i -1][j]&& arr[i][j]> arr[i +1][j]&& arr[i][j]> arr[i][j -1]&& arr[i][j]> arr[i][j +1]){printf("%d %d %d\n", arr[i][j], i, j);
flag =1;}}}if(flag ==0){printf("None %d %d", m, n);}return0;}
7-2 求矩阵各行元素之和
#include<stdio.h>intmain(){int m, n, i, j;int arr[10][10];scanf("%d %d",&m,&n);for(i =0; i < m; i++){for(j =0; j < n; j++){scanf("%d",&arr[i][j]);}}int sum =0;for(i =0; i < m; i++){for(j =1; j < n; j++){
arr[1][0]+= arr[i][j];}}for(i =0; i < m; i++)printf("%d\n", arr[i][0]);return0;}
7-3 判断上三角矩阵
#include<stdio.h>intmain(){int T, i, j, n,k;int a[10][10];scanf("%d",&T);for(k =0; k < T; k++){scanf("%d",&n);for(i =0; i < n; i++){for(j =0; j < n; j++){scanf("%d",&a[i][j]);}}int flag =1;for(int x =1; x < n; x++){for(int y =0; y < x; y++){if(a[x][y]!=0){
flag =0;break;}}if(flag ==0)break;}if(flag ==1)printf("YES\n");elseprintf("NO\n");}return0;}
7-4 点赞
#include<stdio.h>intmain(){int n, m, i, j;int num =0, max =0, maxpos =1000;scanf("%d",&n);int flag[1001]={0};for(i =0; i < n; i++){scanf("%d",&m);for(j =0; j < m; j++){scanf("%d",&num);
flag[num]++;}}for(i =1000; i >0; i--){if(flag[i]> max){
max = flag[i];
maxpos = i;}}printf("%d %d", maxpos, max);return0;}
一.封装定时器函数
function delayed(time){return new Promise((resolve,reject)>{setTimeout( () > {resolve(time)}, time);})
}二调用的时候通过async await 修饰
async function demo() {console.log(new Date().getMinutes(): new Date().getSeconds())await del…
事情源于自,我利用redis未授权访问漏洞在向ubuntu的/varspool/cron/crontabs目录下创建的任务计划文件去反弹shell时,发现shell并不能反弹到自己的centos2上
(1)在ubuntu中进入/var/spool/cron/crontabs/目录
cd /var/spool/cro…