主站
DreamJudge
院校信息
专业题库
模拟考试
机试真题
专业课程
讨论区
兑换中心
登录
注册
上岸
搜索
全 部
择校分析
笔经面经
学习交流
我要提问
站内公告
调剂专题
精彩爆料
解题报告
P1838
南京理工-括号匹配 题解:使用stack 轻松解决
damowanghwj
回复 0
|
赞 0
|
浏览 89
#include<bits/stdc++.h> using namespace std; int GetPriority(char ch){ if(ch == '(' || ch == ')') return 1; if(ch == '<' || ...
P1838
南京理工-括号匹配 题解:map辅助判断
RingoCrystal
回复 0
|
赞 0
|
浏览 94
这个解法的本质其实很简单,这里提供一个例子来辅助大家理解 ({[)]为例,首先加入(,第一次判定为不等{加入,之后又不等[加入,)仍然不等加入,此时为({[),这时其实已经很显然了,对于左括号和不能正确匹配的右括号都采用跳过的方式,并不是直接就结束了,最后所以判断是否为空,对于正常的状态...
P1067
括号的匹配 题解:想问一下大佬为什么只能过20%
RingoCrystal
回复 1
|
赞 0
|
浏览 117
#include <bits/stdc++.h> using namespace std; int level(char a){ int level; if(a=='<')level=1; else if(a=='(')level=2...
P1000
C++
光明守护神
回复 0
|
赞 0
|
浏览 153
#include<bits/stdc++.h> using namespace std; int main() { auto a=1000000000*2; auto b=a; cin>>a>>b; cout<<a+...
P1051
日期计算 题解:只有50% 请问有什么问题吗
13729922474
回复 2
|
赞 0
|
浏览 138
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <stdio.h> #include <string.h> #include <string> #include ...
P3501
回文数的判断 题解:
honevid
VIP
回复 0
|
赞 0
|
浏览 87
#include <cstdio> #include <queue> using namespace std; int main() { char num[5]; while (scanf("%s", num) != EOF) { get...
P1375
素数 题解:只能过83%
emperorT
回复 0
|
赞 0
|
浏览 110
#include<bits/stdc++.h> using namespace std; bool isPrime(int n){ if(n<=1){ return false; } fo...
P1091
促销计算 题解:
emperorT
回复 0
|
赞 0
|
浏览 124
#include<bits/stdc++.h> using namespace std; int main(){ float n; while(cin>>n){ if(n<1000){ cout<<"discount=1,pay=...
P1023
IP地址 题解:
stonebignew
VIP
回复 0
|
赞 0
|
浏览 128
#include <stdio.h> #include <string.h> //获取点与点之间的地址值 int fun(char s[100],int i,int j){ int len=j-i,sum=0,t=1; &...
P5127
动态查找的问题 题解:使用hash表
honevid
VIP
回复 0
|
赞 0
|
浏览 107
## 分析——采用hash表 - 数据总数不超过十万,可以将hash表长设置为十万,采用最简单的线性探测法,一旦发生冲突就往后找 ### 代码 // ConsoleApplication1.cpp : 此文件包含 "main" 函数。程序执行将在此处开...
P2019
字母排序 题解:32行极简易理解,比其它题解短10行!!!
honevid
VIP
回复 0
|
赞 0
|
浏览 177
## 分析 1.创建一个大小为128的数组sheet,序号表示ascii码强转为int表示的数值,对应的数组值表示该ascii码在输入字符串中出现的次数 2.设置一个max变量和id变量,max初值为0,从下标为((int)'A')开始遍历sheet数组,找到最大的值赋给m...
P1541
字符串处理-单词统计 题解:只有66%通过 不知道还有哪里没考虑到
emperorT
回复 1
|
赞 0
|
浏览 109
#include<bits/stdc++.h> using namespace std; int main(){ string s; getline(cin,s); int l = s.size(); int sum=0; for(int i=0;i<l;i++...
P1185
全排列 题解:为什么显示wrong answer
今夕何夕12211
回复 1
|
赞 0
|
浏览 121
#include <stdio.h> #include <stdlib.h> #include <string.h> void swap(char a[],int m,int n) { char temp=a[m]; ...
P1307
组队刷题 题解:为什么不对 我这个struct就多定义了一个 就只能ac20%
08193003
回复 3
|
赞 0
|
浏览 135
#include<bits/stdc++.h> using namespace std; struct bankuai{ double a; double b; double c=b/a; }aa[1005]; bool cmp(bankuai a1,...
P1563
迷宫 题解 为什么显示runtime error 求教
今夕何夕12211
回复 1
|
赞 0
|
浏览 94
#include <stdio.h> #include <stdlib.h> #include <string.h> struct node { int x; int y; ...
P1474
大整数加法 题解:C语言只有50%
williams
回复 1
|
赞 0
|
浏览 135
#include <stdio.h> #include <stdbool.h> #include <math.h> #include <stdlib.h> #include <string.h> #include <...
P1027
删除字符串2 题解:
20082123
回复 0
|
赞 0
|
浏览 132
暴力 #include<string> #include<iostream> using namespace std; int main(){ string s; int k1,...
P1026
删除字符串 题解:
20082123
回复 0
|
赞 0
|
浏览 83
#include<bits/stdc++.h> using namespace std; int main(){ string s; int k; cin&g...
P1022
删除最大最小数 题解:
20082123
回复 0
|
赞 0
|
浏览 107
PYTHON n=int(input()) max=0 min=666666 k=input() b=k.split(' ') for j in b: if(int(j)>max): &n...
P4777
二叉树叶结点的个数 题解:
LittleEleven
回复 0
|
赞 0
|
浏览 69
#include<bits/stdc++.h> using namespace std; int ans; int dfs(){ char ch; cin>>ch; ...
P1151
成绩排序 题解:
peterzhou
回复 1
|
赞 1
|
浏览 762
#include <bits/stdc++.h> using namespace std; int n,flag; struct Stu{ string name; int score; }; bool cm...
P1541
字符串处理-单词统计 题解:我感觉代码有问题,但是不知道问题在哪里通过率66%,
泛泛之交
回复 2
|
赞 0
|
浏览 115
#include<bits/stdc++.h> using namespace std; int main() { string s; getline(cin,s); ...
P1410
打印日期 题解:求大佬解释下为什么只有60%通过率
泛泛之交
回复 2
|
赞 0
|
浏览 137
#include <bits/stdc++.h> using namespace std; int month[]={0,31,28,31,30,31,30,31,31,30,31,30,31}; int main() { ...
P1019
字母频率 题解:
20082123
回复 0
|
赞 0
|
浏览 88
#include<bits/stdc++.h> using namespace std; int main(){ string s; int k,max=0;  ...
P1016
字符分类 题解:
20082123
回复 0
|
赞 0
|
浏览 115
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; &nbs...
P1014
加密算法 题解:
20082123
回复 0
|
赞 0
|
浏览 153
#include<bits/stdc++.h> using namespace std; int main(){ string s; getline(cin,s); &n...
P1013
判断素数 题解:
20082123
回复 0
|
赞 0
|
浏览 152
#include<bits/stdc++.h> using namespace std; bool sx(int a){ if(a<2)//边界情况 re...
P1012
字符移动 题解:
20082123
回复 0
|
赞 0
|
浏览 157
#include<bits/stdc++.h> using namespace std; int main(){ string s; int j=0; cin...
P1052
学生成绩管理 题解:上机前最后一个题解
孙某人
回复 0
|
赞 0
|
浏览 90
#include <iostream> #include <string.h> #include <math.h> #include <algorithm> using namespace std; typedef struct s...
P1022
删除最大最小数 题解:c++
huanghu
回复 3
|
赞 0
|
浏览 244
#include<stdio.h> #include<iostream> using namespace std; int main(){ int n; cin>>n; int arr[n]...
1
2
3
4
5
...
124
我要提问
近期热门
1
N诺成就值出炉,帮你一眼识别大神
2
机试如何才能快速提高?
3
[置顶]计算机考研择校分析【25考研必读】
4
广度优先搜索计算每个人移动到每个位置需要去掉障碍物的最少数目,最后求和的最小值
5
1377旋转矩阵
6
ip地址(C)
7
简单易懂
8
C++递归解法,有注释
9
1017 幂次方 快速幂模板
10
计算机考研复试笔记——操作系统篇