/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'int getint()':
foo.cpp:14:15: warning: comparison with string literal results in unspecified behaviour [-Waddress]
      while(ch<"0"||ch>"9") {if (ch=="-") sign=-1; ch=getchar();}
               ^
foo.cpp:14:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
foo.cpp:14:23: warning: comparison with string literal results in unspecified behaviour [-Waddress]
      while(ch<"0"||ch>"9") {if (ch=="-") sign=-1; ch=getchar();}
                       ^
foo.cpp:14:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
foo.cpp:14:37: warning: comparison with string literal results in unspecified behaviour [-Waddress]
      while(ch<"0"||ch>"9") {if (ch=="-") sign=-1; ch=getchar();}
                                     ^
foo.cpp:14:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
foo.cpp:15:16: warning: comparison with string literal results in unspecified behaviour [-Waddress]
      while(ch>="0"&&ch<="9") {v=v*10+ch-"0"; ch=getchar();}
                ^
foo.cpp:15:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
foo.cpp:15:25: warning: comparison with string literal results in unspecified behaviour [-Waddress]
      while(ch>="0"&&ch<="9") {v=v*10+ch-"0"; ch=getchar();}
                         ^
foo.cpp:15:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
foo.cpp:15:41: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator-'
      while(ch>="0"&&ch<="9") {v=v*10+ch-"0"; ch=getchar();}
                                         ^
foo.cpp: In function 'void update(int&, int, int, int)':
foo.cpp:38:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  #define mid (l+r>>1)
                ^
foo.cpp:42:14: note: in expansion of macro 'mid'
      if(pos<=mid) update(t[o].l,l,mid,pos);
              ^
foo.cpp:38:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  #define mid (l+r>>1)
                ^
foo.cpp:42:35: note: in expansion of macro 'mid'
      if(pos<=mid) update(t[o].l,l,mid,pos);
                                   ^
foo.cpp:38:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  #define mid (l+r>>1)
                ^
foo.cpp:43:25: note: in expansion of macro 'mid'
      else update(t[o].r,mid+1,r,pos);
                         ^
foo.cpp: In function 'void query(int, int, int, int)':
foo.cpp:38:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  #define mid (l+r>>1)
                ^
foo.cpp:50:18: note: in expansion of macro 'mid'
          if (ql<=mid) query(t[i].l,t[j].l,l,mid);
                  ^
foo.cpp:38:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  #define mid (l+r>>1)
                ^
foo.cpp:50:45: note: in expansion of macro 'mid'
          if (ql<=mid) query(t[i].l,t[j].l,l,mid);
                                             ^
foo.cpp:38:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  #define mid (l+r>>1)
                ^
foo.cpp:51:18: note: in expansion of macro 'mid'
          if (qr> mid) query(t[i].r,t[j].r,mid+1,r);
                  ^
foo.cpp:38:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  #define mid (l+r>>1)
                ^
foo.cpp:51:43: note: in expansion of macro 'mid'
          if (qr> mid) query(t[i].r,t[j].r,mid+1,r);
                                           ^

信息

递交者
类型
递交
题目
P1923 漫长的等待
语言
C++
递交时间
2015-08-18 21:39:29
评测时间
2015-08-18 21:39:29
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes