Ural 1654 [stack application]

Data structure, stack application! # Include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include #

Zoj 3278 [2]

Http://acm.zju.edu.cn/onlinejudge/showProblem.do? Problemcode = 3278. A good second... The first time I write such a binary # Include # include # include # include # include # include # include # include # include # include #

HDU 2069-class full backpack

http://acm.hdu.edu.cn/showproblem.php? PID = 2069 # Include using namespace STD; int A [5] = {1001, 2600, 50}, DP [] []; int main () { // freopen ("a.txt", "r", stdin); int N; memset (DP, 0, sizeof (DP); DP [0] [0] = 1; int I, j, k; for

[Tarjan contraction point] HDU 3072

To solve this problem, you must first reduce the point to the point without any inbound edge, and then find the edge with the smallest weight. Note: There may be duplicate edges, so you can see sample3! Because vector and stack are used, the speed

Zoj 1733 [Longest Common subsequence DP]

Http://acm.zju.edu.cn/onlinejudge/showProblem.do? Problemcode = 1733. Key: State Equation If (c1 [I] = c2 [J])DP [I] [J] = DP [I-1] [J-1] + 1;ElseDP [I] [J] = max (DP [I-1] [J], DP [I] [J-1]); # Include # include # include # include # include #

[Water STL] HDU 4039

#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std;#define LL long long#define PI acos(-1.0)#define N 2005#define MAX INT_MAX#define

Zoj 3471 [binary compression status DP]

Http://acm.zju.edu.cn/onlinejudge/showProblem.do? Problemcode = 3471. Bitwise operations are really a god's saying... Here, I use 1 to indicate that the attack has exploded, and 0 to indicate that the attack has not exploded. I use binary to record

Poj 3468 [Line Segment tree + latency optimization]

For a typical line segment tree question, if you use a general method that goes deep into each node to modify the value, it will be TLE. Therefore, a new term "latency optimization" is introduced here ", it means that each node line segment has an

[Floyd] HDU 4034

#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std;#define LL long long#define PI acos(-1.0)#define N 105#define MAX INT_MAX#define MIN

[Line Segment tree] HDU 1754

The tree array is too complex. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std;#define LL long

Ultraviolet A 4138 (Minimum Spanning Tree prime algorithm]

Note that N points have n-1 edges. #include#include#include#includeusing namespace std;int n;char a[502][10];int b[502][5] = {0};int map[502][502];int dis[502];bool flag[502];int result;int mi(int i, int j){ int sum = 0; int temp; for(int k = 1;

Ural 1306 [priority_queue + heap search median value]

Http://acm.timus.ru/problem.aspx? Space = 1 & num = 1306 -- a good "water question" Start with sort, and the result is "test... Later, I saw other people know that they can use the heap To Do This. It also took a whole night to study the

Zoj 1542 [Kruskal algorithm]

The sample of zoj is incorrect. The problem is to find the Minimum Spanning Tree and the longest path. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include

Ural 1014 [water question, but a bit overcast]

Http://acm.timus.ru/problem.aspx? Space = 1 & num = 1014 Although the question is watery, the data is overcast, and 0 returns 10 !!! I wa several times, and I also need to use long to prevent overflow. #include #include #include #include #include

Zoj 2551 determine intersection of line segments

# Include # include # include # include # include # include # include # include # include # include # include # include # include # include using namespace STD; # define ll long # define PI ACOs (-1) # define n 50010 # define INF 999999

[BFS] URL 1033

BFS, not explained. Be sure to start from two portals! #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std;int lowbit(int

Ultraviolet A 3721-Islands [BFS]

Http://livearchive.onlinejudge.org/index.php? Option = com_onlinejudge & page = show_problem & problem = 1722 BFS is very brain-damaged. Do not mark it when looking for water! #include#include#include#include#include#include#include#include#include#

Poj 2187 [maximum distance for convex hull]

Http://poj.org/problem? Id = 2187 It is obvious that no direct violence is allowed here (50000*50000) =. = We need to know that the farthest 2.1 is the vertex on the convex hull, so first construct the convex hull, and then enumerate to find the

[Solved] zoj 3497 mistwald matrix fast power

mul

After several months, I re-performed the task and finally got the AC! The question seems to be graph theory, but the fact is matrix multiplication. According to the discrete mathematics book, bij indicates the number of paths from AI to AJ with a

Zoj 3279 [tree array + binary]

Http://acm.zju.edu.cn/onlinejudge/showProblem.do? Problemid = 3618 It hurts. Use CIN to enter the letter "tle !!! #include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace

Total Pages: 64722 1 .... 56258 56259 56260 56261 56262 .... 64722 Go to: GO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.