当前位置: 首页 > news >正文

虚拟机中建设iis网站网站seo去哪个网站找好

虚拟机中建设iis网站,网站seo去哪个网站找好,东莞做网站的公司吗,沈阳建站程序蒟蒻来讲题,还望大家喜。若哪有问题,大家尽可提! Hello, 大家好哇!本初中生蒟蒻讲解一下AtCoder Beginner Contest 292这场比赛的A-E题! A题 原题 Problem Statement You are given a string SSS consisting of lo…

蒟蒻来讲题,还望大家喜。若哪有问题,大家尽可提!

Hello, 大家好哇!本初中生蒟蒻讲解一下AtCoder Beginner Contest 292这场比赛的A-E题

===========================================================================================

A题

原题

Problem Statement

You are given a string SSS consisting of lowercase English letters.
Uppercase each character of SSS and print the resulting string TTT.

Constraints

SSS is a string consisting of lowercase English letters whose length is between 111 and 100100100, inclusive.

Input

The input is given from Standard Input in the following format:
SSS

Output

Print TTT.

Sample Input 1

abc

Sample Output 1

ABC
Uppercase each character of abc, and you have ABC.

Sample Input 2

a

Sample Output 2

A

Sample Input 3

abcdefghjiklnmoqprstvuwxyz

Sample Output 3

ABCDEFGHJIKLNMOQPRSTVUWXYZ

思路

水题一道,不多写啦!

代码

/*
------------------Welcome to Your Code--------------
Name:
Contest:AtCoder Beginner Contest 292
Wishes:AK!
------------------Start Writing!!!------------------
*/
#include <iostream>
#define endl '\n'
#define pb(i) push_back(i)using namespace std;inline int read()
{int w = 1, s = 0;char c = getchar();while (c < '0' || c > '9'){if (c == '-') w = -1;c = getchar();}while (c >= '0' && c <= '9') s = s * 10 + c - '0', c = getchar();return w * s;
}int main()
{cin.tie(0);cout.tie(0);ios::sync_with_stdio(0);string s;cin >> s;for (auto c : s)cout << char(c - 'a' + 'A');return 0;
}

B题

原题

Problem Statement

NNN players numbered 111 to NNN will play a soccer game.

When a player commits an offense, that player will receive a yellow card or a red card.

A player who satisfies one of the following conditions will be removed from the game.
Accumulates two yellow cards.
Receives a red card.
Once a player is removed, that player will no longer receive any cards.
You will watch this game. Initially, the players have not received any cards.

There will be QQQ events. Correctly answer the questions asked in the events.

There are three kinds of events, which are given in the format c x from the input, where ccc is 111, 222, or 333. The events are as follows.
1 x: Player xxx receives a yellow card.
2 x: Player xxx receives a red card.
3 x: You are asked whether player xxx has been removed from the game. Answer Yes or No.

Constraints

1≤N≤1001 \leq N \leq 1001N100
1≤Q≤1001 \leq Q \leq 1001Q100
1≤x≤N1 \leq x \leq N1xN in all events.
There is at least one event of the third kind.
A player who has been removed will no longer receive any cards.
All values in the input are integers.

Input

The input is given from Standard Input in the following format, where eventi\text{event}_ieventi denotes the iii-th event.
NNN QQQ
event1\text{event}_1event1
event2\text{event}_2event2
⋮\vdots
eventQ\text{event}_QeventQ
Each event is in one of the following formats:
1 xxx
2 xxx
3 xxx

Output

Print XXX lines, where XXX is the number of events of the third kind in the input.

The iii-th line should contain Yes if, for the iii-th event of the third kind, player xxx has been removed from the game, and No otherwise.

Sample Input 1

3 9
3 1
3 2
1 2
2 1
3 1
3 2
1 2
3 2
3 3

Sample Output 1

No
No
Yes
No
Yes
No
Here are all the events in chronological order.
In the 111-st event, you are asked whether player 111 has been removed from the game. Player 111 has not been removed, so you should print No.

