摘要:
注意整型长度即可。 1 #include <iostream> 2 #include <math.h> 3 using namespace std; 4 5 int main(){ 6 long a, b, c, d; 7 bool flag = false, zong = false; 8 cin 阅读全文
posted @ 2022-01-17 14:47
千咲
阅读(49)
评论(0)
推荐(0)
摘要:
测试点1需要注意只存在一种试卷且销量为0的情况。 #include <iostream> using namespace std; int main(){ string amax, emax, str; int n, aamax = -1, eemax = -1, num, data; cin >> 阅读全文
posted @ 2022-01-17 14:29
千咲
阅读(93)
评论(0)
推荐(0)
摘要:
通过字符串和整型的转换实现。 1 #include <iostream> 2 #include <math.h> 3 using namespace std; 4 5 int main(){ 6 string ss; 7 int a, b, c = 1, d, e, n; 8 cin >> ss > 阅读全文
posted @ 2022-01-17 14:21
千咲
阅读(66)
评论(0)
推荐(0)
摘要:
重点在于用map将id和是否是校友一一对应。 1 #include <iostream> 2 #include <map> 3 using namespace std; 4 5 int main(){ 6 int N, num = 0; 7 string str, old, olb; 8 bool 阅读全文
posted @ 2022-01-17 11:53
千咲
阅读(69)
评论(0)
推荐(0)
摘要:
注意No后输出的也是性感素数。 1 #include <iostream> 2 using namespace std; 3 4 bool isprime(int num){ 5 if(num <= 1) return false; 6 for(int i=2; i*i<=num; i++) 7 i 阅读全文
posted @ 2022-01-17 11:39
千咲
阅读(23)
评论(0)
推荐(0)
摘要:
判断最小顶部高度和最大底部高度即可。 1 #include <iostream> 2 using namespace std; 3 4 int main(){ 5 int n,hmin,lmax; 6 cin >> n; 7 int h[n], l[n]; 8 for(int i = 0; i < 阅读全文
posted @ 2022-01-17 11:23
千咲
阅读(46)
评论(0)
推荐(0)
摘要:
测试点1:考虑到k<=n/2和k>n/2的两个情况,不通过的可以把示例中的k改成6试试 1 #include <iostream> 2 using namespace std; 3 4 int main(){ 5 int n, k, x; 6 cin >> n >> k >> x; 7 int d[ 阅读全文
posted @ 2022-01-17 10:59
千咲
阅读(112)
评论(0)
推荐(0)
摘要:
测试点1:仔细看题目后发现是输入数整除四个正因数的和,除不是除以。 #include <iostream> #include <vector> using namespace std; int main(){ int num, data; cin >> num; for(int i = 0; i < 阅读全文
posted @ 2022-01-17 10:18
千咲
阅读(193)
评论(0)
推荐(0)
浙公网安备 33010602011771号