Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
108013 张之隽 行程长度压缩 C++ Compile Error 0 MS 0 KB 390 2025-01-19 12:49:30

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; string s; int main(){ cin >> s; int rre = 0; char j = s[0]; for(int i = 0;i < s.size();i++){ if(s[i] >='a' && s[i] <= 'z'){ s[i] = a[i]-32; } if(j != s[i] && i != 0){ cout << "(" << j << "," <<rre<< ")"; rre = 0; } j = s[i]; rre++; break; } cout << "(" << j << "," << sum << ")"; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0;i < s.size();i++){
                  ^
Main.cc:10:11: error: 'a' was not declared in this scope
    s[i] = a[i]-32;
           ^
Main.cc:20:29: error: 'sum' was not declared in this scope
  cout << "(" << j << "," << sum << ")";
                             ^