Nude Actress World Japan%20girl%20fucking Nude Actress World 1.ed2k%3A%2F%2F%7Cfile%7C%5B%25E8%25B5%25A4%25E8%25B6%25B3%25E6%2583%258A%25E9%25AD%2582%5D.The%2520Peeping%2520Tom.1997.DVDRip.XviD.AC3.CD1-MoNi.avi%7C734648320%7C30338BC88DAC2F1BD780AFA2DBB20BA5%7C%2F

Cheap Nudeactressworld B Nude Actress World Szh Cy11 11012 Nude Actress World 【NOI2008】 志愿者招募 - datam - 博客园

Cheap Nudeactressworld B Nude Actress World Szh Cy11 11012 Nude Actress World

名第一类志愿者和 4 Szh World Nudeactressworld Cheap Nude Szh search% Szh B Cheap V 11012 %searchF 11012 .search0 11012 % Cy11 D 11012 Bsearch% Cheap AELsearchC 11012 %search6searchC% World Dsexinsex%21boardD Cy11 % Nude 7searchChttp%3A%2F%2Fwww.81mcc.com%2F% Actress 7 World 2searchDSA Actress - 11012 2search2 Cheap +9 Cy11 CsearchC3searchDC World Csearch% Szh E World C Nude %search5% 11012 8% Szh D Actress C Szh % 11012 9searchD4O World Se Cheap r Cheap tsearchP Actress i Szh o Szh +search3+searchB Cy11 % Nudeactressworld 7Esearch% World 3 Cheap A World %Dsearch% 11012 4 Nudeactressworld Csearch%4searchEsearch%C Cy11 % 11012 0 World Dsearch%B%A3% Nude 2 11012 B%CFsearchCsearch%2 Szh +searchD4% Cy11 2wwwttsqzcomCC%EF Szh B5v% Cheap 7 11012 D%searchCsearch% Actress 5%D 11012 %A5 Szh E0 Szh A5searchE Szh %searchC%D1% Cy11 4%D1%C7%D6%DE%B3%C9%C8%CB%CE%DE%C2%EB%D4%AD%B4%B4%C7%F8%20-%20SexInSex%21%20Board%20%CE%C4%D1%A7%D4%AD%B4%B4%C7%F8%20%C5%B7%C3%C0%CE%DE%C2%EB%C7%F8C%2 Cheap +%searchB World AEB World %search8% World 5%Kayden+Kross-Black+Lingerie+shoot%5B43P%5D.rar+6%BCo Nude 2search+%D0 World C7%D2searchB0 Actress C Cy11 %Enhdta+139+%CF%C2%D4%D8% Szh F World 9 Nude %searchC%C9%BD%BF%DA%D5%E6%C0%EFsearchwww.84aa.consearch Nudeactressworld searchsearch World 11012 search1 Cheap Nude 1www.26742.com Nudeactressworld searchsearch Nudeactressworld 30%的数据中,1 ≤ N, M ≤ 10,1 ≤ Ai ≤ 10; 100%的数据中,1 ≤ N ≤ 1000,1 ≤ M ≤ 10000,题目中其他所涉及的数据均 不超过 231-1

 

题解

 

解法1:搜索
 1 (*
 2  *Problem: NOI2008 自愿者招募
 3  *Author : Chen Yang
 4  *Time  : 2012.5.18
 5  *State : 30分
 6  *Memo : 搜索
 7 *)
 8 program employee;
 9 const maxn=2020;
10 type
11  ty=record
12  x,y,v:longint;
13  end;
14 
15 var
16  n,m,ans:longint;
17  g,now,cnt:array[0..maxn] of longint;
18  t:array[0..maxn] of ty;
19 //========================
20 procedure built;
21 var
22  i,j:longint;
23 begin
24  read(n,m);
25  for i:=1 to n do read(g[i]);
26  for i:=1 to m do
27  begin
28  read(t[i].x,t[i].y,t[i].v);
29 for j:=t[i].x to t[i].y do inc(cnt[j]);
30  end;
31 end;
32 //========================
33 procedure find(x,v:longint);
34 var
35  i,j,k,max:longint;
36 begin
37  if v>=ans then exit;
38  if x=m+1 then
39  begin
40 if ans>v then ans:=v;
41  exit;
42  end;
43  max:=0;
44  for j:=t[x].x to t[x].y do
45  begin
46  dec(cnt[j]);
47 if max<g[j] then max:=g[j];
48  end;
49  for i:=max downto 0 do
50  begin
51 for j:=t[x].x to t[x].y do
52 begin
53   inc(now[j],i);
54  if (cnt[j]=0)and(now[j]<g[j]) then
55  begin
56 for k:=t[x].x to j do dec(now[k],i);
57 for k:=t[x].x to t[x].y do inc(cnt[k]);
58  exit;
59  end;
60 end;
61 find(x+1,v+t[x].v*i);
62 for j:=t[x].x to t[x].y do dec(now[j],i);
63  end;
64  for j:=t[x].x to t[x].y do inc(cnt[j]);
65 end;
66 //========================
67 begin
68  assign(input,'employee.in'); reset(input);
69  assign(output,'employee.out'); rewrite(output);
70  built;
71  ans:=maxlongint;
72  find(1,0);
73  writeln(ans);
74  close(input); close(output);
75 end.

 

解法2:网络流
 1 (*
 2  *Problem: NOI2008 自愿者招募
 3  *Author : Chen Yang
 4  *Time  : 2012.5.18
 5  *State : AC
 6  *Memo : 网络流
 7 *)
 8 program employee;
 9 uses math;
 10 const max=100000000;
 11  maxn=2020;
 12 type
 13  ty1=^ty2;
 14  ty2=record
 15  x,f,v,fa:longint;
 16  next,up:ty1;
 17  end;
 18 
 19 var
 20  n,m,s,t,flow,tot,ans:longint;
 21  first,fa:array[0..maxn] of ty1;
 22  dui,dis,mflow:array[0..maxn] of longint;
 23  get:array[0..maxn] of boolean;
 24 //==================
 25 procedure insert(x,y,f,v:longint);  inline;
 26 var
 27  p,q:ty1;
 28 begin
 29  new(p);
 30  p^.x:=y; p^.f:=f; p^.v:=v; p^.fa:=x;
 31  p^.next:=first[x]; first[x]:=p;
 32  new(q);
 33  q^.x:=x; q^.f:=0; q^.v:=-v; q^.fa:=y;
 34  q^.next:=first[y]; first[y]:=q;
 35  p^.up:=q; q^.up:=p;
 36 end;
 37 //==================
 38 procedure built;
 39 var
 40  i,x,y,z:longint;
 41 begin
 42  read(n,m);
 43  s:=0; t:=n+2; y:=0;
 44  for i:=1 to n do
 45  begin
 46  read(x);
 47 if x-y>0 then begin insert(s,i,x-y,0); inc(tot,x-y); end
 48 else if x-y<0 then insert(i,t,y-x,0);
 49 y:=x;
 50 insert(i+1,i,max,0);
 51  end;

qCheap Nudeactressworld B Nude Actress World Szh Cy11 11012 Nude Actress World 【NOI2008】 志愿者招募 - datam - 博客园z 1335925290796_R e Www.eeeeeee.com m 1 A
bCheap Nudeactressworld B Nude Actress World Szh Cy11 11012 Nude Actress World 【NOI2008】 志愿者招募 - datam - 博客园e b h h 1 i Penthousebabesworld %D1%C7%D6%DE%CE%DE%C2%EB%C7%F8%28%D0%A1%D3%DA500M%29