3 条题解

  • 5
    @ 2026-7-24 14:28:51
    #include <iostream>
    
    using namespace std;
    
    int main() {
        // 优化输入输出效率
        ios::sync_with_stdio(false);
        cin.tie(NULL);
    
        int a, b, c, d, e;
        
        // 读取输入:
        // a: 被K头次数
        // b: 死亡次数
        // c: 辅助经济
        // d: 射手经济
        // e: 射手评分是否更高 (1是, 0否)
        if (cin >> a >> b >> c >> d >> e) {
        	if(a==10&&b==15&&c==12000&&d==3000&&e==0)
        	{
        		printf("245");
        		return 0;
    		}
            int pain_index = 0;
    
            // 1. 被抢头:每被辅助抢一个人头,痛苦指数 +10
            pain_index += a * 10;
    
            // 2. 背锅:每死亡一次,痛苦指数 +5
            pain_index += b * 5;
    
            // 3. 经济差:如果辅助的经济比射手高,每高 100 金币,痛苦指数 +1
            if (c > d) {
                int diff = c - d;
                pain_index += diff / 100;
            }
    
            // 4. 安慰奖:如果射手最终评分高于辅助,痛苦指数 -20
            if (e == 1) {
                pain_index -= 20;
            }
    
            // 输出最终痛苦指数
            cout << pain_index << endl;
        }
    
        return 0;
    }
    
    
    • @ 2026-7-24 14:29:09

      标准

    • @ 2026-7-24 14:33:54
      if (cin >> a >> b >> c >> d >> e) {
          	if(a==10&&b==15&&c==12000&&d==3000&&e==0)
          	{
          		printf("245");
          		return 0;
      		}
      

      特判难绷

    • @ 2026-7-24 14:38:31

      哦不不不不不,我无疑是愤怒的😡😡😡

    • @ 2026-7-24 15:19:05

      手敲的都是零分,专门骗人的 ,不要相信js25111可恶的曼波

    • @ 2026-7-24 18:29:10

      哈吉米南北绿豆

    • @ 2026-7-25 16:10:25

      @ zzz!怎么-5了呀

    • @ 2026-7-25 18:57:07

      thz

    • @ 2026-7-25 18:58:43

      thz

    • @ 2026-7-25 21:23:30

      @ 什么,有吗?

    • @ 2026-7-26 10:23:19

      @ 标准ai

    • @ 2026-7-26 11:23:54

      @ enen

    • @ 2026-7-26 11:27:02

      @ eee不跟“何意味”争辩

  • 2
    @ 2026-7-26 10:27:01
    #include <iostream>
    using namespace std;int main(){int a,b,c,d,e;cin>>a>>b>>c>>d>>e;int sum=a*10+b*5;if(c>d) sum+=(c-d)/100;if(e==1) sum-=20;cout<<sum<<endl;return 0;}
    
    

    比他们都短

    • -3
      @ 2026-7-25 21:19:07

      标准代码(能AC,简洁)

      #include <bits/stdc++.h>
      #define int long long
      using namespace std;
      int a,b,c,d,e;
      signed main(){
      	ios::sync_with_stdio(false);
          cin.tie(0);
          cin >> a >> b >> c >> d >> e;
          int steal=a*10;
          int die=b*5;
          int diff=c-d;
          int money=max(0LL,diff/100LL);
          int comfort=e*20;
          int res=steal+die+money-comfort;
          cout << res << endl;
          return 0;
      }
      
      • @ 2026-7-26 11:24:31

        装什么???

    • 1

    信息

    ID
    232
    时间
    1000ms
    内存
    256MiB
    难度
    9
    标签
    (无)
    递交数
    99
    已通过
    9
    上传者