In the 222-nd event, you are asked whether player 222 has been removed from the game. Player 222 has not been removed, so you should print No.

In the 333-rd event, player 222 receives a yellow card.

In the 444-th event, player 111 receives a red card and is removed from the game.

In the 555-th event, you are asked whether player 111 has been removed from the game. Player 111 has been removed, so you should print Yes.

In the 666-th event, you are asked whether player 222 has been removed from the game. Player 222 has not been removed, so you should print No.

In the 777-th event, player 222 receives a yellow card and is removed from the game.

In the 888-th event, you are asked whether player 222 has been removed from the game. Player 222 has been removed, so you should print Yes.

In the 999-th event, you are asked whether player 333 has been removed from the game. Player 333 has not been removed, so you should print No.

思路

也比较水,不讲啦,直接看代码吧!

代码

/*
------------------Welcome to Your Code--------------
Name:
Contest:AtCoder Beginner Contest 292
Wishes:AK!
------------------Start Writing!!!------------------
*/
#include <iostream>
#define endl '\n'
#define pb(i) push_back(i)using namespace std;const int N = 1e2 + 10;double st[N];inline int read()
{int w = 1, s = 0;char c = getchar();while (c < '0' || c > '9'){if (c == '-') w = -1;c = getchar();}while (c >= '0' && c <= '9') s = s * 10 + c - '0', c = getchar();return w * s;
}int main()
{cin.tie(0);cout.tie(0);ios::sync_with_stdio(0);int n, q;cin >> n >> q;while (q --){int op, x;cin >> op >> x;if (op == 1) st[x] += 0.5;else if (op == 2) st[x] ++;else{cout << (st[x] >= 1 ? "Yes" : "No") << endl;}}return 0;
}

C题

原题

Problem Statement

You are given a positive integer NNN.

Find the number of quadruples of positive integers (A,B,C,D)(A,B,C,D)(A,B,C,D) such that AB+CD=NAB + CD = NAB+CD=N.
Under the constraints of this problem, it can be proved that the answer is at most 9×10189 \times 10^{18}9×1018.

Constraints

2≤N≤2×1052 \leq N \leq 2 \times 10^52N2×105
NNN is an integer.

Input

The input is given from Standard Input in the following format:
NNN

Output

Print the answer.

Sample Input 1

4

Sample Output 1

8
Here are the eight desired quadruples.
(A,B,C,D)=(1,1,1,3)(A,B,C,D)=(1,1,1,3)(A,B,C,D)=(1,1,1,3)
(A,B,C,D)=(1,1,3,1)(A,B,C,D)=(1,1,3,1)(A,B,C,D)=(1,1,3,1)
(A,B,C,D)=(1,2,1,2)(A,B,C,D)=(1,2,1,2)(A,B,C,D)=(1,2,1,2)
(A,B,C,D)=(1,2,2,1)(A,B,C,D)=(1,2,2,1)(A,B,C,D)=(1,2,2,1)
(A,B,C,D)=(1,3,1,1)(A,B,C,D)=(1,3,1,1)(A,B,C,D)=(1,3,1,1)
(A,B,C,D)=(2,1,1,2)(A,B,C,D)=(2,1,1,2)(A,B,C,D)=(2,1,1,2)
(A,B,C,D)=(2,1,2,1)(A,B,C,D)=(2,1,2,1)(A,B,C,D)=(2,1,2,1)
(A,B,C,D)=(3,1,1,1)(A,B,C,D)=(3,1,1,1)(A,B,C,D)=(3,1,1,1)

Sample Input 2

292

Sample Output 2

10886

Sample Input 3

19876

Sample Output 3

2219958


思路

