竞赛
考级
awawawawawawa
期使喔有哼耗嘚钟稳
原题链接:U2664(输入输出) 题解 别看 别看 :
i 聚宝 (回关) ≡Δ
为什么测试输出的答案是对的,格式好像也没错但就是报PE??? #include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; bool compare(const string& num1, const string& num2) { string s1 = num1 + num2; string s2 = num2 + num1; return s1 > s2; } int main() { int T=2; while (T--) { int N; cin >> N; vector<string> nums(N); for (int i = 0; i < N; ++i) { cin >> nums[i]; } sort(nums.begin(), nums.end(), compare); for (const string& num : nums) { cout << num; } cout << endl; } }
ヾ(≧▽≦*)o
!的](https://attach.acgo.cn/picture/6b767f13f6b7472abe7e995a7eee2e1e.png)
陌离﹠
请各位大佬速来试试!!!
欢迎勇士来挑战!!!
dsds
.Dream.
so?????????????????\n\n\n\n\n\n\n\n\n\n\n\nn\n\n\n\n\n
XMWWCY
感谢
回来看看
正确率只有10% #include <iostream> #include <set> using namespace std; int findCycleLength(int n, int k) { int base = 10; // 基数为10 int cycleLength = 0; } int main() { int n, k; cin >> n >> k; }
最近我会在做题的同时发题目的思路,希望是有用的。 只是我可能一段时间不会发题解了
本人只是在主函数里写,有人编出函数 也没有问题。 1.输入整数n 2.判断是否是0或1,是的话输出"No",而且要return 0 3.**这里是重点:**我们可以这样定义for循环:for(int i=2;pow(i,2)<n;i++) 用pow导入头文件(推荐bits/stdc++.h),不然也可以用i*i 4.循环中判断如果n%i==0就输出"No",return 0 5.最后程序可以直接输出"Yes" 题目已经说明要注意时间复杂度的问题,我们要重视
1.定义结构体 2.填入名称,成绩,学号不能忘了加上数组 3.主函数输入名称,成绩名称建议用string,成绩用double 4.compare函数不能少 其中如果两人不一样,return a.成绩>b.成绩 不然就return a.学号<b.学号 学号一定要用小于,读懂题意 5.执行sort头文件很重要有两种 (1)#include<bits/stdc++.h> *无脑万能头文件 (2)#include<algorithm> *专用(新手推荐) 6.for循环遍历输出即可 看懂了点个关注趴
哈哈哈
114514 114511451414 114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514114514
白狼王
为什么呀 *我是用string做的
= * + * *** * ***** *
枫原万叶
我是GG爆!!! 我是GG爆!!! 我是GG爆!!! 我是GG爆!!! 我是GG爆!!! 我是GG爆!!!
GG爆
我看见神在看视频
银膜
钟源航
共10833条