/ Vijos /

记录详情

Compile Error

foo.cc:43:2: error: stray '#' in program
   43 | }#include<bits/stdc++.h>
      |  ^
foo.cc: In function 'int print(int)':
foo.cc:12:14: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
   12 |     printf("%d",now[nw]);
      |             ~^  ~~~~~~~
      |              |        |
      |              int      long long int
      |             %lld
foo.cc: In function 'int main()':
foo.cc:17:13: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
   17 |     scanf("%d%d",&n,&m);
      |            ~^    ~~
      |             |    |
      |             int* long long int*
      |            %lld
foo.cc:17:15: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long long int*' [-Wformat=]
   17 |     scanf("%d%d",&n,&m);
      |              ~^     ~~
      |               |     |
      |               int*  long long int*
      |              %lld
foo.cc:19:17: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
   19 |         scanf("%d",&x[i]);
      |                ~^  ~~~~~
      |                 |  |
      |                 |  long long int*
      |                 int*
      |                %lld
foo.cc: At global scope:
foo.cc:43:3: error: 'include' does not name a type
   43 | }#include<bits/stdc++.h>
      |   ^~~~~~~
foo.cc:47:11: error: redefinition of 'long long int n'
   47 | long long n,m,x[20],now[maxn],nw,nx,bf[maxn];
      |           ^
foo.cc:5:11: note: 'long long int n' previously declared here
    5 | long long n,m,x[20],now[maxn],nw,nx,bf[maxn];
      |           ^
foo.cc:47:13: error: redefinition of 'long long int m'
   47 | long long n,m,x[20],now[maxn],nw,nx,bf[maxn];
      |             ^
foo.cc:5:13: note: 'long long int m' previously declared here
    5 | long long n,m,x[20],now[maxn],nw,nx,bf[maxn];
      |             ^
foo.cc:47:15: error: redefinition of 'long long int x [20]'
   47 | long long n,m,x[20],now[maxn],nw,nx,bf[maxn];
      |               ^
foo.cc:5:15: note: 'long long int x [20]' previously declared here
    5 | long long n,m,x[20],now[maxn],nw,nx,bf[maxn];
      |               ^
foo.cc:47:21: error: redefinition of 'long long int now [5005]'
   47 | long long n,m,x[20],now[maxn],nw,nx,bf[maxn];
      |                     ^~~
foo.cc:5:21: note: 'long long int now [5005]' previously declared here
    5 | long long n,m,x[20],now[maxn],nw,nx,bf[maxn];
      |                     ^~~
foo.cc:47:31: error: redefinition of 'long long int nw'
   47 | long long n,m,x[20],now[maxn],nw,nx,bf[maxn];
      |                               ^~
foo.cc:5:31: note: 'long long int nw' previously declared here
    5 | long long n,m,x[20],now[maxn],nw,nx,bf[maxn];
      |                               ^~
foo.cc:47:34: error: redefinition of 'long long int nx'
   47 | long long n,m,x[20],now[maxn],nw,nx,bf[maxn];
      |                                  ^~
foo.cc:5:34: note: 'long long int nx' previously declared here
    5 | long long n,m,x[20],now[maxn],nw,nx,bf[maxn];
      |                                  ^~
foo.cc:47:37: error: redefinition of 'long long int bf [5005]'
   47 | long long n,m,x[20],now[maxn],nw,nx,bf[maxn];
      |                                     ^~
foo.cc:5:37: note: 'long long int bf [5005]' previously declared here
    5 | long long n,m,x[20],now[maxn],nw,nx,bf[maxn];
      |                                     ^~
foo.cc:48:6: error: redefinition of 'bool vis [5005]'
   48 | bool vis[maxn],flag;
      |      ^~~
foo.cc:6:6: note: 'bool vis [5005]' previously declared here
    6 | bool vis[maxn],flag;
      |      ^~~
foo.cc:48:16: error: redefinition of 'bool flag'
   48 | bool vis[maxn],flag;
      |                ^~~~
foo.cc:6:16: note: 'bool flag' previously declared here
    6 | bool vis[maxn],flag;
      |                ^~~~
foo.cc:49:11: error: redefinition of 'std::queue<int> q'
   49 | queue<int>q;
      |           ^
foo.cc:7:11: note: 'std::queue<int> q' previously declared here
    7 | queue<int>q;
      |           ^
foo.cc:51:5: error: redefinition of 'int print(int)'
   51 | int print(int nw){
      |     ^~~~~
foo.cc:9:5: note: 'int print(int)' previously defined here
    9 | int print(int nw){
      |     ^~~~~
foo.cc: In function 'int print(int)':
foo.cc:54:14: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
   54 |     printf("%d",now[nw]);
      |             ~^  ~~~~~~~
      |              |        |
      |              int      long long int
      |             %lld
foo.cc: At global scope:
foo.cc:58:5: error: redefinition of 'int main()'
   58 | int main(){
      |     ^~~~
foo.cc:16:5: note: 'int main()' previously defined here
   16 | int main(){
      |     ^~~~
foo.cc: In function 'int main()':
foo.cc:59:13: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
   59 |     scanf("%d%d",&n,&m);
      |            ~^    ~~
      |             |    |
      |             int* long long int*
      |            %lld
foo.cc:59:15: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long long int*' [-Wformat=]
   59 |     scanf("%d%d",&n,&m);
      |              ~^     ~~
      |               |     |
      |               int*  long long int*
      |              %lld
foo.cc:61:17: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
   61 |         scanf("%d",&x[i]);
      |                ~^  ~~~~~
      |                 |  |
      |                 |  long long int*
      |                 int*
      |                %lld
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1065 最小数字倍数
语言
C++
递交时间
2022-08-13 20:22:53
评测时间
2022-08-13 20:22:53
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes