F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_17214803_18237.cpp: In function 'void init()':
0_0_17214803_18237.cpp:20:31: error: invalid conversion from 'int' to 'void*' [-fpermissive]
     memset(deg, 0, sizeof(deg));
                               ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cstring:42:0,
                 from 0_0_17214803_18237.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/string.h:43:18: note: initializing argument 1 of 'void* memset(void*, int, size_t)'
   void * __cdecl memset(void *_Dst,int _Val,size_t _Size);
                  ^
0_0_17214803_18237.cpp:21:34: error: invalid conversion from 'int' to 'void*' [-fpermissive]
     memset(head, -1, sizeof(head));
                                  ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cstring:42:0,
                 from 0_0_17214803_18237.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/string.h:43:18: note: initializing argument 1 of 'void* memset(void*, int, size_t)'
   void * __cdecl memset(void *_Dst,int _Val,size_t _Size);
                  ^
0_0_17214803_18237.cpp: In function 'void addEdge(int, int)':
0_0_17214803_18237.cpp:27:28: error: invalid types 'int[int]' for array subscript
     edge[tot].next = head[u];
                            ^
0_0_17214803_18237.cpp:28:11: error: invalid types 'int[int]' for array subscript
     head[u] = tot++;
           ^
0_0_17214803_18237.cpp: In function 'bool dfs(int)':
0_0_17214803_18237.cpp:32:24: error: invalid types 'int[int]' for array subscript
     for(int& i = head[u]; ~i; i = edge[i].next) {
                        ^
0_0_17214803_18237.cpp:37:17: error: invalid types 'int[int]' for array subscript
         if(deg[v]) { //如果当前点是奇数度的话
                 ^
0_0_17214803_18237.cpp:38:18: error: invalid types 'int[int]' for array subscript
             deg[v] = 0;
                  ^
0_0_17214803_18237.cpp: In function 'void solve()':
0_0_17214803_18237.cpp:49:17: error: invalid types 'int[int]' for array subscript
         if(deg[i]) {
                 ^
0_0_17214803_18237.cpp:50:18: error: invalid types 'int[int]' for array subscript
             deg[i] = 0;
                  ^
0_0_17214803_18237.cpp:56:22: error: invalid types 'int[int]' for array subscript
         while(~head[i]) {
                      ^
0_0_17214803_18237.cpp: In function 'int MAIN()':
0_0_17214803_18237.cpp:73:18: error: invalid types 'int[int]' for array subscript
             deg[u] ^= 1, deg[v] ^= 1;
                  ^
0_0_17214803_18237.cpp:73:31: error: invalid types 'int[int]' for array subscript
             deg[u] ^= 1, deg[v] ^= 1;
                               ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-26 07:47:16, Gzip enabled