主站
DreamJudge
院校信息
专业题库
模拟考试
机试真题
专业课程
讨论区
兑换中心
登录
注册
上岸
搜索
全 部
择校分析
笔经面经
学习交流
我要提问
站内公告
调剂专题
精彩爆料
解题报告
P2011
字符串替换 题解:C++ find()、replace()实现
Cookie‘s AE86
发表于 2天前
回复 0
|
赞 0
|
浏览 37
#include<bits/stdc++.h> using namespace std; int main (){ string s; cin >> s; transform(s.begin(), s.end(),s.begin...
P2021
整数去重 题解:注意n的取值范围,时间复杂度不能高于O(nlogn),所以不能直
Cookie‘s AE86
发表于 2天前
回复 0
|
赞 0
|
浏览 41
#include<bits/stdc++.h> using namespace std; int main(){ int n, tmp; while(cin >> n){ int arr[n]; int...
P1097
负二进制 题解:看了大佬的解释
122793160
发表于 2天前
回复 0
|
赞 0
|
浏览 70
#include<bits/stdc++.h> using namespace std; int main(){ int m; while(cin>>m){ ...
P1375
素数 题解:C语言
渐鸿于陆
VIP
发表于 2天前
回复 0
|
赞 0
|
浏览 271
#include<stdio.h> #include<math.h> #include<string.h> int arr[105]; int main(void){ int n;  ...
P1180
最简真分数 题解:算法上感觉对了,但是AC不了
williams
发表于 3天前
在2天前回复
回复 6
|
赞 0
|
浏览 119
#include <stdio.h> #include <stdbool.h> #include <math.h> #include <stdlib.h> #include <string.h> #include <...
P1088
不简洁
yanmy
发表于 2天前
回复 0
|
赞 0
|
浏览 37
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; struct Student { ...
P1254
字符串排序 题解:
潇风青禾
发表于 2天前
回复 0
|
赞 0
|
浏览 56
#include<bits/stdc++.h> using namespace std; int main(){ char s[20]; gets(s); sort(s, s+strlen(s)); puts(s); return 0; } ...
P1475
大整数乘法 题解:Python大法好
Śś
发表于 2天前
回复 0
|
赞 0
|
浏览 33
while True: try: n = input() a = input() b = ...
我要提问
大佬帮我看看为啥只对60%,1067括号匹配
北海北
发表于 3天前
在2天前回复
回复 6
|
赞 0
|
浏览 104
#include using namespace std; int main() { int n; cin>>n; for(int i=0; i { ...
P1156
质因数个数 题解:
今夕何夕12211
发表于 2天前
回复 0
|
赞 0
|
浏览 49
q求助 显示超时 准确率只有75% #include <stdio.h> #include <stdlib.h> #include <string.h> int isprime(int n) { int sqt=s...
我要提问
N诺c++编译器
15275372321
发表于 2天前
在2天前回复
回复 1
|
赞 0
|
浏览 31
有没有人知道N诺的C++编译器用的是什么?祝大家都能上岸
P1375
素数 题解:
今夕何夕12211
发表于 3天前
在2天前回复
回复 3
|
赞 0
|
浏览 75
为什么一直是50% #include <stdio.h> #include <stdlib.h> #include <string.h> int isprime(int n) { int sqt=sqrt(n); ...
P1375
素数 题解:简单易懂
Śś
发表于 2天前
回复 0
|
赞 0
|
浏览 22
#include<iostream> #include<math.h> using namespace std; int Judge(int x) { if(x<2)return 0; ...
P1401
递归大法
老猫
发表于 3年前
在2天前回复
回复 1
|
赞 6
|
浏览 7.6k
1、前序遍历的第一元素是整个二叉树的根节点 2、中序遍历中根节点的左边的元素是左子树,根节点右边的元素是右子树 3、后序遍历的最后一个元素是整个二叉树的根节点 #include <iostream> #include <string> #inc...
综合
无法正确通过题目都是哪些原因造成的?
admin
SVIP
发表于 4年前
在2天前回复
回复 34
|
赞 9
|
浏览 190.1k
同学们首先要知道DreamJudge返回的结果分别代表了什么意思 Accepted:答案正确,恭喜你正确通过了这道题目。 Wrong Answer: 答案错误,出现这个错误的原因一般是你的程序实现或思路出现了问题,或者数据范围边界没有考虑到。 Runtime Er...
P1414
回文字符串 题解:C++ 指针
Griffies
发表于 3天前
回复 0
|
赞 0
|
浏览 41
#include <iostream> #include <algorithm> #include <cstring> using namespace std; int main(){ char s1[1005]; ...
我要提问
本地运行输入同样的数据的输出和提交后的错误输出不一样
rainberry
VIP
发表于 3天前
回复 2
|
赞 0
|
浏览 46
题号1560 Special数在输入为 5 1 100 1000 5000 10000 的情况下在本地跑输出 为1 2 3 4 4提交后错误答案显示我输出为 #include #include int cal2(int num){ &nbs...
P1009
随机数 题解:挑战最短代码
williams
发表于 18天前
在3天前回复
回复 5
|
赞 2
|
浏览 654
#include <stdio.h> int main(){ printf("210"); }
P1565
1565 最短路 Dijkstra+去重边
青缘
SVIP
发表于 1年前
在3天前回复
回复 1
|
赞 4
|
浏览 5.2k
这题本质上就是经典的朴素Dijkstra算法 使用 G[MAXN][MAXN]邻接矩阵表示图 vis[MAXN]表示点是否被标记 dis[MAXN]表示源点到点i的最短距离 pre[MAXN]表示点i的前向点 根据Dijkstra算法,进行迭代即可。 ...
P1156
质因数个数
零壹
发表于 1年前
在3天前回复
回复 1
|
赞 2
|
浏览 1.8k
注意这几点: 1.判断质数判断到sqrt就行,这样可以节省一半时间; 2.为了解决有多个重复因数的情况,每次都让i=2. #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<...
P1461
反序相等 题解:
Amberqwe
发表于 3天前
在3天前回复
回复 2
|
赞 0
|
浏览 33
为啥在其他测试通过,这个不通过 #include <stdio.h> #include <string.h> int main() { for (int i = 1000; i < 1200;...
P1015
单链表 题解:我这个怎么不对,先把输入的数排序,然后用头插法插进链表,奔溃啊
张会老儿
发表于 3天前
在3天前回复
回复 1
|
赞 0
|
浏览 95
#include<iostream> #include<stdio.h> #include<algorithm> #include<string.h> #include<stdlib.h> using namespace...
P2012
堆排序 题解:c++ 小根堆
damowanghwj
发表于 3天前
回复 0
|
赞 0
|
浏览 46
#include<bits/stdc++.h> using namespace std; priority_queue<int,vector<int>,greater<int>> pQue; int main(){ i...
P1899
十进制加密 题解:
williams
发表于 3天前
回复 0
|
赞 0
|
浏览 34
#include <stdio.h> #include <stdbool.h> #include <math.h> #include <stdlib.h> #include <string.h> #include <...
P1490
思路是用-1替换0,然后用前缀和的思想。主要的技巧是用map存begin,刚开始
Ang
VIP
发表于 4年前
在3天前回复
回复 1
|
赞 0
|
浏览 9.3k
#include<bits/stdc++.h> using namespace std; int main(){ string str; while(cin>>str){ map<int,int> m; ...
综合
力扣学习第一日
酷酷兔
发表于 3天前
回复 0
|
赞 0
|
浏览 49
1.力扣 寻找数组的中心索引 力扣参考答案 class Solution { public: int pivotIndex(vector<int> &nums) { int total = accumulate(nums.beg...
P1233
二叉树 题解:
Cookie‘s AE86
发表于 3天前
回复 0
|
赞 0
|
浏览 36
#include<bits/stdc++.h> using namespace std; int main(){ int x,y; while(cin >> x >> y){ while(x != y){ ...
我要提问
字符串区间翻转 只有80%
DestinyCares+++
发表于 3天前
在3天前回复
回复 2
|
赞 0
|
浏览 64
#include<iostream> #include<string> #include<cstring> #include<algorithm> using namespace std; const int maxn = 100000...
P1225
谁是你的潜在朋友 题解:
Amberqwe
发表于 3天前
回复 1
|
赞 0
|
浏览 53
爲什麽beiju輸不出來 #include <stdio.h> int main() { int a, b, c[200]; scanf("%d %d\n", &...
P1375
素数 题解:
Amberqwe
发表于 3天前
在3天前回复
回复 2
|
赞 0
|
浏览 72
为什莫一直是百分之50 #include<stdio.h> #include<math.h> int main() { int n,k=0; while(scanf("%...
1
2
3
4
5
...
292
我要提问
近期热门
1
N诺成就值出炉,帮你一眼识别大神
2
机试如何才能快速提高?
3
[置顶]2023计算机考研择校分析【23考研必读】
4
1377旋转矩阵
5
ip地址(C)
6
广度优先搜索计算每个人移动到每个位置需要去掉障碍物的最少数目,最后求和的最小值
7
简单易懂
8
C++递归解法,有注释
9
1017 幂次方 快速幂模板
10
计算机考研复试笔记——操作系统篇