上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: 下面是“分数”模运算的定义: b, m互质 k = a/b (mod m) kb = a (mod m) 这里求 x = 1/17 (mod 2668) 17x = 1 (mod 2668) 17x = 2668k + 1 (k∈整数) 取合适的k使得17|(2668k+1) 这里刚好17 | (2668 + 1) 所以k = 1, x = (2668+1)/17 = 157 当然... 阅读全文
posted @ 2019-05-08 22:20 Leozi 阅读(5409) 评论(0) 推荐(3) 编辑
摘要: #include int main() { long long int m,n,r,a,b,c,x,y,z,k,i,left,right,mid,h,f,e,p,s,g; while(scanf("%lld %lld %lld",&a,&b,&c)!=EOF) { scanf("%lld %lld %lld",&m,&n,&r); scan... 阅读全文
posted @ 2019-05-08 22:19 Leozi 阅读(223) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int line[505][505],m,n,used[505],man[505];; int find(int x) { for(int i=1;i>k) { memset(line,0,sizeof(line)); memset(man,0,sizeof(man));... 阅读全文
posted @ 2019-05-08 22:19 Leozi 阅读(160) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/luoxn28/p/5767571.html 阅读全文
posted @ 2019-05-08 22:18 Leozi 阅读(118) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; int v[200005],s[200005],val[200005]; int main() { int a[6]={1,2,3,4,5,6},b[10],k,sum,h,f,g=0; while(1) { memset(val,0,sizeof(val));... 阅读全文
posted @ 2019-05-08 22:17 Leozi 阅读(213) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int c[100005],d[100005]; int main() { int n,m,a[105],b[105],k; while(cin>>n>>m) { k=0; if(n==0&&m==0) break; for... 阅读全文
posted @ 2019-05-08 22:17 Leozi 阅读(191) 评论(0) 推荐(0) 编辑
摘要: #include #define INF 105 using namespace std; int main() { int n,m,d[105][105],mark,x,y,g; while(cin>>n>>m) { mark=0; g=0; for(int i=0;i>x>>y; d[x][y]=... 阅读全文
posted @ 2019-05-08 22:16 Leozi 阅读(208) 评论(0) 推荐(0) 编辑
摘要: #include int main() { int m,n,i,a[105],k=0,sum=0,j,s; scanf("%d %d",&m,&n); for(i=0;i0;j>>=1,s++) if(j&1) sum=sum+a[s]; if(sumk) k=sum; ... 阅读全文
posted @ 2019-05-08 22:16 Leozi 阅读(383) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; const int N = 100001; int mark[N],prime[N],cont=0; void prime_table() { memset(mark,0,sizeof(mark)); mark[0] = mark[1] = 1; for(long long i... 阅读全文
posted @ 2019-05-08 22:15 Leozi 阅读(301) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; char map[205][205]; int count[205][205]; int a[205][205],b[205][205]; int m,n; const int w=1e7; int u[4][2]={1,0,-1,0,0,1,0,-1}; struct node{ int x... 阅读全文
posted @ 2019-05-08 22:15 Leozi 阅读(1352) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页