首页
DreamJudge
院校信息
考研初试
机试真题
讨论区
兑换中心
登录
注册
上岸
Candour
天天原神启动不训练,考研还想上岸?
关注
发消息
文章
0
题解
117
发帖
0
笔记
12
Ta的粉丝
69
关注数
2
粉丝数
69
获赞数
866
阅读数
120094
素数判定 (试除法)- 哈尔滨工业大学 题解:
#include <bits/stdc++.h> using namespace std; int n; bool cheak(int x) { if(x <= 0 || x == 1) return false; for(int i = ...
P1355
2024年5月8日 00:15
回复 0
|
赞 4
|
浏览 1.1k
动态查找问题(题目没给x的数据范围,斗胆试了一下) 题解:
如果x的数据范围很大就得用哈希表了,但这里没必要 #include <bits/stdc++.h> using namespace std; const int N = 1e5 + 10; bool st[N]; int n, m; int main()...
P1477
2024年5月6日 23:41
回复 0
|
赞 2
|
浏览 975
括号匹配(C++ string栈) 题解:
#include <bits/stdc++.h> using namespace std; string str; int main() { cin >> str; string stk1, stk2; for(int i = 0;...
P1501
2024年5月6日 23:30
回复 0
|
赞 11
|
浏览 928
打印日期(用前缀和写了一下 附注释) 题解:
#include<bits/stdc++.h> using namespace std; int y, d; int month[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int s[13]; ...
P1410
2024年5月6日 00:29
回复 0
|
赞 4
|
浏览 2.0k
查找学生信息2(结构体数组) 题解:
#include <bits/stdc++.h> using namespace std; const int N = 1010; int n, m; struct student{ string id; string name; string g...
P1476
2024年5月5日 23:56
回复 0
|
赞 3
|
浏览 915
最简真分数(最大公约数) 题解:
最大公约数是1,说明两个数互质,也就是最简真分数 #include<bits/stdc++.h> using namespace std; const int N = 1010; int n; int a[N]; int main() { ...
P1180
2024年5月5日 00:27
回复 0
|
赞 5
|
浏览 970
杨辉三角形(模拟 - 不输出第一行) - 西北工业大学 题解:
#include <bits/stdc++.h> using namespace std; const int N = 30; int n; int res[N][N]; void get_triangle() { for(int i = 1; i &l...
P1392
2024年5月5日 00:08
回复 0
|
赞 7
|
浏览 862
成绩的等级(选择分支结构) 题解:
#include<bits/stdc++.h> using namespace std; int s; int main() { cin >> s; if(s >= 90) puts("A"); els...
P1038
2024年5月4日 00:54
回复 0
|
赞 4
|
浏览 889
旋转矩阵(模拟 - 注意多组测试输入--第一次交没注意过了80%) - 北航 题解:
#include<bits/stdc++.h> using namespace std; const int N = 20; int a[20][20], b[20][20]; int n; int cheak() { bool t = true;...
P1377
2024年5月4日 00:47
回复 0
|
赞 18
|
浏览 1.3k
博学楼的阶梯(模拟 思路清晰易懂 附注释) 题解:
优化了内存,没有开数组 #include <bits/stdc++.h> using namespace std; int T; int main() { cin >> T; while(T --) { in...
P1005
2024年5月2日 00:29
回复 0
|
赞 3
|
浏览 844
日期差值(格式化输入) 题解:
#include<bits/stdc++.h> using namespace std; const int months[] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; bool ch...
P1290
2024年5月2日 00:00
回复 0
|
赞 9
|
浏览 1.1k
求S(n) (同余定理)题解:
( a * b) % m = ((a % m) * (b % m)) % m #include <bits/stdc++.h> using namespace std; int n; int main() { while(cin >>...
P1500
2024年4月29日 23:10
回复 0
|
赞 7
|
浏览 1.1k
国名排序(C++) 题解:
#include <bits/stdc++.h> using namespace std; vector<string> res; int n; int main() { string s; while(cin >>...
P1217
2024年4月29日 23:00
回复 0
|
赞 15
|
浏览 1.3k
字符串排序 (C++)题解:
#include<bits/stdc++.h> using namespace std; int main() { string str; while(cin >> str) { sort(str.begin(),...
P1254
2024年4月29日 00:02
回复 0
|
赞 3
|
浏览 854
统计单词(C++) 题解:
#include<bits/stdc++.h> using namespace std; string str; int main() { while(getline(cin, str)) { int cnt = 0; ...
P1394
2024年4月28日 23:50
回复 0
|
赞 12
|
浏览 1.1k
成绩排序2.0 (C++)题解:
#include<bits/stdc++.h> using namespace std; typedef pair<int, int> PII; const int N = 110; PII s[N]; int n; bool cmp(PII a...
P1159
2024年4月28日 23:29
回复 0
|
赞 3
|
浏览 795
八进制 (格式化输出)题解:
#include <bits/stdc++.h> using namespace std; int n; int main() { while(cin >> n) { printf("%o\n", n); } return 0;...
P1417
2024年4月28日 00:15
回复 0
|
赞 3
|
浏览 804
字母统计 题解:
#include <bits/stdc++.h> using namespace std; string str; int cnt[27]; int main() { while(cin >> str) { memset(cnt, ...
P1292
2024年4月28日 00:11
回复 0
|
赞 2
|
浏览 995
查找1 (C++ 11)题解:
#include<bits/stdc++.h> using namespace std; unordered_map<int, bool> st; int n, m; int main() { while(cin >> n) ...
P1388
2024年4月27日 00:21
回复 0
|
赞 4
|
浏览 934
日期计算(简单模拟) 题解:
#include <bits/stdc++.h> using namespace std; int y, m, d; int month[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; boo...
P1051
2024年4月27日 00:04
回复 0
|
赞 4
|
浏览 984
1
2
3
4
5
6
本科学校:星穹铁道职业技术学院
目标学校:贵州大学
点此申请N诺身份认证
获得 noobdream 认证,享受多重认证福利!