主站
DreamJudge
院校信息
专业题库
模拟考试
机试真题
上岸课程
讨论区
兑换中心
登录
注册
上岸
搜索
推 荐
择校分析
笔经面经
学习交流
我要提问
站内公告
调剂专题
精彩爆料
解题报告
P1410
打印日期 题解:暴力
zxjrheaven
回复 0
|
赞 0
|
浏览 0
#include <bits/stdc++.h> using namespace std; struct date1 { int year; int moon=0; ...
P1392
杨辉三角形 - 西北工业大学 题解:暴力
zxjrheaven
回复 0
|
赞 0
|
浏览 0
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; &n...
P1377
旋转矩阵 - 北航 题解:暴力
zxjrheaven
回复 0
|
赞 0
|
浏览 0
#include <bits/stdc++.h> using namespace std; int juzhen1[10][10]; int juzhen2[10][10]; int juzhen3[10][10]; int juzhen4[10][10]; int...
P1254
字符串排序 题解:暴力
zxjrheaven
回复 0
|
赞 0
|
浏览 0
#include <bits/stdc++.h> using namespace std; char str[21]; bool cmp(char a,char b) { return a<b; } int ma...
P1034
水仙花数 题解:
jaygee_
回复 0
|
赞 0
|
浏览 57
#include<bits/stdc++.h> using namespace std; int main() { int m, n; while(cin >> m >> n) { if(m == 0 && n ==...
P1565
最短路 题解:Floyd & Dijkstra
Nyakahashi
回复 0
|
赞 1
|
浏览 18
// 17:01 // #include <bits/stdc++.h> #include <iostream> using namespace std; #define INF 0x0fffffff #define MAXN 1001 int n, m; ...
P1810
求众数 题解:
山崎友希
回复 0
|
赞 0
|
浏览 5
#include<stdio.h> int main(){ int n; scanf("%d",&n); int a[n]; &n...
P1217
国名排序 题解:
yeee700
回复 0
|
赞 0
|
浏览 3
C语言qsort库函数解决方式 #include<stdio.h> #include<stdlib.h> int cmp(const void*a,const void*b){ char *pa=(char*)a; ...
P1159
成绩排序2.0 题解:
山崎友希
回复 0
|
赞 0
|
浏览 6
#include<stdio.h> typedef struct{ int p;//学号 int q;//成绩 }student; int main(){  ...
P1352
众数 题解:
山崎友希
回复 0
|
赞 0
|
浏览 5
#include<stdio.h> int main(){ int a[20]; int i; while( ( scanf("%d %d...
P1737
AC为25%,求大佬解答一下哪里有问题
圣灵传说
回复 0
|
赞 0
|
浏览 3
#include<bits/stdc++.h> using namespace std; int main(){ int n; int a[1001]; ...
P1067
括号的匹配 题解:假设你这个人很头铁,不使用任何容器(包括stack和map)
zxjrheaven
回复 0
|
赞 1
|
浏览 36
#include <bits/stdc++.h> using namespace std; int get_rank(char c) { if (c == '{') return 4; else i...
P1290
日期差值 题解:
emoji
回复 0
|
赞 0
|
浏览 9
#include<stdio.h> const int x[12]={31,28,31,30,31,30,31,31,30,31,30,31}; const int y[12]={31,29,31,30,31,30,31,31,30,31,30,31}; typede...
P1905
整数排序 题解:c++超简洁排序
Y969432769845
回复 0
|
赞 0
|
浏览 2
#include <bits/stdc++.h> using namespace std; int main() { string s; getline(cin, s); istrin...
P1979
股票交易(常规暴力和贪心) 题解:
Candour
回复 0
|
赞 1
|
浏览 17
常规 : #include<bits/stdc++.h> using namespace std; const int N = 1e4 + 10; int n, a[N]; int main() { cin >> n; for(i...
P1937
切牌、洗牌 题解:纯C语言 简单易懂
Xsw777
回复 0
|
赞 1
|
浏览 2
#include <stdio.h> void qiepai(int a[],int n){ int q[8] = {0}; int i; int j = ...
P1916
字符串 - 22年 题解:找规律+dp
jsd
回复 0
|
赞 0
|
浏览 2
#include<bits/stdc++.h> using namespace std; int main() { int n, m; int maxcnt = -1;//最长连续1的长度 &...
P1382
哈夫曼树 题解:哈夫曼树的值等于所有非叶结点值的和+小根堆实现
fzh
回复 0
|
赞 0
|
浏览 6
#include<iostream> #include<queue> using namespace std; int main() { int n; while (...
P5202
重复数字是否出现 题解:纯C语言
Xsw777
回复 0
|
赞 1
|
浏览 10
#include <stdio.h> int main(){ long n; scanf("%ld",&n); int a[10] ...
P1907
差分计数 题解:n诺测试数据太小了,正常暴力会超时,应该用字典。
Y969432769845
回复 0
|
赞 1
|
浏览 16
n是10^6数量级,两层for循环暴力数量级10^12,但是计算机1s只能处理10^8。。。。。 这题实际考查找,应该用字典解答 #include <bits/stdc++.h> using namespace std; int main()...
P1062
杨辉三角形 题解:建二维数组表,根据规律加和
AiLanKeSi
回复 0
|
赞 0
|
浏览 10
#include <iostream> using namespace std; int triangle[20][20]; int main() { for(int i = 0;i<20;i++) ...
P1381
复数集合 题解:大根堆+运算符重载
fzh
回复 0
|
赞 2
|
浏览 16
#include<iostream> #include<queue> #include<string> using namespace std; struct El { int a;  ...
P1265
八皇后 题解:
lyh_24
回复 0
|
赞 0
|
浏览 3
#include<iostream> using namespace std; int ans[92]={15863724,16837425,17468253,17582463,24683175, 25713864,...
P1566
P1566 确定比赛名次 答疑提问:求助,不知道哪点有问题
fzh
回复 2
|
赞 3
|
浏览 37
#include using namespace std; struct TNode { int data; TNode* rchild, * lchild; }; void Insert(TNo...
P5230
判断字符串是否有效 题解:经典栈问题
RingoCrystal
回复 0
|
赞 0
|
浏览 11
#include <bits/stdc++.h> using namespace std; int main() { string s; while(cin>>s){ stack<char>st; bool fla...
P1255
字符串排序2 题解:stable_sort()为什么是神
Theeastisred
回复 0
|
赞 1
|
浏览 11
#include<bits/stdc++.h> using namespace std; vector<int>w('z'+1,0); bool cmp(char a,char b){ if(w[a]<...
P2000
ISBN号码识别 题解:卡在75%了,求佬帮我看下哪里有问题
312143140
回复 0
|
赞 0
|
浏览 6
#include<stdio.h> int main(){ char arr[13]; scanf("%s",arr); int num[1...
P1317
直接使用字符串做递归判断,需要计算大于根的字串和小于根的字串
zjx140
回复 1
|
赞 1
|
浏览 7.0k
#include<iostream> using namespace std; string larger_than_root(string s){ //计算比根大的子串 int start_pos = 0; while(start_pos <...
P1240
布灵布灵
古娜拉黑暗之神
回复 1
|
赞 5
|
浏览 9.9k
#include<stdio.h> #include<string.h> int main() { char tem[100]; while(gets(tem) != NULL)&...
P1159
成绩排序2.0 题解:
XCR553
回复 0
|
赞 0
|
浏览 15
冒泡排序 #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n;  ...
P1292
字母统计 题解:纯C语言 简单好理解
Xsw777
回复 0
|
赞 4
|
浏览 28
#include <stdio.h> #include <string.h> int main(){ char a[10000] = {0}; while(gets(a)){ &nbs...
P1018
击鼓传花 题解:链表模拟
samxz
回复 0
|
赞 0
|
浏览 17
#include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct Node{ int data; struct Node* next; }Node; i...
P1011
日期 题解:
ryanausnar
回复 0
|
赞 0
|
浏览 31
#include<bits/stdc++.h> using namespace std; int main(){ int month[13] = {0,31,28,...
P1022
删除最大最小数 题解:想不明白为啥正确率只有百分之75,麻烦同学们看看
一起奋斗啊
回复 4
|
赞 4
|
浏览 155
#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> int main() { int n; int i; ...
P1005
博学楼的阶梯 题解:
wwj0102
回复 0
|
赞 0
|
浏览 9
#include<bits/stdc++.h> using namespace std; int a[105]; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ...
P1001
01序列 题解:使用一个while+一个01存储数组
AiLanKeSi
回复 0
|
赞 0
|
浏览 10
#include <iostream> using namespace std; void to_binary(int n,int arr[]) { int i = 5; while(n / ...
P5127
动态查找的问题 题解:map轻松搞定!
wwj0102
回复 0
|
赞 0
|
浏览 8
#include<bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n,q; cin ...
P2019
字母排序 题解:
wwj0102
回复 0
|
赞 0
|
浏览 11
#include<bits/stdc++.h> using namespace std; typedef struct ac{ char c; int num; }ac; bool cmp(ac a, ac b){ if(a.num == b.num...
P1040
利润提成 题解:
samxz
回复 0
|
赞 0
|
浏览 26
#include <stdio.h> int main() { int profit; float bonus = 0; scanf("%d", &profit); const int thresholds[] = {100...
P1677
巨人排队 题解:c代码,有解析
202110405235
回复 0
|
赞 0
|
浏览 26
#include<bits/stdc++.h> int main(){ int n; int sum=0;//记录路队数 int temp; while(scanf("%d",&n)!=EOF){ //输入 ...
P1018
击鼓传花 题解:
jaygee_
回复 0
|
赞 0
|
浏览 22
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> a(n); for(int i = 0; i < ...
P1259
进制转换2 题解:very good
西电机试专家
回复 0
|
赞 1
|
浏览 37
#include <bits/stdc++.h> using namespace std; int main(){ string s; while(cin>>...
P1401
递归大法
老猫
回复 2
|
赞 27
|
浏览 8.7k
1、前序遍历的第一元素是整个二叉树的根节点 2、中序遍历中根节点的左边的元素是左子树,根节点右边的元素是右子树 3、后序遍历的最后一个元素是整个二叉树的根节点 #include <iostream> #include <string> #inc...
P1454
反序数 题解:清晰
西电机试专家
回复 0
|
赞 1
|
浏览 21
#include <bits/stdc++.h> using namespace std; int fan(int a){ int ans=0; while(a>0){ &nb...
P1027
删除字符串2 题解:不考虑新组合,del[i]存储跳跃点
samxz
回复 0
|
赞 1
|
浏览 163
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ char s[1001]; gets(s); int n=strlen(s); int de...
P1197
动态规划
GENARDING
回复 0
|
赞 0
|
浏览 3
#include <bits/stdc++.h> using namespace std; int main() { int n; while(cin>>n){ int dp[n+1]; dp[0]=1; dp[1]=1; ...
P1011
日期 题解:模拟
samxz
回复 0
|
赞 3
|
浏览 69
#include<stdio.h> #include<stdlib.h> void trans(int a) { switch(a) { case 0: { printf("Sunday"); break; } case...
P1563
BFS无权图
GENARDING
回复 0
|
赞 1
|
浏览 8
#include <bits/stdc++.h> using namespace std; const int MAX=110; char maze[MAX][MAX];//迷宫 int h,w;//迷宫宽和高; int sx,sy;//记录s的坐标 int dx...
P1014
加密算法 题解:
yeee700
回复 0
|
赞 1
|
浏览 17
#include <stdio.h> #include<string.h> int main(void) { char str[100]; gets(str); &...
P1177
查找学生信息 题解:
shiv15832
回复 0
|
赞 2
|
浏览 21
最直观的思路就是输入N,M后定义两个数组,例如reader[]表示:读者i喜欢的书号是多少,book[]表示喜欢j号书的读者有多少人,再遍历查看book[reader[i]],表示读者i喜欢的书总共有多少人喜欢,如果 == 1,就输出悲剧。代码如下: #include <bits/...
1
2
我要提问
全站热榜
1
无法正确通过题目都是哪些原因造成的?
2
机试如何才能快速提高?
3
[置顶]计算机考研择校分析【25考研必读】
4
1017 幂次方 快速幂模板
5
A+B问题 题解:C
6
题目难点:数学公式不断化解
7
负二进制 题解:
8
逻辑很简单,但是实现却要小心多多
9
【23计算机考研】39所985院校录取分数线汇总
10
N诺成就值出炉,帮你一眼识别大神