11年成都網路賽

今天把去年成都的網路賽做了一下,去年是一題不會哇,現在也挺吃力,還有幾題不會,有空再來看Attackhttp://acm.hdu.edu.cn/showproblem.php?pid=4031樹狀數組,這題樹狀數組節點n記錄的是wall[n]和wall[n-1]被炮擊的差#include<iostream>#include<cstdio>#include<cstring>#include<cstdlib>using namespace

Codeforces Round #182 (Div. 2)

//A 好久沒做了,5.1一過寢室不熄燈了,今天做了一場還是只做了2題。 弱。#include<iostream>#include<stdio.h>using namespace std;int a[200005],b[200005];int main(){ // freopen("1.txt","r",stdin); int n,m,numx=0,numy=0,x,y; cin>>n>>m; for(int i=0;

HDU-1671-Phone List

HDU-1671-Phone Listhttp://acm.hdu.edu.cn/showproblem.php?pid=1671字典樹,判斷是否有某個數字是另一個數位首碼,注意123不是123的首碼,建樹之後要刪除節點,否則會Memory LimitExceeded寫的比較麻煩,分兩種情況,一是先出現123,再出現1234,;二是先出現1234,再出現123#include<iostream>#include<cstdio>#include<cstring>

hdu2955–01背包

1、Robberies http://acm.hdu.edu.cn/showproblem.php?pid=2955 正確的方程是:f[j]=max(f[j],f[j-q[i].money]*q[i].v) 其中,f[j]表示搶j塊大洋的最大的逃脫機率,條件是f[j-q[i].money]可達,也就是之前搶劫過;始化為:f[0]=1,其餘初始化為-1 (搶0塊大洋肯定不被抓嘛)#include<stdio.h>#include<string.h>double

HDU-1800-Flying to the Mars

HDU-1800-Flying to the Marshttp://acm.hdu.edu.cn/showproblem.php?pid=1800字典樹,每一個節點有10個葉子節點,注意首碼的0要去掉#include<iostream>#include<cstdio>#include<cstring>using namespace std;int Max;struct node{int count;node *childs[10];node(){count=0

【HDU4313】Matrix 多校 解題報告+AC代碼+思路+演算法正確性證明,此為Kruskal貪心簡單版本,噁心版本稍後放出【目標達成 0.2%】

#include <iostream>#include <cstring>#include <cstdlib>#include <cstdio>using namespace std;/** c0de4fun聲明:本人未給出測試資料、未聲明一次AC的題均為參考解題報告自己寫的。 對那些無私貢獻的大神真誠的致敬!本題的測試資料可以看最後面 Problem: HDU4313 - Matrix

zoj 1586 prim

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=586#include <cstdio>#include <cstring>#define MAX 1000000int Edge[1010][1010];int adapter[1010];int lowcost[1010];int t,n;void init( ){int i, k;scanf( "%d", &n );for( i = 0;

【HDU1686】Oulipo 思路+解題報告+代碼+KMP演算法個人理解 【0.5%達成】

HDU的題意就是,給你一個字串A,一個字串B,求A在B中總共出現了幾次,注意,重複的也算。比如說str1 = "ABA"str2 = "ABABABA"這樣的話,那麼str1就在str2中出現了三次。當然,按照HDU一貫淫蕩的套路,樸素演算法肯定會逾時。Thanks to

【LaTeX】CTeX資料結構模板

\documentclass[a4paper,11pt,oneside,openany]{article}\usepackage{CJK}\usepackage{times}\usepackage{listings}\usepackage{xcolor}\usepackage{color}\usepackage[top=1in, bottom=1in, left=0.75in, right=0.65in]{geometry}

zoj 2158 prim

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1158#include <cstdio>#include <cstdlib>#include <cstring>#define INF 1000000#define MAXN 2000int N;char codes[MAXN][10];int d[MAXN][MAXN];int lowcost[MAXN];int prim(){int i,

最小產生樹-prim演算法模板

#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>using namespace std;#define inf 10000000#define maxn 21int m,n;int edge[maxn][maxn],lowcost[maxn],nearvex[maxn];void prim(int u0){ int i,j; int

poj 3984 bfs

http://poj.org/problem?id=3984#include<iostream>#include<stdio.h>#include<cstring>#define Max 0x7f7f7f7fusing namespace std;int map[6][6];int visited[6][6];int dir[4][2]={{1,0},{-1,0},{0,-1},{0,1}};int ans[6][6];int pre[30];struct

【POJ1077】Eight 八數位問題,解題報告+思路+代碼

#include <cstring>#include <cstdlib>#include <cstdio> #define INPUTusing namespace std;/** Problem : poj1077,hdu1043,經典的八數位問題。 知識點: BFS + HASH + 打表 + 父親節點記錄 境界:3 - BFS+HASH+打表 A了兩天!!! 記得拿啟發學習法,雙向BFS重新寫一遍

【CodeForces 155C Hometask】白瀨肆×字串+DP——果然是字串處理什麼的好討厭啊尤其是分行符號的處理看來不用CIN不行了呢DP的轉移真心不會啊水到家了怎麼辦!【1.1%達成】

#include <cstdlib>#include <cstdio>#include <cstring>#include <iostream>using namespace std;const int MAX_SIZE = 1e5+10;char text[MAX_SIZE];/** Title:

【POJ3009 – Curling】 解題報告+思路+代碼+教訓(看別人的報告過的)

#include <cstring>#include <cstdlib>#include <cstdio>#include <iostream>#define INPUT/**Problem : poj3009看別人的報告過得,代碼基本上相同,因為實在不會了Begin Time: 11th/3/2012 7:28 p.m.End Time: 11th/3/2012 11:10

【poj3320】Jessica’s reading problem,解題報告+資料+代碼

#include <cstdlib>#include <cstdio>#include <cstring>#include <algorithm>#include <climits>#include <map>#include <iostream>/* Problem : POJ3320-Jessica's reading problem; Begin Time: 27/2/2012 5:30

【HDU2571】命運

#include <iostream>#include <cstring>#include <cstdlib>#include <cstdio>using namespace std;const int MAXN = 100;const int MAXM = 1100;int maze[MAXN][MAXM];int dp[MAXN][MAXM];int solve(int n,int m,int N,int

【POJ1198 Solitaire 】 思路+解題報告+測試資料產生器

#include <iostream>#include <cstring>#include <cstdio>#include <cstdlib>//#define DBG//#define INPUT//#define DBG1using namespace std;/** Problem: poj1198 - Solitaire Begin Time : 18:33 15th/Mar/2012 End

【0.9%】SPOJ7758 Grwoing Strings 解題報告 + AC代碼 + 思路 + AC自動機簡短總結

#include <iostream>#include <cstdlib>#include <cstdio>#include <cstring>#include <queue>using namespace std;const int MAX_SIZE = 1000100;/** 【0.9%】SPOJ7758 Grwoing Strings 解題報告 + AC代碼 + 思路 + AC自動機簡短總結

【ZOJ3471】Most Powerful, 思路+原始碼+解題報告(好久沒寫解題報告了……)【目標達成:0.1%】

/** Problem:ZOJ3471-Most Powerful. Reference:http://blog.csdn.net/magicnumber/article/details/6182891 Knowledge point:狀態壓縮DP Thought: 根據炮兵陣地(那是別的題)和這道題,還有一次多校的經驗(就是那個類似拼圖的那個題,給你 幾個塊問你能拼多大的長方形),貌似狀態數少的,就可以用狀態壓縮。 比如這道題,N <=

總頁數: 61357 1 .... 13471 13472 13473 13474 13475 .... 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.