摘要: 题解:用 sort函数,位于 <algorithm>中。 #include <bits/stdc++.h> using namespace std; typedef long long ll; int a[5]; int main() { for(int i = 0; i < 3; i++) cin 阅读全文
posted @ 2020-02-02 22:32 留幸愉 阅读(181) 评论(0) 推荐(0)
摘要: 注意溢出问题,当时想着新生赛,应该不会有溢出的问题,白白贡献了一发wa,还有细节处理没处理好又白白贡献了 一发wa,这道题属于很简单的水题,有良好的代码习惯或者大量的编程一发即AC,我还是太菜了QAQ #include <bits/stdc++.h> using namespace std; typ 阅读全文
posted @ 2020-02-02 22:04 留幸愉 阅读(591) 评论(0) 推荐(0)
摘要: 题意:给你两个整数a,b,计算a+b 的和是多少?(a>0,b>0) 题解:模拟加法 没压位 /*** 高精度加法:模拟计算 1.大整数存储: A3A2A1A0 A < 10 A:0~9 len(A) < 10 A:0~999999999 ***/ #include <iostream> #incl 阅读全文
posted @ 2020-02-02 17:44 留幸愉 阅读(146) 评论(0) 推荐(0)
摘要: 题意: n 个点,m 条边,每条边的权值是 1,当输入的 n 是 0 时结束。 问两点之间最短距离的最大值是多少。 题解:BFS枚举每个点。 #include <iostream> #include <queue> #include <vector> #include <string> #inclu 阅读全文
posted @ 2020-02-02 09:45 留幸愉 阅读(204) 评论(0) 推荐(0)