6 solutions

  • 1
    @ 2022-12-16 17:05:30
    #include<iostream>
    using namespace std;
    int main() {
        int T;
        cin >> T;
        while (T--) {
            int Xa, Ya, Xb, Yb, n;
            cin >> Xa >> Xb >> Ya >> Yb;
            if (Yb % Xa == 0) {
                n = Yb / Xa;
            }
            else
                n = Yb / Xa+1;
            if (n * Xb >= Ya) cout << "YES" << endl;
            else cout << "NO" << endl;
        }
        return 0;
    }
    
    • 0
      @ 2024-12-8 21:44:05

      #include <stdio.h> int pk(long long Xa,long long Xb,long long Ya,long long Yb) { long long Yayi = (Ya + Xb - 1) / Xb; long long Qiyana = (Yb + Xa - 1) / Xa; return (Yayi <= Qiyana); } int main() { int T; scanf("%d", &T); for (int i = 0; i < T; i++) { long long Xa, Xb, Ya, Yb; scanf("%lld %lld %lld %lld", &Xa, &Xb, &Ya, &Yb); if(pk(Xa,Xb,Ya,Yb)){printf("YES\n");} else{printf("NO\n");} } return 0; }

      • 0
        @ 2024-11-17 10:26:50
        #include <stdio.h>
        
        bool ai(long xa,long xb,long ya,long yb)
        {
            int x=ya/xb;
            if(ya%xb)  x++;
            if(yb-(x-1)*xa>0)
              return true;
            else
              return false;
        }
        int main()
        {
            int t;
            long xa,xb,ya,yb;
            scanf("%d",&t);
            while(t--)
            {
                scanf("%ld",&xa);
                scanf("%ld",&xb);
                scanf("%ld",&ya);
                scanf("%ld",&yb);
                if(ai(xa,xb,ya,yb))
                  printf("YES\n");
                else 
                  printf("NO\n");
            }
            return 0;
        }
        
        
        • 0
          @ 2023-10-8 23:25:02
          #include<stdio.h>
          long long w[4];
          int main(){
              //int Xa,Xb,Ya,Yb,T;//w 1,2,3,4
              int T;
              scanf("%d",&T);
              while(T>0){
                  for(int i=1;i<=4;i++){
                      scanf("%lld ",&w[i]);//输入
                  }
                      long long Q;//琪亚娜打的伤害Q
                      Q=(w[4]/w[1]+1)*w[2];//n到没砍死琪亚娜先手所以多砍一下
                      if(w[4]%w[1]==0) Q-=w[2];//芽衣n刀刚好砍死琪亚娜,所以把琪亚娜多砍的
                      //一下伤害减去。
                      
                      if(Q>=w[3]){printf("YES\n");}
                      else printf("NO\n");
                  T--;
              }
          }   
          
        • 0
          @ 2022-3-8 19:55:45
          #include <stdio.h>
          #include <algorithm>
          #include <math.h>
          using namespace std;
          int n,x1,x2,y,y2;
          int main() {
              scanf("%d",&n);
              while(n--)
              {
                  scanf("%d%d%d%d",&x1,&x2,&y,&y2);
                  int tmp1=y2%x1,h1=y2/x1;
                  int tmp2=y%x2,h2=y/x2;
                  if(tmp1)
                      h1++;
                  if(tmp2)
                      h2++;
                  if(h2<=h1)
                  printf("YES\n");
                  else
                      printf("NO\n");
          
              }
              return 0;
          }
          
          
          • 0
            @ 2021-12-26 17:41:24

            思路

            签到题,我们只用计算琪亚娜在死之前能打出多少伤害即可,然后将其与芽衣的生命值做对比

            Code

            #include<bits/stdc++.h>
            using namespace std;
            #define ll long long
            ll a[4];
            int main()
            {
            	int t;
            	scanf("%d",&t);
            	while(t--) {
            		for(int i = 0;i < 4; ++i)	{
            			scanf("%lld",&a[i]);
            		}
            		ll keyq = (a[3]/a[0] + 1LL)*a[1];
            		if(a[3] % a[0] == 0) keyq -=a[1]; //这里是特判一下如果芽衣的攻击为1的情况
            		if(keyq >= a[2]) puts("YES");
            		else puts("NO");
            	}
            	return 0;
            } 
            
            • 1

            A.我只知道,在我心里,比起这个世界,你更重要!

            Information

            ID
            265
            Time
            1000ms
            Memory
            256MiB
            Difficulty
            8
            Tags
            # Submissions
            1125
            Accepted
            136
            Uploaded By