记录详情

Accepted

foo.cc: In function 'int main()':
foo.cc:69:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   69 |         for (int i=0;i<a.size();i++) {
      |                      ~^~~~~~~~~
foo.cc:72:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   72 |         for (int i=0;i<b.size();i++) {
      |                      ~^~~~~~~~~
foo.cc:76:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Count>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   76 |         for (int i=0;i<cnt.size();i++) {
      |                      ~^~~~~~~~~~~
foo.cc:84:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Count>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   84 |         for (int i=0;i<cnt.size()-1;i++) {
      |                      ~^~~~~~~~~~~~~
foo.cc:111:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  111 |         for (int i=0;i<choice[0].size();i++) {
      |                      ~^~~~~~~~~~~~~~~~~
foo.cc:113:42: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  113 |                 for (int j=choice[0][i];j<a.size();j++) t[j]=1;
      |                                         ~^~~~~~~~~
foo.cc:120:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  120 |                         for (int j=0;j<a.size();j++) sum+=(t[j]+1)%2*a[j];////
      |                                      ~^~~~~~~~~
foo.cc:124:49: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  124 |                                 for (int ii=0;ii<a.size();ii++) jj+=(char)(t[ii]+'0');
      |                                               ~~^~~~~~~~~
foo.cc:130:49: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  130 |                                 for (int ii=0;ii<a.size();ii++) jj+=(char)(1^t[ii]+'0');
      |                                               ~~^~~~~~~~~
foo.cc:130:83: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
  130 |                                 for (int ii=0;ii<a.size();ii++) jj+=(char)(1^t[ii]+'0');
      |                                                                              ~~~~~^~~~
foo.cc:139:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  139 |         for (int i=0;i<a.size();i++) {
      |                      ~^~~~~~~~~
foo.cc:162:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  162 |                         for (int i=0;i<b.size();i++) {
      |                                      ~^~~~~~~~~
foo.cc:110:13: warning: unused variable 'k' [-Wunused-variable]
  110 |         int k=0;
      |             ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 5ms 408.0 KiB
#2 Accepted 5ms 396.0 KiB
#3 Accepted 5ms 412.0 KiB
#4 Accepted 3ms 412.0 KiB
#5 Accepted 43ms 1.273 MiB
#6 Accepted 49ms 1.273 MiB
#7 Accepted 4ms 412.0 KiB
#8 Accepted 4ms 412.0 KiB
#9 Accepted 49ms 1.273 MiB
#10 Accepted 50ms 1.273 MiB

信息

递交者
类型
递交
题目
P1545 Problem 6C. 分糖果
比赛
2023秋 悬赏令第六周
语言
C++
递交时间
2023-11-14 21:24:27
评测时间
2023-11-14 21:24:27
评测机
分数
100
总耗时
220ms
峰值内存
1.273 MiB