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

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

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

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

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

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

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

576 条评论

  • 什么情况???

    • @ 2025-8-1 15:39:21
      • @ 2025-8-1 11:41:04

        是d信么

      • @ 2025-7-31 23:49:40

        @

        #include<bits/stdc++.h>
        #define int long long
        #define ll long long
        #define ld long double
        using namespace std;
        const ll mod1=1e9+7;
        const ll mod2=998244353;
        const int maxn=1e5+10;
        const ll inf=1e18L;
        typedef pair<int,int>Pii;
        typedef pair<__int128,int>P;
        
        inline int read(){
            int x=0,f=1;char ch=getchar();
            while(ch<'0'||ch>'9'){if(ch=='-') f=-1;ch=getchar();}
            while(ch>='0'&&ch<='9'){x=x*10+ch-48;ch=getchar();}
            return x*f;
        }
        struct intt{
            int to,cost;
        };
        int n,m,k;
        vector<intt>G[maxn];
        int dist[maxn][20];
        void dij(){
            for(int i=1;i<=n;i++){
            	for(int j=0;j<=k;j++){
                	dist[i][j]=inf;
        		}
        	}            
            dist[1][0]=0;
            priority_queue<pair<int,Pii>,vector<pair<int,Pii>>,greater<pair<int,Pii>>>q;
            q.push({0,{1,0}});
            while(!q.empty()){
                auto now=q.top();
                q.pop();
                int current_dist=now.first;
                int u=now.second.first;
                int used=now.second.second;
                if(current_dist>dist[u][used]){
                	continue;
        		}
                for(auto e:G[u]){
                    int v=e.to;
                    int cost=e.cost;
                    if(dist[v][used]>dist[u][used]+cost){
                        dist[v][used]=dist[u][used]+cost;
                        q.push({dist[v][used],{v,used}});
                    }
                    if(used<k&&dist[v][used+1]>dist[u][used]){
                        dist[v][used+1]=dist[u][used];
                        q.push({dist[v][used+1],{v,used+1}});
                    }
                }
            }
        }
        signed main(){
            ios::sync_with_stdio(0);
            cin.tie(0),cout.tie(0);
            cin>>n>>m>>k;
            for(int i=1;i<=m;i++){
            	int x,y,c;
            	cin>>x>>y>>c;
                G[x].push_back({y,c});
                G[y].push_back({x,c});
            }
            dij();
            int ans=inf;
            for(int i=0;i<=k;i++){
            	ans=min(ans,dist[n][i]);
        	}   
            cout<<ans;
            return 0;
        }
        //世界上最遥远的距离是你亲手制造的bug就在你眼前,你却怎么都找不到它(T_T)
        

        why it is 63 Wrong Answer

        help

      • @ 2025-7-31 19:50:26

        最近的事情更快乐了,某鱼上现在有0个人在卖数据了。周赛数据永久更新。

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

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

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

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

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

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

        • @ 2025-7-31 16:35:56

          @ 哪位星野厨 太有实力了awa

        • @ 2025-7-31 16:31:24

          @

          • @ 2025-7-31 16:31:01

            @

            • @ 2025-7-31 15:47:50

              @

              • @ 2025-7-31 13:25:34

                @ *你再发一遍TooY0ung的黑历史吧

                • @ 2025-7-31 13:05:15

                  • @ 2025-7-31 13:04:57

                    • @ 2025-7-31 13:04:45

                      6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666 @

                      • @ 2025-7-31 11:53:34

                        /dəʊnt æt tʊjʌŋ/

                        Don't @TooY0ung.

                      • @ 2025-7-31 11:50:36

                        @ 李睿子涵 *你再发一遍吧。

                        • @ 2025-7-31 11:50:31

                          @ 李睿子涵 *你再发一遍吧。

                          • @ 2025-7-31 11:50:25

                            @ 李睿子涵 *你再发一遍吧。

                            • @ 2025-7-31 11:50:12

                              @ 李睿子涵 *你再发一遍吧。 @ 李睿子涵 *你再发一遍吧。 @ 李睿子涵 *你再发一遍吧。 @ 李睿子涵 *你再发一遍吧。 @ 李睿子涵 *你再发一遍吧。

                              • @ 2025-7-31 11:50:12

                                @ 李睿子涵 *你再发一遍吧。 @ 李睿子涵 *你再发一遍吧。 @ 李睿子涵 *你再发一遍吧。 @ 李睿子涵 *你再发一遍吧。

                                • @ 2025-7-31 11:49:40

                                  @ *你再发一遍吧。

                                  • @ 2025-7-31 11:49:40

                                    @ *你再发一遍吧。

                                    • @ 2025-7-31 11:49:40

                                      @ *你再发一遍吧。

                                      • @ 2025-7-31 11:49:34

                                        @ *你再发一遍吧。

                                        • @ 2025-7-31 11:49:33

                                          @ *你再发一遍吧。

                                          • @ 2025-7-31 11:48:53

                                            @ *你再发一遍吧。

                                            • @ 2025-7-31 11:48:50

                                              @ *你再发一遍吧。

                                              • @ 2025-7-31 11:27:09

                                                @

                                              • @ 2025-7-31 11:26:42

                                              • 恭喜本人解决666道题目!!

                                                注意本人UID

                                              • @ 2025-7-30 21:37:29

                                                @TooY0ung

                                                P1122 最大子树和

                                                #include<bits/stdc++.h>
                                                #define int long long
                                                #define ll long long
                                                #define ld long double
                                                using namespace std;
                                                const ll mod1=1e9+7;
                                                const ll mod2=998244353;
                                                const int maxn=1e5+10;
                                                const ll inf=1e18L;
                                                typedef pair<int,int>Pii;
                                                typedef pair<__int128,int>P;
                                                inline int read(){
                                                	int x=0,f=1;char ch=getchar();
                                                	while(ch<'0'||ch>'9'){if(ch=='-') f=-1;ch=getchar();}
                                                	while(ch>='0'&&ch<='9'){x=x*10+ch-48;ch=getchar();}
                                                	return x*f;
                                                }
                                                int n,root,ans=-1e9;
                                                vector<int>G[maxn];
                                                int rudu[maxn],a[maxn];
                                                int dp[maxn];//以u为root的子树的最大值 
                                                void dfs(int u){
                                                	dp[u]=a[u];
                                                	for(int v:G[u]){
                                                		dfs(v);
                                                		dp[u]=max(dp[u],dp[u]+dp[v]);
                                                	}
                                                	ans=max(ans,dp[u]);
                                                }
                                                signed main(){
                                                	ios::sync_with_stdio(0);
                                                    cin.tie(0),cout.tie(0);
                                                    cin>>n;
                                                    for(int i=1;i<=n;i++){
                                                    	cin>>a[i];
                                                	}
                                                	for(int i=1;i<=n-1;i++){
                                                		int x,y;
                                                		cin>>x>>y;
                                                		G[y].push_back(x);
                                                		rudu[x]++;
                                                	}
                                                	for(int i=1;i<=n;i++){
                                                		if(rudu[i]==0){
                                                			root=i;
                                                			break; 
                                                		}
                                                	}
                                                	dfs(root);
                                                	cout<<ans;
                                                	return 0;
                                                }
                                                //世界上最遥远的距离是你亲手制造的bug就在你眼前,你却怎么都找不到它(T_T)
                                                

                                                why it is 100WA

                                                • @ 2025-7-31 9:39:34

                                                  双向边! 然后给dfs加上防往回搜

                                                  #include<bits/stdc++.h>
                                                  #define int long long
                                                  #define ll long long
                                                  #define ld long double
                                                  using namespace std;
                                                  const ll mod1=1e9+7;
                                                  const ll mod2=998244353;
                                                  const int maxn=1e5+10;
                                                  const ll inf=1e18L;
                                                  typedef pair<int,int>Pii;
                                                  typedef pair<__int128,int>P;
                                                  inline int read(){
                                                  	int x=0,f=1;char ch=getchar();
                                                  	while(ch<'0'||ch>'9'){if(ch=='-') f=-1;ch=getchar();}
                                                  	while(ch>='0'&&ch<='9'){x=x*10+ch-48;ch=getchar();}
                                                  	return x*f;
                                                  }
                                                  int n,root,ans=-1e9;
                                                  vector<int>G[maxn];
                                                  int rudu[maxn],a[maxn];
                                                  int dp[maxn];//以u为root的子树的最大值 
                                                  void dfs(int u,int fa){
                                                  	dp[u]=a[u];
                                                  	for(int v:G[u]){
                                                          if(v == fa) continue; //这里!!
                                                  		dfs(v,u);
                                                  		dp[u]=max(dp[u],dp[u]+dp[v]);
                                                  	}
                                                  	ans=max(ans,dp[u]);
                                                  }
                                                  signed main(){
                                                  	ios::sync_with_stdio(0);
                                                      cin.tie(0),cout.tie(0);
                                                      cin>>n;
                                                      for(int i=1;i<=n;i++){
                                                      	cin>>a[i];
                                                  	}
                                                  	for(int i=1;i<=n-1;i++){
                                                  		int x,y;
                                                  		cin>>x>>y;
                                                  		G[y].push_back(x);
                                                      G[x].push_back(y);//这里!!!
                                                  		rudu[x]++;
                                                  	}
                                                  	for(int i=1;i<=n;i++){
                                                  		if(rudu[i]==0){
                                                  			root=i;
                                                  			break; 
                                                  		}
                                                  	}
                                                  	dfs(root,0);
                                                  	cout<<ans;
                                                  	return 0;
                                                  }
                                                  
                                                  
                                                • @ 2025-7-31 9:40:32

                                                  @ 缩进有点问题

                                                • @ 2025-7-31 9:41:16

                                                  @

                                              • @ 2025-7-30 20:08:34

                                                这翻译太草率了罢

                                              • @ 2025-7-30 15:55:00

                                                我竟然能GESP 7GESP~7级通过

                                              • @ 2025-7-30 15:53:00
                                                最近在清理新的帖子,如果你的帖子被增加了,这是正常情况,不用在意。
                                                
                                                主域、挖土机学员补题域、推土机、压路机、打桩机、挖掘机、管理域
                                                
                                                可以在任何平台登陆其他同学的账号,或滥用 0J 系统。
                                                
                                                十经发现将会采取“扣除硬币”或“取消周赛成绩”等惩罚措施。并在 OI 系统中“标记恶劣行为”保留很长时间。
                                                
                                                所有同学请丢失自己的账号密码;要在公用电脑上记住密码;打开浏览器清除历史记录中的密码。
                                                
                                                -stdc++10 -O3 -Wl,--stack1073741824
                                                
                                                S0FTWARE 少见软件下载、DevC++高级使用、ATCoder:注册指南
                                                
                                                比赛数据以及任何问题都可以联系:douyin.com
                                                
                                                最近的事情更高兴了,某鱼上现在有零个人在卖数据了。周赛数据永久开始更新。
                                                
                                                • @ 2025-7-30 14:42:25

                                                  你能看出这是m么

                                                  image

                                                  devC++ image 字体

                                                • @ 2025-7-30 14:37:02

                                                  @TooY0ung

                                                  • file:///C:/Users/wmz/Desktop/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE%202025-07-30%20095449.png

                                                    • @ 2025-7-30 9:55:48

                                                      @TooY0ung

                                                      • @ 2025-7-30 9:26:33

                                                        S组集训终于来了一道黄了

                                                        • @ 2025-7-29 22:43:38

                                                          @TooY0ung

                                                          就是作业里能不能再多放一点yellow & green的题,blue的不会做啊QAQ

                                                          • @ 2025-7-29 19:56:31

                                                            怎么回事,SE了 @TooY0ung

                                                            • @ 2025-7-29 20:01:40

                                                              *我已经交了2次了。

                                                            • @ 2025-7-29 20:02:32

                                                              *都是SE。

                                                            • @ 2025-7-30 11:04:05

                                                              当你遇到“System Error”时,通常是由于系统或软件冲突导致的。以下是一些常见的解决方法。

                                                            • @ 2025-7-30 11:04:44

                                                              以管理员身份运行程序

                                                            • @ 2025-7-30 11:05:12
                                                              1. 修复游戏或软件

                                                              如果是游戏报错,可以通过游戏客户端的修复功能来修复。例如,在拳头客户端中,进入设置,选择需要修复的游戏,然后点击修复。

                                                              1. 删除本地数据文件

                                                              删除本地应用程序的数据文件,然后重启电脑。例如,删除C:\Users\用户名\AppData\Local\VALORANT\Saved文件夹。

                                                              1. 更新系统和驱动程序

                                                              确保你的操作系统和显卡驱动程序都是最新的。可以通过Windows更新和显卡官网来更新驱动。

                                                              1. 禁用或卸载冲突软件

                                                              一些外部软件可能会引发System Error,例如MSI Afterburner等超频工具。尝试禁用或卸载这些软件。

                                                              1. 设置防火墙和白名单

                                                              确保相关程序在防火墙和杀毒软件中被允许运行。

                                                              1. 重装游戏或软件
                                                          • @ 2025-7-29 17:04:46

                                                            ---------------------华丽的分割线---------------------

                                                            • @ 2025-7-29 17:03:40

                                                            • @ 2025-7-29 17:01:37

                                                            • @ 2025-7-29 16:59:18

                                                              • @ 2025-7-29 16:16:23

                                                                image

                                                              • @ 2025-7-29 14:44:40

                                                                网炸了

                                                                • @ 2025-7-29 13:43:58

                                                                  第79条评论 至此硬币商城的讨论与faq一样了!

                                                                  • @ 2025-7-29 11:20:18

                                                                  • @ 2025-7-22 19:32:21

                                                                    #P3067. [USACO12OPEN] Balanced Cow Subsets G

                                                                    #include<bits/stdc++.h>
                                                                    #define int long long
                                                                    #define ll long long
                                                                    #define ld long double
                                                                    using namespace std;
                                                                    const ll mod1=1e9+7;
                                                                    const ll mod2=998244353;
                                                                    const int maxn=1e5+10;
                                                                    const ll inf=1e18L;
                                                                    typedef pair<int,int>Pii;
                                                                    typedef pair<__int128,int>P;
                                                                    int n,ans[1<<20],a[30],sum,cnt;
                                                                    map<int,int>mp;
                                                                    vector<int>f[1<<20];
                                                                    void dfs1(int st,int ed,int s,int state){
                                                                    	if(st>ed){
                                                                    		if(mp[s]==0){
                                                                    			mp[s]=++cnt;
                                                                    		}
                                                                    		f[mp[s]].push_back(state);
                                                                    		return;
                                                                    	}
                                                                    	dfs1(st+1,ed,s,state);
                                                                    	dfs1(st+1,ed,s+a[st],state|(1<<(st-1)));
                                                                    	dfs1(st+1,ed,s-a[st],state|(1<<(st-1)));
                                                                    }
                                                                    void dfs2(int st,int ed,int s,int state){
                                                                    	if(st>ed){
                                                                    		if(mp[s]!=0){
                                                                    			int siz=(int)f[mp[s]].size();
                                                                    			for(int i=0;i<siz;i++){
                                                                    				int j=f[mp[s]][i];
                                                                    				ans[j|state]=1;
                                                                    			}
                                                                    		}
                                                                    		return;
                                                                    	}
                                                                    	dfs2(st+1,ed,s,state);
                                                                    	dfs2(st+1,ed,s+a[st],state|(1<<(st-1)));
                                                                    	dfs2(st+1,ed,s-a[st],state|(1<<(st-1)));
                                                                    }
                                                                    signed main(){
                                                                    	ios::sync_with_stdio(0);
                                                                        cin.tie(0),cout.tie(0);
                                                                        cin>>n;
                                                                        for(int i=1;i<=n;i++){
                                                                        	cin>>a[i];
                                                                    	}
                                                                    	dfs1(1,n/2,0,0);
                                                                    	dfs2(n/2+1,n,0,0);
                                                                    	for(int i=1;i<=(1<<n)-1;i++){
                                                                    		sum+=ans[i];
                                                                    	}
                                                                    	cout<<sum;
                                                                    	return 0;
                                                                    }
                                                                    //世界上最遥远的距离是你亲手制造的bug就在你眼前,你却怎么都找不到它(T_T)
                                                                    

                                                                    什么问题?