#include #include using namespace std;map a,b;int t[105],x,n;int main(){ while(~scanf("%d",&n)){ int flag=1; a.clear(); b.clear(); ...
分类:
其他好文 时间:
2014-10-14 18:40:39
阅读次数:
158
设置权限,在AndroidManifest.xml加入public class MainActivity extends Activity { private EditText address; private Button getbutton; private TextView ...
分类:
移动开发 时间:
2014-10-14 18:09:43
阅读次数:
161
1、thread不能设置共享资源、runnable可以设置共享资源2、代码风格与结构,ruannbale更好些3、public class TestThread extends Thread { private int count = 5; @Override public void run(...
分类:
编程语言 时间:
2014-10-14 18:09:09
阅读次数:
206
#include int t,n,a[10];int main(){ while(~scanf("%d",&n)){ int flag=0; for(int i=0;i0)flag=1; if(flag==0){puts("-1");continue;...
分类:
其他好文 时间:
2014-10-14 18:05:35
阅读次数:
144
1 class Solution { 2 public: 3 bool isPalindrome(string s) { 4 int strLen = s.size(); 5 int pos_h = 0; 6 int pos_t = 0; 7...
分类:
其他好文 时间:
2014-10-14 17:21:39
阅读次数:
129
过滤DEDE后台自己添加的Class文件和HTML代码:{dede:sql sql='Select content from #@__arctype where id=1'} [field:content function='cn_substr(html2text(@me),800)'/]...
分类:
其他好文 时间:
2014-10-14 16:33:28
阅读次数:
258
题目:如果一个底边与高为D的圆柱切去一部分使得,剩下的中心是底边与高为d的圆柱,
和以他们底面为上下地面的圆锥台,已知切去的体积,求d。
分析:二分,计算几何。圆锥台体积公式:π*(r^2+r*R+R^2)*h / 3。
说明:可以直接用公式求指数计算。
#include
#include
#include
#include
using namespa...
分类:
其他好文 时间:
2014-10-14 16:22:38
阅读次数:
175
Given a non-negative number represented as an array of digits, plus one to the number.
The digits are stored such that the most significant digit is at the head of the list.
class Solution {
pub...
分类:
其他好文 时间:
2014-10-14 16:04:43
阅读次数:
154
interface Visitor {
void visit(Gladiolus g);
void visit(Chrysanthemum c);
}// concrete visitor 名称访问
class StringVisitor implements Visitor {
String s;
public String toString() {
return s;
}
...
分类:
编程语言 时间:
2014-10-14 15:48:28
阅读次数:
182
Expression Bodied Function 可以用在:
methodsuser-defined operatorstype conversionsread-only properties indexers
看以下的例子:
public class RgbColor(int r, int g, int b)
{
public int Red { get; } = r;
p...