主站
DreamJudge
院校信息
专业题库
模拟考试
机试真题
专业课程
讨论区
兑换中心
登录
注册
上岸
搜索
推 荐
择校分析
笔经面经
学习交流
我要提问
站内公告
调剂专题
精彩爆料
解题报告
P1043
计算Sn (模拟,注意数据范围)题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 101
#include<bits/stdc++.h> using namespace std; typedef long long LL; int x, n; LL ans; int main() { cin >> x >> n; ...
P1000
A+B问题 (看数据范围不会爆longlong)题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 107
#include<bits/stdc++.h> using namespace std; typedef long long LL; LL a, b; int main() { cin >> a >> b; LL ans...
P1024
二元组整数 (搜索和C++ set)题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 85
C++ set去重: #include<bits/stdc++.h> using namespace std; typedef pair<int, int> PII; const int N = 30; set<PII> res; i...
P1086
采药 题解:
藕糖
回复 0
|
赞 0
|
浏览 95
代码: #include <iostream> #include <vector> #include <algorithm> // 用于 std::max using namespace std; int main(void) { &nb...
P1020
最长连续因子(贪心) 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 127
#include<bits/stdc++.h> using namespace std; int n; bool cheak(int x) { if(n % x == 0) return true; return false; ...
P1009
随机数 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 69
#include<bits/stdc++.h> using namespace std; int main() { cout << 210; return 0; }
P1015
单链表 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 47
#include<bits/stdc++.h> using namespace std; int a[5]; int main() { for(int i = 0; i < 5; i ++) cin >> a[i]; so...
P1018
击鼓传花(C++) 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 116
#include<bits/stdc++.h> using namespace std; const int N = 110; int n; bool st[N]; vector<int> res; int main() { ci...
P1021
复数 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 66
#include<bits/stdc++.h> using namespace std; float a, b, c, d; char ch; int main() { cin >> a >> b >> c >&g...
P1025
链表合并 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 42
#include<bits/stdc++.h> using namespace std; vector<int> A; int n, m; int main() { cin >> n; for(int i = 0; i &...
P1026
删除字符串 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 45
#include<bits/stdc++.h> using namespace std; int main() { string str; getline(cin, str); for(int i = 0; i < str.size();...
P1019
字母频率 (C++11 哈希表)题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 74
#include<bits/stdc++.h> using namespace std; unordered_map<char, int> res; int main() { string str; getline(c...
P1016
字符分类 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 50
#include<bits/stdc++.h> using namespace std; int main() { string str; getline(cin, str); string num, c, oth...
P1017
幂次方(快速幂) 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 69
#include<bits/stdc++.h> using namespace std; int mod = 233333; int x, n; int qmi(int a, int b) { int res = 1 % mod...
P1022
删除最大最小数 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 64
题目叙述不清,需要特判 #include<bits/stdc++.h> using namespace std; const int N = 110; int a[N]; int n; int main() { cin >>...
P1027
删除字符串2 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 85
#include<bits/stdc++.h> using namespace std; int main() { string str; getline(cin, str); for(int i = 0; i < str.size();...
P1000
A+Bproblem (c++)<----抓换的思想
jerry3128
回复 7
|
赞 2
|
浏览 14.6k
这道题是我在本站上A的第一道题,那我们直接开始吧: 首先,我们要用到转换的思想,既然这道题跟代数有关,那我们便可以把它转换为图论,如图: 又因为在题目的数据中并没有负数,那么,显然这个问题就转化为了求源点S到汇点T的最大流,接着就是模板就行了 #include<bits...
P1014
加密算法 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 119
#include<bits/stdc++.h> using namespace std; int main() { string str; getline(cin, str); for(int i = 0; i < str....
P1013
判断素数 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 69
#include<bits/stdc++.h> using namespace std; int n; bool cheak(int n) { if(n == 1) return false; for(int i = 2; i * i &l...
P1023
IP地址 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 88
#include<bits/stdc++.h> using namespace std; char num[1010]; bool cheak(string str) //判断合法性 { int cnt = 0, sum = 0; for(int i ...
P1011
日期 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 129
#include<iostream> using namespace std; string w[8] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", ...
P1012
字符移动 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 61
#include<bits/stdc++.h> using namespace std; int main() { string str, num, ot; cin >> str; for(int i ...
P1010
排序 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 79
#include<bits/stdc++.h> using namespace std; const int N = 1010; int a[N]; int n; int main() { cin >> n; fo...
P1008
0和1的个数 (位运算)题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 85
#include<bits/stdc++.h> using namespace std; int n, cnt; int main() { cin >> n; while(n) { if(n & 1) cnt ++; ...
P1007
整除 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 74
#include<bits/stdc++.h> using namespace std; int cnt; int main() { for(int i = 100; i <= 1000; i ++) { if(i %...
P1006
字符串翻转 题解:
我能走到对岸吗
回复 0
|
赞 1
|
浏览 96
#include<bits/stdc++.h> using namespace std; int main() { string s; getline(cin, s); reverse(s.begin(), s.end...
P1377
旋转矩阵 - 北航 题解:
flipped
回复 0
|
赞 0
|
浏览 170
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <math.h>...
P1018
击鼓传花 题解:
flipped
回复 0
|
赞 0
|
浏览 156
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <math.h>...
P1062
杨辉三角形 题解:
flipped
回复 0
|
赞 0
|
浏览 119
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <math.h>...
P1334
最大连续子序列 题解:
为欢几何
回复 0
|
赞 0
|
浏览 166
#include<bits/stdc++.h> using namespace std; long long dp[1000010]; long long a[1000010]; long long maxx; long long s = 0, d = 0; lon...
1
2
3
4
5
...
127
我要提问
近期热门
1
N诺成就值出炉,帮你一眼识别大神
2
机试如何才能快速提高?
3
[置顶]计算机考研择校分析【25考研必读】
4
广度优先搜索计算每个人移动到每个位置需要去掉障碍物的最少数目,最后求和的最小值
5
1377旋转矩阵
6
ip地址(C)
7
简单易懂
8
C++递归解法,有注释
9
1017 幂次方 快速幂模板
10
计算机考研复试笔记——操作系统篇