String to Integer (atoi) 比较正统的一道题,基石系列。 第1次提交 import time class Solution: def __init__(self): self.INT_MAX=2 31 1 self.INT_MIN= 2 31 def myAtoi(self, ...
分类:
其他好文 时间:
2018-07-24 20:26:40
阅读次数:
192
#include<iostream>#include<algorithm>using namespace std;int main (){ int n; cin>>n; while(n--) { int max; int min; int a,b; cin>>a>>b; if(a<b) { max= ...
分类:
其他好文 时间:
2018-07-22 21:16:23
阅读次数:
151
#include<iostream>using namespace std;int main (){ int n,m,max; cin>>n; m=n; max=n*n; int count=1; int s[105][105]; int x=1,y=n; while(count<=max) { w ...
分类:
其他好文 时间:
2018-07-22 20:46:55
阅读次数:
177
"874. 行走机器人模拟" 模拟 class Solution { public int robotSim(int[] commands, int[][] obstacles) { int max = 0; int[][] dx = {{0, 1}, {1, 0}, {0, 1}, { 1, 0} ...
分类:
其他好文 时间:
2018-07-22 12:00:13
阅读次数:
615
// 模板水题 敌兵布阵 HDU - 1166 class TreeArray{ public: const static int cmaxn = 1e5; /// Todo: 修改区间的最大值 int cdate[cmaxn]; int max_sz; // 表示元素的个数 在init初始化 vo... ...
分类:
编程语言 时间:
2018-07-21 18:51:13
阅读次数:
158
// // Time Limit Exceeded because of the use of int left = maxSum(root.left) > 0 ? maxSum(root.left) : 0; class Solution { int max = Integer.MIN_VALUE... ...
分类:
其他好文 时间:
2018-07-19 13:39:35
阅读次数:
103
List<Statbydate> rest = server.LineChart(bdate, edate); int max = 0, min = 0; if (rest.Count > 0) { max = rest[0].maxRegister; //最大值 min = rest[0].min ...
分类:
Web程序 时间:
2018-07-19 10:47:48
阅读次数:
202
#include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<algorithm> using namespace std; const int MAXARR=1000005; const int MAX ...
分类:
其他好文 时间:
2018-07-13 13:24:54
阅读次数:
176
#include <bits/stdc++.h>using namespace std;const int N = 100005, INF = INT_MAX;int n, k, A[N], L[N], R[N];long long cnt;void Merge(int p, int q, int ...
分类:
其他好文 时间:
2018-07-11 17:09:00
阅读次数:
132
#include #include #include #include #include #include #include #include using namespace std; const int MAX_L=2005; //最大长度,可以修改 class bign { public: in... ...
分类:
其他好文 时间:
2018-07-08 18:03:15
阅读次数:
180