上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 24 下一页
摘要: 参考网址:http://blog.csdn.net/zqg5258423/article/details/53207471 不能每次读写同一个map都建一个锁,应一个map对应一个锁 阅读全文
posted @ 2017-03-13 16:54 cdongyang 阅读(283) 评论(0) 推荐(0)
摘要: 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>index</title> 5 </head> 6 <body> 7 <form name="myform" id="myform" target="_self"> 8 帐号:<input type="text 阅读全文
posted @ 2017-03-07 23:30 cdongyang 阅读(285) 评论(0) 推荐(0)
摘要: 【Android】java.net.SocketException: Permission denied解决 在调试代码时,LogCat中出现出现java.net.SocketException: Permission denied 需要在AndroidManifest.xml文件中配置一下权限: 阅读全文
posted @ 2017-03-05 22:41 cdongyang 阅读(265) 评论(0) 推荐(0)
摘要: 1 package com.example.ubuntu.myapplication; 2 3 import android.content.DialogInterface; 4 import android.graphics.Color; 5 import android.preference.D 阅读全文
posted @ 2017-03-05 20:12 cdongyang 阅读(343) 评论(0) 推荐(0)
摘要: 1 syntax enable 2 syntax on 3 4 colorscheme desert 5 6 set nocompatible 7 set filetype=c 8 9 set number 10 set numberwidth=4 11 12 set wrap " 自动换行 13 阅读全文
posted @ 2017-01-15 22:59 cdongyang 阅读(312) 评论(0) 推荐(0)
摘要: 给出n,m,k,求1~n中前m个正好有k个在原来位置的种数(i在第i个位置) 做法:容斥,先选出k个放到原来位置,然后剩下m-k个不能放到原来位置的,用0个放到原来位置的,有C(m-k,0)*(n-k)!种 - 1个放原来位置的,有C(m-k,1)*(n-k-1)!种+...-... 1 #incl 阅读全文
posted @ 2016-07-14 19:58 cdongyang 阅读(227) 评论(0) 推荐(0)
摘要: //容斥原理,c[i]表示i当前要算的次数,复杂度和第二层循环相关 O(nlogn~n^2) LL in_exclusion(int n,int *c) { for(int i=0;i<=n;i++) c[i]=1; //不一定是这样初始化,要算到的才初始化为1 LL ans=0; for(int 阅读全文
posted @ 2016-04-18 22:35 cdongyang 阅读(1948) 评论(0) 推荐(0)
摘要: 1 /* 2 1 3 126 223092870 4 210 330 390 462 510 546 570 690 714 770 798 858 910 966 1122 1155 1190 1254 1326 1330 1365 1430 1482 1518 1610 1785 1794 18 阅读全文
posted @ 2016-04-07 23:34 cdongyang 阅读(250) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #include <algorithm> 3 #define MAX 100000 4 #define LL long long 5 #define unsigned U 6 //using namespace std; 7 int cas=1,T; 8 阅读全文
posted @ 2016-04-06 20:59 cdongyang 阅读(421) 评论(0) 推荐(0)
摘要: 1 #include <cstdio> 2 #include <queue> 3 #include <cstring> 4 #include <iostream> 5 #include <cstdlib> 6 #include <algorithm> 7 #include <vector> 8 #i 阅读全文
posted @ 2016-03-27 22:24 cdongyang 阅读(239) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 24 下一页