174 条题解

  • 0
    @ 2009-05-10 16:20:53

    int num[10][5]={1,2,0,2,1, //0

    0,3,0,3,0, //1

    1,3,1,1,1, //2

    1,3,1,3,1, //3

    0,2,1,3,0, //4

    1,1,1,3,1, //5

    1,1,1,2,1, //6

    1,3,0,3,0, //7

    1,2,1,2,1, //8

    1,2,1,3,1}; //9

    很笨的方法……

  • 0
    @ 2009-05-02 16:20:30

    编译通过...

    ├ 测试数据 01:运行超时|格式错误...

    ├ 测试数据 02:运行超时|格式错误...

    ├ 测试数据 03:运行超时|格式错误...

    ├ 测试数据 04:运行超时|格式错误...

    ├ 测试数据 05:运行超时|格式错误...

    ├ 测试数据 06:运行超时|格式错误...

    ├ 测试数据 07:运行超时|格式错误...

    ├ 测试数据 08:运行超时|格式错误...

    ├ 测试数据 09:运行超时|格式错误...

    ├ 测试数据 10:运行超时|格式错误...

    ---|---|---|---|---|---|---|---|-

    Unaccepted 有效得分:0 有效耗时:0ms

    这算是什么呀??

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

    真的在行末不能加空格。

    可是样例中行末有空格,真阴险!!!!!!!!!!

  • 0
    @ 2009-03-20 22:07:21

    #include

    #include

    using namespace std;

    short y[10][5]={{1,4,0,4,1},{0,2,0,2,0},{1,2,1,3,1},{1,2,1,2,1},{0,4,1,2,0},{1,3,1,2,1},{1,3,1,4,1},{1,2,0,2,0},{1,4,1,4,1},{1,4,1,2,1}};

    main () {

    short k,l,u,i,j;

    char s[256];

    cin>>k>>s;

    l=strlen (s);

    for (i=0;i

  • 0
    @ 2009-03-19 17:30:38

    var i,j,k,l,n,a:longint;

    st:string;

    procedure aa;

    begin

    write(' ');

    for i:=1 to n do

    write(' ');

    write(' ');

    end;

    procedure a1;

    begin

    write(' ');

    for j:=1 to n do

    write(' ');

    write('|');

    write(' ');

    end;

    procedure a2;

    begin

    write(' ');

    for i:=1 to n do

    write('-');

    write(' ');

    write(' ');

    end;

    procedure a3;

    begin

    write('|');

    for j:=1 to n do

    write(' ');

    write(' ');

    write(' ');

    end;

    procedure a4;

    begin

    write('|');

    for j:=1 to n do

    write(' ');

    write('|');

    write(' ');

    end;

    begin

    readln(n);

    readln(st);

    l:=length(st);

    for k:=1 to l do

    begin

    case st[k] of

    '1':aa;

    '2':a2;

    '3':a2;

    '4':aa;

    '5':a2;

    '6':a2;

    '7':a2;

    '8':a2;

    '9':a2;

    '0':a2;

    end;

    end;

    writeln;

    for i:=1 to n do

    begin

    for k:=1 to l do

    begin

    case st[k] of

    '1':a1;

    '2':a1;

    '3':a1;

    '4':a4;

    '5':a3;

    '6':a3;

    '7':a1;

    '8':a4;

    '9':a4;

    '0':a4;

    end;

    end;

    writeln;

    end;

    for k:=1 to l do

    case st[k] of

    '1':aa;

    '2':a2;

    '3':a2;

    '4':a2;

    '5':a2;

    '6':a2;

    '7':aa;

    '8':a2;

    '9':a2;

    '0':aa;

    end;

    writeln;

    for a:=1 to n do

    begin

    for k:=1 to l do

    begin

    case st[k] of

    '1':a1;

    '2':a3;

    '3':a1;

    '4':a1;

    '5':a1;

    '6':a4;

    '7':a1;

    '8':a4;

    '9':a1;

    '0':a4;

    end;

    end;

    writeln;

    end;

    for k:=1 to l do

    case st[k] of

    '1':aa;

    '2':a2;

    '3':a2;

    '4':aa;

    '5':a2;

    '6':a2;

    '7':aa;

    '8':a2;

    '9':a2;

    '0':a2;

    end;

    end.

    为什么错啊???

  • 0
    @ 2009-02-15 13:55:21

    好阴人啊.. 最后不能多一个空格..

  • 0
    @ 2009-02-07 11:53:14

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

    AC那刻我虚脱了。。。。真不是滋味。。。。

  • 0
    @ 2009-02-01 16:37:36

    难得啊,学C一个星期终于有一个程序一次就AC了

    #include

    #include

    int len,k;

    char st[256];

    void first(char x,char y,char z)

    {

    int i,j;

    for(i=0;i0)printf(" ");

    if((st[i]==x)||(st[i]==y)||(st[i]==z))

    for(j=1;j

  • 0
    @ 2009-01-30 20:04:31

    http://www.vijos.cn/ProblemImg/P1064.txt

    这个是标准格式,没错的,有疑问看这个。

    最后一个数字后面没空格。每个数字占的大小是一样的。

  • 0
    @ 2009-01-28 22:05:23

    样例是错的!!!!!!

    最后一个数字没有空格!!!!!!

    大家注意啊!!!!

    BS出题人

  • 0
    @ 2009-01-19 10:40:42

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

  • 0
    @ 2008-12-27 19:07:28

    |||||||||||||||||||||||||

  • 0
    @ 2008-12-21 10:18:39

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:运行超时|格式错误...

  • 0
    @ 2008-12-16 18:08:29

    #include

    using namespace std;

    int main(int argc, char* argv[])

    {

      int n;

      cin >> n;

      string str;

      cin >> str;

      //图案类型 1:" " 2:" - " 3:" |" 4:"| " 5:"| |"

      int lib[5][10] = {{2,1,2,2,1,2,2,2,2,2}, //存储每行的图案类型,共5大行

               {5,3,3,3,5,4,4,3,5,5},

               {1,1,2,2,2,2,2,1,2,2},

               {5,3,4,3,3,3,5,3,5,3},

               {2,1,2,2,1,2,2,1,2,2}};

      

      int len = str.size();

      for (int row=0; row

  • 0
    @ 2008-12-03 20:28:32

    每一行最后都没有空格哦!

    ( 2006-3-17 18:54:50 )

    被这句题解阴了……不知道谁发的……以为是 只要最后输完字符就没空格了……比如6在最后一列的第二行 只输出 '|'而不是'| '…… 晕死

    除了第一个是数字前没空格比较阴,其他的都还好……

    一次AC 纪念下。78行的copy……

    const

    c:array[0..9,1..5,1..3]of char =(((' ','-',' '),('|',' ','|'),(' ',' ',' '),('|',' ','|'),(' ','-',' '))

    ,((' ',' ',' '),(' ',' ','|'),(' ',' ',' '),(' ',' ','|'),(' ',' ',' '))

    ,((' ','-',' '),(' ',' ','|'),(' ','-',' '),('|',' ',' '),(' ','-',' '))

    ,((' ','-',' '),(' ',' ','|'),(' ','-',' '),(' ',' ','|'),(' ','-',' '))

    ,((' ',' ',' '),('|',' ','|'),(' ','-',' '),(' ',' ','|'),(' ',' ',' '))

    ,((' ','-',' '),('|',' ',' '),(' ','-',' '),(' ',' ','|'),(' ','-',' '))

    ,((' ','-',' '),('|',' ',' '),(' ','-',' '),('|',' ','|'),(' ','-',' '))

    ,((' ','-',' '),(' ',' ','|'),(' ',' ',' '),(' ',' ','|'),(' ',' ',' '))

    ,((' ','-',' '),('|',' ','|'),(' ','-',' '),('|',' ','|'),(' ','-',' '))

    ,((' ','-',' '),('|',' ','|'),(' ','-',' '),(' ',' ','|'),(' ','-',' ')));

    procedure makeAnumber&Aline(n,h:integer);

    var

    i,j:integer;

    begin

    write(c[n,h,1]);

    for i:=1 to big do

    write(c[n,h,2]);

    write(c[n,h,3]);

    end;

  • 0
    @ 2008-12-03 17:44:17

    硬来,直接输出。

    For i:=1 to length(s) do Begin

    write(' ');

    For j:=1 to k do

    case s[i] of

    '1','4':write(' ');

    '2','3','5','6','7','8','9','0':write('-');

    End;

    write(' ');

    if ilength(s) Then write(' ');

    End;

    writeln;

    For i:=1 to k do Begin

    For j:=1 to length(s) do Begin

    case s[j] of

    '1','2','3','7':write(' ');

    '4','5','6','8','9','0':write('|');

    End;

    For n:=1 to k do write(' ');

    case s[j] of

    '1','2','3','4','7','8','9','0':write('|');

    '5','6':write(' ');

    End;

    if jlength(s) Then write(' ');

    End;

    writeln;

    End;

    For i:=1 to length(s) do Begin

    write(' ');

    For n:=1 to k do

    case s[i] of

    '1','7','0':write(' ');

    '2','3','4','5','6','8','9':write('-');

    End;

    write(' ');

    if ilength(s) Then write(' ');

    End;

    writeln;

    For i:=1 to k do Begin

    For j:=1 to length(s) do Begin

    case s[j] of

    '1','3','4','5','7','9':write(' ');

    '2','6','8','0':write('|');

    End;

    For n:=1 to k do write(' ');

    case s[j] of

    '1','3','4','5','6','7','8','9','0':write('|');

    '2':write(' ');

    End;

    if jlength(s) Then write(' ');

    End;

    writeln;

    End;

    For i:=1 to length(s) do Begin

    write(' ');

    For n:=1 to k do

    case s[i] of

    '2','3','5','6','8','9','0':write('-');

    '1','4','7':write(' ');

    End;

    write(' ');

    if ilength(s) Then write(' ');

    End;

    writeln;

  • 0
    @ 2008-11-21 16:45:21

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

    注意格式啊...我在这里重重的摔了

  • 0
    @ 2008-11-13 20:13:21

    编译通过...

    ├ 测试数据 01:答案正确... 0ms

    ├ 测试数据 02:答案正确... 0ms

    ├ 测试数据 03:答案正确... 0ms

    ├ 测试数据 04:答案正确... 0ms

    ├ 测试数据 05:答案正确... 0ms

    ├ 测试数据 06:答案正确... 0ms

    ├ 测试数据 07:答案正确... 0ms

    ├ 测试数据 08:答案正确... 0ms

    ├ 测试数据 09:答案正确... 0ms

    ├ 测试数据 10:答案正确... 0ms

    ---|---|---|---|---|---|---|---|-

    Accepted 有效得分:100 有效耗时:0ms

    ----------------华丽的分隔线----------------

    此题的输出格式害我WA了两次

    string 就是好用

    贴下代码,供大牛BS

    #include

    using namespace std;

    string a[5][10]=

    {{" - "," "," - "," - "," "," - "," - "," - "," - "," - "},

    {"| |"," |"," |"," |","| |","| ","| "," |","| |","| |"},

    {" "," "," - "," - "," - "," - "," - "," "," - "," - "},

    {"| |"," |","| "," |"," |"," |","| |"," |","| |"," |"},

    {" - "," "," - "," - "," "," - "," - "," "," - "," - "}};

    int K;

    int main()

    {int x,i,j,k,l,len,t;

    cin>>K;

    string s;

    getline(cin,s);

    getline(cin,s);

    len=s.size();

    for(i=0;i

  • 0
    @ 2008-11-13 19:48:33

    其实很简单。。。自己打两行。。。剩下的三行直接COPY

  • 0
    @ 2008-11-12 20:58:30

    注意末尾没有空格

  • 0
    @ 2008-11-12 19:41:13

    Accepted 有效得分:100 有效耗时:0ms

    ---|---|---|--

    朴素模拟..

信息

ID
1064
难度
4
分类
字符串 点击显示
标签
递交数
1886
已通过
819
通过率
43%
被复制
10
上传者