Given A,B,C, You should quickly calculate the result of A^B mod C. (1
#include #include #include #include
#include
using namespace std;
typedef __int6...
分类:
其他好文 时间:
2014-07-29 11:08:56
阅读次数:
220
快速幂
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u
Submit
Status
Description
Given a positive integer N, you should output the most right digit of N^N.
Input...
分类:
其他好文 时间:
2014-07-28 15:49:53
阅读次数:
262
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only constant space. Y...
分类:
其他好文 时间:
2014-07-28 00:28:19
阅读次数:
273
题目There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should b...
分类:
其他好文 时间:
2014-07-27 22:49:39
阅读次数:
176
Description
Given an undirected weighted graph G, you should find one of spanning trees specified as follows.
The graph G is an ordered pair (V, E), where V is a set of vertices {v1,
v2, …, vn}...
分类:
其他好文 时间:
2014-07-27 11:48:33
阅读次数:
312
题目:Given an array of integers, every element appears three times except for one. Find that single one.Note:Your algorithm should have a linear runtim....
分类:
编程语言 时间:
2014-07-27 10:46:02
阅读次数:
294
题目:Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime comp....
分类:
编程语言 时间:
2014-07-27 10:43:42
阅读次数:
239
Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example, Given n = 3,You should return the followin...
分类:
其他好文 时间:
2014-07-27 10:21:02
阅读次数:
219
Given an array of words and a lengthL, format the text such that each line has exactlyLcharacters and is fully (left and right) justified.You should p...
分类:
其他好文 时间:
2014-07-27 10:05:32
阅读次数:
352
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be ...
分类:
其他好文 时间:
2014-07-27 09:53:12
阅读次数:
350