{ "generatedAt": "2026-09-12T10:44:08.975Z", "baseUrl": "https://oj.qonnwolf.com", "course": { "id": "6a826183bdde81887a2237b5", "title": "2026 秋季班 CSP04" }, "group": "橙子周六1400CSP04", "section": { "id": "6a826183bdde81887a2237ba", "no": "02", "name": "简单排序", "title": "02 简单排序" }, "progress": [ { "title": "01 基础回顾", "submitted": 5, "started": 5, "students": 5 }, { "title": "02 简单排序", "submitted": 2, "started": 2, "students": 5 }, { "title": "03 二维数组", "submitted": 0, "started": 0, "students": 5 }, { "title": "04 二维数组图形", "submitted": 0, "started": 0, "students": 5 }, { "title": "05 二维数组综合", "submitted": 0, "started": 0, "students": 5 }, { "title": "06 综合训练1", "submitted": 0, "started": 0, "students": 5 }, { "title": "07 自定义函数进阶", "submitted": 0, "started": 0, "students": 5 }, { "title": "08 sort基础", "submitted": 0, "started": 0, "students": 5 }, { "title": "09 sort进阶", "submitted": 0, "started": 0, "students": 5 }, { "title": "10 结构体基础", "submitted": 0, "started": 0, "students": 5 }, { "title": "11 结构体进阶", "submitted": 0, "started": 0, "students": 5 }, { "title": "12 综合训练2", "submitted": 0, "started": 0, "students": 5 }, { "title": "13 递推算法 ", "submitted": 0, "started": 0, "students": 5 }, { "title": "14 指针基础", "submitted": 0, "started": 0, "students": 5 }, { "title": "15 指针进阶", "submitted": 0, "started": 0, "students": 5 }, { "title": "16 文件操作与异常处理", "submitted": 0, "started": 0, "students": 5 }, { "title": "17 综合训练3", "submitted": 0, "started": 0, "students": 5 }, { "title": "18 真题实战1", "submitted": 0, "started": 0, "students": 5 }, { "title": "19 真题实战2", "submitted": 0, "started": 0, "students": 5 }, { "title": "20 期末考试", "submitted": 0, "started": 0, "students": 5 } ], "classSummary": { "studentCount": 5, "startedStudentCount": 2, "submittedStudentCount": 2, "completedStudentCount": 0, "attentionStudentCount": 5, "notStartedStudentCount": 3, "recoveredStudentCount": 1, "completionRate": 5.88, "firstAttemptScoreRate": 70, "finalScoreRate": 5.88, "averageAttemptsPerStudent": 1.6, "averageFirstAttemptDurationMs": 1649862 }, "perProblem": [ { "name": "📝 课堂练习", "title": "CSP04-02A", "problems": [ { "pid": 4262, "title": "冒泡排序实现", "submitted": 2, "accepted": 2, "firstAttemptScoreRate": 55, "averageAttempts": 2 }, { "pid": 4263, "title": "选择排序实现", "submitted": 2, "accepted": 2, "firstAttemptScoreRate": 100, "averageAttempts": 1 }, { "pid": 4264, "title": "计算排序后的交换次数", "submitted": 0, "accepted": 0, "firstAttemptScoreRate": null, "averageAttempts": null }, { "pid": 4265, "title": "求第 K 小的数", "submitted": 0, "accepted": 0, "firstAttemptScoreRate": null, "averageAttempts": null }, { "pid": 4266, "title": "成绩排名(稳定排序)", "submitted": 0, "accepted": 0, "firstAttemptScoreRate": null, "averageAttempts": null }, { "pid": 6602, "title": "简单排序 - 选择题", "submitted": 0, "accepted": 0, "firstAttemptScoreRate": null, "averageAttempts": null }, { "pid": 6603, "title": "简单排序 - 判断题", "submitted": 1, "accepted": 1, "firstAttemptScoreRate": 40, "averageAttempts": 2 } ] }, { "name": "📋 课后作业", "title": "CSP04-02B", "problems": [ { "pid": 4267, "title": "数字排序(作业)", "submitted": 0, "accepted": 0, "firstAttemptScoreRate": null, "averageAttempts": null }, { "pid": 4268, "title": "找中位数", "submitted": 0, "accepted": 0, "firstAttemptScoreRate": null, "averageAttempts": null }, { "pid": 4269, "title": "判断排序方向", "submitted": 0, "accepted": 0, "firstAttemptScoreRate": null, "averageAttempts": null } ] }, { "name": "🚀 拓展练习", "title": "CSP04-02C", "problems": [ { "pid": 4270, "title": "计算逆序对数量", "submitted": 0, "accepted": 0, "firstAttemptScoreRate": null, "averageAttempts": null }, { "pid": 4271, "title": "鸡尾酒排序", "submitted": 0, "accepted": 0, "firstAttemptScoreRate": null, "averageAttempts": null }, { "pid": 4272, "title": "区间排序", "submitted": 0, "accepted": 0, "firstAttemptScoreRate": null, "averageAttempts": null }, { "pid": 4273, "title": "排序可视化(模拟输出)", "submitted": 0, "accepted": 0, "firstAttemptScoreRate": null, "averageAttempts": null }, { "pid": 4274, "title": "双关键字排序", "submitted": 0, "accepted": 0, "firstAttemptScoreRate": null, "averageAttempts": null }, { "pid": 8164, "title": "部分排序", "submitted": 0, "accepted": 0, "firstAttemptScoreRate": null, "averageAttempts": null }, { "pid": 8165, "title": "相邻差最小", "submitted": 0, "accepted": 0, "firstAttemptScoreRate": null, "averageAttempts": null } ] } ], "students": [ { "uid": 202, "name": "张雨禾", "groups": [ "橙子周六1400CSP04" ], "stats": { "assigned": 17, "accepted": 3, "firstAttemptScoreRate": 80, "finalScoreRate": 17.65, "attemptCount": 4, "signals": [ "尚未完成" ] }, "problems": [ { "tid": "tid1", "pid": 4262, "title": "冒泡排序实现", "submissions": [ { "seq": 1, "status": "AC", "score": 100, "rid": "6aa4f35025d632ee5c41c5dd", "lang": "cc.cc14o2", "errorHead": "", "code": "#include\nusing namespace std;\nint arr[10010];\nint n;\nint main(){\n\tcin>>n;\n\tfor(int i=1;i<=n;i++){\n\t\tcin>>arr[i];\n\t}\n\t\n\t\n\tfor(int i=1;i<=n-1;i++){\n\t\tfor(int j=1;j<=n-i;j++){\n\t\t\tif(arr[j]>arr[j+1]){\n\t\t\t\tswap(arr[j],arr[j+1]);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tfor(int i=1;i<=n;i++){\n\t\tcout<\nusing namespace std;\nint n;\nint arr[10010];\nint main(){\n\tcin>>n;\n\tfor(int i=1;i<=n;i++){\n\t\tcin>>arr[i];\n\t}\n\tfor(int i=1;i<=n;i++){\n\t\tint maxx=arr[i];\n\t\tint idx=i;\n\t\tfor(int j=i+1;j<=n;j++){\n\t\t\tif(arr[j]>maxx){\n\t\t\t\tmaxx=arr[j];\n\t\t\t\tidx=j;\n\t\t\t}\n\t\t}\n\t\tswap(arr[idx],arr[i]);\n\t}\n\tfor(int i=1;i<=n;i++){\n\t\tcout<\nusing namespace std; \nint arr[1000];\nint main(){\n\tint n;\n\tcin>>n;\n\t\n\tfor(int i=1;i<=n;i++){\n\t\tcin>>arr[i];\n\t}\n\t\n\tfor(int i=1;i<=n-1;i++){\n\t\tfor(int j=1;j<=n-i;j++){\n\t\t\tif(arr[j]>arr[j+1]);\n\t\t\t int t=arr[j];\n\t\t\t arr[j]=arr[j+1];\n\t\t\t arr[j+1]=t;\n\t\t}\n\t}\n\tfor(int i=1;i<=n;i++){\n\t\tcout<\nusing namespace std; \nint arr[1000];\nint main(){\n\tint n;\n\tcin>>n;\n\t\n\tfor(int i=1;i<=n;i++){\n\t\tcin>>arr[i];\n\t}\n\t\n\tfor(int i=1;i<=n-1;i++){\n\t\tfor(int j=1;j<=n-i;j++){\n\t\t\tif(arr[j]>arr[j+1]);\n\t\t\t int t=arr[j];\n\t\t\t arr[j]=arr[j+1];\n\t\t\t arr[j+1]=t;\n\t\t}\n\t}\n\tfor(int i=1;i<=n;i++){\n\t\tcout<\nusing namespace std; \nint arr[1000];\nint main(){\n\tint n;\n\tcin>>n;\n\t\n\tfor(int i=1;i<=n;i++){\n\t\tcin>>arr[i];\n\t}\n\t\n\tfor(int i=1;i<=n-1;i++){\n\t\tfor(int j=1;j<=n-i;j++){\n\t\t\tif(arr[j]>arr[j+1]){\n\t\t\t int t=arr[j];\n\t\t\t arr[j]=arr[j+1];\n\t\t\t arr[j+1]=t;\n\t\t\t}\n\t\t}\n\t}\n\tfor(int i=1;i<=n;i++){\n\t\tcout<\nusing namespace std; \nint arr[1000];\nint main(){\n\tint n;\n cin>>n;\n for(int i=1;i<=n;i++){\n \tcin>>arr[i];\n\t}\n\t\n\tfor(int i=1;i<=n;i++){\n\t\tint maxx=arr[i];\n\t\tint idx=i;\n\t\tfor(int j=i+1;j<=n;j++){\n\t\t\tif(arr[j]>maxx){\n\t\t\t\tmaxx=arr[j];\n\t\t\t\tidx=j;\n\t\t\t}\n\t\t}\n\t\tswap(arr[idx],arr[i]);\n\t}\n\tfor(int i=1;i<=n;i++){\n\t\tcout<