摘要: 题目 思路 去考虑sort排序为相同数字为偶数个,输出格式 错误的去思考了数组为pair 代码 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=1e6+10; int i,j,k,n,m,t 阅读全文
posted @ 2024-03-14 16:14 zzzz-z 阅读(66) 评论(0) 推荐(0)
摘要: 题目 思路 我的思路: 排好序后找到几个0,在将最后一个0的右边一位输出,再根据0的个数输出0,再输出其余数字 别人思路: 排好序后将0右边一个和第一个0交换后,直接输出 代码 #include<bits/stdc++.h> using namespace std; int main () { ch 阅读全文
posted @ 2024-03-14 15:41 zzzz-z 阅读(34) 评论(0) 推荐(0)