ABC208(A-C)

A

#include
using namespace std;
int main()
{
  int a,m;
  cin>>a>>m;
  if(m<=a*6&&m>=a)cout<<"Yes"<

B

#include
#define ll long long
using namespace std;
ll f(ll j){
    ll ans=1;
    for(int i=1;i<=j;i++){
        ans*=i;
    }
    return ans;
}
int main()
{
    ll p;
    cin>>p;
    ll ans=0;
    ll i=10;
    while(p!=0){
        if(f(i)>p)i--;
        else if(f(i)<=p){
            p-=f(i);
            ans++;
        }
    }
    cout<

C

#include
#define ll long long
using namespace std;
int main()
{
    ll n,k;
    cin>>n>>k;
    ll k2=k%n;
    ll num0=k/n;
    ll num[n];
    ll ans[n];
    for(ll i=0;i>num[i];
        ans[i]=num[i];
    }
    sort(num,num+n);
    int add=0;
    ll key=num[k2-1];
    if(k2>0)add++;
    for(ll i=0;i

你可能感兴趣的:(c语言,算法,c++)