/ Vijos /

记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:27:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   27 |     for (int i = 1; i < s.size() - 1; ++i) {
      |                     ~~^~~~~~~~~~~~~~
foo.cc:32:23: warning: comparison of integer expressions of different signedness: 'int' and 'long long unsigned int' [-Wsign-compare]
   32 |     for (int i = 1; i < szt; ++i) {
      |                     ~~^~~~~
foo.cc:34:25: warning: format '%X' expects argument of type 'unsigned int', but argument 2 has type 'long long unsigned int' [-Wformat=]
   34 |         else printf("0x%X", t[i]);
      |                        ~^   ~~~~
      |                         |      |
      |                         |      long long unsigned int
      |                         unsigned int
      |                        %llX
foo.cc:35:20: error: expected ';' before '}' token
   35 |         cout << ','
      |                    ^
      |                    ;
   36 |     }
      |     ~               
foo.cc:38:21: warning: format '%X' expects argument of type 'unsigned int', but argument 2 has type 'long long unsigned int' [-Wformat=]
   38 |     else printf("0x%X", t[szt]);
      |                    ~^   ~~~~~~
      |                     |        |
      |                     |        long long unsigned int
      |                     unsigned int
      |                    %llX
foo.cc:39:16: error: expected ';' before '}' token
   39 |     cout << "}"
      |                ^
      |                ;
   40 | }
      | ~               
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1000 A+B Problem
语言
C++
递交时间
2022-02-06 14:02:27
评测时间
2022-02-06 14:02:27
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes