QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#129918#6428. K Co-prime PermutationZhangYiDeCompile Error//C++17874b2023-07-23 08:22:352023-07-23 08:22:38

Details

answer.code: In function ‘int read()’:
answer.code:5:22: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
    5 |         register int x=0,f=0;register char ch=getchar();
      |                      ^
answer.code:5:26: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
    5 |         register int x=0,f=0;register char ch=getchar();
      |                          ^
answer.code:5:44: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
    5 |         register int x=0,f=0;register char ch=getchar();
      |                                            ^~
answer.code: At global scope:
answer.code:2:14: error: ‘maxn’ was not declared in this scope
    2 | #define maxn maxn 1000005
      |              ^~~~
answer.code:10:7: note: in expansion of macro ‘maxn’
   10 | int a[maxn];
      |       ^~~~
answer.code:2:19: error: expected ‘]’ before numeric constant
    2 | #define maxn maxn 1000005
      |                   ^~~~~~~
answer.code:10:7: note: in expansion of macro ‘maxn’
   10 | int a[maxn];
      |       ^~~~
answer.code: In function ‘int main()’:
answer.code:19:27: error: ‘a’ was not declared in this scope
   19 |     for(int i=1;i<=n;i++) a[i]=i;
      |                           ^
answer.code:25:19: error: ‘a’ was not declared in this scope
   25 |             int k=a[i];
      |                   ^
answer.code:32:15: error: ‘a’ was not declared in this scope
   32 |         int x=a[1];
      |               ^
answer.code:42:39: error: ‘a’ was not declared in this scope
   42 |     for(int i=1;i<n;i++) printf("%d ",a[i]);
      |                                       ^
answer.code:43:17: error: ‘a’ was not declared in this scope
   43 |     printf("%d",a[n]);
      |                 ^