讨论 / 求助!
掐大肥 2014-07-17 06:28:26
点我顶贴 收藏 删除
#include<iostream>

using namespace std;

int main()

{ int a,b;

cin>>a>>b;

cout<<a+b;

return 0;

}

这题我都WA!

#1 掐大肥@2014-07-17 06:43:02
回复 删除
VIJOS有何特殊之处?求解

#2 掐大肥@2014-07-17 06:51:30
回复 删除
已在POJ提交,AC毫无问题!!
#3 掐大肥@2014-07-17 07:09:20
回复 删除
107196632A+B Problem掐大肥 WA 102014-07-17 22:05

107196532A+B Problem掐大肥 WA 02014-07-17 22:05

107196432A+B Problem掐大肥 WA 402014-07-17 22:05

107196332A+B Problem掐大肥 CE 02014-07-17 21:49

107196232A+B Problem掐大肥 CE 02014-07-17 21:48

一道题目一个程序的五次提交的五种结果,RQNOJ果然是神网站,想AC,看RP!

#4 AK-47无影@2015-03-10 04:14:01
回复 删除
program ex1(input,output);

const

dx: array[1 .. 8] of Shortint = (-2, -1, 1, 2, 2, 1, -1, -2);

dy: array[1 .. 8] of Shortint = (1, 2, 2, 1, -1, -2, -2, -1);

var

n, m, x, y, i, j: Byte;

g: array[0 .. 20, 0 .. 20] of Byte;

f: array[0 .. 20, 0 .. 20] of Comp;

begin

Readln(n, m, x, y);

Fillchar(g, Sizeof(g), 0);

g[x, y] := 1;

for i := 1 to 8 do

if (x + dx[i] >= 0) and (x + dx[i] <= n) and

(y + dy[i] >= 0) and (y + dy[i] <= m) then

g[x + dx[i], y + dy[i]] := 1;

f[0, 0] := 1;

for i := 1 to n do

if g[i, 0] = 0 then f[i, 0] := f[i - 1, 0];

for i := 1 to m do

if g[0, i] = 0 then f[0, i] := f[0, i - 1];

for i := 1 to n do

for j := 1 to m do

if g[i, j] = 0 then f[i, j] := f[i - 1, j] + f[i, j - 1];

Writeln(f[n, m]: 0: 0)

end.

#5 AK-47无影@2015-03-10 04:14:44
回复 删除
program ex1(input,output);

const

dx: array[1 .. 8] of Shortint = (-2, -1, 1, 2, 2, 1, -1, -2);

dy: array[1 .. 8] of Shortint = (1, 2, 2, 1, -1, -2, -2, -1);

var

n, m, x, y, i, j: Byte;

g: array[0 .. 20, 0 .. 20] of Byte;

f: array[0 .. 20, 0 .. 20] of Comp;

begin

Readln(n, m, x, y);

Fillchar(g, Sizeof(g), 0);

g[x, y] := 1;

for i := 1 to 8 do

if (x + dx[i] >= 0) and (x + dx[i] <= n) and

(y + dy[i] >= 0) and (y + dy[i] <= m) then

g[x + dx[i], y + dy[i]] := 1;

f[0, 0] := 1;

for i := 1 to n do

if g[i, 0] = 0 then f[i, 0] := f[i - 1, 0];

for i := 1 to m do

if g[0, i] = 0 then f[0, i] := f[0, i - 1];

for i := 1 to n do

for j := 1 to m do

if g[i, j] = 0 then f[i, j] := f[i - 1, j] + f[i, j - 1];

Writeln(f[n, m]: 0: 0)

end.

11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 111222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 3334444444444444444444444444444444444444444444444444444444444444444444444444444444

查看更多回复
提交回复