ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#213989 | #2739. 阿空的核聚变 | Running_a_way | Compile Error | / | / | C++ | 649b | 2024-11-14 21:39:58 | 2024-11-14 23:08:20 |
answer
#include <iostream>
#include <cstdio>
#include <map>
using namespace std;
const int N = 5e5 + 10;
string s;
int n, m;
map<int, string> mp;
int main() {
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
cin >> s;
n = s.size(); s = ' ' + s;
string p;
cin >> m;
while(m--) {
int l, r; cin >> l >> r;
p = "";
for (int i = l; i <= r; i++) {
char ch = s[i];
while(p.size() && p.back() == ch) p.pop_back(), ch++;
if(ch <= 'z') p.push_back(ch);
}
if(p.size()) cout << "No\n";
else cout << "Yes\n";
}
return 0;
}
Details
answer.code: In function 'int main()': answer.code:22:33: error: 'std::string' has no member named 'back' while(p.size() && p.back() == ch) p.pop_back(), ch++;\x0d ^ answer.code:22:49: error: 'std::string' has no member named 'pop_back' while(p.size() && p.back() == ch) p.pop_back(), ch++;\x0d ^