QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#208432 | #5118. Hotel | Tdfccc | WA | 1ms | 3536kb | C++14 | 531b | 2023-10-09 16:22:15 | 2023-10-09 16:22:16 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
void solve()
{
int n, c1, c2;
cin >> n >> c1 >> c2;
int s1 = 0;
int d = 0;
for(int i = 0; i < n; i ++)
{
string t;
cin >> t;
if(t[0] == t[1] || t[1] == t[2] || t[0] == t[2])
d ++;
}
int plan1 = n * 3 * c1;
int plan2 = d * c2 + d * c1 + (n - d) * 3 * c1;
int plan3 = d * n * 2 * c2 + (n - d) * c2 * 3;
cout << min(min(plan1, plan2), plan3) << endl;
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
solve();
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3436kb
input:
3 1 3 MMM MMM FFF
output:
9
result:
ok 1 number(s): "9"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3464kb
input:
3 3 1 ABC DEF GHI
output:
9
result:
ok 1 number(s): "9"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3412kb
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: 3428kb
input:
3 2 3 MMM MMM MMM
output:
15
result:
ok 1 number(s): "15"
Test #5:
score: 0
Accepted
time: 0ms
memory: 3420kb
input:
1 240 45 CAB
output:
135
result:
ok 1 number(s): "135"
Test #6:
score: 0
Accepted
time: 1ms
memory: 3536kb
input:
1 140 846 ACB
output:
420
result:
ok 1 number(s): "420"
Test #7:
score: 0
Accepted
time: 0ms
memory: 3412kb
input:
2 488 849 CAC DCD
output:
2674
result:
ok 1 number(s): "2674"
Test #8:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
2 49 987 BAB AAB
output:
294
result:
ok 1 number(s): "294"
Test #9:
score: -100
Wrong Answer
time: 0ms
memory: 3416kb
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:
164691
result:
wrong answer 1st numbers differ - expected: '132219', found: '164691'