18 条题解
-
0计宇亮 LV 10 @ 2013-04-19 22:41:13
一个MOer说应该这么做
#include<iostream>
#include<math.h>
using namespace std;
int pd[101][101];
int main()
{
int k,n;
cin>>k>>n;
int a[k+1][n],i,j,s,s1,s2,t,bij1,bij2,pdt,mm;
bool wufa;
for(i=1;i<=k;i++)
for(j=0;j<n;j++)
cin>>a[i][j];
for(i=0;i<101;i++)
for(j=0;j<101;j++)
pd[i][j]=-1;
for(i=1;i<=k;i++)
for(j=0;j<n;j++)
for(mm=0;mm<j;mm++)
if(a[i][j]>a[i][mm])
{
t=a[i][j];
a[i][j]=a[i][mm];
a[i][mm]=t;
}
while(1)
{
cin>>bij1>>bij2;
if(bij1==0&&bij2==0)break;
pdt=0;s1=0;s2=0;wufa=false;
while(a[bij1][pdt]==a[bij2][pdt]&&pdt<n)
pdt++;
if(pdt==n)cout<<"Equal!"<<endl;
else
{
if(a[bij1][pdt]>a[bij2][pdt])
{
while(pdt<n)
{
s1=s1+a[bij1][pdt];
s2=s2+a[bij2][pdt];
if(s1<s2)wufa=true;
pdt++;
}
if(wufa==false)cout<<bij1<<endl;
else cout<<"Can't tell!"<<endl;
}
else
{
while(pdt<n)
{
s1=s1+a[bij1][pdt];
s2=s2+a[bij2][pdt];
if(s1>s2)wufa=true;
pdt++;
}
if(wufa==false)cout<<bij2<<endl;
else cout<<"Can't tell!"<<endl;
}
}
}
return 0;
}
随便找了个水题为什么我通过/提交还是149/432…………不都通过了吗…………150你哪去了TAT -
02009-11-09 21:08:35@
啊萎载
竟然这么A了 -
02009-11-08 10:07:06@
膜拜hydralisk大牛!!!!!!调整思想就是强!!!!!!
-
02009-10-27 18:59:20@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 134ms
├ 测试数据 07:答案正确... 150ms
├ 测试数据 08:答案正确... 181ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 196ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:661msOTL...
看半天jensen和karamata没看懂,糊里糊涂瞎写就过了~
这是个什么理儿啊~ -
02009-06-26 10:08:43@
找规律
贴个程序片段:
procedure test(i,j:integer);
var b,c:arr;
d,k,l,t,s1,s2:integer;
begin
for k:=1 to n do if aa[j,k] then break;
if a=a[j,k] then begin
write('Equal!');
exit;
end else begin
if a>a[j,k] then begin
b:=a[i];
c:=a[j];
d:=i;
end else begin
b:=a[j];
c:=a[i];
d:=j;
end;
s1:=0;
s2:=0;
for l:=k to n do begin
s1:=s1+b[l];
s2:=s2+c[l];
if s1 -
02009-06-14 10:54:05@
var a,b:array[0..101,0..101]of longint;
p,gjw,x,y,c,x0,y0,s,t,i,j,k,n:longint;
sk:string;
function big(x,y:longint):longint;
var i:longint;
begin
for i:=1 to n do begin
if a[x,i]>a[y,i] then exit(x);
if a[x,i] -
02009-06-13 13:00:17@
-
02009-03-27 17:15:14@
水题。
-
02009-02-22 13:57:13@
Accepted 有效得分:100 有效耗时:0ms
折腾半天终于过了
感谢curimit大牛的帮助 -
02009-02-21 19:43:27@
Accepted!!!!!
-
02008-10-10 19:00:42@
楼下/???????????????????????????????????????????
用户名?????????????????????????? -
02007-11-11 16:24:27@
?????????????
-
02007-09-26 22:48:16@
???????????????????????????????????????????????????????????????
-
02007-09-21 11:01:53@
好不容易过~~~
害得我去学控制不等式~~~晕
凸函数+控制理论太强了不等式无敌~~~~ -
02007-09-13 19:07:46@
原来这题看懂了是这样
-
02007-08-03 19:31:31@
总算进了前三
-
02007-04-07 16:49:05@
总是不对
-
02006-10-18 15:27:01@
同志们注意了。。。。vijos的大文件时有问题的。。。。。输出一定不要加回车!!
- 1