poj 1122 FDNY to the Rescue! (最短路+列印路徑)

FDNY to the Rescue!Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 2213 Accepted: 664DescriptionThe Fire Department of New York (FDNY) has always been proud of their response time to fires in New York City, but they want to make their

poj 1465 Multiple (bfs+取餘判重)

MultipleTime Limit: 1000MS Memory Limit: 32768KTotal Submissions: 5625 Accepted: 1217Descriptiona program that, given a natural number N between 0 and 4999 (inclusively), and M distinct decimal digits X1,X2..XM (at least one), finds the smallest

hdu 1217 Arbitrage (BellmanFord 變形 判斷是否存在正權迴路)

ArbitrageTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3277    Accepted Submission(s): 1489Problem DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one

hdu 4339 Query (set解法)

QueryTime Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2063    Accepted Submission(s): 707Problem DescriptionYou are given two strings s1[0..l1], s2[0..l2] and Q - number of queries.Your task

HDU 3665 dijkstra floyd

分別用dijkstra 和floyd做了。。奇怪的是,時間都是15MS#include <iostream>using namespace std;#define N 12int n, m;int map[N][N];int sea[N];int D[N];int flag[N];void floyd(){for(int i = 0; i < n; i++)for(int j = 0; j < n; j++)for(int k = 0; k < n;

poj 1556 The Doors (建圖+最短路)

The DoorsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 5360 Accepted: 2173DescriptionYou are to find the length of the shortest path through a chamber containing obstructing walls. The chamber will always have sides at x = 0, x = 10, y =

HDU 1134 大數模數 使用大數模板

#include<iostream> #include<string> #include<iomanip> #include<algorithm> using namespace std; char str[1010];int modd;#define MAXN 9999#define MAXSIZE 10#define DLEN 4class BigNum{ private: int a[1010]; //可以控制大數的位元 int

編程之美 筆記

之前看過這本書,花了兩天大致又看了一遍。做個筆記。擴充題大多沒做。很多題目還得自己實現一下。 ---------  2013.2.21遊戲之樂 -------------  遊戲的設計是很大的學問,資料結構選擇等。1.1 讓cpu佔用率曲線聽你的指揮主要就是幾個api1.2 中國象棋將帥問題只用一個位元組儲存變數! bitset要掌握,寫一遍在對照編程珠璣掌握規律後的解法很簡單。p181.3

HDU3555:Bomb(數位DP)

Problem DescriptionThe counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bomb counts from 1 to N. If the current number sequence includes the sub-sequence "49",

POJ2282:The Counting Problem(數位DP)

DescriptionGiven two integers a and b, we write the numbers between a and b, inclusive, in a list. Your task is to calculate the number of occurrences of each digit. For example, if a = 1024 and b = 1032, the list will be1024 1025 1026 1027 1028 1029

POJ3286:How many 0′s?(數位DP)

DescriptionA Benedict monk No.16 writes down the decimal representations of all natural numbers between and includingm and n, m ≤ n. How many 0's will he write down?InputInput consists of a sequence of lines. Each line contains two unsigned 32-bit

hdu 4467 Graph ( 神奇的思想 降低複雜度 )

GraphTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 695    Accepted Submission(s): 113Problem DescriptionP. T. Tigris is a student currently studying graph theory. One day, when he was

CF#196DIV2:A-Puzzles

http://codeforces.com/contest/337/problem/AThe end of the school year is near and Ms. Manana, the teacher, will soon have to say goodbye to a yet another class. She decided to prepare a goodbye present for hern students and give each of them a

CF#196DIV2:B-Routine Problem

http://codeforces.com/contest/337/problem/BManao has a monitor. The screen of the monitor has horizontal to vertical length ratioa:b. Now he is going to watch a movie. The movie's frame has horizontal to vertical length ratioc:d. Manao adjusts the

HDU3652:B-number(數位DP)

Problem DescriptionA wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string "13" and can be divided by 13. For example, 130 and 2613 are wqb-numbers, but 143 and 2639 are not. Your task is to

poj 3897 Maze Stretching (二分+bfs+二維判重)

Maze StretchingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 711 Accepted: 190DescriptionUsually the path in a maze is calculated as the sum of steps taken from the starting point until the ending point, assuming that the distance of one

HDU 1083 二分匹配

題目大意:有n個學生,p門課程,一個學生可以選修多門課程,現在要為這p門課程分別選一個課代表,且一個學生只能當一個科目的課代表,問是否能滿足所有課程都找到課代表。運用常用模板:#include <iostream>using namespace std;const int N = 310;int map[N][N], flag[N];int pre[N];int n, m, num;int find(int cur){ int i ; for(i = 1; i <=

poj 3900 The Robbery (dfs+剪枝)

The RobberyTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 1517 Accepted: 134DescriptionIn the downtown of Bucharest there is a very big bank with a very big vault. Inside the vault there are N very big boxes numbered from 1 to N. Inside

PKU 圖論分類-Author McFn

打星號的表示個人認為比較經典,或是演算法,構圖比較好的題目1062* 昂貴的聘禮 枚舉等級限制+dijkstra1087* A Plug for UNIX 2分匹配1094 Sorting It All Out floyd 或 拓撲1112* Team Them Up! 2分圖染色+DP1125 Stockbroker Grapevine FLOYD1135 Domino Effect 最短路1149* PIGS 網路流1161* Walls floyd1201 Intervals 差分約束12

poj 1135 Domino Effect (隱式最短路)

Domino EffectTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7164 Accepted: 1813DescriptionDid you know that you can use domino bones for other things besides playing Dominoes? Take a number of dominoes and build a row by standing them on

總頁數: 61357 1 .... 17447 17448 17449 17450 17451 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.