上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 87 下一页
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3068 Problem Description 给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度.回文就是正反读都是一样的字符串,如aba, abba等 Input 输入有多组c 阅读全文
posted @ 2019-04-29 15:34 _Zlrrr 阅读(121) 评论(0) 推荐(0)
摘要: A. Reachable Numbers 代码: #include <bits/stdc++.h> using namespace std; const int maxn = 1e9 + 7; int N; set<int> s; int main() { scanf("%d", &N); whil 阅读全文
posted @ 2019-04-28 20:05 _Zlrrr 阅读(197) 评论(0) 推荐(0)
摘要: A.2016 给出正整数 n 和 m,统计满足以下条件的正整数对 (a,b) 的数量: 1. 1≤a≤n,1≤b≤m; 2. a×b 是 2016 的倍数。 Input 输入包含不超过 30 组数据。 每组数据包含两个整数 n,m (1≤n,m≤10 9). Output对于每组数据,输出一个整数表 阅读全文
posted @ 2019-04-26 20:39 _Zlrrr 阅读(274) 评论(0) 推荐(0)
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3486 Problem Description YaoYao has a company and he wants to employ m people recently. Since his company is 阅读全文
posted @ 2019-04-25 11:01 _Zlrrr 阅读(197) 评论(0) 推荐(0)
摘要: A. Neko Finds Grapes 代码: #include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 10; int N, M; int a[maxn], b[maxn]; int odda = 0, evea = 阅读全文
posted @ 2019-04-25 10:52 _Zlrrr 阅读(212) 评论(0) 推荐(0)
摘要: http://poj.org/problem?id=1050 Description Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-arra 阅读全文
posted @ 2019-04-24 19:27 _Zlrrr 阅读(230) 评论(0) 推荐(0)
摘要: 解决区间查询最大值最小值的问题 用 $O(N * logN)$ 的复杂度预处理 查询的时候只要 $O(1)$ 的时间 这个算法是 real 小清新了 有一个长度为 N 的数组进行 M 次查询 可以查询区间最大值和最小值 阅读全文
posted @ 2019-04-24 16:03 _Zlrrr 阅读(240) 评论(0) 推荐(0)
摘要: A. Reverse a Substring 代码: #include <bits/stdc++.h> using namespace std; int N; string s; int main() { scanf("%d", &N); cin >> s; int temp = -1; for(i 阅读全文
posted @ 2019-04-24 14:06 _Zlrrr 阅读(208) 评论(0) 推荐(0)
摘要: A - Taxi Fare Last September, Hangzhou raised the taxi fares. The original flag-down fare in Hangzhou was 10 yuan, plusing 2 yuan per kilometer after 阅读全文
posted @ 2019-04-23 18:15 _Zlrrr 阅读(254) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/largest-rectangle-in-histogram/ Given n non-negative integers representing the histogram's bar height where the width of 阅读全文
posted @ 2019-04-22 20:43 _Zlrrr 阅读(118) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 87 下一页