最新 最热

leetcode 16 3Sum Closest

class Solution {public: int threeSumClosest(vector<int>& nums, int target) { int closest = nums[0] + nums[1] + nums[2]; int diff = abs(clos...

2018-06-04
1

leetcode 18 4Sum

class Solution {public: vector<vector<int> > fourSum(vector<int> &nums, int target) { set<vector<int> > res; sort(nums.begin(), nums.end())...

2018-06-04
1

leetcode 15 3Sum

class Solution {public: vector<vector<int>> threeSum(vector<int>& nums) { set<vector<int>> res; sort(nums.begin(), nums.end()); for...

2018-06-04
0

hdu1094

#include<iostream>using namespace std;int main(){ int n; while(cin>>n){ int sum=0; int i,m; for(i=1;i<=n;++i){ cin...

2018-06-04
1

hdu1092

#include <iostream> using namespace std; int main() { int n,a,sum=0; while(cin>>n&&n!=0) { while (n--) { ci...

2018-06-04
1

hdu1093

#include <iostream> using namespace std; int main() { int n,m,a,sum=0; while(cin>>n) { while (n--) { ci...

2018-06-04
1

hdu1081

#include<iostream> using namespace std; int GetMaxNum(int a[],int n) //求最大字段和 { int i,sum=0,maxsum=0; maxsum|=1<<31; for(i=1;i<=n;i+...

2018-06-04
1

hdu1059

#include <stdio.h> #include <string.h> #define MAXN 120005 int main() { int num[7]; int T = 0; while (scanf("%d %d %d %d %d %d", &num...

2018-06-04
1

hdu1032

#include <iostream> using namespace std; int main() { int a,b,t,i,max; while(cin >> a >> b) { cout << a << " " << b << " "; ......

2018-06-04
1

hdu1018

#include <stdio.h>#include <math.h>int main(void){int t,n,i;double sum;scanf("%d", &t);while(t--){scanf("%d",&n);sum=0;for(i=2;i<=n;i++)...

2018-06-04
1