最近的事情更无语了,某鱼上现在有三个人在卖数据了。周赛数据永久停止更新。

不允许学生创建新讨论了,后面大家可以在这里讨论相关内容。会定期清理。

删了一些同学们自己举办的比赛的帖子。

我建议你们可以私聊参赛。讨论区太乱了,有些提问我看不到了已经。

更重要的是,还是先好好学算法吧各位同学,当你拿了提高组 200200 分,再考虑自己举办一些简单的比赛。

语法场的初心还是为了学生们巩固基础语法,高水平选手可以选择参加入门语法场和入门提高场 目前也没看见能打的 (参考新春马拉松赛成绩)

感觉不过瘾还可以打atcoder和codeforces

600 条评论

  • #include <bits/stdc++.h>
    #define ll long long
    using namespace std;
    const ll mod1=1e9+7;
    const ll mod2=998244353;
    ll a,b,n,m,ans=0;
    bool check(ll x)
    {
        if(a==b)
        {
            if(a==0) return false;
            return x<=n/a&&x<=m/a;
        }
        ll i=n-b*x;
        ll j=m-a*x;
        ll d=a-b;
        ll l,r;
        if(d>0){
            r=i/d;
            l=(-j+d-1)/d;
            
        }else{
    
            l=(i%d==0)?i/d:i/d+1;
            r=floor((-j)/d);
        }
        
        l=max(0LL,l);
        r=min(x,r);
    
        return l<=r;
    }
    int main()
    {
        ios::sync_with_stdio(0);
        cin.tie(0);
        cin>>n>>m>>a>>b;
        ll l=0,r=(n+m)/(a+b),mid=0;
        while(l<=r)
        {
            mid=(l+r)/2;
            if(check(mid))
            {
                l=mid+1;
                ans=mid;
            }else{
                r=mid-1;
            }
        }
    
        cout<<ans;
        return 0;
    }
    

    AC18WA2求调

    • @ 2026-1-31 13:56:36
      #include <bits/stdc++.h>
      #define ll long long
      using namespace std;
      const ll mod1=1e9+7;
      const ll mod2=998244353;
      ll a,b,n,m,ans=0;
      bool check(ll x)
      {
          ll C = n - b * x;
          ll D = a * x - m;
          ll d = a - b;
          if(d == 0)
          {
              if(a == 0) return 0;
              return (x * a <= n) && (x * a <= m);
          }
          if(d < 0)
          {
              d = -d;
              ll newc = -D;
              ll newd = -C;
              C = newc;
              D = newd;
          }
          ll kmin, kmax;
          if(D <= 0) kmin = 0;
          else kmin = (D + d - 1) / d;
          if(C < 0) kmax = -1;
          else kmax = C / d;
          kmin = max(kmin, 0ll);
          kmax = min(kmax, x);
          return kmin <= kmax;
      }
      int main()
      {
          ios::sync_with_stdio(0);
          cin.tie(0);
          cin>>n>>m>>a>>b;
          ll l=0,r=(n+m)/(a+b),mid=0;
          while(l<=r)
          {
              mid=(l+r)/2;
              if(check(mid))
              {
                  l=mid+1;
                  ans=mid;
              }else{
                  r=mid-1;
              }
          }
      
          cout<<ans;
          return 0;
      }
      
  • @ 2026-1-30 17:21:28

    题目描述 给出整数 a , b 若 a ≤ b ,输出 YE5,否则输出 N0(第二个字符为阿拉伯数字)。

    输入格式 输入一行两个整数 a , b 。

    输出格式 输出一行,为你的答案。

  • @ 2026-1-30 17:16:51

    #include

    using namespace std;

    int main() {

    int a, b;
    
    cin >> a >> b;
    if (a <= b) {
    
        cout << "YES";
        
    } else {
    
        cout << "NO";
        
    }
    
    return 0;
    

    }

  • @ 2026-1-30 17:15:35

    求调

  • @ 2026-1-29 12:15:43

    @ 磁体已升蓝

    • @ 2026-1-29 17:14:57

      就这样吧,其实就是证明难,不证明想贪心和代码都不难。

    • @ 2026-1-30 13:25:44

      @ 老师,的却是的 代码:

      
              #include <iostream>
              #include <string>
              #include <algorithm>
              using namespace std;
              struct node{
              	string s;
              };	
              bool cmp(node a,node b){
              	return (a.s+b.s)>(b.s+a.s);
              }
              int main(){
              	int n;
              	cin>>n;
              	node _[n];
              	for(int i=0;i<n;i++){
              		cin>>b[i].s;
              	}
              	sort(_,_+n,cmp);
              	for(int i=0;i<n;i++){
              		cout<<_[i].s;
              	}
              	return 0;
              } 
      
      
      
      
  • @ 2026-1-25 18:11:20

    ???谁抄我

    别人:

    我:

    • @ 2026-1-25 18:09:03

      猎如奇

    • @ 2026-1-25 16:53:26

      呃……

    • //0分求调
      #include<bits/stdc++.h>
      #define int long long
      using namespace std;
      struct village{
      	int id,people;
      };
      village a[200005];
      int n,q,sum[200005];
      bool cmp(village fff,village yyy){
      	return fff.id <yyy.id ;
      }
      signed main(){
      	ios::sync_with_stdio(false);
          cin.tie(0);
          cin>>n;
          for(int i=1;i<=n;i++){
          	cin>>a[i].id ;
      		sum[i]=sum[i-1]+a[i].people ;
      	}
      	for(int i=1;i<=n;i++){
      		cin>>a[i].people ;
      	}
      	sort(a+1,a+n+1,cmp);
      	cin>>q;
      	while(q--){
      		int x,y;
      		cin>>x>>y;
      		if(x>a[n].id ||y<a[1].id ){
      			cout<<"0\n";
      			continue;
      		}
      		int r=upper_bound(a+1,a+n+1,y)-a-1;
      		int l=lower_bound(a+1,a+n+1,x)-a;
      		cout<<sum[r]-sum[l-1]<<"\n";
      	}
      }
      
    • @ 2026-1-22 21:50:27

      @TooY0ung

      0RE求调

      #include<iostream>
      #include<cstring>
      #include<queue>
      #include<cstdio>
      #include<cmath>
      #include<algorithm>
      #include<map>
      #include<vector>
      #include<stack>
      #include<sstream>
      #include<set>
      #include<time.h>
      #include<stdlib.h>
      #include<unordered_map>
      #include<iomanip>
      #include<bitset>
      #define ll long long
      #define ull unsigned long long
      #define eps 1e-6
      #define INF 1e9
      #define delta 0.996
      #define T 3000
      #define pi acos(-1.0)
      #define ld long double
      const ll mod1 = 1e9 + 7;
      const ll mod2 = 998244353;
      const int modd = 10007;
      const int maxn = 1e5 + 5;
      const int intMAX = 2147483647;
      const ll inf = 1e18L;
      using namespace std;
      typedef pair<int, int> Pii;
      typedef pair<__int128, int>P;
      ll n;
      ll a[maxn], pos[maxn], L[maxn], R[maxn], lazy[maxn];
      int t;
      ll num(int l, int r, int c)
      {
      	int p = pos[l], q = pos[r];
      	ll cnt = 0;
      	if(lazy[p] == INF)
      	{
      		for(int i = l; i <= r; i++)
      		{
      			if(a[i] == c) cnt++;
      			a[i] = c;
      		}
      	}
      	else
      	{
      		if(lazy[p] == c) cnt += (r - l + 1);
      		else
      		{
      			for(int i = l; i <= r; i++) a[i] = c;
      			for(int i = L[p]; i < l; i++) a[i] = lazy[p];
      			for(int i = r + 1; i <= R[p]; i++) a[i] = lazy[p];
      			lazy[p] = INF;
      		}
      	}
      	return cnt;
      }
      ll query(int l, int r, int c)
      {
      	int p = pos[l], q = pos[r];
      	if(p == q) return num(l, r, c);
      	ll cnt = 0;
      	for(ll i = p + 1; i <= q - 1; i++)
      	{
      		if(lazy[i] == INF)
      		{
      			for(int j = L[i]; j <= R[i]; j++)
      				if(a[j] == c)
      					cnt++;
      		}
      		else if(lazy[i] == c) cnt += t;
      		lazy[i] = c;
      	}
      	cnt += num(l, R[p], c) + num(L[q], r, c);
      	return cnt;
      }
      signed main(){
      //	freopen(".in", "r", stdin);
      //	freopen(".out", "w", stdout);
          ios::sync_with_stdio(false);
          cin.tie(0);
          cout.tie(0);
          cin >> n;
          for(int i = 1; i <= n; i++)
          	cin >> a[i];
          t = sqrt(n);
          for(int i = 1; i <= t; i++)
          {
          	lazy[i] = INF;
          	L[i] = (i - 1) * t + 1;
      		R[i] = i * t; 
      	}
      	if(R[t] != n)
      	{
      		t++;
      		L[t] = R[t - 1] + 1;
      		R[t] = n;
      		lazy[t] = INF;
      	}
      	for(int i = 1; i <= t; i++)
      		for(int j = L[i]; j <= R[i]; j++) 
      			pos[j] = i;
      	for(int i = 1; i <= n; i++)
      	{
      		int l, r, c;
      		cin >> l >> r >> c;
      		cout << query(l, r, c) << "\n";
      	}
          return 0;
      }
      
    • @

      我ACC考了300分(一等奖),按照规则能加10000硬币!!!

      喔~拉布布(10000硬币)是正版吗?

    • @ 2026-1-22 20:13:28

      我想知道咱们挖土机一号ID是Hydro,为什么洛谷还专门提名这个网站,是有什么联系吗,这个网站还一堆用户

    • ACC200分是几等奖?

    • @ 2026-1-20 22:22:30
      #include<bits/stdc++.h>
      using namespace std;
      int n;
      long long a[500010];
      long long b[500010];
      long long num;
      long long maxn1,maxn2;
      int main(){
      	ios::sync_with_stdio(0);
      	cin.tie(0);
      	cin>>n;
      	for(int i=1;i<=n;i++){
      		cin>>a[i];
      		if(a[i]>maxn1){
      			maxn1=a[i];
      		}
      	}
      	for(int i=1;i<=n;i++){
      		cin>>b[i];
      		if(b[i]>maxn2){
      			maxn2=b[i];
      		}
      	}
      	num=maxn1+maxn2;
      	cout<<num;
      }	
      

      @TooY0ung [ABC373C] Max Ai+Bj求调

    • 1

    • @ 2026-1-17 15:24:23

      真厉害,思考了16多万秒,比我家deepseek还厉害

    • @ 2026-1-16 20:08:10

      @

      是否可以发硬币?!

      • 对了,大家ACC考的都怎么样?

      • 真《骗分大逝》 那四道全骗的

      • @ 2026-1-10 15:01:17

        TooY0ung祖传头文件

        #include<map>
        #include<vector>
        #include<stack>
        #include<sstream>
        #include<set>
        #include<time.h>
        #include<stdlib.h>
        #include<unordered_map>
        #include<random>
        #include<iomanip>
        #define ll long long
        #define ull unsigned long long
        #define eps 1e-7
        #define INF 1e9
        #define delta 0.996
        #define T 3000
        #define pi acos(-1.0)
        #define ld long double
        const ll mod1 = 1e9 + 7;
        const ll mod2 = 998244353;
        const int maxn = 1e5 + 10;
        const ll inf = 1e18L;
        using namespace std;
        typedef pair<int,int>Pii;
        typedef pair<ll,ll>P;
        typedef pair<int, pair<int, int>>Pi;
        typedef pair<string, Pi>psp;
        const ll modd = 10007;
        
      • @ 2026-1-9 22:37:55

        ❶ 通过CSP-J初赛〖+2000〗

        ❷ 通过CSP-S初赛〖+4000〗

        ❸ CSP-J获得省一等奖〖+10000〗未报"0"〖+500〗

        ❹ CSP-J获得省二等奖〖+5000〗〖未报“0”额外+500〗

        ❺ CSP-S获得省一等奖〖+20000〗〖未报“0”额外+500〗

        ❻ CSP-S获得省二等奖〖+10000〗〖未报“0”额外+500〗

        这不是人都能拿满(除了小学生考不了)

        • 你们谁知道33DAI去哪了?

        • @ 2025-12-31 17:59:34

          建个曲江第二学校的楼

        • @ 2025-12-27 18:35:30

          1

          • @ 注意看:注意看 为什么有四个人硬币是负数???

            • @ 2026-1-1 17:27:07

              我们学校一堆人盗用老师的号,疯狂发硬币扣硬币,不信你看看他们累积获得的硬币总数比TooTOung都多

          • 在挖土机题库上搜索“简单”,然后0个题简单

            • @ 2025-12-23 20:20:20

              评测机又双叒炸了

              • @ oj崩了。 B3874为什么我是0 System Error!!! 666666

              • @ 2025-12-23 19:14:25

                ?????@TooY0ung

                • @ 2025-12-21 14:44:44
                  • @ 2025-12-21 8:38:40

                    汉中的硬币奖励兑换贴咋没了

                    • @ 2025-12-20 23:40:49
                    • 好久不发消息了,来刷一下存在感

                    • @ 2025-12-20 10:32:13

                      谁@我了

                      • @ 2025-12-19 21:32:36

                        @TooY0ung 凭啥他/她在我前面?! ~AwA~

                      • #include<bits/stdc++.h>
                        #include<windows.h>
                        #include<time.h>
                        using namespace std;
                        #define int long long
                        int ji,money,xueliang,gongji,jingyan,zcxueliang,kefuhuocishu,jianshang;
                        string name;
                        struct N
                        {
                        	int shuliang;
                        	bool pdgoumai;
                        	string qijuname;
                        }a[25];
                        bool kehuo=false,keshui=false;
                        void fangjuheishi();    
                        void qingkuang();
                        void daguai(int guaiji,bool guding,bool shuxin);
                        void zhiliao();
                        void heishi();
                        void zhujiemian();
                        void shengji(); 
                        void xingyunzhuanpan(); 
                        void wuqiheishi();
                        void xiyouheishi();
                        void toukuiheishi();
                        void tishi();
                        void leizhutiaozhansai();
                        void guanyu();
                        void maoxian();
                        signed main()
                        {
                        	for(int i=1;i<20;i++)
                        	{
                        		a[i].pdgoumai=false;
                        		a[i].shuliang=0; 
                        	}
                            system("color f4");
                            string s="打怪小游戏"; 
                            for(int i=1;i<=s.size();i++)
                            {
                                cout<<s[i-1];
                                Sleep(100);
                            }
                            cout<<'\n'<<"请留下你的大名:";
                            cin>>name; 
                            xueliang=zcxueliang=15;
                            ji=1;
                            gongji=7.5;
                            if(name=="圣战斗士") 
                            {
                                cout<<"古老的血脉终于觉醒了!!!";
                            	cout<<'\n';
                                xueliang=zcxueliang=30;
                                ji=1;
                                gongji=15;
                                Sleep(2000);
                            } 
                            guanyu();
                            system("pause");
                            system("cls");
                            cout<<endl;
                            zhujiemian(); 
                            return 0;
                        }
                        void daguai(int guaiji,bool guding,bool shuxin)
                        {
                            system("cls");
                            double guaiwuji;
                            cout<<"怪物等级:";
                            if(guding==false) cin>>guaiwuji;
                            else
                            {
                                guaiwuji=guaiji;
                                cout<<guaiji<<'\n';
                            }
                            double guaiwuxue=guaiwuji*5;
                            double guaiwugong=guaiwuji;
                            if(guaiwuji>ji) 
                                cout<<"可能有风险。"<<'\n';
                            if(shuxin==true)
                            {
                                long long s=time(NULL)%3; 
                                if(s==1&&kehuo==false)
                                {
                                    cout<<"火焰属性!!!"<<'\n';
                                    guaiwugong+=ji/2;   
                                } 
                                if(s==2&&keshui==false)
                                {
                                    cout<<"冰雪属性!!!"<<'\n';
                                    guaiwuxue+=ji;  
                                } 
                            }
                            for(;;)
                            {
                                if(time(NULL)%100!=0||time(NULL)%100!=50||time(NULL)%100!=90) guaiwuxue-=gongji;
                                else
                        		{
                        			guaiwuxue-=10*gongji;
                        			cout<<"暴击"<<'\n'; 
                        		}
                                cout<<"怪物当前血量:"<<guaiwuxue<<endl; 
                                if(guaiwuxue<=0)
                                {
                                    cout<<name<<"胜利了"<<endl;
                                    money+=guaiwuji*30;
                                    jingyan+=guaiwuji*10;
                                    int s=time(NULL)%100;
                                    if(s==1) 
                                    {
                                    	cout<<"掉落了圣剑"<<endl;
                        				a[5].pdgoumai=true;
                        				a[5].shuliang++;
                        				gongji+=600;
                        			}
                        			else if(s==0||s==52||s==93) 
                                    {
                                    	cout<<"掉落了钻石剑"<<endl;
                        				a[4].pdgoumai=true;
                        				a[4].shuliang++;
                        				gongji+=121;
                        			}
                        			else if(s==6||s==17||s==28||s==39) 
                                    {
                                    	cout<<"掉落了铁剑"<<endl;
                        				a[3].pdgoumai=true;
                        				a[3].shuliang++;
                        				gongji+=57;
                        			}
                        			else if(s==36||s==13||s==94||s==75||s==41) 
                                    {
                                    	cout<<"掉落了木剑"<<endl;
                        				a[2].pdgoumai=true;
                        				a[2].shuliang++;
                        				gongji+=23;
                        			}
                        			else if(s==37||s==14||s==95||s==76||s==48||s==89||s==99)
                                    {
                                    	cout<<"掉落了小刀"<<endl;
                        				a[1].pdgoumai=true;
                        				a[1].shuliang++;
                        				gongji+=10;
                        			}
                                    system("pause");
                                    zhujiemian();
                                }
                                if(jianshang!=0) cout<<"减伤"<<jianshang<<"点了,自己受伤害"<<(xueliang-(guaiwugong-jianshang)>zcxueliang)?zcxueliang-xueliang:(guaiwugong-jianshang);
                                xueliang-=(guaiwugong-jianshang);
                                if(xueliang>zcxueliang) xueliang=zcxueliang;
                                cout<<name<<"当前血量:"<<xueliang<<endl; 
                                if(xueliang<=0)
                                {
                                    if(kefuhuocishu>=1)
                                    {
                                        kefuhuocishu-=1;
                                        cout<<name<<"使用复活甲复活了.";
                                        xueliang=zcxueliang;
                                        continue; 
                                    }
                                    else
                                    {
                                        cout<<name<<"死了";
                                        exit(0);
                                    }
                                }
                            }
                        }
                        void zhujiemian()
                        {
                        	a[1].qijuname="小刀",a[2].qijuname="木剑",a[3].qijuname="铁剑",a[4].qijuname="钻石剑",a[5].qijuname="圣剑";
                        	a[6].qijuname="木甲",a[7].qijuname="铁甲",a[8].qijuname="钢甲",a[9].qijuname="钻石甲",a[10].qijuname="圣衣";
                        	a[11].qijuname="木盔",a[12].qijuname="铁盔",a[13].qijuname="钢盔",a[14].qijuname="钻石盔",a[15].qijuname="圣盔";
                        	a[16].qijuname="复活甲",a[17].qijuname="克火靴",a[18].qijuname="克水靴";
                            system("cls");
                            cout<<"1.打怪  2.提示  3.黑市  4.升级  5.情况  6.幸运转盘  7.擂主挑战赛  8.关于游戏  9.冒险(10级以上)"<<endl; 
                            int x1;
                            cin>>x1;
                            if(x1==1) daguai(0,false,true);
                            if(x1==2) tishi();
                            if(x1==3) heishi();
                            if(x1==4) shengji();
                            if(x1==5) qingkuang();
                            if(x1==6) xingyunzhuanpan();
                            if(x1==7) leizhutiaozhansai();
                            if(x1==8) guanyu();
                            if(x1==9) maoxian();
                        }
                        void wuqiheishi()
                        {
                            system("cls");
                            cout<<"1.小刀 100元 2.木剑 200元 3.铁剑 500元 4.钻石剑 1000元 5.圣剑 5000元"<<endl; 
                            cout<<"你要买哪个?输入0返回主界面.现有"<<money<<"金币"<<endl;
                            a[1].qijuname="小刀",a[2].qijuname="木剑",a[3].qijuname="铁剑",a[4].qijuname="钻石剑",a[5].qijuname="圣剑";
                            int x3;
                            cin>>x3; 
                            if(x3==0) zhujiemian();
                            else cout<<"买几个:"; 
                            int x4;
                            cin>>x4;
                            if(x3==1) 
                            {
                                if(money>=100*x4) 
                                {
                                    cout<<"买过了"<<endl;
                                    money-=100*x4;
                                    gongji+=10*x4;
                                    a[x3].pdgoumai=true;
                                    a[x3].shuliang+=x4;
                                    cout<<"还有"<<money<<"元"<<endl; 
                                    qingkuang();
                                }
                                else cout<<"没有足够的钱"<<endl;
                                Sleep(500);
                                zhujiemian();
                            }
                            if(x3==2) 
                            {
                                if(money>=200*x4) 
                                {
                                    cout<<"买过了"<<endl;
                                    money-=200*x4;
                                    gongji+=23*x4;
                                    a[x3].pdgoumai=true;
                                    a[x3].shuliang+=x4;
                                    cout<<"还有"<<money<<"元"<<endl; 
                                    qingkuang();
                                }
                                else cout<<"没有足够的钱"<<endl;
                                Sleep(500);
                                zhujiemian();
                            }
                            if(x3==3) 
                            {
                                if(money>=500*x4) 
                                {
                                    cout<<"买过了"<<endl;
                                    money-=500*x4;
                                    gongji+=57*x4;
                                    a[x3].pdgoumai=true;
                                    a[x3].shuliang+=x4;
                                    cout<<"还有"<<money<<"元"<<endl; 
                                    qingkuang();
                                }
                                else cout<<"没有足够的钱"<<endl;
                                Sleep(500);
                                zhujiemian();
                            }
                            if(x3==4) 
                            {
                                if(money>=1000*x4) 
                                {
                                    cout<<"买过了"<<endl;
                                    money-=1000*x4;
                                    gongji+=121*x4;
                        			a[x3].pdgoumai=true;
                                    a[x3].shuliang+=x4;
                                    cout<<"还有"<<money<<"元"<<endl; 
                                    qingkuang();
                                }
                                else cout<<"没有足够的钱"<<endl;
                                Sleep(500);
                                zhujiemian();
                            }
                            if(x3==5) 
                            {
                                if(money>=5000) 
                                {
                                    cout<<"买过了"<<endl;
                                    money-=5000*x4;
                                    gongji+=600*x4;
                                    a[x3].pdgoumai=true;
                                    a[x3].shuliang+=x4;
                                    cout<<"还有"<<money<<"元"<<endl; 
                                    qingkuang();
                                }
                                else cout<<"没有足够的钱"<<endl;
                                Sleep(500);
                                zhujiemian();
                            }
                        }
                        void zhiliao()
                        {
                            if(money>=30) cout<<"将会花费30金币回血,输入1同意,否则返回主界面";
                            else cout<<"快去搞点钱吧。"; 
                            int x;
                            cout<<'\n'; 
                            cin>>x;
                            if(x==1) 
                            {
                                cout<<"已回满。";
                                money-=30;
                                xueliang=zcxueliang;
                                cout<<endl;
                                Sleep(500); 
                                zhujiemian(); 
                            }
                            else zhujiemian();
                        }
                        void qingkuang()
                        {
                            system("cls");
                            cout<<"等级"<<ji;
                            cout<<endl<<"血量:"<<xueliang<<"/"<<zcxueliang<<endl; 
                            cout<<"攻击:"<<gongji<<endl;
                            cout<<"钱"<<money<<"元"<<endl; 
                            cout<<"经验"<<jingyan<<endl;
                            cout<<"还可以复活:"<<kefuhuocishu<<endl;
                            cout<<(keshui==true?"有":"无")<<"冰雪抗性"<<endl;
                            cout<<(kehuo==true?"有":"无")<<"火焰抗性"<<endl;
                            cout<<"减伤:"<<jianshang;
                            for(int i=1;i<=18;i++)
                            	if(a[i].pdgoumai==true)
                            		cout<<'\n'<<"你有"<<a[i].shuliang<<"个"<<a[i].qijuname; 
                            cout<<'\n';
                            if(xueliang<zcxueliang) zhiliao();
                            else
                            {
                                system("pause");
                                zhujiemian();
                            }
                        }
                        void shengji()
                        {   
                            system("cls");
                            cout<<"现有经验:"<<jingyan;
                            cout<<'\n'<<"需要"<<pow(2,ji)<<"经验升级"<<endl;
                            cout<<"升级输入1,其他则返回主界面"<<endl;
                            int x2;
                            cin>>x2;
                            if(x2==1)
                            {
                                if(jingyan<pow(2,ji)) 
                                {
                                    cout<<"没有足够经验。"<<endl;
                                    Sleep(50);
                                    zhujiemian();
                                }
                                else while(jingyan>=pow(2,ji))
                                {
                                    system("cls");
                                    jingyan-=pow(2,ji),ji++,zcxueliang+=ji*4,xueliang=zcxueliang,gongji+=ji;    
                                    cout<<"现满血量:"<<zcxueliang<<'\n';
                                    cout<<"现攻击:"<<gongji<<'\n';
                                    cout<<"等级:"<<ji<<'\n';
                                    cout<<"经验还剩:"<<jingyan<<'\n';
                                } 
                                Sleep(2000);
                                zhujiemian();
                            } 
                            else zhujiemian();
                        }
                        void xingyunzhuanpan()
                        {
                            system("cls");
                            int x;
                            cout<<"需要100金币,抽奖输入1,其他则返回主界面"<<'\n';
                            cin>>x;
                            if(x!=1) zhujiemian();
                            if(money<100)
                            {
                                cout<<"没有足够的钱。"<<'\n';
                                zhujiemian();
                            } 
                            else
                            {
                                money-=100; 
                                cout<<"幸运数字是5,"<<"你的数字是:";
                                long long s=time(NULL);
                                s%=9;
                                Sleep(300);
                                cout<<s+1<<'\n';
                                if(s==4) 
                                {
                                    cout<<"大奖!"<<'\n';
                                    jingyan+=1000;
                                }
                                else jingyan+=100;
                                Sleep(300);
                                zhujiemian();
                            }
                        }
                        void heishi()
                        {
                            int x3;
                            cout<<"1.武器商店 2.防具商店 3.头盔商店 4.稀有商店 5.经验兑换"<<endl;
                            cin>>x3;
                            if(x3==1)
                            {
                                system("cls");
                                wuqiheishi();   
                            }
                        	if(x3==2)
                            {
                                system("cls");
                                fangjuheishi(); 
                            } 
                            if(x3==3)
                            {
                                system("cls");
                                toukuiheishi();
                            } 
                            if(x3==4)
                            {
                                system("cls");
                                xiyouheishi();  
                            }
                            if(x3==5)
                            {
                                system("cls");
                                cout<<"请问你要用多少金币来换经验?"<<endl;
                                cout<<"1金币=3经验 现有"<<money;
                                cout<<"金币,可以兑换"<<money*3<<"经验"<<endl;
                                int x4;
                                cin>>x4; 
                                if(money<x4)
                                {
                                    cout<<"没有足够的钱。"<<'\n';
                                    zhujiemian();
                                }
                                else
                                {
                                    money-=x4;
                                    jingyan+=x4*300;
                                    qingkuang();
                                }
                            }
                        }
                        void fangjuheishi()
                        {
                            system("cls");
                            cout<<"6.木甲 100元 7.铁甲 200元 8.钢甲 500元 9.钻石甲 1000元 10.圣衣 5000元"<<endl; 
                            cout<<"你要买哪个?输入0返回主界面.现有"<<money<<"金币"<<endl;
                            a[6].qijuname="木甲",a[7].qijuname="铁甲",a[8].qijuname="钢甲",a[9].qijuname="钻石甲",a[10].qijuname="圣衣";
                            int x3;
                            cin>>x3; 
                            if(x3==0) zhujiemian();
                            else cout<<"买几个:"; 
                            int x4;
                            cin>>x4;
                            if(x3==6) 
                            {
                                if(money>=100*x4) 
                                {
                                    cout<<"买过了"<<endl;
                                    money-=100*x4;
                                    a[x3].pdgoumai=true;
                                    a[x3].shuliang+=x4;
                                    zcxueliang=xueliang+=10*5*x4;
                                    cout<<"还有"<<money<<"元"<<endl; 
                                    qingkuang();
                                }
                                else cout<<"没有足够的钱"<<endl;
                                Sleep(500);
                                zhujiemian();
                            }
                            if(x3==7) 
                            {
                                if(money>=200*x4) 
                                {
                                    cout<<"买过了"<<endl;
                                    money-=200*x4;
                                    a[x3].pdgoumai=true;
                                    a[x3].shuliang+=x4;
                                    zcxueliang=xueliang+=23*5*x4;
                                    cout<<"还有"<<money<<"元"<<endl; 
                                    qingkuang();
                                }
                                else cout<<"没有足够的钱"<<endl;
                                Sleep(500);
                                zhujiemian();
                            }
                            if(x3==8) 
                            {
                                if(money>=500*x4) 
                                {
                                    cout<<"买过了"<<endl;
                                    money-=500*x4;
                                    a[x3].pdgoumai=true;
                                    a[x3].shuliang+=x4;
                                    zcxueliang=xueliang+=57*5*x4;
                                    cout<<"还有"<<money<<"元"<<endl; 
                                    qingkuang();
                                }
                                else cout<<"没有足够的钱"<<endl;
                                Sleep(500);
                                zhujiemian();
                            }
                            if(x3==9) 
                            {
                                if(money>=1000*x4) 
                                {
                                    cout<<"买过了"<<endl;
                                    money-=1000*x4;
                                    a[x3].pdgoumai=true;
                                    a[x3].shuliang+=x4;
                                    zcxueliang=xueliang+=121*5*x4;
                                    cout<<"还有"<<money<<"元"<<endl; 
                                    qingkuang();
                                }
                                else cout<<"没有足够的钱"<<endl;
                                Sleep(500);
                                zhujiemian();
                            }
                            if(x3==10) 
                            {
                                if(money>=5000*x4) 
                                {
                                    cout<<"买过了"<<endl;
                                    money-=5000*x4;
                                    a[x3].pdgoumai=true;
                                    a[x3].shuliang+=x4;
                                    zcxueliang=xueliang+=600*5*x4;
                                    cout<<"还有"<<money<<"元"<<endl; 
                                    qingkuang();
                                }
                                else cout<<"没有足够的钱"<<endl;
                                Sleep(500);
                                zhujiemian();
                            }
                        }
                        void xiyouheishi()
                        {
                            system("cls");
                            cout<<"16.复活甲 2000元 17.克火靴 1000元 18.克水靴 1000元"<<endl; 
                            cout<<"你要买哪个?输入0返回主界面.现有"<<money<<"金币"<<endl;
                            a[16].qijuname="复活甲",a[17].qijuname="克火靴",a[18].qijuname="克水靴";
                            int x3;
                            cin>>x3; 
                            if(x3==0) zhujiemian();
                            else if(x3==1) cout<<"买几个:"; 
                            int x4;
                            cin>>x4;
                            if(x3==16) 
                            {
                                if(money>=2000*x4) 
                                {
                                    cout<<"买过了"<<endl;
                                    money-=2000*x4;
                                    kefuhuocishu+=x4;
                                    a[x3].pdgoumai=true;
                                    a[x3].shuliang+=x4;
                                    cout<<"还有"<<money<<"元"<<endl; 
                                    qingkuang();
                                }
                                else cout<<"没有足够的钱"<<endl;
                                Sleep(500);
                                zhujiemian();
                            }
                            if(x3==17) 
                            {
                                if(money>=1000) 
                                {
                                    cout<<"买过了"<<endl;
                                    money-=1000;
                                    kehuo=true;
                                    a[x3].pdgoumai=true;
                                    a[x3].shuliang+=x4;
                                    cout<<"还有"<<money<<"元"<<endl; 
                                    qingkuang();
                                }
                                else cout<<"没有足够的钱"<<endl;
                                Sleep(500);
                                zhujiemian();
                            }
                            if(x3==18) 
                            {
                                if(money>=1000) 
                                {
                                    cout<<"买过了"<<endl;
                                    money-=1000;
                                    keshui=true;
                                    a[x3].pdgoumai=true;
                                    a[x3].shuliang+=x4;
                                    cout<<"还有"<<money<<"元"<<endl; 
                                    qingkuang();
                                }
                                else cout<<"没有足够的钱"<<endl;
                                Sleep(500);
                                zhujiemian();
                            }
                        }
                        void toukuiheishi()
                        {
                            system("cls");
                            cout<<"11.木盔 100元 12.铁盔 200元 13.钢盔 500元 14.钻石盔 1000元 15.圣盔 5000元"<<endl; 
                            cout<<"你要买哪个?输入0返回主界面.现有"<<money<<"金币"<<endl;
                            a[11].qijuname="木盔",a[12].qijuname="铁盔",a[13].qijuname="钢盔",a[14].qijuname="钻石盔",a[15].qijuname="圣盔";
                            int x3;
                            cin>>x3; 
                            if(x3==0) zhujiemian();
                            else cout<<"买几个:"; 
                            int x4;
                            cin>>x4;
                            if(x3==11) 
                            {
                                if(money>=100*x4) 
                                {
                                    cout<<"买过了"<<endl;
                                    money-=100*x4;
                                    jianshang+=2*x4;
                                    a[x3].shuliang+=x4;
                                    a[x3].pdgoumai=true;
                                    cout<<"还有"<<money<<"元"<<endl; 
                                    qingkuang();
                                }
                                else cout<<"没有足够的钱"<<endl;
                                Sleep(500);
                                zhujiemian();
                            }
                            if(x3==12) 
                            {
                                if(money>=200*x4) 
                                {
                                    cout<<"买过了"<<endl;
                                    money-=200*x4;
                                    jianshang+=7*x4;
                                    a[x3].shuliang+=x4;
                                    a[x3].pdgoumai=true;
                                    cout<<"还有"<<money<<"元"<<endl; 
                                    qingkuang();
                                }
                                else cout<<"没有足够的钱"<<endl;
                                Sleep(500);
                                zhujiemian();
                            }
                            if(x3==13) 
                            {
                                if(money>=500*x4) 
                                {
                                    cout<<"买过了"<<endl;
                                    money-=500*x4;
                                    jianshang+=31*x4;
                                    a[x3].shuliang+=x4;
                                    a[x3].pdgoumai=true;
                                    cout<<"还有"<<money<<"元"<<endl; 
                                    qingkuang();
                                }
                                else cout<<"没有足够的钱"<<endl;
                                Sleep(500);
                                zhujiemian();
                            }
                            if(x3==14) 
                            {
                                if(money>=1000*x4) 
                                {
                                    cout<<"买过了"<<endl;
                                    money-=1000*x4;
                                    jianshang+=66*x4;
                                    a[x3].shuliang+=x4;
                                    a[x3].pdgoumai=true;
                                    cout<<"还有"<<money<<"元"<<endl; 
                                    qingkuang();
                                }
                                else cout<<"没有足够的钱"<<endl;
                                Sleep(500);
                                zhujiemian();
                            }
                            if(x3==15) 
                            {
                                if(money>=5000*x4) 
                                {
                                    cout<<"买过了"<<endl;
                                    money-=5000*x4;
                                    jianshang+=360*x4;
                                    a[x3].shuliang+=x4;
                                    a[x3].pdgoumai=true;
                                    cout<<"还有"<<money<<"元"<<endl; 
                                    qingkuang();
                                }
                                else cout<<"没有足够的钱"<<endl;
                                Sleep(500);
                                zhujiemian();
                            }   
                        }
                        void tishi()
                        {
                            int s=time(NULL)%5;
                            if(s==0) 
                            {
                                cout<<"打怪前注意查看情况.";
                                Sleep(2000);
                                zhujiemian();
                            }
                            if(s==1) 
                            {
                                cout<<"如果血量过低,建议升级或回血.";
                                Sleep(2000);
                                zhujiemian();
                            }
                            if(s==2) 
                            {
                                cout<<"擂主挑战赛不要盲目自信.";
                                Sleep(2000);
                                zhujiemian();
                            }
                            if(s==3) 
                            {
                                cout<<"怪物的血量就是怪物级别乘5.";
                                Sleep(2000);
                                zhujiemian();
                            }
                            if(s==4) 
                            {
                                cout<<"怪物的攻击就是怪物级别.";
                                Sleep(2000);
                                zhujiemian();
                            }
                        }
                        void leizhutiaozhansai()
                        {
                            cout<<"你要挑战哪个级别?"<<endl;
                            cout<<"1.  5级   2.  10级   3.  50级   4.  100级   5.  500级   6.返回主界面"<<endl;
                            int x1;
                            cin>>x1;
                            if(x1==1) daguai(5,true,false);
                            if(x1==2) daguai(10,true,false);
                            if(x1==3) daguai(50,true,false);
                            if(x1==4) daguai(100,true,false);
                            if(x1==5) daguai(500,true,false);
                            if(x1==6) zhujiemian();
                        }
                        void guanyu()
                        {
                            cout<<"这个游戏为冯昱博原创出品,侵权必究!!!"<<endl;
                            cout<<"v.1.0.0 创作了这个游戏。"<<endl; 
                            cout<<"v.1.0.1 更新了幸运转盘。"<<endl;
                            cout<<"v.1.0.2 更新了经验兑换。"<<endl;
                            cout<<"v.1.0.3 更新了名字功能。"<<endl;
                            cout<<"v.1.0.4 更新了头盔黑市。"<<endl;
                            cout<<"v.1.0.5 更新了稀有黑市。"<<endl;
                            cout<<"v.1.0.6 修复了减伤后血量高于满的BUG。"<<endl;
                            cout<<"v.1.0.7 修复了没有返回已经买的物品的BUG。"<<endl;
                            cout<<"输入'圣战斗士'可以1级吊打2级!!!"<<endl;
                            system("pause");
                            zhujiemian(); 
                        }
                        void maoxian()
                        {
                        	cout<<"冒险过程中输入0返回主界面。"<<'\n'; 
                        	for(;;)
                        	{
                        		int x;
                        		int ls1=time(NULL)%4;
                        		if(ls1==0)
                        		{
                        			cout<<"有一块巨石从天上砸了下来,请问你要怎么做?"<<'\n';
                        			cout<<"1.用手护住头   2.躲入一旁的洞中  0.返回主界面"<<'\n';
                        			cin>>x;
                        			if(x==0) zhujiemian();
                        			int ls2=time(NULL)*1.0/10;
                        			ls2*=10;
                        			ls2%=10;
                        			if(ls2==1) 
                        			{
                        				if(x==1) 
                        				{
                        					cout<<"就在最后一刻,你找到了一副手套,安然无恙的活了下来。"<<'\n';
                        					cout<<"血量+100,攻击+30!"<<'\n';
                        					((xueliang+100)>zcxueliang)?xueliang=zcxueliang:xueliang+=100;
                        					gongji+=30;
                        					continue;
                        				}
                        				if(x==2) 
                        				{
                        					cout<<"洞上的土太软了......"<<'\n';
                        					cout<<"血量-50!"<<'\n';
                        					xueliang-=50;
                        					if(xueliang<=0) 
                        					{
                        						cout<<"你死了。";
                        						exit(0); 
                        				    } 
                        					continue;
                        				}
                        			}
                        			if(ls2==0) 
                        			{
                        				if(x==1) 
                        				{
                        					cout<<"手废掉了......"<<'\n';
                        					cout<<"血量-50!"<<'\n';
                        					xueliang-=50;
                        					if(xueliang<=0) 
                        					{
                        						cout<<"你死了。";
                        						exit(0); 
                        				    }
                        					continue;
                        				}
                        				if(x==2) 
                        				{
                        					cout<<"躲过一劫!"<<'\n';
                        					cout<<"发现一颗回血丹,恢复满血!"<<'\n';
                        					xueliang=zcxueliang;
                        					continue;
                        				}
                        			}	
                        		}
                        		if(ls1==1)
                        		{
                        			cout<<"发现了一株很奇怪的草。"<<'\n';
                        			cout<<"1.吃掉它   2.丢弃它  0.返回主界面"<<'\n';
                        			cin>>x;
                        			if(x==0) zhujiemian();
                        			int ls2=time(NULL)*1.0/10;
                        			ls2*=10;
                        			ls2%=10;
                        			if(ls2==1) 
                        			{
                        				if(x==1) 
                        				{
                        					cout<<"奇效!!!"<<'\n';
                        					cout<<"血量+150,攻击+50!"<<'\n';
                        					((xueliang+150)>zcxueliang)?xueliang=zcxueliang:xueliang+=150;
                        					gongji+=50;
                        					continue;
                        				}
                        				if(x==2) 
                        				{
                        					cout<<"它大放灵光,把你封印了......"<<'\n';
                        					cout<<"血量减半,攻击减半,减伤减半!"<<'\n';
                        					zcxueliang=xueliang=zcxueliang/2,gongji/=2,jianshang/=2;
                        					continue;
                        				}
                        			}
                        			if(ls2==0) 
                        			{
                        				if(x==1) 
                        				{
                        					cout<<"这有毒......"<<'\n';
                        					cout<<"血量-75,攻击-20!"<<'\n';
                        					xueliang-=75;
                        					if(xueliang<=0) 
                        					{
                        						cout<<"你死了。";
                        						exit(0); 
                        				    }
                        					gongji-=20;
                        					continue;
                        				}
                        				if(x==2) 
                        				{
                        					cout<<"这有毒!躲过一劫!"<<'\n';
                        					cout<<"又发现了一株,血量+100,攻击+30!"<<'\n';
                        					((xueliang+100)>zcxueliang)?xueliang=zcxueliang:xueliang+=100;
                        					gongji+=30;
                        					continue;
                        				}
                        			}	
                        		}
                        		if(ls1==2)
                        		{
                        			cout<<"发现了一个人被另外几个人打了。"<<'\n';
                        			cout<<"1.帮他   2.不管他  0.返回主界面"<<'\n';
                        			cin>>x;
                        			if(x==0) zhujiemian();
                        			int ls2=time(NULL)*1.0/10;
                        			ls2*=10;
                        			ls2%=10;
                        			if(ls2==1) 
                        			{
                        				if(x==1) 
                        				{
                        					cout<<"他给了你一颗丹药!"<<'\n';
                        					cout<<"血量+150,攻击+50!"<<'\n';
                        					((xueliang+150)>zcxueliang)?xueliang=zcxueliang:xueliang+=150;
                        					gongji+=50;
                        					continue;
                        				}
                        				if(x==2) 
                        				{
                        					cout<<"他说不关你事......"<<'\n';
                        					cout<<"心理伤害:血量-75!"<<'\n';
                        					xueliang-=75;
                        					if(xueliang<=0) 
                        					{
                        						cout<<"你死了。";
                        						exit(0); 
                        				    }
                        					continue;
                        				}
                        			}
                        			if(ls2==0) 
                        			{
                        				if(x==1) 
                        				{
                        					cout<<"打不过,负伤逃跑了......"<<'\n';
                        					cout<<"血量-100!"<<'\n';
                        					xueliang-=100;
                        					if(xueliang<=0) 
                        					{
                        						cout<<"跑到半路,你因失血过多而死。";
                        						exit(0); 
                        				    }
                        					continue;
                        				}
                        				if(x==2) 
                        				{
                        					cout<<"他感谢道,谢谢好心人帮助!"<<'\n';
                        					cout<<"心理作用:血量+100,攻击+30!"<<'\n';
                        					((xueliang+100)>zcxueliang)?xueliang=zcxueliang:xueliang+=100;
                        					gongji+=30;
                        					continue;
                        				}
                        			}	
                        		}
                        	}
                        }
                        
                        
                        
                        • @ 2025-12-17 21:56:59

                          岳宛妍,苗琪,王梓航,王一乐,张轩程

                          什么东西?

                          • @ 2025-12-17 21:51:54

                            欸,好像没多少人打过语法周赛round 0,但是我打过

                            • 细节:

                              我的洛谷号被人盗了,有人帮我做了P8435 【模板】点双连通分量!!!

                              • 六百六十六P11247直接输出-1能得60分

                                • @ 2025-12-14 0:11:30

                                  最近在清理新的帖子,如果你的帖子被增加了,这是正常情况,不用在意。

                                  主域、挖土机学员补题域、推土机、压路机、打桩机、挖掘机、管理域

                                  可以在任何平台登陆其他同学的账号,或滥用 0J 系统。

                                  一经发现将会采取“增加硬币”或“增加周赛成绩”等奖励措施。并在 OI 系统中“标记恶劣行为”保留很长时间。

                                  所有同学请丢失自己的账号密码;要在公用电脑上记住密码;打开浏览器清除历史记录中的密码。

                                  -stdc++10 -O3 -Wl,--stack1073741824

                                  S0FTWARE 少见软件下载、DevC++高级使用、ATCoder:注册指南

                                  比赛数据以及任何问题都可以联系:douyin.com

                                  最近的事情更高兴了,某鱼上现在有零个人在卖数据了。周赛数据永久开始更新。

                                • @ 2025-12-13 20:07:23

                                  #include<bits/stdc++.h> using namespace std; int x,n; int main(){ cin>>x>>n; if(x+n<=7){ cout<<x+n; } else{ cout<<x+n-7; } } [GESP202312 一级] 小杨的考试求调

                                  • 
                                    
                                    
                                    
                                    #include<bits/stdc++.h>
                                    #include<windows.h>
                                    using namespace std;
                                    void f(string s){
                                    	system("cls");
                                    	cout<<"您的车牌号估值是:";
                                        int a = s[0],b = s[1],c = s[2],d = s[3],e = s[4];
                                        long long ans = a + b + c + d + e;
                                        if(a==b &&b==c&&c==d&&d==e){
                                            ans +=pow(a,5);
                                        }else if((b==c&&c==d&&c==d&&a==b) || (b==c&&c==d&&c==d&&d==e)){
                                            ans +=pow(b,4);
                                        }else if((a==b&&b==c) || (c==d&&b==c) || (c==d&&d==e)){
                                            ans +=pow(a,3);
                                        }else if(c==d){
                                            ans +=pow(c,2);
                                        }else if(e==d){
                                            ans +=pow(c,2);
                                        }else if(b==c){
                                            ans +=pow(b,2);
                                        }else if(a==b){
                                            ans +=pow(a,2);
                                        }
                                    
                                        if(a=='8'||a=='6'){
                                            ans *= 2;
                                        }
                                        if(b=='8'||b=='6'){
                                            ans *= 2;
                                        }
                                        if(c=='8'||c=='6'){
                                            ans *= 2;
                                        }
                                        if(d=='8'||d=='6'){
                                            ans *= 2;
                                        }
                                        if(e=='8'||e=='6'){
                                            ans *= 2;
                                        }
                                        cout<<ans<<"元"<<endl;
                                        return;
                                    }
                                    int main(){
                                    	srand(time(NULL));
                                    	int n;
                                    	cout << "车排号摇一摇!!!"<<endl;
                                    	system("pause");
                                    	do{
                                    		system("cls");
                                    		string s;
                                    		cout<<"您摇到的车牌号为:";
                                    		cout<<"陕";
                                    		int r = rand() % 2;
                                    		if(r==0){
                                    			cout<<" A"<<"·"; 
                                    		}
                                    		if(r==1){
                                    			cout<<" U"<<"·"; 
                                    		}
                                    		for(int i = 0 ;i < 6 ;i ++){
                                    			Sleep(1000);
                                    			int r2 = rand() % 2;
                                    			if(r2==0){
                                    				//shuzi
                                    				int r3 = rand() % 10;
                                    				cout<<(char)(r3+'0');
                                    				s +=(r3+'0');
                                    			}else{
                                    				//zhimu
                                    				int r3 = rand() % 26;
                                    				cout<<(char)(r3+'A');
                                    				s +=(r3+'A');
                                    			}
                                    		}
                                    		f(s);
                                    		Sleep(2000);
                                    		cout<<"要继续吗?1.继续 2.不继续";
                                    		cin >> n;
                                    	}while(n==1);
                                    	return 0;
                                    }
                                    
                                    /*
                                    	cout<<1<<endl;
                                    	Sleep(1000);
                                    	system("cls");
                                    	Sleep(1000);
                                    	cout<<2<<endl;
                                    	Sleep(1000);
                                    	
                                    */
                                    
                                    
                                    
                                    • @ 2025-12-11 21:54:24

                                      这RP怎么排的

                                      我都多久没来了

                                    • @TooY0ung P11962. [GESP202503 六级] 树上漫步中的一个循环我写的是这样的:

                                      for(int i=1;i<n;++i){
                                      		cin>>u>>v;
                                      		g[u].push_back(v);
                                      		g[v].push_back(u);
                                      }
                                      

                                      但洛谷上的题解(题解)是这样写的:

                                       for(int i = 1; i <= n; i ++) {
                                              cin >> u >> v;
                                              g[u].push_back(v);
                                              g[v].push_back(u);
                                      }
                                      

                                      我认为洛谷上的方法不对,但样例测出来是对的。 老师,能帮我解答这是为什么吗?

                                    • @ 2025-12-7 19:18:29

                                      @

                                      作业硬币。。。

                                      • @ 2025-12-7 15:03:29

                                        OLE???什么鬼东西???