Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:17:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |                 for(int i=0;i<at.size();i++)
      |                             ~^~~~~~~~~~
/in/foo.cc:19:28: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'int'
   19 |                         if(int(a[i])>int(a[i]))
      |                            ^~~~~~~~~
/in/foo.cc:19:38: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'int'
   19 |                         if(int(a[i])>int(a[i]))
      |                                      ^~~~~~~~~

信息

递交者
类型
递交
题目
P2854 字符排序2024.12GESP4级T2
语言
C++
递交时间
2026-07-24 14:47:00
评测时间
2026-07-24 14:47:00
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes