/ SB域 /

记录详情

Time Exceeded

foo.cc: In function 'void work1()':
foo.cc:12:16: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
   12 |     printf("F %d %d\n",x,y);
      |               ~^       ~
      |                |       |
      |                int     long long int
      |               %lld
foo.cc:12:19: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=]
   12 |     printf("F %d %d\n",x,y);
      |                  ~^      ~
      |                   |      |
      |                   int    long long int
      |                  %lld
foo.cc: In function 'void work2()':
foo.cc:18:16: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
   18 |     printf("Q %d %d %d %d\n",x1,y1,x2,y2);
      |               ~^             ~~
      |                |             |
      |                int           long long int
      |               %lld
foo.cc:18:19: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=]
   18 |     printf("Q %d %d %d %d\n",x1,y1,x2,y2);
      |                  ~^             ~~
      |                   |             |
      |                   int           long long int
      |                  %lld
foo.cc:18:22: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long long int' [-Wformat=]
   18 |     printf("Q %d %d %d %d\n",x1,y1,x2,y2);
      |                     ~^             ~~
      |                      |             |
      |                      int           long long int
      |                     %lld
foo.cc:18:25: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long long int' [-Wformat=]
   18 |     printf("Q %d %d %d %d\n",x1,y1,x2,y2);
      |                        ~^             ~~
      |                         |             |
      |                         int           long long int
      |                        %lld
foo.cc: In function 'void work3()':
foo.cc:25:16: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
   25 |     printf("A %d %d %d %d %d\n",x1,y1,x2,y2,d);
      |               ~^                ~~
      |                |                |
      |                int              long long int
      |               %lld
foo.cc:25:19: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=]
   25 |     printf("A %d %d %d %d %d\n",x1,y1,x2,y2,d);
      |                  ~^                ~~
      |                   |                |
      |                   int              long long int
      |                  %lld
foo.cc:25:22: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long long int' [-Wformat=]
   25 |     printf("A %d %d %d %d %d\n",x1,y1,x2,y2,d);
      |                     ~^                ~~
      |                      |                |
      |                      int              long long int
      |                     %lld
foo.cc:25:25: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long long int' [-Wformat=]
   25 |     printf("A %d %d %d %d %d\n",x1,y1,x2,y2,d);
      |                        ~^                ~~
      |                         |                |
      |                         int              long long int
      |                        %lld
foo.cc:25:28: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long long int' [-Wformat=]
   25 |     printf("A %d %d %d %d %d\n",x1,y1,x2,y2,d);
      |                           ~^                ~
      |                            |                |
      |                            int              long long int
      |                           %lld
foo.cc: In function 'void work4()':
foo.cc:32:16: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
   32 |     printf("D %d %d %d %d %d\n",x1,y1,x2,y2,d);
      |               ~^                ~~
      |                |                |
      |                int              long long int
      |               %lld
foo.cc:32:19: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=]
   32 |     printf("D %d %d %d %d %d\n",x1,y1,x2,y2,d);
      |                  ~^                ~~
      |                   |                |
      |                   int              long long int
      |                  %lld
foo.cc:32:22: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long long int' [-Wformat=]
   32 |     printf("D %d %d %d %d %d\n",x1,y1,x2,y2,d);
      |                     ~^                ~~
      |                      |                |
      |                      int              long long int
      |                     %lld
foo.cc:32:25: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long long int' [-Wformat=]
   32 |     printf("D %d %d %d %d %d\n",x1,y1,x2,y2,d);
      |                        ~^                ~~
      |                         |                |
      |                         int              long long int
      |                        %lld
foo.cc:32:28: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long long int' [-Wformat=]
   32 |     printf("D %d %d %d %d %d\n",x1,y1,x2,y2,d);
      |                           ~^                ~
      |                            |                |
      |                            int              long long int
      |                           %lld
foo.cc: In function 'int main()':
foo.cc:37:29: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
   37 |     puts("宽长:"); scanf("%d%d",&n,&m);
      |                            ~^    ~~
      |                             |    |
      |                             int* long long int*
      |                            %lld
foo.cc:37:31: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long long int*' [-Wformat=]
   37 |     puts("宽长:"); scanf("%d%d",&n,&m);
      |                              ~^     ~~
      |                               |     |
      |                               int*  long long int*
      |                              %lld
foo.cc:39:37: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
   39 |     puts("输入操作个数:"); scanf("%d",&T);
      |                                    ~^  ~~
      |                                     |  |
      |                                     |  long long int*
      |                                     int*
      |                                    %lld
foo.cc:40:38: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
   40 |     puts("输入F操作的几率:");scanf("%d",&F);
      |                                     ~^  ~~
      |                                      |  |
      |                                      |  long long int*
      |                                      int*
      |                                     %lld
foo.cc:41:38: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
   41 |     puts("输入Q操作的几率:");scanf("%d",&Q);
      |                                     ~^  ~~
      |                                      |  |
      |                                      |  long long int*
      |                                      int*
      |                                     %lld
foo.cc:42:38: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
   42 |     puts("输入A操作的几率:");scanf("%d",&A);
      |                                     ~^  ~~
      |                                      |  |
      |                                      |  long long int*
      |                                      int*
      |                                     %lld
foo.cc:43:38: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
   43 |     puts("输入D操作的几率:");scanf("%d",&D);
      |                                     ~^  ~~
      |                                      |  |
      |                                      |  long long int*
      |                                      int*
      |                                     %lld
