Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:10:23: error: expected ';' before 'if'
   10 |                 s+='.'
      |                       ^
      |                       ;
   11 |                 if(s[0]=='0' && s[1]>='0' && s[1]<='9') o=0;
      |                 ~~     
/in/foo.cc:12:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   12 |                 for(int i=0;i<s.size()-1;i++){
      |                             ~^~~~~~~~~~~

信息

递交者
类型
递交
题目
P2968 规范的 IP 地址
语言
C++
递交时间
2025-10-06 10:06:17
评测时间
2025-10-06 10:06:17
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes