QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#805667 | #8975. Eva and Euro coins | SGColin | Compile Error | / | / | C++20 | 1003b | 2024-12-08 17:52:15 | 2024-12-08 17:52:15 |
Judging History
This is the latest submission verdict.
- [2024-12-08 17:52:15]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-12-08 17:52:15]
- Submitted
answer
#include<bits/stdc++.h>
using namespace std;
inline int rd() {
int x = 0;
bool f = 0;
char c = getchar();
for (; !isdigit(c); c = getchar()) f |= (c == '-');
for (; isdigit(c); c = getchar()) x = x * 10 + (c ^ 48);
return f ? -x : x;
}
#define N 1000007
#define fr first
#define sc second
#define pci pair<char, int>
int na, nb;
pci a[N], b[N];
int main() {
int n = rd(), k = rd();
if (k == 1) {puts("Yes"); return 0;}
for (int i = 1; i <= n; ++i) {
char c = getchar();
while (!isdigit(c)) c = getchar();
if (na && a[na].fr == c) {
++a[na].sc; if (a[na].sc == k) --na;
} else a[++na] = mp(c, 1);
}
for (int i = 1; i <= n; ++i) {
char c = getchar();
while (!isdigit(c)) c = getchar();
if (nb && b[nb].fr == c) {
++b[nb].sc; if (b[nb].sc == k) --nb;
} else b[++nb] = mp(c, 1);
}
if (na != nb) {puts("No"); return 0;}
for (int i = 1; i <= na; ++i)
if (a[i] != b[i]) {puts("No"); return 0;}
puts("Yes");
return 0;
}
详细
answer.code: In function ‘int main()’: answer.code:31:34: error: ‘mp’ was not declared in this scope 31 | } else a[++na] = mp(c, 1); | ^~ answer.code:38:34: error: ‘mp’ was not declared in this scope 38 | } else b[++nb] = mp(c, 1); | ^~