strupr()函数编译错误

问题遇到的现象和发生背景

32:行程长度编码
http://noi.openjudge.cn/ch0107/32/

问题相关代码,请勿粘贴截图
#include

using namespace std;

int main()
{
 string s;
 getline(cin,s);
 s=strupr(const_cast<char *>(s.c_str()));
 {
        char d=s[i];
        for(int g=1;;g++)
        {
            if(s[i+g]!=d)
            {
                cout<<'('<','<')';
                i+=g-1;
                break;
            }
        }
    }
 return 0;
}

运行结果及报错内容

试运行没问题,但在openjudge上:
error: ‘strupr’ was not declared in this scope; did you mean ‘strstr’?

有看到这个,可能是用不了的原因
兼容性说明:strupr不是标准C库函数,只能在VC中使用。在linux gcc环境下需要自行定义这个函数。