QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#723217#7860. Graph of Maximum Degree 3ucup-team4740#Compile Error//C++231.9kb2024-11-07 21:27:002024-11-07 21:27:00

Details

answer.code:6:34: error: ‘std::unordered_map<int, int> link [100005]’ redeclared as different kind of entity
    6 | unordered_map<int, int> link[Maxn];
      |                                  ^
In file included from /usr/include/c++/13/bits/atomic_wait.h:44,
                 from /usr/include/c++/13/bits/atomic_base.h:42,
                 from /usr/include/c++/13/bits/shared_ptr_atomic.h:33,
                 from /usr/include/c++/13/memory:81,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:56,
                 from answer.code:1:
/usr/include/unistd.h:789:12: note: previous declaration ‘int link(const char*, const char*)’
  789 | extern int link (const char *__from, const char *__to)
      |            ^~~~
answer.code: In function ‘void check(std::set<int>&)’:
answer.code:46:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   46 |             if(link[tmp[i]].count(tmp[j]))
      |                           ^
answer.code:46:29: error: request for member ‘count’ in ‘*(link, (link + ((sizetype)tmp.std::vector<int>::operator[](((std::vector<int>::size_type)i)))))’, which is of non-class type ‘int(const char*, const char*) noexcept’
   46 |             if(link[tmp[i]].count(tmp[j]))
      |                             ^~~~~
answer.code: In function ‘void solve()’:
answer.code:80:26: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   80 |         if(z == 1) link[x][y] = link[y][x] = 1;
      |                          ^
answer.code:80:29: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   80 |         if(z == 1) link[x][y] = link[y][x] = 1;
      |                             ^
answer.code:80:39: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   80 |         if(z == 1) link[x][y] = link[y][x] = 1;
      |                                       ^
answer.code:80:42: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   80 |         if(z == 1) link[x][y] = link[y][x] = 1;
      |                                          ^
answer.code:80:44: error: assignment of read-only location ‘*(link + (((sizetype)y) + ((sizetype)x)))’
   80 |         if(z == 1) link[x][y] = link[y][x] = 1;
      |                                 ~~~~~~~~~~~^~~