QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#567956 | #5120. Power of Two | xiaozhi# | WA | 0ms | 3556kb | C++17 | 635b | 2024-09-16 14:48:21 | 2024-09-16 14:48:22 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int mod = 998244353;
const int inf = 1e8;
void solve() {
int n, c1, c2;
cin >> n >> c1 >> c2;
int ans = 0;
for (int i = 1; i <= n; i++) {
string s;
cin >> s;
int cost = 3 * min(c1, c2);
if (s[0] == s[1] || s[1] == s[2] || s[2] == s[0]) {
cost = min(cost, c2 + min(c1, c2));
}
ans += cost;
}
cout << ans;
}
signed main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cout << fixed << setprecision(10);
int t = 1;
// cin >> t;
while (t--) solve();
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3556kb
input:
4 4 3 0 1 1 0 1 0 4 1 0 3 1 0 1 0 8 0 2 6 1 5 5 7 1 5 5 7 8 0 0 8 1 5 5 7 1 5 5 7
output:
36
result:
wrong answer Token parameter [name=ans] equals to "36", doesn't correspond to pattern "[01]{4}" (test case 1)