学习中
.Seven
这个作者很懒,什么都没留下…
展开
-
A Simple Problem with Integers POJ - 3468(区间更新 区间修改裸题)
You have N integers, A1, A2, … , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to ask for the su...原创 2019-12-04 21:55:26 · 56 阅读 · 0 评论 -
I Hate It HDU - 1754 (单点修改维护区间最大值)(树状数组与线段树)
很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input 本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和 M ( 0<N<=200000,0<M<5000 )...原创 2019-12-03 19:12:26 · 86 阅读 · 0 评论 -
Jungle Roads POJ - 1251(最小生成树)
The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, s...原创 2019-11-27 21:00:56 · 83 阅读 · 0 评论 -
Frogger POJ - 2253(最短路变形)
Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists’ sun...原创 2019-11-27 17:39:51 · 82 阅读 · 0 评论 -
Til the Cows Come Home POJ - 2387
Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get b...原创 2019-11-27 17:33:08 · 140 阅读 · 0 评论 -
## PAT A1076
PAT A1076 图的遍历 #include <bits/stdc++.h> using namespace std; struct node { int data; int layer; }; vector<node> m[1010]; bool vis[1010]={false}; int n,L,x; int bfs() { int cnt=...原创 2019-10-31 17:37:51 · 104 阅读 · 0 评论