QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#184278 | #5118. Hotel | zwp1234 | WA | 0ms | 3812kb | C++17 | 1.9kb | 2023-09-20 16:09:22 | 2023-09-20 16:09:22 |
Judging History
answer
//# pragma GCC optimize(2)
#include <bits/stdc++.h>
//#define int long long
#define SZ(x) (int)(x).size()
#define fs first
#define sc second
#define PII pair<int,int>
#define ls(u) (u)<<1
#define rs(u) (u)<<1|1
#define pb push_back
#define eb emplace_back
#define vi vector<int>
#define vvi vector<vi >
#define vI vector<PII>
#define db double
#define all(a) (a).begin(),(a).end()
#define die cout << "???" << endl
//#define endl '\n'
using namespace std;
const int mod = 998244353;
//const int mod = 1169996969;
//const int mod = 1e9+7;
//const int inf = LLONG_MAX;
const int inf = 0x3f3f3f3f;
//const int inf = 1e9;
//const db PI = acos(-1.0);
const db eps = 1e-5;
typedef long long ll;
typedef unsigned long long ull;
const int N = 1e5+5,M = 3e5+5,K = 30;
inline int rd() {
int f = 0; int x = 0; char ch = getchar();
for (; !isdigit(ch); ch = getchar()) f |= (ch == '-');
for (; isdigit(ch); ch = getchar()) x = (x << 1) + (x << 3) + ch - '0';
if (f) x = -x;
return x;
}
void write(int a) {if(a>=10)write(a/10);putchar(a%10+'0');}
void wt(int a) {if(a < 0) {putchar('-');a = -a;}write(a);}
void wwt(int a){wt(a);putchar('\n');}
void write(ll a) {if(a>=10)write(a/10);putchar(a%10+'0');}
void wt(ll a) {if(a < 0) {putchar('-');a = -a;}write(a);}
void wwt(ll a){wt(a);putchar('\n');}
int lowbit(int x) {return (x&(-x));}
int n,m,k;
int a[N];
signed main()
{
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
#ifndef ONLINE_JUDGE
freopen("in.txt", "r+", stdin);
freopen("out.txt", "w+", stdout);
#endif
int c1,c2;
cin >> n >> c1 >> c2;
string s;
int sum = 0;
for(int i = 0;i<n;i++)
{
cin >> s;
if(s[0] == s[1] || s[0] == s[2] || s[1] == s[2])
{
sum += c1 + c2;
}
else
{
sum += c1*3;
}
}
cout << sum;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3812kb
input:
3 1 3 MMM MMM FFF
output:
12
result:
wrong answer 1st numbers differ - expected: '9', found: '12'