foo.cc:44:39: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
   44 |     puts("输入干扰操作个数:");scanf("%d",&R);
      |                                      ~^  ~~
      |                                       |  |
      |                                       |  long long int*
      |                                       int*
      |                                      %lld
foo.cc:46:14: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
   46 |     printf("%d %d\n",n,m);
      |             ~^       ~
      |              |       |
      |              int     long long int
      |             %lld
foo.cc:46:17: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=]
   46 |     printf("%d %d\n",n,m);
      |                ~^      ~
      |                 |      |
      |                 int    long long int
      |                %lld
foo.cc:49:17: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
   49 |        printf("%d ",random(2*TT+1)-TT);
      |                ~^   ~~~~~~~~~~~~~~~~~
      |                 |                 |
      |                 int               long long int
      |                %lld
foo.cc:48:7: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   48 |       for (int j=1;j<=m;j++)
      |       ^~~
foo.cc:50:8: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   50 |        puts("");
      |        ^~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Time Exceeded ≥2097ms ≥47.297 MiB
#2 Time Exceeded ≥2103ms ≥58.367 MiB
#3 Time Exceeded ≥2099ms ≥54.492 MiB
#4 Time Exceeded ≥2100ms ≥44.742 MiB
#5 Time Exceeded ≥2100ms ≥70.992 MiB
#6 Time Exceeded ≥2099ms ≥64.117 MiB
#7 Time Exceeded ≥2100ms ≥52.117 MiB
#8 Time Exceeded ≥2099ms ≥71.617 MiB
#9 Time Exceeded ≥2101ms ≥61.117 MiB
#10 Time Exceeded ≥2101ms ≥65.617 MiB
#11 Time Exceeded ≥2099ms ≥74.492 MiB
#12 Time Exceeded ≥2098ms ≥59.738 MiB
#13 Time Exceeded ≥2100ms ≥63.867 MiB
#14 Time Exceeded ≥2099ms ≥59.996 MiB
#15 Time Exceeded ≥2099ms ≥67.055 MiB
#16 Time Exceeded ≥2099ms ≥68.543 MiB
#17 Time Exceeded ≥2100ms ≥69.867 MiB
#18 Time Exceeded ≥2099ms ≥76.867 MiB
#19 Time Exceeded ≥2100ms ≥74.617 MiB
#20 Time Exceeded ≥2101ms ≥74.617 MiB
#21 Time Exceeded ≥2100ms ≥56.242 MiB
#22 Time Exceeded ≥2093ms ≥48.242 MiB
#23 Time Exceeded ≥2099ms ≥73.242 MiB
#24 Time Exceeded ≥2099ms ≥75.617 MiB
#25 Time Exceeded ≥2101ms ≥74.117 MiB

代码

# include <bits/stdc++.h>
# define int long long
using namespace std;
const int TT=10000;
int n,m;
int random(int x) { return rand()*rand()%x;}
int Fun(int low,int high)
{ return random(10000000) % (high - low + 1) + low;} 
void work1()
{
    int x=random(n)+1,y=random(m)+1;
    printf("F %d %d\n",x,y); 
}
void work2()
{
    int x1=random(n)+1,y1=random(m)+1;
    int x2=Fun(x1,n),y2=Fun(y1,m);
    printf("Q %d %d %d %d\n",x1,y1,x2,y2);
}
void work3()
{
    int x1=random(n)+1,y1=random(m)+1;
    int x2=Fun(x1,n),y2=Fun(y1,m);
    int d=random(2*TT+1)-TT;
    printf("A %d %d %d %d %d\n",x1,y1,x2,y2,d);
}
void work4()
{
    int x1=random(n)+1,y1=random(m)+1;
    int x2=Fun(x1,n),y2=Fun(y1,m);
    int d=random(2*TT+1)-TT;
    printf("D %d %d %d %d %d\n",x1,y1,x2,y2,d);
}
signed main()
{
    srand((unsigned long long)time(NULL)*19260817);
    puts("宽长:"); scanf("%d%d",&n,&m);
    int F,Q,A,D,R,T;
    puts("输入操作个数:"); scanf("%d",&T);
    puts("输入F操作的几率:");scanf("%d",&F);
    puts("输入Q操作的几率:");scanf("%d",&Q);
    puts("输入A操作的几率:");scanf("%d",&A);
    puts("输入D操作的几率:");scanf("%d",&D); 
    puts("输入干扰操作个数:");scanf("%d",&R);
    freopen("7.in","w",stdout);
    printf("%d %d\n",n,m);
    for (int i=1;i<=n;i++) {
      for (int j=1;j<=m;j++)
       printf("%d ",random(2*TT+1)-TT);
       puts("");
    }
    while (T--) {
        int opt=random(100);
        if (opt<F) work1();
        else if (opt<F+Q) work2();
        else if (opt<F+Q+A) work3();
        else work4();
    }
    puts("E");
    while (R--) {
        int opt=random(100);
        if (opt<F) work1();
        else if (opt<F+Q) work2();
        else if (opt<F+Q+A) work3();
        else work4();
    } 
    return 0;
}

信息

递交者
类型
递交
题目
二维数列 (U50446)
题目数据
下载
语言
C++
递交时间
2022-08-10 20:59:13
评测时间
2022-08-10 20:59:13
评测机
分数
0
总耗时
≥52497ms
峰值内存
≥76.867 MiB