主站
DreamJudge
院校信息
专业题库
模拟考试
机试真题
专业课程
讨论区
兑换中心
登录
注册
上岸
搜索
全 部
择校分析
笔经面经
学习交流
我要提问
站内公告
调剂专题
精彩爆料
解题报告
P1006
字符串翻转 题解:C++
kar
发表于 2天前
回复 0
|
赞 0
|
浏览 124
int main(){ string str; cin>>str; reverse(str.begin(),str.end());  ...
择校分析
[置顶]2023计算机考研择校分析【23考研必读】
admin
SVIP
发表于 1年前
在2天前回复
回复 3
|
赞 21
|
浏览 55.4k
如果同学们有自己想考的院校,就按自己的目标院校科目备考就行,比如浙江的同学可能更倾向于考浙大。 如果同学们还没有下定决心要考哪所学校的话,可以看看下面的考研择校分析做参考。 同学们需要特别注意:考研和高考不一样,高考只要能力强分高,几乎可以肯定能上好学校,因为高考可以填...
P3502
密码的翻译 题解:
雨梦のkira
发表于 3天前
回复 0
|
赞 0
|
浏览 64
#include<bits/stdc++.h> using namespace std; int main() { string s; while(cin >> s){ //only a for for(auto &...
P2011
字符串替换 题解:
雨梦のkira
发表于 3天前
回复 0
|
赞 0
|
浏览 47
看不懂的话就用双重循环吧~,如果有多个tantan, #include <bits/stdc++.h> using namespace std; int main() { string s; string sp = "baibai"; bool is...
P5105
集合中的相同元素 题解:
雨梦のkira
发表于 3天前
回复 0
|
赞 0
|
浏览 80
用set去重吧,如果不要把个数排在前面直接用set而不是unordered_set了 #include<bits/stdc++.h> using namespace std; int main() { int n; while(cin >>...
P1929
简单排序 题解:
雨梦のkira
发表于 3天前
回复 0
|
赞 0
|
浏览 60
简单sort #include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; int ma...
P5128
喝饮料问题 题解:
雨梦のkira
发表于 3天前
回复 0
|
赞 0
|
浏览 127
第一眼还以为是背包问题的dp呢,没想到还是个挺简单的贪心。 我们可以想想,一元可以买每种饮料多少?我们是不是每次要拿钱少,量还大的饮料? #include <iostream> #include <vector> #include <strin...
P2018
三角形判定 题解:
Cookie‘s AE86
发表于 3天前
回复 0
|
赞 0
|
浏览 36
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; for(int i = 0; i < n; i++){ ...
P2014
找出众数 题解:c++实现,set去重,count计算出现次数
Cookie‘s AE86
发表于 3天前
回复 0
|
赞 0
|
浏览 53
#include<bits/stdc++.h> using namespace std; int main (){ int n, tmp; cin >> n; set<int> myset; int arr...
P2011
字符串替换 题解:C++ find()、replace()实现
Cookie‘s AE86
发表于 3天前
回复 0
|
赞 0
|
浏览 48
#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
发表于 3天前
回复 0
|
赞 0
|
浏览 46
#include<bits/stdc++.h> using namespace std; int main(){ int n, tmp; while(cin >> n){ int arr[n]; int...
P1097
负二进制 题解:看了大佬的解释
122793160
发表于 3天前
回复 0
|
赞 0
|
浏览 70
#include<bits/stdc++.h> using namespace std; int main(){ int m; while(cin>>m){ ...
P1375
素数 题解:C语言
渐鸿于陆
VIP
发表于 3天前
回复 0
|
赞 0
|
浏览 272
#include<stdio.h> #include<math.h> #include<string.h> int arr[105]; int main(void){ int n;  ...
P1180
最简真分数 题解:算法上感觉对了,但是AC不了
williams
发表于 4天前
在3天前回复
回复 6
|
赞 0
|
浏览 121
#include <stdio.h> #include <stdbool.h> #include <math.h> #include <stdlib.h> #include <string.h> #include <...
P1088
不简洁
yanmy
发表于 3天前
回复 0
|
赞 0
|
浏览 46
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; struct Student { ...
P1254
字符串排序 题解:
潇风青禾
发表于 3天前
回复 0
|
赞 0
|
浏览 71
#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大法好
Śś
发表于 3天前
回复 0
|
赞 0
|
浏览 33
while True: try: n = input() a = input() b = ...
我要提问
大佬帮我看看为啥只对60%,1067括号匹配
北海北
发表于 4天前
在3天前回复
回复 6
|
赞 0
|
浏览 107
#include using namespace std; int main() { int n; cin>>n; for(int i=0; i { ...
P1156
质因数个数 题解:
今夕何夕12211
发表于 3天前
回复 0
|
赞 0
|
浏览 53
q求助 显示超时 准确率只有75% #include <stdio.h> #include <stdlib.h> #include <string.h> int isprime(int n) { int sqt=s...
我要提问
N诺c++编译器
15275372321
发表于 3天前
在3天前回复
回复 1
|
赞 0
|
浏览 40
有没有人知道N诺的C++编译器用的是什么?祝大家都能上岸
P1375
素数 题解:
今夕何夕12211
发表于 3天前
在3天前回复
回复 3
|
赞 0
|
浏览 78
为什么一直是50% #include <stdio.h> #include <stdlib.h> #include <string.h> int isprime(int n) { int sqt=sqrt(n); ...
P1375
素数 题解:简单易懂
Śś
发表于 3天前
回复 0
|
赞 0
|
浏览 34
#include<iostream> #include<math.h> using namespace std; int Judge(int x) { if(x<2)return 0; ...
P1401
递归大法
老猫
发表于 3年前
在3天前回复
回复 1
|
赞 6
|
浏览 7.6k
1、前序遍历的第一元素是整个二叉树的根节点 2、中序遍历中根节点的左边的元素是左子树,根节点右边的元素是右子树 3、后序遍历的最后一个元素是整个二叉树的根节点 #include <iostream> #include <string> #inc...
综合
无法正确通过题目都是哪些原因造成的?
admin
SVIP
发表于 4年前
在3天前回复
回复 34
|
赞 9
|
浏览 190.2k
同学们首先要知道DreamJudge返回的结果分别代表了什么意思 Accepted:答案正确,恭喜你正确通过了这道题目。 Wrong Answer: 答案错误,出现这个错误的原因一般是你的程序实现或思路出现了问题,或者数据范围边界没有考虑到。 Runtime Er...
P1414
回文字符串 题解:C++ 指针
Griffies
发表于 3天前
回复 0
|
赞 0
|
浏览 48
#include <iostream> #include <algorithm> #include <cstring> using namespace std; int main(){ char s1[1005]; ...
我要提问
本地运行输入同样的数据的输出和提交后的错误输出不一样
rainberry
VIP
发表于 3天前
回复 2
|
赞 0
|
浏览 51
题号1560 Special数在输入为 5 1 100 1000 5000 10000 的情况下在本地跑输出 为1 2 3 4 4提交后错误答案显示我输出为 #include #include int cal2(int num){ &nbs...
P1009
随机数 题解:挑战最短代码
williams
发表于 19天前
在3天前回复
回复 5
|
赞 2
|
浏览 670
#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天前
回复 2
|
赞 0
|
浏览 36
为啥在其他测试通过,这个不通过 #include <stdio.h> #include <string.h> int main() { for (int i = 1000; i < 1200;...
1
2
3
4
5
...
292
我要提问
近期热门
1
N诺成就值出炉,帮你一眼识别大神
2
机试如何才能快速提高?
3
[置顶]2023计算机考研择校分析【23考研必读】
4
1377旋转矩阵
5
ip地址(C)
6
广度优先搜索计算每个人移动到每个位置需要去掉障碍物的最少数目,最后求和的最小值
7
简单易懂
8
C++递归解法,有注释
9
1017 幂次方 快速幂模板
10
计算机考研复试笔记——操作系统篇