WooKinson

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2018年12月21日

摘要: 题目描述: 先上代码: 1 #include <stdio.h> 2 #include <string.h> 3 #define LEN 100000 4 using namespace std; 5 6 int main(void) 7 { 8 int n,res=1; 9 int num[LEN 阅读全文
posted @ 2018-12-21 21:01 WooKinson 阅读(191) 评论(0) 推荐(0) 编辑

摘要: 题目描述: 先上解法: 1 #include <stdio.h> 2 using namespace std; 3 4 int main(void) 5 { 6 int n,max=0; 7 int num[100+1]; 8 scanf("%d",&n); 9 for (int i=0 ; i<n 阅读全文
posted @ 2018-12-21 10:47 WooKinson 阅读(182) 评论(0) 推荐(0) 编辑

摘要: 题目描述: 代码如下: 1 #include <stdio.h> 2 #include <string.h> 3 using namespace std; 4 5 int main(void) 6 { 7 int n,m,a,b; 8 int map[100+1][1000+1]; 9 memset 阅读全文
posted @ 2018-12-21 10:40 WooKinson 阅读(286) 评论(0) 推荐(0) 编辑

摘要: 题目描述: 问题描述 有n个格子,从左到右放成一排,编号为1-n。 共有m次操作,有3种操作类型: 1.修改一个格子的权值, 2.求连续一段格子权值和, 3.求连续一段格子的最大值。 对于每个2、3操作输出你所求出的结果。 输入格式 第一行2个整数n,m。 接下来一行n个整数表示n个格子的初始权值。 阅读全文
posted @ 2018-12-21 10:16 WooKinson 阅读(240) 评论(0) 推荐(0) 编辑

摘要: 题目描述: 代码如下: 1 #include <cstdio> 2 using namespace std; 3 4 int main(void) 5 { 6 char ch[20+1]; 7 scanf("%s",&ch); 8 for (int i=0 ; ch[i]!='\0' ; i ++) 阅读全文
posted @ 2018-12-21 09:48 WooKinson 阅读(207) 评论(0) 推荐(0) 编辑