232 条题解

  • 0
    @ 2009-10-03 19:21:11

    开始没用int64,全绿色...

    忘了把n本身算上,10点挂掉...

    最后忘了补0.....竟然AC????!!!!!

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

    编译通过...

    ├ 测试数据 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-09-27 17:02:18

    万恶的int64,为了这个我叫了6遍....

    建议除循环变量以外都得用int64

  • 0
    @ 2009-09-27 15:34:30

    用字符串比直接处理数字容易写的多,

    另ms数据有问题吧??我用longint居然只有10,

    改成int64就ac了.

  • 0
    @ 2009-09-26 18:25:03

    本人超菜,问个无知的问题,各位牛不要怪!本题中数据怎么读取?没有读数字个数,也没有什么结束标记,而且vijos上好像不能用文件,不能用eof,那怎么办?各位见笑~

  • 0
    @ 2009-09-25 23:38:42

    #include

    using namespace std;

    long long s[10]={0},n,a[10001]={0},s1,s2;

    int work(int x,int i)

    {int j,k=1,m;

    s1=0;s2=0;

    for(;x!=0;x/=10,k*=10)s[x%10]++;

    for(j=9;j>=0;j--){for(m=1;m

  • 0
    @ 2009-09-25 13:22:26

    记录号 Flag 得分 记录信息 环境 评测机 程序提交时间

    R1558972 Accepted 100 From |-

      P1024 FPC Vijos Sunny 2009-9-25 13:19:11

    From xiaomengxian

    卡布列克圆舞曲

    编译通过...

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

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

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

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

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

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

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

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

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

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

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

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

    啊呀呀。。sunny机。 一次秒杀。

  • 0
    @ 2009-09-20 17:54:43

    var i,j,l,top:longint;t:int64;st,max,min:string;ans:boolean;

    d:array[1..100000]of string;

    procedure done(s:string);

    var x,y:int64;q:char;

    begin

    for i:=l downto 1 do

    for j:=2 to i do

    begin

    val(s[j],x);val(s[j-1],y);

    if y>x then begin q:=s[j];s[j]:=s[j-1];s[j-1]:=q;end;

    end; max:='';

    min:=s; for i:=1 to l do max:=s[i]+max;

    end;

    function dele(max,min:string):string;

    var i,j:int64;t:longint;

    begin

    val(max,i);val(min,j);

    i:=i-j;

    str(i,dele);

    i:=length(dele);

    for t:=1 to l-i do dele:=dele+'0';

    end;

    function find(s:string):longint;

    begin

    for i:=1 to top-1 do if d[i]=s then begin

    ans:=true;find:=i;exit;end;

    end;

    begin

    while not eof do begin

    readln(st);

    l:=length(st);

    top:=1;

    d[top]:=st;

    ans:=false;

    while not ans do

    begin

    inc(top);

    done(d[top-1]);

    d[top]:=dele(max,min);

    t:=find(d[top]);

    end;

    for i:=t to top-1 do write(d[i],' ');writeln ; end;

    end.

  • 0
    @ 2009-09-20 09:26:52

    无语。。。

  • 0
    @ 2009-09-16 20:26:39

    要用long long

    要不然WA9个

  • 0
    @ 2009-09-12 22:35:23

    没什么可说的,也没必要用高精度..

    哈希王道!~

    注意用int64 或者 long long 就可以了!~

    还有就是用哈希的时候记得清0,毕竟多组数据

  • 0
    @ 2009-09-12 13:54:19

    编译通过...

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

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

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

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

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

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

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

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

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

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

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

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

    const filename='p1024';

    var

    s:string;

    a:array[1..100,1..1000]of longint;{---|->一开始看了下面的题解,以为真的小于maxlongint,开了个20*100的数组,才对了1个点,WA了一次}

    b,c:array[1..100]of longint;

    i,j,k,l,x:longint;

    procedure pai;

    var i,k,temp:longint;

    begin

    fillchar(b,sizeof(b),0);

    fillchar(c,sizeof(c),0);

    for i:=1 to l do

    begin

    b[i]:=a[j,i];

    c[i]:=a[j,i];

    end;

    for i:=1 to l-1 do

    for k:=i+1 to l do

    begin

    if b[i]

  • 0
    @ 2009-09-05 13:35:08

    main code:

    全程使用字符串。。偷懒。。

    while not eof do

    begin

    readln(st);

    l := length(st);

    top := 1;

    d[top] := st;

    ans := false;

    while not ans do

    begin

    inc(top);

    done(d[top-1],max,min);

    d[top] := dec(max,min);

    findans;

    end;

    end;

  • 0
    @ 2009-09-04 12:41:55

    90分!!!!!!!!

  • 0
    @ 2009-09-02 18:09:20

    产生最大数时要用long long。。。

    被阴到了

  • 0
    @ 2009-08-31 10:08:32

    编译通过...

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

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

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

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

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

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

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

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

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

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

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

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

    100题AC纪念~~

    Accepted

    题号   P1024

    类型(?)   模拟

    通过   2484人

    提交   11331次

    通过率   22%

    难度   1

  • 0
    @ 2009-08-28 16:27:20

    第一次用longint,全W

    第二次数组用int64,A一个点。。。

    第三次把全部都用int64,100~~~

    100题AC纪念~~

  • 0
    @ 2009-08-23 15:42:51

    = =|||

    要int64!!!!

    不然wa9个

  • 0
    @ 2009-08-22 13:59:01

    #include

    char str[10];

    int Length;

    void sort(int len){

    int i,j;

    for(i=0;i=0;i--){

    myNumber = myNumber*10 + str[i];

    }

    return myNumber;

    }

    long long int SMALL(){

    int i;

    long long int myNumber=0;

    for(i=0;i

  • 0
    @ 2009-08-21 20:59:56



    gcc

    g++都没有int64级的整形

  • 0
    @ 2009-08-20 11:36:56

    出错的请注意:一定要用int64!否则会有9个数据wa了!

    我的题解(代码及说明):

    http://www.oibh.org/uhome/space.php?uid=85346&do=blog&id=771

信息

ID
1024
难度
6
分类
模拟 点击显示
标签
(无)
递交数
6780
已通过
1566
通过率
23%
被复制
13
上传者