| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 133709 | 郝王骏程 | 删除单词后缀 | C++ | Compile Error | 0 MS | 0 KB | 310 | 2025-10-20 18:26:53 |
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int len=s.length(); for(int i=0;i<len;i++){ if(s[i]=='A'){ s[i]='T'; }else if(s[i]=="t"){ s[i]='A'; }else if(s[i]=='G'){ s[i]='C'; }else if(s[i]=='C'){ s[i]='G'; } } cout<<s; return 0; }
Main.cc: In function 'int main()':
Main.cc:10:18: warning: comparison with string literal results in unspecified behaviour [-Waddress]
}else if(s[i]=="t"){
^
Main.cc:10:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]