QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#637547#7724. Irreducible Fractionsucup-team1882#Compile Error//C++14645b2024-10-13 13:17:422024-10-13 13:17:43

Details

answer.code: In function ‘int main()’:
answer.code:14:41: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘ll*’ {aka ‘long long int*’} [-Wformat=]
   14 |     for(int i = 1; i <= n; ++i) scanf("%d", a + i);
      |                                        ~^   ~~~~~
      |                                         |     |
      |                                         int*  ll* {aka long long int*}
      |                                        %lld
answer.code:16:45: error: ‘gcd’ is not a member of ‘std’
   16 |         for(int j = 1; j <= n; ++j) if(std::gcd(a[i], a[j]) == 1) s[i][j] = 1;
      |                                             ^~~
answer.code:13:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   13 |     scanf("%d", &n);
      |     ~~~~~^~~~~~~~~~
answer.code:14:38: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   14 |     for(int i = 1; i <= n; ++i) scanf("%d", a + i);
      |                                 ~~~~~^~~~~~~~~~~~~