摘要:
//////////////////////////////////////////////////////////1889 n的倍数使11111…位数最少//思路:使题意转变为:给出n,算出最小的x满足10^x mod 9n = 1 (思路完全与1489一样)// 高精度,需要不断地缩小数据的规模。首先,n=1时,x=0;// 其次,每次把10^k nod 9n的余数乘10,得到是... 阅读全文
posted @ 2010-05-12 11:06
VRS
阅读(373)
评论(0)
推荐(0)
摘要:
// 1904 海狸咬木// 一道简单的数学题#include <iostream>#include <math.h>#include <iomanip>using namespace std;#define Pi 3.1415926int main(){ double D,V; double d; while(cin>>D>>V &am... 阅读全文
posted @ 2010-05-12 11:06
VRS
阅读(248)
评论(0)
推荐(0)
摘要:
///////////////////////////////////////////////////////#include <iostream>using namespace std;int main(){ int A,a,B,b,C,c; while(cin>>A>>a>>B>>b>>C>>c &&a... 阅读全文
posted @ 2010-05-12 11:05
VRS
阅读(155)
评论(0)
推荐(0)
摘要:
///////////////////////////////////////////////////////#include <iostream>#include<iomanip>using namespace std;#define Pi 3.1415927int main(){ double dia,n,time; double ans; int counter=1;... 阅读全文
posted @ 2010-05-12 11:05
VRS
阅读(100)
评论(0)
推荐(0)
摘要:
///////////////////////////////////////////////////////#include <iostream>#include <algorithm>using namespace std;bool st[3000];int main(){ int n; int a,b; while(cin>>n) { cin>&g... 阅读全文
posted @ 2010-05-12 11:05
VRS
阅读(158)
评论(0)
推荐(0)
摘要:
//////////////////////////////////////////#include<iostream>#include<algorithm>using namespace std;int st[16];int main(){ int i; int ans; while(cin>>st[0] && st[0]!=-1) { an... 阅读全文
posted @ 2010-05-12 11:04
VRS
阅读(181)
评论(0)
推荐(0)
摘要:
///////////////////////////////////////////////////////#include<iostream>#include <iomanip>using namespace std;int main(){ float a,b; cin>>a; while(cin>>b && b!=999) { ... 阅读全文
posted @ 2010-05-12 11:04
VRS
阅读(139)
评论(0)
推荐(0)
摘要:
//////////////////////////////////////////////////////////////////////最长公共子串//dp经典例题#include<iostream>#include<string>using namespace std;char x[10000],y[10000];void LCSLength(int m,int n,... 阅读全文
posted @ 2010-05-12 11:03
VRS
阅读(232)
评论(0)
推荐(0)
摘要:
/////////////////////////////////////////////////////////////#include<iostream>using namespace std;char st[10][10];int dimen[10];int main(){ int n; while(cin>>n && n!=-1) { int i;... 阅读全文
posted @ 2010-05-12 11:03
VRS
阅读(231)
评论(0)
推荐(0)
摘要:
///////////////////////////////////////////////////////数学题// 要交换次数少,关键是绕长度少于半圆的方向去交换// 我是以A1与An为分界把Ai与(An+1)-Ai交换到分界处,均交换i-1次,一直算到An/2,// 若n为奇数则再加上(An+1)/2的交换次数#include<iostream>using namespace ... 阅读全文
posted @ 2010-05-12 11:02
VRS
阅读(261)
评论(0)
推荐(0)