首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
P1368
排列与二进制 题解:C语言
yngshq
#include <stdio.h> int main() { int i,k,n,m,count=0; while(scanf("%d %d",&n,&m)!=...
P1259
进制转换2 题解:python
yngshq
while True: try: x=int(input(),16) y=format(x,...
P1178
进制转换 题解:用python比较简单
yngshq
while True: try: x=int(input()) x=format(x,'b...
P1176
十进制和二进制 python题解:
yngshq
while True: try: a=int(input()) a=format(a,'b...
P1097
负二进制 题解:
yngshq
#include <stdio.h> #include <math.h> #define maxsize 100 int main() { int x,temp,remainder;  ...
P1085
校门外的树 题解:
yngshq
#include <stdio.h> int main() { int L,M,start,final,i=0,j=0,k,count=0; int len[10001]; &nb...
P1348
百鸡问题 题解:
yngshq
#include <stdio.h> int chicken(int n) { int x,y,z; double sum; for(x=0;x<=10...
P1045
平方和与倒数和 题解:
yngshq
#include <stdio.h> int a(int x) { int i,sum=0; for(i=1;i<=x;i++) { &n...
P1735
统计卡牌的值 题解:
yngshq
#include <stdio.h> #include <string.h> #define maxsize 50 int main() { char s[4]={'J','Q','...
P1500
求S(n) 题解:
yngshq
#include <stdio.h> int S(n) { return n; } int main() { int n,y; while(scanf(...
P1034
水仙花数 题解:
yngshq
#include <stdio.h> #include<stdbool.h> bool flower(int x) { int sum,temp,k; temp=x; &...
P1003
翻转数的和 题解:
yngshq
#include <stdio.h> #include <string.h> #define maxsize 100 int flopToint(char x[]) { int i,j,k,len,ret=0; &nbs...
P1428
整数和 题解:
yngshq
#include <stdio.h> int main() { int i,N,m,k=0; scanf("%d",&m); wh...
P1085
校门外的树 题解:
ZeroQi_404
#include<iostream> using namespace std; int main(){ int L,M; cin >> L >> M; int tree[10001]; for(int i=0;i<=L...
P1040
利润提成 题解:绝对简洁
ZeroQi_404
#include <iostream> using namespace std; int main() { double x, n = 0; cin >> x; if (x > 1000000) { ...
P1178
进制转换 题解:
lhy535
关于这个大数10进制转2进制问题。 我已经试过,如果你不考虑大数,把他当作long long 来处理,可以过50%用例,这个可以用来骗分。(当然我再平时练习的时候不建议这么做) 思路: 首先我们得清楚10进制转2进制的本质 %2和 /2到底是什么含义。 %2...
P1014
加密算法 题解:
Yggdrasil753
#include<iostream> #include<string> #include<cctype> using namespace std; int main(){ char ch[256] = {0}; ...
P1043
计算Sn 题解:
QAQ熊猫QAQ
#include<stdio.h> #include<math.h> int main() { int a, n; int sum=0; scan...
P5305
计算 \( 3 \times 3 \) 矩阵的行列式 题解:
QAQ熊猫QAQ
#include<stdio.h> int main() { int arr[3][3]; for (int i = 0; i < 3; i++) {  ...
P5303
统计三角形数量 题解:
QAQ熊猫QAQ
#include<stdio.h> int is_triangle(int a, int b, int c) { if (a + b > c && a + c > b && b + c > ...
P1377
旋转矩阵加强版 题解:新手易懂版(个人认为)
gyhhhhhh
#include <stdio.h> int check0(int n, int a[10][10], int b[10][10]) { for(int i=0; i<n; i++) f...
P1078
文件压缩 题解:
快乐小土狗
#include<iostream> #include<cstring> #include<cmath> #include<cstdio> #include<algorithm> using namespace std;...
P1573
梦中的统计 题解:
快乐小土狗
#include <iostream> using namespace std; int main() { long long M, N; long long cnt[10] = {0}; // 存储0~9的出现次数,初始化为0 long ...
P5104
约瑟夫问题的实现 题解:
绫小路754
#include<stdio.h> #include<string.h> struct node{ int num; int flag;//用来判断是否出局 }; int main() {...
P5104
约瑟夫问题的实现 题解:
绫小路754
#include<stdio.h> #include<string.h> struct node{ int num; int flag;//用来判断是否出局 }; int main() {...
P1001
01序列 题解:
itachi
天才就是百分之九十九的汗水 #include <iostream> using namespace std; int main() { cout << "000000" <<...
P1126
存下到达每个地点所需时间,如果没有不可达地点而最大所需时间不为t,输出NO
泠灵绫
#include <bits/stdc++.h> using namespace std; typedef struct node { int sx,sy; int step; } node; const int maxn=105; char mpt[...
P816
长度一定的连续子序列的最大平均值 题解:
快乐小土狗
#include <stdio.h> #include <stdlib.h> int main() { int n, k; scanf("%d %d", &n, &k); int nums[10000...
P8722
勇气比赛 题解:
kiypop
//已0为根构造二叉树 // 0 // (N) / \(G) // 1 2 //可以得到这样的规律 ...
P4355
二叉树的先序序列 题解:c语言递归
yk123
#include<stdio.h> #include <string.h> void getPre(char* str1,char* str2,char* str3,int len,int Inindex,int Postindex, int Preindex){ ...
P4922
打印杨辉三角形 题解:c语言递归
yk123
#include<stdio.h> int S(int n ,int m){ &n...
P815
Battle Over Cities 题解:
快乐小土狗
#include <iostream> #include <vector> #include <cstring> using namespace std; const int MAXN = 1005; vector<int> a...
P5124
求S(n)的值 题解:
wmj
#include<stdio.h> int main(){ int n; while(scanf("%d",&n)!=EOF){ printf("%d\n&qu...
P5124
求S(n)的值 题解:
wmj
#include<stdio.h> int main(){ int n; while(scanf("%d",&n)!=EOF){ printf("%d\n&qu...
P5124
求S(n)的值 题解:
wmj
#include<stdio.h> int main(){ int n; while(scanf("%d",&n)!=EOF){ printf("%d\n&qu...
P814
N皇后问题 题解:回溯
快乐小土狗
#include <bits/stdc++.h> // 初始化全局标记数组(N最大10,对角线最大长度20) int col[11] = {0}; // 标记列是否被占用:col[j]=1表示第j列有皇后 int diag1[21] = {0}; // 标记主对角线(...
P1286
最短路径 题解:C语言+SPFA+并查集
OOOOOIN
#include<stdio.h> #include<stdlib.h> #include<string.h> #define M 105 #define INF 0x3f3f3f3f3f3f3f3fLL #define E 405 //有并查...
P8677
调和级数求和 题解:
快乐小土狗
#include <stdio.h> int main() { int n; // 定义累加和变量,使用double类型保证精度 double sum = 0.0; // 输入正整数n scanf("%d", ...
P1913
礼炮车 题解:
adue
#include<stdio.h> int main(){ int sum=0; for(int i=5;i<21*7+1;i++){ ...
P1178
进制转换 题解:
kkkkkkllll
#include<iostream> #include<vector> #include<algorithm> #include<math.h> using namespace std; int main(){ &nbs...
P1183
Freckles C语言+kruskal+并查集
OOOOOIN
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #define M 105 #define INF 1e12 typedef s...
P1183
Freckles 题解:C语言/prime解法
OOOOOIN
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #define M 105 #define INF 1e12 typedef str...
P1259
进制转换2 题解:
18919717626
#include<bits/stdc++.h> using namespace std; int main(){ string s; string rel; &nbs...
P1978
选择排序 题解:
mlx
#include<iostream> using namespace std; const int N=1e5+10; int n,k; int a[N]; int main() { cin>>n>>k; fo...
P5280
链表的插入排序 题解:
mlx
#include<iostream> using namespace std; int n; struct node{ int val; node *next; }; void init(node *l) { l->v...
P1195
字符串 题解:
mlx
#include<iostream> using namespace std; const int N=1010; string a[N],b[N]; int n,m; int main() { while(cin>>n) ...
P5271
字符串的单词颠倒 题解:
mlx
#include<iostream> #include<stack> using namespace std; string str; stack<string> st; int main() { int n; c...
P1429
围圈报数 题解:
mlx
#include<iostream> #include<vector> #include<algorithm> using namespace std; int m,n; int cnt=2; int main() { c...
P1848
统计次数 题解:
mlx
#include<iostream> using namespace std; int n,k; int main() { while(cin>>n>>k) { int cnt=0; ...
P1627
直接暴力即可:
mlx
#include<iostream> using namespace std; string a,b; bool check(string s) { for(int i=0;i<s.size();i++) if(s[i]>='0'...
1
2
我要提问
全站热榜
1
无法正确通过题目都是哪些原因造成的?
2
机试如何才能快速提高?
3
[置顶]计算机考研择校分析【25考研必读】
4
题目难点:数学公式不断化解
5
详细题解(站在巨人的肩膀上)
6
A+B问题 题解:C
7
逻辑很简单,但是实现却要小心多多
8
【25计算机考研】39所985院校录取分数线汇总
9
广度优先搜索计算每个人移动到每个位置需要去掉障碍物的最少数目,最后求和的最小值
10
2048游戏 题解:简洁实现