摘要: 最基础的高斯消元了,然而我把j打成i连WA连跪,考场上再犯这种错误就真的得滚粗了。 #include<cmath> #include<cstdio> #include<cstring> #include<algorithm> #define for1(i,a,n) for(int i=(a);i<= 阅读全文
posted @ 2016-02-19 18:50 abclzr 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 如果纯模拟,就会死循环,而随着循环每个点的期望会逼近一个值,高斯消元就通过列方正组求出这个值。 #include<cstdio> #include<cctype> #include<cstring> #include<algorithm> using namespace std; const dou 阅读全文
posted @ 2016-02-19 17:18 abclzr 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 参考iwtwiioi的模板写出来的。上午gty讲的并没有听懂,只好自己慢慢对着模板理解。 在HDU上为什么相同的程序提交有时T有时A!!! 奉上sth神犇的模板(不是这道题): var ch:char; q,g,num:array [0..500001] of longint; st:string; 阅读全文
posted @ 2016-02-19 17:02 abclzr 阅读(174) 评论(0) 推荐(0) 编辑