- 问答
【FAQ】问答&讨论贴
- @ 2025-6-7 13:41:09
最近的事情更无语了,某鱼上现在有三个人在卖数据了。周赛数据永久停止更新。
不允许学生创建新讨论了,后面大家可以在这里讨论相关内容。会定期清理。
删了一些同学们自己举办的比赛的帖子。
我建议你们可以私聊参赛。讨论区太乱了,有些提问我看不到了已经。
更重要的是,还是先好好学算法吧各位同学,当你拿了提高组 分,再考虑自己举办一些简单的比赛。
语法场的初心还是为了学生们巩固基础语法,高水平选手可以选择参加入门语法场和入门提高场 目前也没看见能打的 (参考新春马拉松赛成绩)
感觉不过瘾还可以打atcoder和codeforces
493 条评论
-
tangjiarong LV 10 (18926/22414) @ 2026-7-27 21:13:02终于完成实名认证了
-
@ 2026-7-27 17:44:35
#include <graphics.h> #include #include #include #include
const int W = 960, H = 540; int shake = 0;
// 50 个角色的数据:名字 + 主色 + 大招类型(0~4) struct CharData { char name[16]; int r, g, b; int ultType; // 0雷 1火 2冰 3毒 4光 };
CharData roster[50];
void initRoster() { srand((unsigned)time(NULL)); const char* prefix[5] = {"雷","炎","冰","毒","光"}; for (int i = 0; i < 50; i++) { sprintf(roster[i].name, "%s%d号", prefix[i%5], i/5 + 1); roster[i].ultType = i % 5; roster[i].r = 80 + (i37)%175; roster[i].g = 80 + (i53)%175; roster[i].b = 80 + (i*71)%175; } }
// 粒子 struct P { int x, y, vx, vy, life; int r, g, b; }; P parts[300]; int pcnt = 0;
void burst(int x, int y, int r, int g, int b, int n) { for (int i = 0; i < n && pcnt < 300; i++) { P& p = parts[pcnt++]; p.x = x; p.y = y; p.vx = (rand()%9 - 4) * 3; p.vy = -(rand()%8 + 2) * 3; p.life = 20 + rand()%15; p.r = r; p.g = g; p.b = b; } }
void updateParts() { for (int i = 0; i < pcnt; ) { parts[i].x += parts[i].vx / 3; parts[i].y += parts[i].vy / 3; parts[i].vy += 1; // 重力 parts[i].life--; if (parts[i].life <= 0) { parts[i] = parts[pcnt-1]; pcnt--; } else i++; } }
void drawParts() { for (int i = 0; i < pcnt; i++) { setfillcolor(RGB(parts[i].r, parts[i].g, parts[i].b)); bar(parts[i].x-2, parts[i].y-2, parts[i].x+2, parts[i].y+2); } }
// 角色实体 struct Fighter { int x, y; int hp, mp, stun, facing; int idx; // roster index
void reset(int px, int i) { x = px; y = H - 120; hp = 100; mp = 0; stun = 0; facing = (px < W/2?1:-1); idx = i; } void draw() { CharData& c = roster[idx]; int col = RGB(c.r, c.g, c.b); // 身体 setfillcolor(col); bar(x-25, y-80, x+25, y); // 头 setfillcolor(RGB(255,220,180)); fillcircle(x, y-95, 18); // 朝向小标 setfillcolor(RGB(255,255,0)); bar(x + facing*22, y-70, x + facing*30, y-60); } void move(bool left, bool right) { if (stun > 0) { stun--; return; } if (left) { x -= 5; facing = -1; } if (right) { x += 5; facing = 1; } if (x < 40) x = 40; if (x > W-40) x = W-40; if (mp < 100) mp += 1; } void attack(Fighter& o) { if (stun > 0) return; int ax = x + facing*30; if (abs(ax - o.x) < 60 && abs(y - o.y) < 90) { o.hp -= 6; o.stun = 12; shake = 6; CharData& c = roster[idx]; burst(o.x, o.y-40, c.r, c.g, c.b, 12); if (mp < 100) mp += 10; } } void ult(Fighter& o) { if (stun > 0 || mp < 100) return; mp = 0; CharData& c = roster[idx]; int dmg = 0; switch (c.ultType) { case 0: // 雷:闪电链 dmg = 30; shake = 20; for (int i = 0; i < 60; i++) burst(o.x + rand()%60-30, o.y - rand()%100, 120, 180, 255, 1); break; case 1: // 火:烈焰爆 dmg = 35; shake = 25; for (int i = 0; i < 80; i++) burst(o.x + rand()%80-40, o.y - rand()%80, 255, 120, 0, 1); break; case 2: // 冰:冰封 dmg = 25; shake = 15; o.stun = 50; for (int i = 0; i < 60; i++) burst(o.x + rand()%60-30, o.y - rand()%60, 150, 220, 255, 1); break; case 3: // 毒:腐蚀 dmg = 20; shake = 10; o.hp -= 15; // 持续伤害 for (int i = 0; i < 50; i++) burst(o.x + rand()%50-25, o.y - rand()%50, 80, 200, 80, 1); break; case 4: // 光:神圣裁决 dmg = 40; shake = 30; for (int i = 0; i < 100; i++) burst(o.x + rand()%100-50, o.y - rand()%100, 255, 255, 180, 1); break; } o.hp -= dmg; o.stun = max(o.stun, 30); } void drawUI(int x0) { // HP setfillcolor(RGB(60,0,0)); bar(x0, 20, x0+200, 30); setfillcolor(RGB(230,50,50)); bar(x0, 20, x0 + hp*2, 30); // MP setfillcolor(RGB(0,0,60)); bar(x0, 35, x0+200, 42); setfillcolor(RGB(50,140,255)); bar(x0, 35, x0 + mp*2, 42); // Name setcolor(WHITE); setfont(16, 0, "SimHei"); outtextxy(x0, 50, roster[idx].name); }};
Fighter p1, p2; int sel1 = 0, sel2 = 1; bool selecting = true;
// 简易键盘状态 bool keyDown(char c) { return GetAsyncKeyState(c) & 0x8000; }
void drawSelect() { setfillcolor(RGB(20,20,40)); bar(0,0,W,H); setcolor(YELLOW); setfont(28, 0, "SimHei"); outtextxy(W/2-150, 60, "漫画对战 · 选人"); setfont(18, 0, "SimHei"); setcolor(WHITE); outtextxy(80, 140, "P1 按 1-5 选择:"); outtextxy(W/2+80, 140, "P2 按 6-0 选择:"); for (int i = 0; i < 5; i++) { setfillcolor(RGB(roster[i].r, roster[i].g, roster[i].b)); bar(80 + i120, 200, 80 + i120+100, 280); setfillcolor(RGB(roster[i+5].r, roster[i+5].g, roster[i+5].b)); bar(W/2+80 + i120, 200, W/2+80 + i120+100, 280); setcolor(WHITE); char t[32]; sprintf(t, "%d.%s", i+1, roster[i].name); outtextxy(80 + i120, 290, t); sprintf(t, "%d.%s", i+6, roster[i+5].name); outtextxy(W/2+80 + i120, 290, t); } // 选中框 setcolor(YELLOW); bar(80 + sel1 * 120, 195, 80 + sel1 * 120+105, 285); bar(W/2+80 + sel2 * 120, 195, W/2+80 + sel2 * 120+105, 285); setcolor(WHITE); outtextxy(W/2-100, 380, "ENTER 开始对战"); outtextxy(W/2-100, 420, "P1: A/D 移动 J 攻击 U 大招"); outtextxy(W/2-100, 450, "P2: ←/→ 移动 小键盘1 攻击 小键盘4 大招"); }
int main() { initgraph(W, H); setcaption("漫画风对战 · 50角色 · EGE极限版"); initRoster();
while (1) { if (selecting) { // 选人 if (keyDown('1')) sel1 = 0; if (keyDown('2')) sel1 = 1; if (keyDown('3')) sel1 = 2; if (keyDown('4')) sel1 = 3; if (keyDown('5')) sel1 = 4; if (keyDown('6')) sel2 = 5; if (keyDown('7')) sel2 = 6; if (keyDown('8')) sel2 = 7; if (keyDown('9')) sel2 = 8; if (keyDown('0')) sel2 = 9; if (keyDown('\r')) { p1.reset(300, sel1); p2.reset(660, sel2); selecting = false; } cleardevice(); drawSelect(); Sleep(30); continue; } // 对战 p1.move(keyDown('A'), keyDown('D')); if (keyDown('J')) p1.attack(p2); if (keyDown('U')) p1.ult(p2); p2.move(keyDown(VK_LEFT), keyDown(VK_RIGHT)); if (keyDown(VK_NUMPAD1)) p2.attack(p1); if (keyDown(VK_NUMPAD4)) p2.ult(p1); updateParts(); // 绘制 cleardevice(); // 背景:漫画速度线 for (int i = 0; i < 6; i++) { int x1 = rand()%W, y1 = rand()%H; setlinecolor(RGB(40,40,60)); line(x1, y1, x1 + rand()%40-20, y1 + rand()%40-20); } // 震屏 int ox = 0, oy = 0; if (shake > 0) { ox = rand()%shake - shake/2; oy = rand()%shake - shake/2; shake--; } setviewport(ox, oy, W+ox, H+oy, 1); p1.draw(); p2.draw(); drawParts(); setviewport(0,0,W,H,1); // UI p1.drawUI(40); p2.drawUI(W-240); // 漫画大字 if (p1.hp <= 0 || p2.hp <= 0) { setcolor(RED); setfont(64, 0, "SimHei"); outtextxy(W/2-150, H/2-40, "K.O.!"); setfont(20, 0, "SimHei"); setcolor(WHITE); outtextxy(W/2-200, H/2+40, p1.hp<=0?"P2 胜利! 按 R 重开":"P1 胜利! 按 R 重开"); if (keyDown('R')) { p1.reset(300, sel1); p2.reset(660, sel2); } } Sleep(16); // ~60FPS } closegraph(); return 0;} 复制自己玩DEV玩不了 换个软件玩
-
@ 2026-7-27 16:05:13LPC123q
-
@ 2026-7-27 16:04:57
-
@ 2026-7-27 16:04:16
-
@ 2026-7-27 11:22:06
这人是GAY吧,没事儿就烦我 -
@ 2026-7-26 14:56:32 -
@ 2026-7-26 14:54:40 -
@ 2026-7-26 14:51:22怎么改头像
-
@ 2026-7-26 14:42:33冒泡一下
-
@ 2026-7-26 14:37:22 -
@ 2026-7-26 12:18:38『我们是OIer,』 —Code Warriors—
『所以』 —We Don ′ t Run, We Code—
『不用在跑道上挥汗如雨;』 —No Track, No Sweat—
『不用在球场上健步如飞;』 —No Court, No Sprint—
『更不用在没事的时候,』 —No Need for Training—
『经受非人的体能训练……』 —But Our Minds Run Fast—
『但是,』 —Yet—
『我们却要把头脑』 —We Push Our Minds—
『高速运转,』 —At Full Speed—
『还要接受一大堆』 —Learn What College Students—
『大学生也只是』 —Only Understand Slightly—
『“了解即可”的知识,』 —We Master It—
『把一个个抽象的问题』 —Turn Problems Into Code—
『转化为一篇篇』 —Elegant and Beautiful—
『优美的代码,』 —Algorithms in Art—
『才能在F11按下以后』 —Press F11, Hear Cheers—
『获得欢呼。』 —Then We Are Heard—
『不要以为我们』 —Don ′ t Think We ′ re Easy—
『机房里没有风吹,』 —No Wind or Sun—
『没有日晒,』 —But Our Lab Has Code—
『就比勤劳的体育生们轻松,』 —We Sweat in Brain—
『只不过是大脑和四肢的区别罢了。』 —Mind vs Muscle—
『可是, —But—
『OIer的寂寞和委屈又有谁能懂?』 —Who Understands Us?—
『自习课鏖战机房,』 —Contests in Self Study—
『却被认为是逃课上网;』 —Called Skipping Class—
『为荣耀耽误考试去比赛,』 —Miss Exams for Glory—
『却被认为是逃避。』 —But They Call It Escape—
『体育的同学们虽然辛苦,』 —Athletes Have Fans—
『但在挥汗如雨的背后,』 —They Have Applause—
『有人在喝彩鼓掌;』 —We Have Only the Screen—
『在风吹日晒的同时,』 —They Have Fans Watching—
『有粉丝在仰慕。』 —We Have No Spotlight—
『而我们呢?』 —Where Is Our Light?—
『与WA较劲的时候,』 —Fighting Against Errors—
『只有那一遍遍的运行窗口,』 —Only the Command Window—
『知道我们的不屈;』 —Knows Our Will—
『刷题的漫漫长夜,』 —Long Nights of Practice—
『只有陪伴我们的笔记本电脑,』 —Only Our Laptop Knows—
『知道我们的不懈;』 —Knows Our Determination—
『在自习课别人学习的时候,』 —While Others Study—
『只有板砖般的算法导论,』 —Only the Thick Book—
『知道我们的进取;』 —Knows Our Ambition—
『没有人会理解, —No One Understands—
『OIer,』 —We Are OIers—
『除了程序、算法之外』 —Code and Algorithms—
『别无他言。』 —That ′ s All We Speak—
『我们的世界里,』 —No Games, No Stars—
『从来不会有游戏、歌星的出现。』 —Only Code and Logic—
『这不是被家长逼迫的“小四门”,』 —Not Forced by Parents—
『是我们的兴趣,』 —It ′ s Our Passion—
『我们的爱好』 —Our Interest—
『乃至我们的事业。』 —Our Future—
『每一个OIer都幻想着』 —We Dream of Medals—
『自己脖子上可以』 —Gold, Silver, Bronze—
『挂上一块沉甸甸的金牌,』 —Not Exam Chains—
『而不是』 —But Freedom—
『万恶的应试教育的枷锁。』 —Not the System—
『没准哪个OIer,』 —Maybe One of Us—
『就是下一个艾伦•图灵,』 —Next Alan Turing—
『挑战头脑的极限,』 —Pushing the Limits—
『去做最不平凡的自己……』 —To Be Extraordinary—
-
@ 2026-7-25 20:30:44大家可以发CSP-J集训游记~~~
-
@ 2026-7-23 21:44:45@yang窝6级63(快发硬币)
-
@ 2026-7-19 15:58:39
居然敢不发,气死我了
-
@ 2026-7-19 15:58:02
老师神魔时候发硬币
-
@ 2026-7-19 15:49:45上来了
-
@ 2026-7-19 15:44:32孩子们,备战普及组的一定要去打比赛列表前面的语法周赛和16连测,很有用
后面忘了
-
@ 2026-7-19 15:38:54/
-
@ 2026-7-19 15:37:32
1
-
@ 2026-7-18 7:47:58
Jdhchdjdnc
-
@ 2026-7-17 17:13:55
ry55u55r6ur6ur56u6uh rt\jhtjr6trtrjyhhe hrjtrjr
-
@ 2026-7-17 11:36:15
极品C盘
-
@ 2026-7-15 17:39:45
cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; cout << setw(3) << x; v
-
@ 2026-7-12 17:47:36
***~~#include<bits/stdc++.h> using namespace std; int n,m,ans; char arr[115][115]; int used[115][115]; queueqx; queueqy; int dx[]={-1,-1,-1,0,1,1,1,0}; int dy[]={-1,0,1,1,1,0,-1,-1}; void bfs(int startx,int starty) { qx.push(startx); qy.push(starty); used[startx][starty]=1; while(qx.size()) { int tx=qx.front(),ty=qy.front(); for(int i=0;i<8;i++) { int nx=tx+dx[i],ny=ty+dy[i]; if(nx>0&&nx<=n&&ny>0&&ny<=m&&arr[nx][ny]=='W'&&used[nx][ny]==0) { qx.push(nx); qy.push(ny); used[nx][ny]=1; } } qx.pop(); qy.pop(); }
} int main() { cin>>n>>m; for(int i=1;i<=n;i++) { for(int j=1;j<=m;j++) { cin>>arr[i][j]; } } for(int i=1;i<=n;i++) { for(int j=1;j<=m;j++) { if(arr[i][j]=='W'&&used[i][j]==0) { bfs(i,j); ans++; } } } cout<<ans;
}~~*</u>**
-
@ 2026-7-12 16:38:35
ht
-
@ 2026-7-11 11:28:42
-
@ 2026-7-10 16:25:37
h
-
@ 2026-7-9 11:52:24
333333
-
@ 2026-7-9 10:56:34第一次发评论
-
@ 2026-7-5 18:49:46人生第一次SE!!!

-
@ 2026-7-3 19:16:51 -
@ 2026-6-30 18:02:38A0048题解
#include<iostream> #include<cstring> #include<queue> #include<cstdio> #include<cmath> #include<algorithm> #include<map> #include<vector> #include<stack> #include<sstream> #include<set> #include<unordered_set> #include<time.h> #include<stdlib.h> #include<unordered_map> #include<random> #include<iomanip> #include<climits> #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 #define vl vector<long long> const ll mod1 = 1e9 + 7; const ll mod2 = 998244353; const ll mod3 = 1e9; const int maxn = 5e4 + 10; const int maxm = 1e5 + 10; const int maxq = 5e4 + 10; const int nn = maxn * 20; const ll inf = 1e18L; using namespace std; typedef pair<int,int>Pii; typedef pair<ll ,int>Pli; typedef pair<int, pair<int, int>>Pi; typedef pair<string, Pi>psp; typedef pair<int, vector<int>>piv; typedef pair<ll, ll>P; using namespace std; int n,m,s,vis[100005],dis[100005]; int aa,bb; struct mapp{ int to,cost; }; vector<mapp>a[200005]; priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>>q; void dij(){ for(int i=1;i<=n;i++) dis[i]=1e9; dis[s]=0; q.push({0,s}); while(!q.empty()){ pair<int,int> now=q.top(); q.pop(); int v=now.second; if(vis[v]) continue; vis[v]=1; for(int i=0;i<a[v].size();i++){ mapp g=a[v][i]; if(dis[g.to ]>dis[v]+g.cost ){ dis[g.to ]=dis[v]+g.cost ; q.push({dis[g.to ],g.to }); } } } } int main(){ ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); n=3,m=2,s=1; cin>>aa>>bb; a[1].push_back({2,aa}),a[2].push_back({3,bb}); dij(); cout<<dis[3]; } -
@ 2026-6-29 19:11:44
-
@ 2026-6-29 17:16:45拜拜 Wotojo 2030
辅域、挖土机学员补题域、学生域
可以在任何平台登陆其他老师及同学的账号,可以滥用 OJ 系统。
没有发现将会采取“奖励硬币”或“AK周赛成绩”等奖励措施。并在 OJ 系统中“标记榜样行为”永久保留。
所有老师请告诉学生自己的账号密码;要在公用电脑上记住密码;使用浏览器请不要清除历史记录中的密码。
HARDWARE 不常用软件卸载、Visual Studio Code高级使用、Codeforces注册指南
题目数据(不包括任何问题)都可以联系:www.poki.com
最近的事情更精彩了,天猫上现在有LONG_LONG_MAX只动物在卖数据了。年赛数据开始更新。
-
@ 2026-6-29 17:08:36 -
@ 2026-6-29 16:58:03去年的事情更高兴了,京东618上现在有N个人在卖数据了。周赛数据永久每秒更新。
允许学生创建新讨论了,后面大家可以在这里删除相关内容。会定期增加。
增加了一些老师们自己举办的比赛的帖子。
我建议你们可以公开参赛。讨论区太整洁了,有些提问我看不到了已经。
更重要的是,还是先好好学开发吧各位同学,当你拿了字节跳动offer ,再考虑自己举办许多简单的比赛。
IOI场的内涵还是为了学生们巩固输入输出,低水平选手可以选择参加头文件场和省选场 目前看见很多能打的 (参考IOI成绩)
感觉过瘾不可以打atcoder和codeforces
-
@ 2026-6-28 22:23:00GESP讨论帖:
可以在下面讨论一些关于GESP的内容
-
@ 2026-6-28 22:21:06GESP通过100祭
-
@ 2026-6-25 21:06:06
??? -
@ 2026-6-20 21:14:23 -
@ 2026-6-20 18:12:22
-
@ 2026-6-20 15:22:15窝是gay
-
@ 2026-6-14 0:01:48
-
@ 2026-6-13 14:03:53厉害
-
@ 2026-6-13 14:03:40怎么搞的
-
@ 2026-6-13 14:01:33[冯昱博]fengyubo,又一个挖土机?
-
@ 2026-6-13 0:26:34 -
@ 2026-6-12 22:54:47有人吗



