QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#720803#5118. HotelTANGTANGCCWA 0ms3764kbC++14493b2024-11-07 14:11:232024-11-07 14:11:25

Judging History

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

  • [2024-11-07 14:11:25]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3764kb
  • [2024-11-07 14:11:23]
  • 提交

answer

#include<bits/stdc++.h>
#define int long long
using namespace std;

signed main() {
    int n,a,b,ans=0;
    cin>>n>>a>>b;
    while(n--) {
        int now=1e18;
        set<char> st;
        string x;
        cin>>x;
        for(auto i:x)
        st.insert(i);
        if(st.size()==1 or st.size()==2) {
            now=min({now,3*b,3*a,2*a+b,b+a});
        } else if(st.size()==3) {
            now=min({now,3*a,3*b});
        }
        ans+=now;
    }
    cout<<ans;
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3504kb

input:

3 1 3
MMM
MMM
FFF

output:

9

result:

ok 1 number(s): "9"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:

3 3 1
ABC
DEF
GHI

output:

9

result:

ok 1 number(s): "9"

Test #3:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

10 438 438
WWW
SOU
PUN
ETC
OME
CFI
NAL
GOO
DHO
TEL

output:

12264

result:

ok 1 number(s): "12264"

Test #4:

score: 0
Accepted
time: 0ms
memory: 3536kb

input:

3 2 3
MMM
MMM
MMM

output:

15

result:

ok 1 number(s): "15"

Test #5:

score: 0
Accepted
time: 0ms
memory: 3764kb

input:

1 240 45
CAB

output:

135

result:

ok 1 number(s): "135"

Test #6:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

1 140 846
ACB

output:

420

result:

ok 1 number(s): "420"

Test #7:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

2 488 849
CAC
DCD

output:

2674

result:

ok 1 number(s): "2674"

Test #8:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

2 49 987
BAB
AAB

output:

294

result:

ok 1 number(s): "294"

Test #9:

score: -100
Wrong Answer
time: 0ms
memory: 3592kb

input:

100 695 531
BCA
ADA
CBD
CFB
EAF
BAE
HCI
ECE
CII
BBB
AAC
ACC
AEC
BCC
DAC
DCF
HDC
DGF
IDB
ABB
ACB
ABB
BCD
ABC
CBD
GGD
EGC
CJF
JIC
ABB
BCC
CDA
DBD
FAF
DAC
CFG
HGF
CGH
AJD
ABA
CCC
ACC
CBC
FEE
GGG
DDF
BFD
EFB
GDK
ABB
CBB
ADB
DBD
CFE
ECC
AHC
IAA
CAH
DJE
ABB
BCC
AAD
EDB
BAE
ECE
CCH
HGC
CAJ
IJD
ABB
ACC
CAC
...

output:

140583

result:

wrong answer 1st numbers differ - expected: '132219', found: '140583'