48 条题解
-
0Deam.臧 LV 7 @ 2009-05-31 21:22:48
哦哦 有大牛 专程来膜拜的
-
02009-05-22 12:33:37@
34行
var
a1,a2:array[0..31,0..31,0..31] of int64;
f:array[1..30,1..30,1..30] of boolean;
n,t,i,j,k,o,m:longint;
tt:int64;
begin
readln(o,n,m);
for i:=1 to n do
begin
f:=true;f:=true;
f:=true;f:=true;
f[1,1,i]:=true;f[n,1,i]:=true;
f[1,n,i]:=true;f[n,n,i]:=true;
f[1,i,1]:=true;f[1,i,n]:=true;
f[n,i,1]:=true;f[n,i,n]:=true;
end;
a2[1,1,m]:=1;
for t:=1 to o do
begin
a1:=a2;
for i:=1 to n do
for j:=1 to n do
for k:=1 to n do
if f then
begin
tt:=a1;
inc(a2,tt);inc(a2,tt);
inc(a2,tt);inc(a2,tt);
inc(a2,tt);inc(a2,tt);
dec(a2,tt);
end;
end;
writeln(a2[1,1,m]);
end. -
02009-05-08 20:35:48@
注意要INT64!暴力解决……
program p1502;
var
i,j,k,m,n,o:longint;
a,b:array[1..50,1..50,1..50] of int64;
begin
read(o,n,m);a[1,1,m]:=1;
for i:=1 to o do
begin
fillchar(b,sizeof(b),0);
b[1,1,1]:=a[1,1,1];b[1,n,n]:=a[1,n,n];
b[1,n,1]:=a[1,n,1];b[n,1,1]:=a[n,1,1];
b[n,n,1]:=a[n,n,1];b[n,1,n]:=a[n,1,n];
b[1,1,n]:=a[1,1,n];b[n,n,n]:=a[n,n,n];
for j:=2 to n-1 do
begin
b[1,j,1]:=a[1,j,1];b[1,1,j]:=a[1,1,j];
b[1,n,j]:=a[1,n,j];b[n,1,j]:=a[n,1,j];
b[1,j,n]:=a[1,j,n];b[n,n,j]:=a[n,n,j];
b[j,1,1]:=a[j,1,1];b[j,n,n]:=a[j,n,n];
b[j,n,1]:=a[j,n,1];b[j,1,n]:=a[j,1,n];
b[n,j,1]:=a[n,j,1];b[n,j,n]:=a[n,j,n];
end;
fillchar(a,sizeof(a),0);
a[1,1,1]:=b[1,1,2]+b[1,2,1]+b[2,1,1];
a[1,1,n]:=b[1,1,n-1]+b[1,2,n]+b[2,1,n];
a[1,n,1]:=b[1,n-1,1]+b[1,n,2]+b[2,n,1];
a[1,n,n]:=b[1,n,n-1]+b[1,n-1,n]+b[2,n,n];
a[n,1,1]:=b[n-1,1,1]+b[n,1,2]+b[n,2,1];
a[n,n,1]:=b[n,n-1,1]+b[n-1,n,1]+b[n,n,2];
a[n,n,n]:=b[n,n,n-1]+b[n,n-1,n]+b[n-1,n,n];
a[n,1,n]:=b[n,1,n-1]+b[n-1,1,n]+b[n,2,n];
for j:=2 to n-1 do
begin
a[1,j,1]:=b[1,j-1,1]+b[1,j+1,1];
a[1,1,j]:=b[1,1,j-1]+b[1,1,j+1];
a[1,j,n]:=b[1,j-1,n]+b[1,j+1,n];
a[n,j,1]:=b[n,j-1,1]+b[n,j+1,1];
a[n,j,n]:=b[n,j-1,n]+b[n,j+1,n];
a[1,n,j]:=b[1,n,j-1]+b[1,n,j+1];
a[n,1,j]:=b[n,1,j-1]+b[n,1,j+1];
a[n,n,j]:=b[n,n,j-1]+b[n,n,j+1];
a[j,1,1]:=b[j-1,1,1]+b[j+1,1,1];
a[j,n,1]:=b[j-1,n,1]+b[j+1,n,1];
a[j,1,n]:=b[j-1,1,n]+b[j+1,1,n];
a[j,n,n]:=b[j-1,n,n]+b[j+1,n,n];
end;
end;
writeln(a[1,1,m]);
end.
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0ms
秒杀!!!…… -
02009-04-20 13:04:07@
哪位大牛帮我看一下,为什么还有两个点没过呢?
#include
#include
int o,n,m;
int Guozi[31][31][31];void Initial()
{
int i,j,k;
scanf("%d %d %d",&o,&n,&m);
for(i=0;i -
02009-03-27 22:57:06@
暴力的初始化
快疯了!!
c[1,1]:=1;c[1,2]:=2;
c[2,1]:=2;c[2,2]:=3;
c[3,1]:=3;c[3,2]:=4;
c[4,1]:=4;c[4,2]:=1;
c[5,1]:=1;c[5,2]:=5;
c[6,1]:=2;c[6,2]:=6;
c[7,1]:=3;c[7,2]:=7;
c[8,1]:=4;c[8,2]:=8;
c[9,1]:=5;c[9,2]:=6;
c[10,1]:=6;c[10,2]:=7;
c[11,1]:=7;c[11,2]:=8;
c[12,1]:=8;c[12,2]:=5;
d[1,1]:=1;e[1,1]:=2;
d[1,2]:=4;e[1,2]:=n-1;
d[1,3]:=5;e[1,3]:=2;d[2,1]:=1;e[2,1]:=n-1;
d[2,2]:=2;e[2,2]:=2;
d[2,3]:=6;e[2,3]:=2;d[3,1]:=2;e[3,1]:=n-1;
d[3,2]:=3;e[3,2]:=2;
d[3,3]:=7;e[3,3]:=2;d[4,1]:=3;e[4,1]:=n-1;
d[4,2]:=4;e[4,2]:=2;
d[4,3]:=8;e[4,3]:=2;d[5,1]:=9;e[5,1]:=2;
d[5,2]:=12;e[5,2]:=n-1;
d[5,3]:=5;e[5,3]:=n-1;d[6,1]:=10;e[6,1]:=2;
d[6,2]:=9;e[6,2]:=n-1;
d[6,3]:=6;e[6,3]:=n-1;d[7,1]:=11;e[7,1]:=2;
d[7,2]:=10;e[7,2]:=n-1;
d[7,3]:=7;e[7,3]:=n-1;d[8,1]:=12;e[8,1]:=2;
d[8,2]:=11;e[8,2]:=n-1;
d[8,3]:=8;e[8,3]:=n-1; -
02009-03-16 22:14:52@
囧死了……没想到用long long ……
#include
using namespace std;
int main()
{
long long o,n,m,map[2][31][31][31],now=0,s[2],dx,dy,dz;
cin>>o>>n>>m;
memset(map,0,sizeof(map));map[0][1][1][m]=1;s[0]=1;s[1]=n;
for (int i=1;i -
02009-03-07 18:21:13@
晕!!!!编完了才发现是正方体不是正方形.不过还是AC了
-
02009-02-22 20:11:07@
稀饭
稀饭
稀饭
...............................
...............................
题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题
题题题题题题题题题题题题题题题题题题题题题题题题题题题题水水水水题题题题题
题题题题题题题题题题题题题题题题题题题题题题题题水水水水水水水水水题题题题
题题题题题题题题题题题题题题题题题题水水水水水水水水水水水水水水水题题题题
题题题题题题题题题题题题题题题题水水水水水水水水水水水水水水水题题题题题题
题题题题题题题题题题题水水水水题水水水水水水水水水水水题题题题题题题题题题
题题题题题题题题水水水水水水水题水水水题题水水水水水题题题题题题题题题题题
题题题水水水水水水水水水水水水题题题题题题水水水水题题题题题题题题题题题题
题水水水水水水水水水水水水水水题题题题题题水水水水题题题题题题题题题题题题
题水水水水水水水水水水水水题题题题题题题水水水水水水水水水水水题题题题题题
题水水水水水水水水水水水水题题题题题题水水水水水水水水水水水水水水题题题题
题题水水水水水水水水水水题题题题题水水水水水水题题题水水水水水水水题题题题
题题题题题题题题水水水水题题题题题水水水水题题题题题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水题题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水水水题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水水水题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题水水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题水水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题水水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题水水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水题题水水水水题题水水水水水题题题题题
题题水水题题题水水水水水题题题题水水水题题水水水题题题水水水水水题题题题题
题题水水水水水水水水水水题题题题题水水题题水水题题题题水水水水水题题题题题
题题题水水水水水水水水水题题题题题题题题水水水题题题题水水水水题题题题题题
题题题题题水水水水水水水题题题题题题题题水水水题水水水水题题题题题题题题题
题题题题题题水水水水水水题题题题题题题水水水水题题水水水水题题题题题题题题
题题题题题题题题题水水水题题题题题题水水水水水题题题水水水水水水水题题题题
题题题题题题题题题题题题题题题题水水水水水水题题题题题水水水水水水题题题题
题题题题题题题题题题题题题题题水水水水水水题题题题题题水水水水水水水题题题
题题题题题题题题题题题题题题水水水水水题题题题题题题题题水水水水水水题题题
题题题题题题题题题题题题题水水水水水题题题题题题题题题题题水水水水题题题题
题题题题题题题题题题题题水水水题题题题题题题题题题题题题题题水水水题题题题
题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题 -
02009-02-21 15:14:24@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案错误... ├ 标准行输出
├ 错误行输出
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Unaccepted 有效得分:90 有效耗时:0ms编译通过...
├ 测试数据 01:答案错误... ├ 标准行输出
├ 错误行输出
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Unaccepted 有效得分:90 有效耗时:0ms数据弱了......
方向常量开的有问题,却能对9个点.... -
02009-02-12 23:10:44@
做了48行,这题太恶心了。。。
开三维硬模拟 -
02009-02-11 23:00:39@
一次Accepted 有效得分:100 有效耗时:0ms
反正数据小……索性就……
3维数组……主程序
if map0 then
begin
if ((i=1)and(j=1)and(k=1)) then
begin
mapt:=map+mapt;
mapt:=map+mapt;
mapt:=map+mapt;end else
if ((i=n)and(j=1)and(k=1)) then
begin
mapt:=map+mapt;
mapt:=map+mapt;
mapt:=map+mapt;end else
if ((i=1)and(j=n)and(k=1)) then
begin
mapt:=map+mapt;
mapt:=map+mapt;
mapt:=map+mapt;end else
if ((i=1)and(j=1)and(k=n)) then
begin
mapt:=map+mapt;
mapt:=map+mapt;
mapt:=map+mapt;end else
if ((i=n)and(j=n)and(k=1)) then
begin
mapt:=map+mapt;
mapt:=map+mapt;
mapt:=map+mapt;end else
if ((i=n)and(j=1)and(k=n)) then
begin
mapt:=map+mapt;
mapt:=map+mapt;
mapt:=map+mapt;end else
if ((i=1)and(j=n)and(k=n)) then
begin
mapt:=map+mapt;
mapt:=map+mapt;
mapt:=map+mapt;end else
if ((i=n)and(j=n)and(k=n)) then
begin
mapt:=map+mapt;
mapt:=map+mapt;
mapt:=map+mapt;end else
begin
if (i=1)and(j=1) then
begin
mapt:=map+mapt;
mapt:=map+mapt;end else
if (i=1)and(j=n) then
begin
mapt:=map+mapt;
mapt:=map+mapt;end else
if (i=n)and(j=1) then
begin
mapt:=map+mapt;
mapt:=map+mapt;end else
if (i=n)and(j=n) then
begin
mapt:=map+mapt;
mapt:=map+mapt;end else
if (i=n)and(k=n) then
begin
mapt:=map+mapt;
mapt:=map+mapt;end else
if (i=1)and(k=n) then
begin
mapt:=map+mapt;
mapt:=map+mapt;end else
if (i=1)and(k=1) then
begin
mapt:=map+mapt;
mapt:=map+mapt;end else
if (i=n)and(k=1) then
begin
mapt:=map+mapt;
mapt:=map+mapt;end else
if (j=n)and(k=1) then
begin
mapt:=map+mapt;
mapt:=map+mapt;end else
if (j=n)and(k=n) then
begin
mapt:=map+mapt;
mapt:=map+mapt;end else
if (j=1)and(k=n) then
begin
mapt:=map+mapt;
mapt:=map+mapt;end else
if (j=1)and(k=1) then
begin
mapt:=map+mapt;
mapt:=map+mapt;写了156行哈哈
复制粘贴 多用写字板的全部替换功能~ -
02009-02-11 17:36:51@
做的时候注意一下顶点就行了!
-
02009-02-02 13:46:04@
bu shi
题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题
题题题题题题题题题题题题题题题题题题题题题题题题题题题题水水水水题题题题题
题题题题题题题题题题题题题题题题题题题题题题题题水水水水水水水水水题题题题
题题题题题题题题题题题题题题题题题题水水水水水水水水水水水水水水水题题题题
题题题题题题题题题题题题题题题题水水水水水水水水水水水水水水水题题题题题题
题题题题题题题题题题题水水水水题水水水水水水水水水水水题题题题题题题题题题
题题题题题题题题水水水水水水水题水水水题题水水水水水题题题题题题题题题题题
题题题水水水水水水水水水水水水题题题题题题水水水水题题题题题题题题题题题题
题水水水水水水水水水水水水水水题题题题题题水水水水题题题题题题题题题题题题
题水水水水水水水水水水水水题题题题题题题水水水水水水水水水水水题题题题题题
题水水水水水水水水水水水水题题题题题题水水水水水水水水水水水水水水题题题题
题题水水水水水水水水水水题题题题题水水水水水水题题题水水水水水水水题题题题
题题题题题题题题水水水水题题题题题水水水水题题题题题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水题题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水水水题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水水水题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题水水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题水水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题水水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题水水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水题题水水水水题题水水水水水题题题题题
题题水水题题题水水水水水题题题题水水水题题水水水题题题水水水水水题题题题题
题题水水水水水水水水水水题题题题题水水题题水水题题题题水水水水水题题题题题
题题题水水水水水水水水水题题题题题题题题水水水题题题题水水水水题题题题题题
题题题题题水水水水水水水题题题题题题题题水水水题水水水水题题题题题题题题题
题题题题题题水水水水水水题题题题题题题水水水水题题水水水水题题题题题题题题
题题题题题题题题题水水水题题题题题题水水水水水题题题水水水水水水水题题题题
题题题题题题题题题题题题题题题题水水水水水水题题题题题水水水水水水题题题题
题题题题题题题题题题题题题题题水水水水水水题题题题题题水水水水水水水题题题
题题题题题题题题题题题题题题水水水水水题题题题题题题题题水水水水水水题题题
题题题题题题题题题题题题题水水水水水题题题题题题题题题题题水水水水题题题题
题题题题题题题题题题题题水水水题题题题题题题题题题题题题题题水水水题题题题
题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题 -
02009-02-02 09:24:28@
虽然是水题,不过也要细心呦!
其实用三维数组,基类型是int64+剪枝 就可以轻松过啦! -
02009-02-03 20:17:10@
共8个顶点..可设其中四个顶点为head顶点,即连接它的都是边的头.
反之令4个顶点即tail顶点..
不需要3维数组的~~ -
02009-01-31 21:25:14@
no.50`
\
70行程序~~ -
02009-01-29 18:31:31@
题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题
题题题题题题题题题题题题题题题题题题题题题题题题题题题题水水水水题题题题题
题题题题题题题题题题题题题题题题题题题题题题题题水水水水水水水水水题题题题
题题题题题题题题题题题题题题题题题题水水水水水水水水水水水水水水水题题题题
题题题题题题题题题题题题题题题题水水水水水水水水水水水水水水水题题题题题题
题题题题题题题题题题题水水水水题水水水水水水水水水水水题题题题题题题题题题
题题题题题题题题水水水水水水水题水水水题题水水水水水题题题题题题题题题题题
题题题水水水水水水水水水水水水题题题题题题水水水水题题题题题题题题题题题题
题水水水水水水水水水水水水水水题题题题题题水水水水题题题题题题题题题题题题
题水水水水水水水水水水水水题题题题题题题水水水水水水水水水水水题题题题题题
题水水水水水水水水水水水水题题题题题题水水水水水水水水水水水水水水题题题题
题题水水水水水水水水水水题题题题题水水水水水水题题题水水水水水水水题题题题
题题题题题题题题水水水水题题题题题水水水水题题题题题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水题题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水水水题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水水水题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题水水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题水水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题水水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题水水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水题题水水水水题题水水水水水题题题题题
题题水水题题题水水水水水题题题题水水水题题水水水题题题水水水水水题题题题题
题题水水水水水水水水水水题题题题题水水题题水水题题题题水水水水水题题题题题
题题题水水水水水水水水水题题题题题题题题水水水题题题题水水水水题题题题题题
题题题题题水水水水水水水题题题题题题题题水水水题水水水水题题题题题题题题题
题题题题题题水水水水水水题题题题题题题水水水水题题水水水水题题题题题题题题
题题题题题题题题题水水水题题题题题题水水水水水题题题水水水水水水水题题题题
题题题题题题题题题题题题题题题题水水水水水水题题题题题水水水水水水题题题题
题题题题题题题题题题题题题题题水水水水水水题题题题题题水水水水水水水题题题
题题题题题题题题题题题题题题水水水水水题题题题题题题题题水水水水水水题题题
题题题题题题题题题题题题题水水水水水题题题题题题题题题题题水水水水题题题题
题题题题题题题题题题题题水水水题题题题题题题题题题题题题题题水水水题题题题
题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题 -
02009-01-26 17:58:18@
Var a,a0:array[0..31,0..31,0..31] of int64;
o,n,m,i,j,k,l:longint;
Function check(a,b,c:longint):boolean;
var i,t:longint;
begin
t:=0;
if (a=1) or (a=n) then inc(t);
if (b=1) or (b=n) then inc(t);
if (c=1) or (c=n) then inc(t);
if t>=2 then exit(true);
exit(false);
end;
Begin
readln(o,n,m);
a[1,1,m]:=1;
for i:=1 to o do
begin
for j:=1 to n do
for k:=1 to n do
for l:=1 to n do
if check(j,k,l) then
begin
inc(a0[j+1,k,l],a[j,k,l]);
inc(a0[j-1,k,l],a[j,k,l]);
inc(a0[j,k+1,l],a[j,k,l]);
inc(a0[j,k-1,l],a[j,k,l]);
inc(a0[j,k,l+1],a[j,k,l]);
inc(a0[j,k,l-1],a[j,k,l]);
end;
a:=a0;
fillchar(a0,sizeof(a0),0);
end;
writeln(a[1,1,m]);
End.
精简代码AC(容易超时);
记得要用int64; -
02009-01-25 22:47:41@
mao04太慷慨了
-
02009-01-24 19:58:04@
楼下的mao04,别以为题目是你出的就可以把程序贴在这个
害的这么好的题目通过率这么高
其实这个题目也不是什么难到需要标程的地步