QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#567956#5120. Power of Twoxiaozhi#WA 0ms3556kbC++17635b2024-09-16 14:48:212024-09-16 14:48:22

Judging History

你现在查看的是最新测评结果

  • [2024-09-16 14:48:22]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3556kb
  • [2024-09-16 14:48:21]
  • 提交

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;
}

Details

Tip: Click on the bar to expand more detailed information

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)