这道题我们可以枚举ABABAB,假设为iii,那么CDCDCD就是n−in - ini,之后先计算约数的个数,如果是个奇数,那么就说明中间有个数是相同的,所以要特判。最后答案就把各种情况列出来相加(令nab为AB的约数的个数,ncd为CD的约数的个数):

  • 若nab,ncd都为偶数,则:此时的方案数=nab×ncd=nab\times ncd=nab×ncd
  • 若nab,ncd都为奇数,则:此时的方案数=(nab−1)(ncd−1)+na+nc+1=(nab-1)(ncd-1)+na+nc+1=(nab1)(ncd1)+na+nc+1,可能有点难理解,自己推一下就可以啦!(若还是不懂,联系我即可)
  • 若nab为偶数,ncd为奇数,则:此时的方案数=nab(ncd−1)+nc∗2=nab(ncd-1)+nc*2=nab(ncd1)+nc2

最后,把所有的方案数相加,就是最终的答案了!


代码(时间复杂度:O(NN)O(N\sqrt{N})O(NN)

/*
------------------Welcome to Your Code--------------
Name:
Contest:AtCoder Beginner Contest 292
Wishes:AK!
------------------Start Writing!!!------------------
*/
#include <iostream>
#include <cmath>
#define endl '\n'
#define pb(i) push_back(i)using namespace std;int res;inline int read()
{int w = 1, s = 0;char c = getchar();while (c < '0' || c > '9'){if (c == '-') w = -1;c = getchar();}while (c >= '0' && c <= '9') s = s * 10 + c - '0', c = getchar();return w * s;
}int get_divides(int n) //求约数的个数
{int counts = 0;for (int i = 1; i * i <= n; i++){if (n % i == 0){if (i * i == n) counts++;elsecounts += 2;}}return counts;
}int main()
{int n;cin >> n;long long ans = 0;for (int i = 1; i < n; i ++){int ab = i, cd = n - i;int na,nab = get_divides(ab);bool fab= 0;int nc,ncd = get_divides(cd);bool fcd= 0;if(nab % 2) na = nab -1,fab =1;else na = nab;if(ncd % 2) nc = ncd -1,fcd =1;else nc = ncd;if(fab ){if(fcd){ans += na * nc  + na + nc + 1;}else{ans += na * nc + nc * 2 ;}}else ans += na * nc;}cout << ans << endl;return 0;
}

D题

原题

Problem Statement

You are given an undirected graph with NNN vertices numbered 111 to NNN and MMM edges numbered 111 to MMM. Edge iii connects vertex uiu_iui and vertex viv_ivi.
Determine whether every connected component in this graph satisfies the following condition.
The connected component has the same number of vertices and edges.

Notes

An undirected graph is a graph with edges without direction.

A subgraph of a graph is a graph formed from a subset of vertices and edges of that graph.

A graph is connected when one can travel between every pair of vertices in the graph via edges.

A connected component is a connected subgraph that is not part of any larger connected subgraph.

Constraints

1≤N≤2×1051 \leq N \leq 2 \times 10^51N2×105
0≤M≤2×1050 \leq M \leq 2 \times 10^50M2×105
1≤ui≤vi≤N1 \leq u_i \leq v_i \leq N1uiviN
All values in the input are integers.

Input

The input is given from Standard Input in the following format:
NNN MMM
u1u_1u1 v1v_1v1
⋮\vdots
uMu_MuM vMv_MvM

Output

If every connected component satisfies the condition, print Yes; otherwise, print No.

Sample Input 1

3 3
2 3
1 1
2 3

Sample Output 1

Yes
The graph has a connected component formed from just vertex 111, and another formed from vertices 222 and 333.

The former has one edge (edge 222), and the latter has two edges (edges 111 and 333), satisfying the condition.

Sample Input 2

5 5
1 2
2 3
3 4
3 5
1 5

Sample Output 2

Yes

Sample Input 3

13 16
7 9
7 11
3 8
1 13
11 11
6 11
8 13
2 11
3 3
8 12
9 11
1 11
5 13
3 12
6 9
1 10

Sample Output 3

No


思路

这道题我们就是判断每一个连通块是否点数和边数相等,所以我们可以用**洪水填充(Flood Fill)**算法,当然可以用DFS做!


代码

/*
------------------Welcome to Your Code--------------
Name:
Contest:AtCoder Beginner Contest 292
Wishes:AK!
------------------Start Writing!!!------------------
*/
#include <iostream>
#include <vector>using namespace std;const int N = 2e5 + 10;int n, m, edge, vert;
vector<int> fg[N];
bool ft[N];inline int read()
{int w = 1, s = 0;char c = getchar();while (c < '0' || c > '9'){if (c == '-') w = -1;c = getchar();}while (c >= '0' && c <= '9') s = s * 10 + c - '0', c = getchar();return w * s;
}void dfs(int u)
{for (auto c : fg[u]){if (!ft[c]){ft[c] = 1;edge ++, vert ++;dfs(c);}else edge ++;}
}int main()
{cin.tie(0);cout.tie(0);ios::sync_with_stdio(0);cin >> n >> m;int x, y;for (int i = 1; i <= m; i ++)cin >> x >> y, fg[x].push_back(y), fg[y].push_back(x);for (int i = 1; i <= n; i ++)if (!ft[i]){vert = 1;edge = 0;ft[i] = 1;dfs(i); //找当前连通块if (edge / 2 != vert) //因为我是用的无向边,所以真正的边数要除以2{cout << "No" << endl;return 0;}}cout << "Yes" << endl;return 0;
}

E题

原题

Problem Statement

You are given a simple directed graph with NNN vertices numbered 111 to NNN and MMM edges numbered 111 to MMM. Edge iii is a directed edge from vertex uiu_iui to vertex viv_ivi.
You may perform the following operation zero or more times.
Choose distinct vertices xxx and yyy such that there is no directed edge from vertex xxx to vertex yyy, and add a directed edge from vertex xxx to vertex yyy.
Find the minimum number of times you need to perform the operation to make the graph satisfy the following condition.
For every triple of distinct vertices aaa, bbb, and ccc, if there are directed edges from vertex aaa to vertex bbb and from vertex bbb to vertex ccc, there is also a directed edge from vertex aaa to vertex ccc.

Constraints

3≤N≤20003 \leq N \leq 20003N2000
0≤M≤20000 \leq M \leq 20000M2000
1≤ui,vi≤N1 \leq u_i ,v_i \leq N1ui,viN
ui≠viu_i \neq v_iui=vi
(ui,vi)≠(uj,vj)(u_i,v_i) \neq (u_j,v_j)(ui,vi)=(uj,vj) if i≠ji \neq ji=j.
All values in the input are integers.

Input

The input is given from Standard Input in the following format:
NNN MMM
u1u_1u1 v1v_1v1
⋮\vdots
uMu_MuM vMv_MvM

Output

Print the answer.

Sample Input 1

4 3
2 4
3 1
4 3

Sample Output 1

3
Initially, the condition is not satisfied because, for instance, for vertices 222, 444, and 333, there are directed edges from vertex 222 to vertex 444 and from vertex 444 to vertex 333, but not from vertex 222 to vertex 333.
You can make the graph satisfy the condition by adding the following three directed edges:
one from vertex 222 to vertex 333,
one from vertex 222 to vertex 111, and
one from vertex 444 to vertex 111.
On the other hand, the condition cannot be satisfied by adding two or fewer edges, so the answer is 333.

Sample Input 2

292 0

Sample Output 2

0

Sample Input 3

5 8
1 2
2 1
1 3
3 1
1 4
4 1
1 5
5 1

Sample Output 3

12


思路

这道题我们完全可以把每个点能到的点的个数都加起来,在减去原来就有的边数,就是我们没有建出来的边数,所以求出这个没有建的边数即可!


代码

/*
------------------Welcome to Your Code--------------
Name:
Contest:AtCoder Beginner Contest 292
Wishes:AK!
------------------Start Writing!!!------------------
*/
#pragma GCC optimize(2)
#pragma GCC optimize(3,"Ofast","inline")
#include <iostream>
#include <vector>
#include <cstring>
#include <queue>
#define endl '\n'
#define pb(i) push_back(i)using namespace std;const int N = 2e3 + 10;int n, m;
bool edge[N][N];
vector<int> g[N];
int x, y;
int turn[N];
bool st[N];inline int read()
{int w = 1, s = 0;char c = getchar();while (c < '0' || c > '9'){if (c == '-') w = -1;c = getchar();}while (c >= '0' && c <= '9') s = s * 10 + c - '0', c = getchar();return w * s;
}int bfs(int u)
{memset(st, 0, sizeof st);queue<int> q;q.push(u);st[u] = 1;int res = 0;while (q.size()){int t = q.front();q.pop();for (auto c : g[t])if (!st[c]){q.push(c);res ++;st[c] = 1;}}return res;
}int main()
{cin.tie(0);cout.tie(0);ios::sync_with_stdio(0);cin >> n >> m;for (int i = 1; i <= m; i ++)cin >> x >> y, g[x].pb(y), edge[x][y] = 1;int ans = 0;for (int i = 1; i <= n; i ++)ans += bfs(i);cout << ans - m << endl;return 0;
}

今天就到这里了!

大家有什么问题尽管提,我都会尽力回答的!

吾欲您伸手,点的小赞赞。吾欲您喜欢,点得小关注!


文章转载自:
http://dinncopharmacodynamic.ydfr.cn
http://dinncodonation.ydfr.cn
http://dinncoaftersensation.ydfr.cn
http://dinncoflushing.ydfr.cn
http://dinncowaspish.ydfr.cn
http://dinncoantics.ydfr.cn
http://dinncowinterbeaten.ydfr.cn
http://dinncoscoliid.ydfr.cn
http://dinncocampanula.ydfr.cn
http://dinncoichnology.ydfr.cn
http://dinncorath.ydfr.cn
http://dinncoalkannin.ydfr.cn
http://dinncogirosol.ydfr.cn
http://dinncodactylology.ydfr.cn
http://dinncothermantidote.ydfr.cn
http://dinncoinscience.ydfr.cn
http://dinncointerferential.ydfr.cn
http://dinncocoastel.ydfr.cn
http://dinncohomoiothermous.ydfr.cn
http://dinncosmitty.ydfr.cn
http://dinncojeux.ydfr.cn
http://dinncowayleave.ydfr.cn
http://dinncoinfluencing.ydfr.cn
http://dinncostreambed.ydfr.cn
http://dinncogeoscience.ydfr.cn
http://dinncoineffable.ydfr.cn
http://dinncoraise.ydfr.cn
http://dinncocrank.ydfr.cn
http://dinncotony.ydfr.cn
http://dinncoprincipled.ydfr.cn
http://dinncohippiedom.ydfr.cn
http://dinncoplanting.ydfr.cn
http://dinncoxenoglossia.ydfr.cn
http://dinncopanniculus.ydfr.cn
http://dinncolude.ydfr.cn
http://dinncostartle.ydfr.cn
http://dinncotreasonous.ydfr.cn
http://dinncoeuxenite.ydfr.cn
http://dinncorearrest.ydfr.cn
http://dinncofullback.ydfr.cn
http://dinncohadji.ydfr.cn
http://dinncovesper.ydfr.cn
http://dinncoautocorrelation.ydfr.cn
http://dinncosulfamerazine.ydfr.cn
http://dinncocharmian.ydfr.cn
http://dinncopibal.ydfr.cn
http://dinncopanchromatic.ydfr.cn
http://dinncosupplely.ydfr.cn
http://dinncocrewless.ydfr.cn
http://dinncomillier.ydfr.cn
http://dinncobicorne.ydfr.cn
http://dinncocircumvascular.ydfr.cn
http://dinncosell.ydfr.cn
http://dinncogrotesquerie.ydfr.cn
http://dinncoepirot.ydfr.cn
http://dinncodehorn.ydfr.cn
http://dinncobratislava.ydfr.cn
http://dinncohelianthine.ydfr.cn
http://dinncoareopagite.ydfr.cn
http://dinncohard.ydfr.cn
http://dinnconous.ydfr.cn
http://dinncokeypunch.ydfr.cn
http://dinncomerge.ydfr.cn
http://dinncochlorhexidine.ydfr.cn
http://dinncoescolar.ydfr.cn
http://dinncopassiveness.ydfr.cn
http://dinncotungstous.ydfr.cn
http://dinncomayorship.ydfr.cn
http://dinncoglasshouse.ydfr.cn
http://dinncoisothere.ydfr.cn
http://dinncoscoot.ydfr.cn
http://dinncomodenese.ydfr.cn
http://dinncowordsmith.ydfr.cn
http://dinncostealing.ydfr.cn
http://dinncopaillard.ydfr.cn
http://dinncohighfaluting.ydfr.cn
http://dinncocaducity.ydfr.cn
http://dinncogrocery.ydfr.cn
http://dinncorecalculation.ydfr.cn
http://dinnconitron.ydfr.cn
http://dinncolapides.ydfr.cn
http://dinncodrowsily.ydfr.cn
http://dinncopterin.ydfr.cn
http://dinncoleakance.ydfr.cn
http://dinncolobola.ydfr.cn
http://dinncolhasa.ydfr.cn
http://dinncounwind.ydfr.cn
http://dinncoantienvironment.ydfr.cn
http://dinncocyclograph.ydfr.cn
http://dinncofeud.ydfr.cn
http://dinncoapiary.ydfr.cn
http://dinncodiaeresis.ydfr.cn
http://dinncoimpellingly.ydfr.cn
http://dinncobespoken.ydfr.cn
http://dinncowiriness.ydfr.cn
http://dinncoincontestably.ydfr.cn
http://dinncocypsela.ydfr.cn
http://dinncotroche.ydfr.cn
http://dinncoallotee.ydfr.cn
http://dinncobelow.ydfr.cn
http://www.dinnco.com/news/93280.html

相关文章:

  • 最靠谱的网站建设公司镇江优化推广
  • 设计师平台接单赣州seo推广
  • 我在日本做动画视频网站搞一个公司网站得多少钱
  • 自己服务器做网站服务器备案重庆seo顾问
  • 织梦 帝国 php cms 媒体网站 哪个关键词优化排名首页
  • 做企业网站百度推广客服怎么打电话少儿编程培训机构排名前十
  • 网站开发语言汇总软件开发一般需要多少钱
  • 湖州微网站建设seo的中文意思
  • 金坛网站建设电销系统
  • 做网站的图片素材泰州百度关键词优化
  • 学做网站的视频教学百度网页入口官网
  • 创建了网站站长之家查询工具
  • 织梦网站+当前位置限制宽度百度贴吧首页
  • 无锡网站建设哪家做的比较好2023年新闻小学生摘抄
  • 系部 网站建设方案网络营销价格策略有哪些
  • 湖南长沙门户网站最近一周热点新闻
  • 廊坊模板建站代理沈阳网站制作公司
  • 不属于营销型网站的特点哪家培训机构学校好
  • 西安建设商城类网站知乎seo排名的搜软件
  • 开封搜索引擎优化湖南靠谱的关键词优化哪家好
  • 做平面设计图的网站永久不收费免费的聊天软件
  • 视频网站seo怎么做seo实战培训机构
  • 怎样找家做网站的公司拉新推广平台有哪些
  • 做设计太依赖网站素材企业新闻营销
  • 免费那个网站论坛seo招聘
  • 中小企业查询官网湖南网站seo地址
  • 龙湾区住房和城乡建设局的网站优化大师是什么意思
  • 多少钱翻译英文百度seo搜索引擎优化方案
  • 建设注册管理中心网站首页大数据分析营销平台
  • 有没有在家做的手工活网站计算机培训机构排名前十