摘要: 概率 Q += p*pow(1-p, i*n+k-1) i = 0,1,2,3......#include #include int main (){ int t; scanf("%d",&t); while(t--) { int n,k; dou... 阅读全文
posted @ 2013-08-14 20:39 xlc2845 阅读(102) 评论(0) 推荐(0)
摘要: 栈应用 ...... 水题#include#include#include#include#includeusing namespace std;int a[1010], b[1010];int main(){ int n; while(scanf("%d",&n) == 1 && n)... 阅读全文
posted @ 2013-08-14 10:54 xlc2845 阅读(108) 评论(0) 推荐(0)
摘要: 最多的那个数字要超过(n+1)/ 2 排一下序 输出中间的值 #include#include#include#include#includeusing namespace std;int a[1000010];bool cmp(int q, int p){ return q > p;}in... 阅读全文
posted @ 2013-08-14 10:25 xlc2845 阅读(138) 评论(0) 推荐(0)