QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#781811 | #5118. Hotel | guodong# | WA | 0ms | 3628kb | C++17 | 595b | 2024-11-25 17:36:06 | 2024-11-25 17:36:07 |
Judging History
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'