水 A - Interview 注意是或不是异或 #include <bits/stdc++.h> int a[1005], b[1005]; int main() { int n; scanf ("%d", &n); for (int i=0; i<n; ++i) { scanf ("%d", a
分类:
其他好文 时间:
2016-03-06 10:00:37
阅读次数:
201
A - Interview 题意:一个区间l,r。f(x,l,r)是区间从左到右用|运算符运算所得到的结果,求使得两个数组a,b中相同l,r得到的最大和 思路:直接暴力 #include<cstdio> #include<algorithm> #include<iostream> #include<
分类:
其他好文 时间:
2016-03-05 16:04:18
阅读次数:
201
所有数字都或一下就好了。肯定是最大的。 #include<stdio.h> #include<string.h> int n; long long a[1000+10]; long long b[1000+10]; int main() { scanf("%d",&n); for(int i=1;i
分类:
其他好文 时间:
2016-03-05 11:41:21
阅读次数:
177
Given an expression string array, return the final result of this expression Have you met this question in a real interview? Yes Example For the expre
分类:
其他好文 时间:
2016-02-02 14:47:23
阅读次数:
274
火柴拼出多少个正方形 http://matchstickpuzzles.blogspot.com/2011/06/55-4x4-square-how-many-squares.html 输入是两个二维数组ver 和 hor, 若是有火柴就是1, 没有就是0. dpHor 表示横方向上有多少连续火柴,
分类:
其他好文 时间:
2016-02-01 01:55:38
阅读次数:
256
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single
分类:
其他好文 时间:
2016-01-29 19:39:15
阅读次数:
133
This interview question come from a famous communication firm of china. : ) 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 ...
分类:
其他好文 时间:
2016-01-19 12:19:53
阅读次数:
215
Given an array of integers, find the subarray with smallest sum.Return the sum of the subarray.Have you met this question in a real interview? YesExam...
分类:
其他好文 时间:
2016-01-09 07:32:10
阅读次数:
164
Given a directed graph, design an algorithm to find out whether there is a route between two nodes.Have you met this question in a real interview? Yes...
分类:
其他好文 时间:
2016-01-06 06:48:23
阅读次数:
196
Determine the number of bits required to flip if you want to convert integer n to integer m.Have you met this question in a real interview? YesExample...
分类:
其他好文 时间:
2016-01-06 06:46:58
阅读次数:
206