ural1010 Discrete Function
来源:互联网 发布:爱奇艺cyida软件源 编辑:程序博客网 时间:2024/04/30 03:49
不难发现倾角最大的肯定是相邻两点。
#include <bits/stdc++.h>using namespace std;typedef long long LL;const int N = 100005;LL a[N];int main() { int n; scanf("%d", &n); for (int i = 1; i <= n; i++) scanf("%lld", &a[i]); LL tmp = 0; int ans = 0; for (int i = 2; i <= n; i++) { if (abs(a[i] - a[i - 1]) > tmp) { tmp = abs(a[i] - a[i - 1]); ans = i; } } printf("%d %d\n", ans - 1, ans); return 0;}
0 0
- URAL1010 - Discrete Function - 水题
- ural1010 Discrete Function
- ural 1010. Discrete Function
- ural 1010. Discrete Function
- 1010. Discrete Function
- URAL 1010 - Discrete Function
- URAL 1010 Discrete Function
- 寒假集训.Discrete-Function
- URAL 1010|Discrete Function
- Discrete Function(timus1010,暴力)
- [解题报告]Ural 1010 Discrete Function
- URAL 1010 Discrete Function(解题报告)
- URAL 1010 Discrete Function(解题报告)
- URAL 1010 Discrete Function【简单暴力】
- Discrete Logging
- Discrete Roots
- Discrete Logging
- Topics on Discrete Mathematics
- 76. Minimum Window Substring
- spring mvc 是否要设置@Scope("prototype")
- JAVA中3种将byte转换为String的方法
- 安装CocoaPods出现错误解决方法
- unity5之导航网格寻路系统-2使用NavMeshAgent实现类型英雄联盟右键行走功能
- ural1010 Discrete Function
- socket
- 设计模式笔记二:抽象工厂模式
- python安装库文件,安装needle 测试框架
- Nginx安装
- 文章标题
- linux命令四级过关
- JavaWeb 基础
- [NOIP] [单调队列] NOIP2016Day2 蚯蚓