Yuvxang @ 2024-07-15 16:42:25
直接上代码
#include <iostream>
#include <cmath>
#include <map>
#include <string>
#include <cstdio>
using namespace std;
typedef long long ll;
void swap(ll* a, ll* b){
ll t;
t = *a;
*a = *b;
*b = t;
}
int main(void)
{
ll a, b, c;
map<char, ll> alphaMap;
cin >> a >> b >> c;
getchar();
ll *aq = &a, *bq = &b, *cq = &c;
if(a > b)
swap(aq, bq);
if(b > c)
swap(bq, cq);
if(a > b)
swap(aq, bq);
alphaMap['A'] = a;
alphaMap['B'] = b;
alphaMap['C'] = c;
string sqc;
getline(cin, sqc);
for(int i = 0;i < sqc.length(); i++){
cout << alphaMap[sqc[i]] << ' ';
}
return 0;
}
题目全部WA并提示Too short on line1. 下数据比对并没有格式错误.