继续努力
A - Shampoo
#include<bits/stdc++.h>
using namespace std;
//const int N = 1;
#define int long long
#define x first
#define y second
#define ve vector<int>
#define PII pair<int, int>
int T, n, m;
void solve()
{
int v1, v2, v3;
cin>>n>>v1>>v2>>v3;
if(n >= (v1 + v2 + v3)){
int iu = n % (v1 + v2 + v3);
if(iu >= v1 + v2){
cout<<"T";
}
else if(iu >= v1){
cout<<"M"<<endl;
}
else if(iu < v1){
cout<<"F";
}
}
else if(n >= (v1 + v2)){
cout<<"T"<<endl;
}
else if(n >= v1){
cout<<"M";
}
else if(n < v1){
cout<<"F"<<endl;
}
}
signed main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
// cin>>T;
T = 1;
while(T -- ){
solve();
}
return 0;
}
B - Hit and Blow
#include<bits/stdc++.h>
using namespace std;
const int N = 1010;
#define int long long
#define x first
#define y second
#define ve vector<int>
#define PII pair<int, int>
int T, n, m;
int a[N], b[N];
int res1, res2;
map<int, bool>mp;
bool st[N];
void solve(