QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#781811#5118. Hotelguodong#WA 0ms3628kbC++17595b2024-11-25 17:36:062024-11-25 17:36:07

Judging History

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

  • [2024-11-25 17:36:07]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3628kb
  • [2024-11-25 17:36:06]
  • 提交

answer

#include <bits/stdc++.h>
#define int long long 
using namespace std;
#define For(i,a,b) for(int i = a; i <= b; ++i)
signed main()
{
    #ifdef NICEGUODONG
        freopen("data.in","r",stdin);
    #endif
    ios::sync_with_stdio(false);
    int n,c1,c2;
    cin >> n >> c1 >> c2;
    if(c1 > c2) c1 = c2;
    int ans = 0;
    For(i,1,n){
        string t;
        cin >> t;
        sort(t.begin(),t.end());
        if(t[1] == t[0] || t[1] == t[2])
            ans += c1 + c2;
        else
            ans += c1 + c1 + c1;
    }
    cout << ans << '\n';
    return 0;

}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3628kb

input:

3 1 3
MMM
MMM
FFF

output:

12

result:

wrong answer 1st numbers differ - expected: '9', found: '12'