主站
DreamJudge
院校信息
专业题库
模拟考试
机试真题
专业课程
讨论区
兑换中心
登录
注册
上岸
搜索
全 部
择校分析
笔经面经
学习交流
我要提问
站内公告
调剂专题
精彩爆料
解题报告
P1011
日期 题解:注意最后输出的时候超过数组要除余
dongqing
回复 0
|
赞 1
|
浏览 504
#include<bits/stdc++.h> using namespace std; struct node { int y,m,d; }p; int main() { cin>>p.m...
P1253
合唱队形 题解:
fxl
回复 0
|
赞 1
|
浏览 628
#include <bits/stdc++.h> using namespace std; int n,a[105],dp_h[105],dp_t[105]; int main(){ while(cin>>n){ &nbs...
P1256
拦截导弹 题解:
fxl
回复 0
|
赞 1
|
浏览 430
#include <bits/stdc++.h> using namespace std; int n,dp[30],a[30]; int main(){ cin>>n; ...
P1012
字符移动 题解:
要一根华子
回复 0
|
赞 2
|
浏览 425
#include<bits/stdc++.h> #include <string> #include <algorithm> using namespace std; int main(){ char a[10...
P1002
数字统计 题解:
要一根华子
回复 0
|
赞 1
|
浏览 608
#include<bits/stdc++.h> using namespace std; int main(){ int L,R,count=0,temp; cin>>L>>R; for(int i=L;i...
P1257
最大上升子序列和 题解:
fxl
回复 0
|
赞 1
|
浏览 407
#include <bits/stdc++.h> using namespace std; int n,dp[1005],a[1005]; int LIS_sum(){ int ans=0; fo...
P1703
最大子串和 题解:
fxl
回复 0
|
赞 2
|
浏览 664
#include <bits/stdc++.h> using namespace std; int n,a[105],dp[105]; int main(){ while(cin>>n){ &nb...
P1334
最大连续子序列 题解:
fxl
回复 0
|
赞 1
|
浏览 377
#include <bits/stdc++.h> using namespace std; int k,a[10005],dp[10005]; int main(){ while(cin>>k){ ...
P1125
C语言海伦公式方法
nooknook
回复 2
|
赞 0
|
浏览 14.4k
#include<stdio.h> #include<math.h> int main() { int x0, y0, x1, y1, x2, y2; while (scanf("%d%d%d%d%d%d", &x0, &y0, &am...
P1726
不连续1的子串 题解:
fxl
回复 0
|
赞 1
|
浏览 311
#include <bits/stdc++.h> using namespace std; const int maxn=25; long long dp[maxn]; int main(){ int N; ...
P1347
基于大佬代码的更加清晰的版本(高强度注释)
mimicool
VIP
回复 0
|
赞 1
|
浏览 620
/* 我们假设会经过所有的加油站 我们可以假装持有价格高得油,一旦遇到价格低的就进行替换 在经过加油站的时候,我们补充该加油站的油(注意是假设补充,具体是否补充要看之后有没有遇见更加便宜的油) 比如,我们的油箱在遇到价值4快的加油站时,还剩下2块钱的油和5块钱的油,这说明之前假装补...
P1398
a+b - 华科 题解:
蟹蟹
回复 0
|
赞 1
|
浏览 458
#include<stdio.h> #include<math.h> #include<string.h> #define max 1010 int main() { void add(char a[],char b[...
P1399
排序 - 华科 题解:
蟹蟹
回复 0
|
赞 1
|
浏览 378
#include<stdio.h> int main() { int n=0,arr[105]; while(scanf("%d",&n)!=EOF){ // ...
P1911
反转公约数 题解:直接模拟即可
lenny
VIP
回复 0
|
赞 0
|
浏览 398
先对输入的数字进行反转,再使用gcd算法求公约数即可。 数字反转处理: 用一个临时变量存储第一个数字,使用%10来获得第一个数字 然后进行进位相加:res=res*10+a即可 最后还需要对x/=10操作,获取后几位数字 gcb求最大公约数: 递归求解 re...
P1479
01字符串 题解:(斐波那契数列换皮)
lenny
VIP
回复 0
|
赞 0
|
浏览 662
本题题意看似很难摸着头脑,实则这是一道斐波那契数列题的换皮。 根据题意可以自行推算 当n=1时,组合只有0 结果是1 当n=2时,组合:00 1 结果是2 当n=3时,组合:000 10 01 结果是3 当n=4时,组合:0000 100 010 001 11 结...
P1912
循环位移 题解:
lenny
VIP
回复 0
|
赞 1
|
浏览 369
#include <bits/stdc++.h> using namespace std; int size = 0; // 模拟字符串循环 void func(string &str1) { int len = str1.size(); // ...
P2020
字符串转化 题解:
ivannn
回复 0
|
赞 2
|
浏览 550
简化版本 #include <stdio.h> int main(){ char a[100]; int i=0,sum=0; while(scanf(...
P1394
三种情况:读取到字母、代表单词结束的空格、连续的空格
阔赛英
回复 4
|
赞 3
|
浏览 3.3k
#include <iostream> #include <stdio.h> #include <string.h> using namespace std; int main() { char s[128]; whi...
P1476
查找学生信息2 题解:
peterzhou
回复 0
|
赞 2
|
浏览 611
#include <bits/stdc++.h> using namespace std; struct student{ string num; string name; string ...
P1175
差分数组求解:
jz拿遍offer
回复 0
|
赞 1
|
浏览 580
#include <bits/stdc++.h> using namespace std; int main() { int L, M; while(cin>>L>>M) { int l, r, ...
P1700
判断回文数 C++秒了
圆梦厦大
回复 0
|
赞 1
|
浏览 485
C++秒了 #include<string> #include<algorithm> #include<iostream> using namespace std; int main(){ string a,b; whil...
P1393
矩阵转置 题解:
圆梦厦大
回复 0
|
赞 1
|
浏览 522
#include<iostream> #include<vector> #include<algorithm> using namespace std; const int N = 100; int main(){ int n...
P1703
最大子串和 题解:
圆梦厦大
回复 0
|
赞 1
|
浏览 518
#include<iostream> #include<algorithm> using namespace std; const int N = 100; int a[N],s[N]; int main(){ int n; whi...
P1851
A除以B 题解:
jz拿遍offer
回复 0
|
赞 1
|
浏览 475
// Created by JZhang #include <bits/stdc++.h> using namespace std; void divide(int a[], int b, int Q[], int len){ int t=0, r, tem...
P2013
求斐波那契数列的第n项 题解:
苏琪
回复 0
|
赞 1
|
浏览 505
#include<bits/stdc++.h> using namespace std; int fbnq(int n){ if(n == 0 || n == 1){ return 1; } return fbnq(n-1)+fbnq(n-2...
P1912
循环位移 题解:循环就是把数组“复制一遍”
h1h
回复 0
|
赞 1
|
浏览 411
#include<iostream> #include<algorithm> #include<unordered_map> using namespace std; unordered_map<string,bool> h; int ...
P1702
十六进制不进位加法 题解:
h1h
回复 0
|
赞 2
|
浏览 493
#include<iostream> #include<algorithm> #include<cstring> using namespace std; int main() { string a,b;  ...
P1703
最大子串和 题解:
h1h
回复 0
|
赞 1
|
浏览 520
#include<iostream> #include<vector> #include<algorithm> #include<cstring> using namespace std; const int N=110; int n...
P1001
01序列 题解:
天妒英才
回复 0
|
赞 1
|
浏览 687
记录以下学习使用<bitset> #include <iostream> #include<bitset> using namespace std; int main() { int a=0;  ...
P1908
罗马数字 题解:
calypse
回复 0
|
赞 1
|
浏览 308
#include <iostream> #include <vector> using namespace std; class Test0723 { public: vector<int> rome = {1, 5, 10, 50, 100,...
1
...
54
55
56
57
58
...
124
我要提问
近期热门
1
N诺成就值出炉,帮你一眼识别大神
2
机试如何才能快速提高?
3
[置顶]计算机考研择校分析【25考研必读】
4
广度优先搜索计算每个人移动到每个位置需要去掉障碍物的最少数目,最后求和的最小值
5
1377旋转矩阵
6
ip地址(C)
7
简单易懂
8
C++递归解法,有注释
9
1017 幂次方 快速幂模板
10
计算机考研复试笔记——操作系统篇