首页
DreamJudge
院校信息
考研初试
机试真题
讨论区
兑换中心
登录
注册
上岸
cczz
加油
关注
发消息
文章
0
题解
35
发帖
0
笔记
0
Ta的粉丝
0
关注数
0
粉丝数
0
获赞数
6
阅读数
1372
最大公约数1 题解:
#include<bits/stdc++.h> using namespace std; int gcd(int a, int b){ if(b == 0) return a; else return gcd(b, a % b); } int main(...
P1426
2025年8月9日 15:55
回复 0
|
赞 0
|
浏览 4
To Fill or Not to Fi 题解(贪心):
贪心策略: 在当前加油站,寻找在最大行驶距离(即满油箱所能行驶的距离)内价格最低的加油站作为下一个目的地。 距离从近到远找,如果找到了加油站价格比当前加油站更低,无需判断后续加油站,只加足够到达该加油站的油;否则加满油。 ...
P1347
2025年8月7日 16:28
回复 0
|
赞 0
|
浏览 32
组队刷题 题解:
#include<bits/stdc++.h> using namespace std; struct Node { int cnt; int cost; } node[1005]; int main() { int m, n; ...
P1307
2025年8月7日 15:47
回复 0
|
赞 0
|
浏览 22
查找第K小数 题解(排序去重):
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n; while (cin ...
P1383
2025年8月6日 21:07
回复 0
|
赞 0
|
浏览 27
查找1 题解:
#include<bits/stdc++.h> using namespace std; int main(){ int n, m; map<int, int> mp; cin >> n; int t; for(i...
P1388
2025年8月6日 20:20
回复 0
|
赞 0
|
浏览 23
查找学生信息 题解:
#include<bits/stdc++.h> using namespace std; int main(){ int n, m; while(cin >> n >> m){ int a[205]; int bookC...
P1177
2025年8月6日 20:12
回复 0
|
赞 0
|
浏览 22
成绩排序 - 华科 题解(构造比较函数,轻松解决):
#include<bits/stdc++.h> using namespace std; struct Student{ string name; int age; int grade; }; int main(){ int n; wh...
P1404
2025年8月6日 19:34
回复 0
|
赞 1
|
浏览 45
排序 - 华科 题解(sort快速解决):
#include<bits/stdc++.h> using namespace std; int main(){ int n; while(cin >> n){ int a[105]; for(int i = 0; i < n...
P1399
2025年8月6日 18:07
回复 0
|
赞 0
|
浏览 22
字符串排序3 题解:
#include<bits/stdc++.h> using namespace std; int main(){ int n; while(cin >> n){ getchar(); // 消除回车影响 vector<strin...
P1261
2025年8月6日 17:58
回复 0
|
赞 0
|
浏览 36
字符串排序2 题解:
#include<bits/stdc++.h> using namespace std; int main(){ string line; while(getline(cin, line)){ vector<char> letters; ...
P1255
2025年8月6日 17:41
回复 0
|
赞 0
|
浏览 22
字符串排序 题解:
#include<bits/stdc++.h> using namespace std; int main(){ char a[25]; cin >> a; sort(a, a+strlen(a)); for(int i = 0; i < ...
P1254
2025年8月6日 17:23
回复 0
|
赞 0
|
浏览 51
国名排序 题解:
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<string> countries(n); for(int ...
P1217
2025年8月6日 16:38
回复 0
|
赞 0
|
浏览 39
成绩排序2.0 题解:
#include<bits/stdc++.h> using namespace std; struct Student{ int id; int grade; }stu[105]; bool cmp(Student a, Student b){ if...
P1159
2025年8月6日 16:28
回复 0
|
赞 0
|
浏览 50
删除字符串(正则表达式解法,两行核心代码):
1.正则表达式解法 #include <bits/stdc++.h> using namespace std; int main() { string s; getline(cin, s); // 使用 icase 标...
P1027
2025年8月5日 21:21
回复 0
|
赞 0
|
浏览 51
统计单词 题解:
#include<bits/stdc++.h> using namespace std; int main(){ string s; while(getline(cin, s)){ int cnt = 0; char before = '...
P1394
2025年8月5日 20:55
回复 0
|
赞 0
|
浏览 40
首字母大写 题解(采用stl轻松解决):
#include<bits/stdc++.h> using namespace std; int main(){ char s[105]; gets(s); char before = ' '; for(int i = 0; i < s...
P1240
2025年8月5日 20:32
回复 0
|
赞 0
|
浏览 67
字母统计 题解:
#include<bits/stdc++.h> using namespace std; int main(){ string s; getline(cin, s); int cnt[50] = {0}; for(int i = 0; i &...
P1292
2025年8月5日 19:47
回复 0
|
赞 0
|
浏览 35
字符移动 题解:
#include<bits/stdc++.h> using namespace std; int main(){ char s[105]; char out[105]; gets(s); int idx = 0; int len = st...
P1012
2025年8月5日 19:37
回复 0
|
赞 0
|
浏览 41
偷菜时间表 题解:
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; while(n -- > 0){ int minu = (13*60 + 15); ...
P1053
2025年8月5日 19:28
回复 0
|
赞 0
|
浏览 39
日期累加 题解(条理清晰,计算总天数):
#include<bits/stdc++.h> using namespace std; int month[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; bool isLeapYear(int y){ retu...
P1446
2025年8月5日 18:13
回复 0
|
赞 0
|
浏览 40
1
2
本科学校:bilibili大学
目标学校:无
点此申请N诺身份认证
获得 noobdream 认证,享受多重认证福利!