Given two strings A and B, find the minimum number of times A has to be repeated such that B is a substring of it. If no such solution, return 1. For ...
分类:
其他好文 时间:
2019-01-09 18:37:36
阅读次数:
162
#include<stdio.h>int main(){ void hanoi(int n,char one,char two,char three); int m; printf("Inout the numbers of disks:"); scanf("%d",&m); printf("The ...
分类:
其他好文 时间:
2019-01-08 19:20:59
阅读次数:
202
题目如下: Given two non-negative integers x and y, an integer is powerful if it is equal to x^i + y^j for some integers i >= 0 and j >= 0. Return a list o ...
分类:
其他好文 时间:
2019-01-07 17:33:22
阅读次数:
151
E. Intersection of Permutations You are given two permutations a and b, both consisting of n elements. Permutation of nn elements is such a integer se ...
分类:
其他好文 时间:
2019-01-07 17:24:56
阅读次数:
157
between tags and words, there's table 1. between tags, there's table 2. combine the two tables, p(...) to get the results. MRF: factors of the tables ...
分类:
其他好文 时间:
2019-01-07 10:30:22
阅读次数:
270
970. Powerful Integers Given two non-negative integers x and y, an integer is powerful if it is equal to x^i + y^j for some integers i >= 0 and j >= 0 ...
分类:
其他好文 时间:
2019-01-06 13:36:04
阅读次数:
151
要死要死,第一题竟然错误8次,心态崩了呀,自己没有考虑清楚,STL用的也不是很熟,一直犯错。 第二题也是在室友的帮助下完成的,心态崩了。 970. Powerful Integers 970. Powerful Integers Given two non-negative integers x a ...
分类:
其他好文 时间:
2019-01-06 13:33:00
阅读次数:
136
Given two binary strings, return their sum (also a binary string). The input strings are both non-empty and contains only characters 1 or 0. Example 1 ...
分类:
其他好文 时间:
2019-01-06 13:32:20
阅读次数:
138
Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the c ...
分类:
其他好文 时间:
2019-01-05 22:52:12
阅读次数:
199
In the world of Dota2, there are two parties: the Radiant and the Dire. The Dota2 senate consists of senators coming from two parties. Now the senate ...
分类:
其他好文 时间:
2019-01-05 22:43:57
阅读次数:
127