最高分多少问题(华为2016)
来源:互联网 发布:spss数据分析培训 编辑:程序博客网 时间:2024/05/22 00:38
#include<iostream>//#include <stdio.h>#include <algorithm>using namespace std; const int MAXN=100000; int data[MAXN+5]; int querymax ( int l , int r ) { int ans=data[l]; for(int i=l+1;i<=r;i++) {ans=max(ans,data[i]);}return ans;} void update(int idx,int value){ data[idx]=value;} int main(){ int n,m; while(cin>>n>>m){ for(int i=1;i<=n;i++){ cin>>data[i]; } char order; int a,b; for(;m--;){ cin>>order>>a>>b;if(a>n || b) if(order=='U'){ update(a,b); }else if(order=='Q'){ if(a>b) swap(a,b); int ans = querymax(a,b);cout<<ans<<endl; } } } return 0;}
0 0
- 最高分多少问题(华为2016)
- 华为 最高分多少
- 最高分是多少(华为2016校招)
- 华为笔试:最高分是多少(2016)
- 华为笔试最高分代码问题
- 牛客网---2016---华为最高分是多少
- 最高分是多少(线段树) 华为2016校园招聘
- 华为2016机试题目: 最高分是多少
- 2016华为机试题1:最高分是多少
- 华为机试题(一) 最高分是多少
- 华为16机试(一):最高分是多少
- 最高分是多少(2016)
- 华为OJ 最高分是多少
- 华为-最高分是多少-Java
- 华为2016校园招聘上机笔试题----最高分是多少
- 一道华为2016机试题总结:“最高分是多少”
- 华为2016校园招聘上机笔试题:最高分是多少 [python]
- 华为2016校园招聘上机笔试题1最高分是多少
- 三言两语来学C-壹
- 杭电 HDU ACM Bone Collector (dp 01)
- HDU-1875 畅通工程再续
- HDU 1222 Wolf and Rabbit (扩展欧几里德应用)
- 冒泡排序的三种实现
- 最高分多少问题(华为2016)
- 学习ios常用网站
- Cocos2d-lua骨骼动画(*.csb)
- javascript引用类型之对象Object
- Java陷阱之assert关键字
- ueditor配置
- Windows下获取精确的时间差
- Xamarin IOS SearchBar 文本框设置
- vim 主题(colorsheme)