[color=red]Why?[/color]

为什么超时啊?

大牛们帮帮忙。。。

#include

int x[15];

long int ml=0;

int y;

int try(int z,int m)

{

int a,b;

int c=1;

for(a=1;a

5 条评论

  • @ 2016-12-10 09:47:20

    #include<iostream>
    using namespace std;
    int main()
    {
    string a,g;
    int b,c,f,n,money=0,result=0,sum=0;
    char d,e;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
    cin>>a>>b>>c>>d>>e>>f;
    money=0;
    if(b>80&&f>=1)
    money+=8000;
    if(b>85&&c>80)
    money+=4000;
    if(b>90)
    money+=2000;
    if(b>85&&e=='Y')
    money+=1000;
    if(c>80&&d=='Y')
    money+=850;
    sum+=money;
    if(result<money)
    {
    result=money;
    g=a;
    }
    }
    cout<<g<<endl<<result<<endl<<sum<<endl;
    return 0;
    }

  • @ 2016-08-08 13:30:59

    var
    i,n:longint;
    c:extended;
    begin
    readln(n);
    c:=1;
    for i:=2*n downto n+1 do c:=c*i;
    for i:=1 to n do c:=c/i;
    writeln(trunc(c) div (n+1))
    end.

  • @ 2015-06-22 12:00:55

    var
    n:integer;
    begin
    readln(n);
    case n of
    1:writeln('1');
    2:writeln('2');
    3:writeln('5');
    4:writeln('14');
    5:writeln('42');
    6:writeln('132');
    7:writeln('429');
    8:writeln('1430');
    9:writeln('4862');
    10:writeln('16796');
    11:writeln('58786');
    12:writeln('208012');
    13:writeln('742900');
    14:writeln('2674440');
    15:writeln('9694845');
    end;
    end.
    此题不打表,何时打???

  • @ 2013-07-20 22:00:12

    同是NOIP2003普及组的题,且是同一题,怎么这个网站的题目出得和其他网站不同呢
    http://www.rqnoj.cn/Problem_53.html和https://vijos.org/p/1122明显就有不同

  • @ 2009-08-03 19:08:34

    此题可以用

    卡特兰数列做

  • 1

信息

ID
1122
难度
2
分类
组合数学 | Catalan数列 点击显示
标签
递交数
4093
已通过
2516
通过率
61%
被复制
22
上传者