Gravatar
liu_runda
积分:2887
提交:1014 / 2190
刷榜是可耻的行为,更何况是别人的代码。。。。某些人有点过分啊

Gravatar
葳棠殇
积分:1419
提交:362 / 782
我想知道这题正解什么鬼!为什么各种BUG都能过,但是有的T,有的不T!卡SPFA是什么鬼!

题目 2093 花园的守护之神
2016-04-15 11:17:40
Gravatar
NewBee
积分:1849
提交:671 / 1665
.为啥会过。。。

Gravatar
SOBER GOOD BOY
积分:2019
提交:588 / 930
(⊙o⊙)

页面 66 删号公告
2016-04-15 11:10:24
Gravatar
Hzoi_
积分:1676
提交:530 / 743
[size=50]哈哈哈[/size]

页面 66 删号公告
2016-04-15 11:07:29
Gravatar
Hzoi_
积分:1676
提交:530 / 743
回复 @liu_runda :
hhhhhh

Gravatar
liu_runda
积分:2887
提交:1014 / 2190
强烈建议管理员想办法把不写main函数的刷榜方法卡掉。。。

Gravatar
Go灬Fire
积分:3411
提交:1738 / 3778
数组开小了.................

Gravatar
LOSER
积分:1578
提交:567 / 1832

Gravatar
stdafx.h
积分:3338
提交:889 / 1556
快传数据....

Gravatar
stdafx.h
积分:3338
提交:889 / 1556
暴力卡过.

Gravatar
葳棠殇
积分:1419
提交:362 / 782
回复 @TenderRun :
%%%,按照你的ISAP打了一遍,才发现原来大的好像不是,囧TAT

题目 28 [NOI 2006]最大获利
2016-04-15 09:11:02
Gravatar
zys
积分:1681
提交:471 / 964
回复 @3517 :

题目 2213 K个串
2016-04-15 06:19:55
Gravatar
0
积分:2003
提交:530 / 1238
回复 @zls :
Orz 好眼力
//我是7楼 6楼是15楼

题目 2213 K个串
2016-04-15 06:17:46
Gravatar
@@@
积分:1122
提交:307 / 770
#include <fstream>
using namespace std;
ifstream cin("shorta.in");
ofstream cout("shorta.out");
int main()
{
int e[501][501],i,j,k,s,a,t1,t2,t3,n,m,inf=999999;
cin>>n>>m;
for(i=1;i<=n;i++)
for(j=1;j<=n;j++)
if(i==j)
e[i][j]=0;
else
e[i][j]=inf;
for(i=1;i<=m;i++)
{
cin>>t1>>t2>>t3;
e[t1][t2]=t3;
e[t2][t1]=t3;
}
for(k=1;k<=n;k++)
for(i=1;i<=n;i++)
for(j=1;j<=n;j++)
if(e[i][j]>e[i][k]+e[k][j])
e[i][j]=e[i][k]+e[k][j];
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
cout<<e[i][j]<<" ";
cout<<endl;
}
cin.close();cout .close();
return 0;
}#include <fstream>
using namespace std;
ifstream cin("shorta.in");
ofstream cout("shorta.out");
int main()
{
int e[501][501],i,j,k,s,a,t1,t2,t3,n,m,inf=999999;
cin>>n>>m;
for(i=1;i<=n;i++)
for(j=1;j<=n;j++)
if(i==j)
e[i][j]=0;
else
e[i][j]=inf;
for(i=1;i<=m;i++)
{
cin>>t1>>t2>>t3;
e[t1][t2]=t3;
e[t2][t1]=t3;
}
for(k=1;k<=n;k++)
for(i=1;i<=n;i++)
for(j=1;j<=n;j++)
if(e[i][j]>e[i][k]+e[k][j])
e[i][j]=e[i][k]+e[k][j];
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
cout<<e[i][j]<<" ";
cout<<endl;
}
cin.close();cout .close();
return 0;
}

题目 1 加法问题
2016-04-14 20:53:28
Gravatar
bhiaibogf
积分:375
提交:111 / 264
@menci 数据似乎有误,后两组数据路程好像不到n条吧...

Gravatar
Hakurou!
积分:541
提交:160 / 495
尝试c++抢榜失败

题目 2061 连续出现的字符
2016-04-14 20:37:56
Gravatar
沉迷学习的假的Keller
积分:1631
提交:464 / 692
VIP 新技能浮水法,好棒~

Gravatar
cstdio
积分:4745
提交:1198 / 2108
哈哈哈

页面 66 删号公告
2016-04-14 20:10:44
Gravatar
这_不错
积分:260
提交:141 / 425
求找错。。。。。
program www;
const maxn=1000000;
var heap,c,d,di:array[0..maxn]of longint;
len,i,n,tmp,p,sum,j,px,tot,fur,wu,k,i1:longint;
procedure put(x:longint);
var fa,son,tmp:longint;
begin
inc(len);
heap[len]:=x;
son:=len;
while(son<>1)and(heap[son div 2]>heap[son])do
begin
tmp:=heap[son div 2];
heap[son div 2]:=heap[son];
heap[son]:=tmp;
son:=son div 2;
end;
end;
function get:longint;
var fa,son,tmp:longint;
begin
get:=heap[1];
heap[1]:=heap[len];
len:=len-1;
fa:=1;
while(fa*2<=len)or(fa*2+1<=len)do
begin
if (fa*2+1>len)and(heap[fa*2]<heap[fa*2+1])
then son:=fa*2
else son:=fa*2+1;
if heap[fa]>heap[son]
then begin
tmp:=heap[fa];
heap[fa]:=heap[son];
heap[son]:=tmp;
fa:=son;
end
else break;
end;
end;
procedure kong;
var i:longint;
begin
for i:=1 to maxn do
heap[i]:=0;
end;
begin
assign(input,'pal.in');reset(input);
assign(output,'pal.out');rewrite(output);
readln(p);
readln(n);tot:=0;sum:=0;
for i:=1 to n do
readln(c[i],d[i]);
c[n+1]:=-1;
di[0]:=0;
for i:=1 to n do
di[i]:=di[i-1]+d[i];
d[n+1]:=maxlongint;
i:=1;i1:=0;
while tot<di[n] do
begin
put(c[i]);
fur:=p;
for j:=i to n+2 do
begin
if fur>0 then
begin
fur:=fur-d[j];
if j<>i then put(c[j]);
end
else break;
end;
wu:=get;
if wu<>-1 then
begin
wu:=get;
for k:=i to n do
if c[k]=wu then break;
sum:=sum+(di[k-1]-di[i-1])*c[i];
tot:=di[k-1];
i:=k;
kong;
end
else begin
wu:=get;
if wu<>0 then
begin
for k:=i to n do
if c[k]=wu then break;
sum:=sum+(di[k-1]-di[i-1])*c[i];
tot:=di[k-1];
i:=k;
sum:=sum+(di[n]-di[i-1])*c[i];
tot:=di[n];
end
else
begin
sum:=sum+(di[n]-di[i-1])*c[i];
tot:=di[n];
end;
end;
end;
writeln(sum);
close(input);
close(output);
end.