Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. Example 1: Example 2: 思路:d ...
分类:
其他好文 时间:
2019-09-13 01:22:01
阅读次数:
104
嗯... 题目链接:http://poj.org/problem?id=3641 AC代码: 1 #include<cstdio> 2 #include<iostream> 3 4 using namespace std; 5 6 inline bool is_prime(int x){ 7 if( ...
分类:
其他好文 时间:
2019-09-12 23:48:34
阅读次数:
82
嗯... 题目链接:http://poj.org/problem?id=1995 快速幂模板... AC代码: 1 #include<cstdio> 2 #include<iostream> 3 4 using namespace std; 5 6 int main(){ 7 long long N ...
分类:
其他好文 时间:
2019-09-12 23:35:30
阅读次数:
119
我们在进行页面布局的时候可以发现元素在脱离文档流后,就会出现高度塌陷问题。 众所周知高度塌陷的原因是因为子元素脱离文档流所造成的父元素塌陷(所谓的高度塌陷就是子元素和父元素不在一个层级,未设置高宽的父元素里面没有子元素的支撑就会塌陷)会影响页面布局和美观性。 以下提出几点解决方案 首先我们先引出一个 ...
分类:
其他好文 时间:
2019-09-12 21:29:31
阅读次数:
92
Given several boxes with different colors represented by different positive numbers. You may experience several rounds to remove boxes until there is ...
分类:
其他好文 时间:
2019-09-12 13:15:53
阅读次数:
110
B. Beautiful DivisorsRecently Luba learned about a special kind of numbers that she calls beautiful numbers. The number is called beautiful iff its bi ...
分类:
其他好文 时间:
2019-09-12 13:09:59
阅读次数:
97
[root@bogon ~]# kill -l 1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP 6) SIGABRT 7) SIGBUS 8) SIGFPE 9) SIGKILL 10) SIGUSR1 11) SIGSEGV 12) SIGU ...
分类:
系统相关 时间:
2019-09-11 19:56:56
阅读次数:
129
Sequence: Define a Sequence to generate sequential numbers automatically example:可以在 update、select、insert语句中使用 ...
分类:
数据库 时间:
2019-09-11 11:44:33
阅读次数:
83
题目描述: 题目思路: 这道题目比较简单,一开始我的思路是把两个链表里存储的数变成int类型,然后两个int类型相加,在把加和sum分解成个位,十位,百位,然后把分解之后的数据再插入到链表中即可,所以一开始的代码是这样的: 提交之后发现,LeetCode的测试数据是 这样的话,不论是用int类型还是 ...
分类:
其他好文 时间:
2019-09-11 09:34:05
阅读次数:
66
Problem Description Two players, Stan and Ollie, play, starting with two natural numbers. Stan, the first player, subtracts any positive multiple of t ...
分类:
其他好文 时间:
2019-09-10 18:03:29
阅读次数:
101