摘要: hdu2089 不要62/*ID: neverchanjePROG:LANG: C++11*/#include#include#include#include#include#include#include#include#include#includeusing namespace std;#de... 阅读全文
posted @ 2014-07-27 14:27 neverchanje 阅读(113) 评论(0) 推荐(0) 编辑
摘要: A题/*ID: neverchanjePROG:LANG: C++11*/#include#include#include#include#include#include#include#include#include#includeusing namespace std;#define INF 0... 阅读全文
posted @ 2014-07-19 17:10 neverchanje 阅读(215) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;int main(){ int g,l,t; cin>>t; while(t--){ cin>>g>>l; if(l%g==0)//最大公约数一定是最小公倍数的因子 cout ... 阅读全文
posted @ 2014-07-13 07:42 neverchanje 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 ID: neverchanje 3 PROG: TOJ2195 4 LANG: C++11 5 */ 6 #include 7 #include 8 using namespace std; 9 10 char cmd;11 int n,val;12 int main(){13 //... 阅读全文
posted @ 2014-06-27 17:59 neverchanje 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 解线性同余方程组的迭代法x=r1(mod a1)x=r2(mod a2)x=a1*t+r1x=a2*u+r2a1*t+a2*u=r2-r1解u,t令d=(a1,a2) c=r2-r1当仅当d|c时有解用extgcd解得a1*t'+a2*u'=d 中的t'和u'a1*(t'*c/d) + a2*(u'... 阅读全文
posted @ 2014-05-27 15:27 neverchanje 阅读(225) 评论(0) 推荐(0) 编辑