自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 B - exgcd

给出2个数M和N(M < N),且M与N互质,找出一个数K满足0 < K < N且K * M % N = 1,如果有多个满足条件的,输出最小的。Input输入2个数M, N中间用空格分隔(1 <= M < N <= 10^9)Output输出一个数K,满足0 < K < N且K * M % N = 1,如果有多个满足条件的,输出最小的...

2018-07-26 19:52:12 156 1

原创 A - 费马小定理

求:3^0 + 3^1 +...+ 3^(N) mod 1000000007Input输入一个数N(0 <= N <= 10^9)Output输出:计算结果Sample Input3Sample Output40#include <iostream>#include <cstdio>#include <cstd...

2018-07-26 19:51:39 181 1

原创 E - Vanya and Brackets CodeForces - 552E

Vanya is doing his maths homework. He has an expression of form , where x1, x2, ..., xn are digits from 1 to 9, and sign  represents either a plus '+' or the multiplication sign '*'. Vanya needs to ad...

2018-07-26 11:26:47 184 1

原创 I - Moon Game

Fat brother and Maze are playing a kind of special (hentai) game in the clearly blue sky which we can just consider as a kind of two-dimensional plane. Then Fat brother starts to draw N starts in the ...

2018-07-25 20:44:02 825

原创 111

#include <bits/stdc++.h>using namespace std;typedef long long ll;const int maxn = 5e4 + 10;const int INF = (1 << 30);int t, n, m, x, y, z, ans, sum;int a[maxn], ha[maxn], vis[maxn],...

2018-07-24 11:34:38 131

原创 数据结构实验之图论十一:AOE网上的关键路径

Problem Description    一个无环的有向图称为无环图(Directed Acyclic Graph),简称DAG图。    AOE(Activity On Edge)网:顾名思义,用边表示活动的网,当然它也是DAG。与AOV不同,活动都表示在了边上,如下图所示:                                         如上所示,共有11项活动(...

2018-07-24 10:33:45 792

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除