313 条题解
-
0how LV 10 @ 2009-07-31 22:09:26
...汗...没看见逆时针...
-
02009-07-31 21:14:18@
15行一次秒杀
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0msvar n,a,b,c:integer;
s:array[1..100] of record x,y:real; end;
r,rs:real;begin
readln(n,r);
for a:=1 to n do
readln(s[a].x,s[a].y);
rs:=0;
for a:=1 to n-1 do
rs:=rs+sqrt(sqr(abs(s[a].x-s[a+1].x))+sqr(abs(s[a].y-s[a+1].y)));
rs:=rs+sqrt(sqr(abs(s[1].x-s[n].x))+sqr(abs(s[1].y-s[n].y)));
rs:=rs+r*2*3.14159;
write(rs:0:2);
end. -
02009-07-29 23:36:23@
能给个图,题目的意思不太懂,为什么要加上一个圆的周长呢,
-
02009-07-28 11:36:10@
program lyc;
var r,l,x,y,a,b,x0,y0:real;
n,i:longint;
begin
readln(n,r);
read(x0,y0);
x:=x0;y:=y0;
a:=x0;b:=y0;
for i:=2 to n do
begin
readln(x,y);
l:=l+sqrt(sqr(x-a)+sqr(y-b));
a:=x;
b:=y;
end;
l:=l+sqrt(sqr(a-x0)+sqr(b-y0)); l:=l+2*r*3.141592653589793246264338327950288419716939937510582097494459230781640628620899862803482534211706798;
write(l:0:2);
end.
挽救通过率的方法就是--刷水题;
权作开心喽
哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈 -
02009-07-25 11:39:49@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0msvar s,a,b,x,y,x1,y1,r:real;
n,i:integer;
begin
read(n,r);
read(x1,y1);
s:=0;
x:=x1;y:=y1;
a:=x1;b:=y1;
for i:=2 to n do
begin
readln(a,b);
s:=s+sqrt(sqr(a-x)+sqr(b-y));
x:=a;
y:=b;
end;
s:=s+sqrt(sqr(a-x1)+sqr(b-y1));
s:=s+2*r*3.1415926;
write(s:0:2);
end.秒杀!!so easy!!!
-
02009-07-23 14:20:22@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0msprogram dsa;
var s,a,b,x,y,x1,y1,r:real;
n,i:integer;
begin
read(n,r);
read(x1,y1);
s:=0;
x:=x1;y:=y1;
a:=x1;b:=y1;
for i:=2 to n do
begin
readln(a,b);
s:=s+sqrt(sqr(a-x)+sqr(b-y));
x:=a;
y:=b;
end;
s:=s+sqrt(sqr(a-x1)+sqr(b-y1));
s:=s+2*r*3.1415926;
write(s:0:2);
end.终于还是检查出来了
-
02009-07-22 19:18:47@
MyProger\Prog2849.cpp: In function `int main()':
MyProger\Prog2849.cpp:5: error: stray '\227' in program
MyProger\Prog2849.cpp:5: error: stray '\128' in program
MyProger\Prog2849.cpp:5: error: stray '\128' in program
MyProger\Prog2849.cpp:5: error: stray '\227' in program
MyProger\Prog2849.cpp:5: error: stray '\128' in program
MyProger\Prog2849.cpp:5: error: stray '\128' in program
MyProger\Prog2849.cpp:6: error: stray '\227' in program
MyProger\Prog2849.cpp:6: error: stray '\128' in program
MyProger\Prog2849.cpp:6: error: stray '\128' in program
MyProger\Prog2849.cpp:6: error: stray '\227' in program
MyProger\Prog2849.cpp:6: error: stray '\128' in program
MyProger\Prog2849.cpp:6: error: stray '\128' in program
MyProger\Prog2849.cpp:7: error: stray '\227' in program
MyProger\Prog2849.cpp:7: error: stray '\128' in program
MyProger\Prog2849.cpp:7: error: stray '\128' in program
MyProger\Prog2849.cpp:7: error: stray '\227' in program
MyProger\Prog2849.cpp:7: error: stray '\128' in program
MyProger\Prog2849.cpp:7: error: stray '\128' in program
MyProger\Prog2849.cpp:8: error: stray '\227' in program
MyProger\Prog2849.cpp:8: error: stray '\128' in program
MyProger\Prog2849.cpp:8: error: stray '\128' in program
MyProger\Prog2849.cpp:8: error: stray '\227' in program
MyProger\Prog2849.cpp:8: error: stray '\128' in program
MyProger\Prog2849.cpp:8: error: stray '\128' in program
MyProger\Prog2849.cpp:9: error: stray '\227' in program
MyProger\Prog2849.cpp:9: error: stray '\128' in program
MyProger\Prog2849.cpp:9: error: stray '\128' in program
MyProger\Prog2849.cpp:9: error: stray '\227' in program
MyProger\Prog2849.cpp:9: error: stray '\128' in program
MyProger\Prog2849.cpp:9: error: stray '\128' in program
MyProger\Prog2849.cpp:10: error: stray '\227' in program
MyProger\Prog2849.cpp:10: error: stray '\128' in program
MyProger\Prog2849.cpp:10: error: stray '\128' in program
MyProger\Prog2849.cpp:10: error: stray '\227' in program
MyProger\Prog2849.cpp:10: error: stray '\128' in program
MyProger\Prog2849.cpp:10: error: stray '\128' in program
MyProger\Prog2849.cpp:11: error: stray '\227' in program
MyProger\Prog2849.cpp:11: error: stray '\128' in program
MyProger\Prog2849.cpp:11: error: stray '\128' in program
MyProger\Prog2849.cpp:11: error: stray '\227' in program
MyProger\Prog2849.cpp:11: error: stray '\128' in program
MyProger\Prog2849.cpp:11: error: stray '\128' in program
MyProger\Prog2849.cpp:12: error: stray '\227' in program
MyProger\Prog2849.cpp:12: error: stray '\128' in program
MyProger\Prog2849.cpp:12: error: stray '\128' in program
MyProger\Prog2849.cpp:12: error: stray '\227' in program
MyProger\Prog2849.cpp:12: error: stray '\128' in program
MyProger\Prog2849.cpp:12: error: stray '\128' in program
MyProger\Prog2849.cpp:13: error: stray '\227' in program
MyProger\Prog2849.cpp:13: error: stray '\128' in program
MyProger\Prog2849.cpp:13: error: stray '\128' in program
MyProger\Prog2849.cpp:13: error: stray '\227' in program
MyProger\Prog2849.cpp:13: error: stray '\128' in program
MyProger\Prog2849.cpp:13: error: stray '\128' in program
MyProger\Prog2849.cpp:14: error: stray '\227' in program
MyProger\Prog2849.cpp:14: error: stray '\128' in program
MyProger\Prog2849.cpp:14: error: stray '\128' in program
MyProger\Prog2849.cpp:14: error: stray '\227' in program
MyProger\Prog2849.cpp:14: error: stray '\128' in program
MyProger\Prog2849.cpp:14: error: stray '\128' in program
MyProger\Prog2849.cpp:14: error: stray '\227' in program
MyProger\Prog2849.cpp:14: error: stray '\128' in program
MyProger\Prog2849.cpp:14: error: stray '\128' in program
MyProger\Prog2849.cpp:14: error: stray '\227' in program
MyProger\Prog2849.cpp:14: error: stray '\128' in program
MyProger\Prog2849.cpp:14: error: stray '\128' in program
MyProger\Prog2849.cpp:15: error: stray '\227' in program
MyProger\Prog2849.cpp:15: error: stray '\128' in program
MyProger\Prog2849.cpp:15: error: stray '\128' in program
MyProger\Prog2849.cpp:15: error: stray '\227' in program
MyProger\Prog2849.cpp:15: error: stray '\128' in program
MyProger\Prog2849.cpp:15: error: stray '\128' in program
MyProger\Prog2849.cpp:15: error: stray '\227' in program
MyProger\Prog2849.cpp:15: error: stray '\128' in program
MyProger\Prog2849.cpp:15: error: stray '\128' in program
MyProger\Prog2849.cpp:15: error: stray '\227' in program
MyProger\Prog2849.cpp:15: error: stray '\128' in program
MyProger\Prog2849.cpp:15: error: stray '\128' in program
MyProger\Prog2849.cpp:16: error: stray '\227' in program
MyProger\Prog2849.cpp:16: error: stray '\128' in program
MyProger\Prog2849.cpp:16: error: stray '\128' in program
MyProger\Prog2849.cpp:16: error: stray '\227' in program
MyProger\Prog2849.cpp:16: error: stray '\128' in program
MyProger\Prog2849.cpp:16: error: stray '\128' in program
MyProger\Prog2849.cpp:16: error: stray '\227' in program
MyProger\Prog2849.cpp:16: error: stray '\128' in program
MyProger\Prog2849.cpp:16: error: stray '\128' in program
MyProger\Prog2849.cpp:16: error: stray '\227' in program
MyProger\Prog2849.cpp:16: error: stray '\128' in program
MyProger\Prog2849.cpp:16: error: stray '\128' in program
MyProger\Prog2849.cpp:17: error: stray '\227' in program
MyProger\Prog2849.cpp:17: error: stray '\128' in program
MyProger\Prog2849.cpp:17: error: stray '\128' in program
MyProger\Prog2849.cpp:17: error: stray '\227' in program
MyProger\Prog2849.cpp:17: error: stray '\128' in program
MyProger\Prog2849.cpp:17: error: stray '\128' in program
MyProger\Prog2849.cpp:17: error: stray '\227' in program
MyProger\Prog2849.cpp:17: error: stray '\128' in program
MyProger\Prog2849.cpp:17: error: stray '\128' in program
MyProger\Prog2849.cpp:17: error: stray '\227' in program
MyProger\Prog2849.cpp:17: error: stray '\128' in program
MyProger\Prog2849.cpp:17: error: stray '\128' in program
MyProger\Prog2849.cpp:18: error: stray '\227' in program
MyProger\Prog2849.cpp:18: error: stray '\128' in program
MyProger\Prog2849.cpp:18: error: stray '\128' in program
MyProger\Prog2849.cpp:18: error: stray '\227' in program
MyProger\Prog2849.cpp:18: error: stray '\128' in program
MyProger\Prog2849.cpp:18: error: stray '\128' in program
MyProger\Prog2849.cpp:19: error: stray '\227' in program
MyProger\Prog2849.cpp:19: error: stray '\128' in program
MyProger\Prog2849.cpp:19: error: stray '\128' in program
MyProger\Prog2849.cpp:19: error: stray '\227' in program
MyProger\Prog2849.cpp:19: error: stray '\128' in program
MyProger\Prog2849.cpp:19: error: stray '\128' in program -
02009-07-21 18:07:04@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0ms本来想做到水题刷刷rp,结果遇到这么水的题...OTZ
大家注意看题,题上说的是逆时针,所以不用写什么判断....
一开始我还以为要用三角函数来做... -
02009-07-20 08:56:12@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0ms艾,把1打成0结果没一次AC,
好擦那 -
02009-07-19 20:01:35@
还以为是凸包、、、
、、、、、
、、、、
、、、
、、
、
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、 -
02009-07-17 17:03:04@
program qwww;
const
pi=3.14159;
type
ssss=record
x:real;
y:real;
end;var
s,r:real;
i,n:integer;
a:array [1..100] of ssss;begin
read(n,r);
s:=0;
for i:=1 to n do
readln(a[i].x,a[i].y);
for i:=1 to n do
if i=n then s:=s+sqrt(sqr(a[i].x-a[1].x)+sqr(a[i].y-a[1].y))
else s:=s+sqrt(sqr(a[i].x-a.x)+sqr(a[i].y-a.y));
s:=s+2*r*pi;
write(s:6:2);
end.
好简单! -
02009-07-16 22:57:30@
var
n:integer;
r:real;
i,j:integer;
b:array[1..100,1..2] of real;
c:real;begin
readln(n,r);
for i:=1 to n do
readln(b,b);
c:=0;
for i:=1 to n-1 do
c:=c+sqrt(sqr(b-b)+sqr(b-b));
c:=c+sqrt(sqr(b[1,1]-b[n,1])+sqr(b[1,2]-b[n,2]))+3.1416*r*r;
write(c:0:2);
end. -
02009-07-08 21:21:18@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0ms
第一次交竟然忘乘R了,可怜啊 -
02009-11-04 12:57:22@
program ex1;
var d:array[1..100,1..2] of real;
a,c:integer; b,e:real;
begin
read(a,b);
for c:=1 to a do
read(d[c,1],d[c,2]);
d[a+1,1]:=d[1,1]; d[a+1,2]:=d[1,2];
for c:=1 to a do
e:=e+sqrt(sqr(abs(d[c,1]-d[c+1,1]))+sqr(abs(d[c,2]-d[c+1,2])));
e:=e+b*2*3.14159;
writeln(e:0:2);
end. -
02009-09-07 17:49:30@
http://blog.163.com/yy_0227_2009/
欢迎访问我的博客,有答案。。。 -
02009-06-15 20:42:01@
var
a:array[1..100,1..100] of real;
i,n:integer;
r,s:real;
begin
readln(n,r);
for i:=1 to n do
readln(a,a);
s:=0;
for i:=2 to n do
s:=s+sqrt(sqr(a-a)+sqr(a-a));
s:=s+sqrt(sqr(a[n,1]-a[1,1])+sqr(a[n,2]-a[1,2]));
s:=s+3.1415926*r*2;
writeln(s:0:2);
end. -
02009-06-14 10:42:06@
题意出的不行啊。。。想了好长时间才明白是什么意思。。。。
-
02009-06-13 11:09:17@
var
a,i:longint;
r,x1,y1,x2,y2,x3,y3,s:real;
begin
readln(a,r);
s:=2*pi*r*180*(a-2)/360;
readln(x1,y1);
x3:=x1;
y3:=y1;
for i:=1 to a-1 do
begin
readln(x2,y2);
s:=s+sqrt(sqr(x1-x2)+sqr(y1-y2));
x1:=x2;
y1:=y2;
end;
s:=s+sqrt(sqr(x3-x2)+sqr(y3-y2));
writeln(s:0:2);
readln;
end.为什么错了
-
02009-06-11 20:06:55@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0msprogram rope;
const
max=101;
type
node=record
x,y:real;
end;
var
ropes:array[1..max] of node;
r,amount:real;
n,i:integer;
begin
read(n,r);
for i:=1 to n do
readln(ropes[i].x,ropes[i].y);
for i:=1 to n-1 do
amount:=amount+sqrt(sqr(ropes[i].x-ropes.x)+sqr(ropes[i].y-ropes.y));
amount:=amount+sqrt(sqr(ropes[n].x-ropes[1].x)+sqr(ropes[n].y-ropes[1].y))+2*pi*r;
writeln(amount:0:2);
end. -
02009-06-10 18:08:05@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms66题,与我的生日对上了,庆祝一下!!!!!!