上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页
摘要: 易错点 输入格式中提到:“每行给出一个用户设置的密码,为不超过 80 个字符的非空字符串”,因此可能包含空格。测试点2即包含空格,如果用“cin>>a",测试点2会过不去,需要用cin.getline() 代码 #include <iostream> #include <cstdio> #inclu 阅读全文
posted @ 2022-07-13 12:10 qwasdasd 阅读(34) 评论(0) 推荐(0)
摘要: 易错点 测试点3:如果总评用float,测试点3会报错,换成int后能ac,原因不解 注意点 utility中的pair放到vector后用sort()可以对pair中的两个值进行自定义排序 代码 #include <iostream> #include <cstdio> #include <str 阅读全文
posted @ 2022-07-13 11:23 qwasdasd 阅读(66) 评论(0) 推荐(0)
摘要: 注意点 string里有个to_string()可以实现int转string 代码 #include <iostream> #include <cstdio> #include <string> using namespace std; bool is_Palindromic(string a){ 阅读全文
posted @ 2022-07-12 23:33 qwasdasd 阅读(22) 评论(0) 推荐(0)
摘要: 代码 #include <iostream> #include <cstdio> #include <string> using namespace std; int main() { char ch; string s; char tmpc; int tmp=0; cin>>ch; getchar 阅读全文
posted @ 2022-07-12 22:25 qwasdasd 阅读(40) 评论(0) 推荐(0)
摘要: 易错点 很多关键细节在题干背景里,而不单单是输出格式里,很容易忽略 setprecision有误差,.5会舍去而不是进位 代码 #include <iostream> #include <cstdio> #include <iomanip> using namespace std; int main 阅读全文
posted @ 2022-07-12 20:27 qwasdasd 阅读(23) 评论(0) 推荐(0)
摘要: 代码 #include <iostream> #include <cstdio> #include <string> using namespace std; int main() { string s; int n; cin>>n; getchar(); for(int i=0;i<n;i++){ 阅读全文
posted @ 2022-07-12 19:54 qwasdasd 阅读(49) 评论(0) 推荐(0)
摘要: 代码 #include <iostream> #include <cstdio> using namespace std; long a[100002]; string nxt[100002]; int main() { string faddr; string h,p1,p2; string f, 阅读全文
posted @ 2022-07-12 18:59 qwasdasd 阅读(23) 评论(0) 推荐(0)
摘要: 易错点 最高位的进位不要忽略 需要考虑两个0相加的情况程序不出错 代码 #include <iostream> #include <cstdio> #include <string> #include <stack> using namespace std; int main() { string 阅读全文
posted @ 2022-07-12 14:56 qwasdasd 阅读(46) 评论(0) 推荐(0)
摘要: 代码 #include <iostream> #include <cstdio> #include <string> #include <iomanip> using namespace std; float point[101]; int num[101]; int rnum[101]; floa 阅读全文
posted @ 2022-07-12 13:36 qwasdasd 阅读(31) 评论(0) 推荐(0)
摘要: 代码 #include <iostream> #include <cstdio> #include <set> #include <string> using namespace std; int main() { int n,m; string index; string name; set<st 阅读全文
posted @ 2022-07-12 11:56 qwasdasd 阅读(26) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页