摘要:
P1104 生日 思路:首先定义struct struct stu{ int year,mouth,day; string name; }a[105]; 然后cin 接着排序 最后输出 代码 #include<bits/stdc++.h> using namespace std; struct st 阅读全文
posted @ 2026-08-01 19:23
屠桦
阅读(2)
评论(0)
推荐(0)
摘要:
思路:先sort,然后for,遇到相同cnt只加一次 主要代码 for(int i=1;i<=n;i++){ if(a[i]!=a[i-1]) cnt++; if(cnt==k) cout<<a[i]; } 完整代码 #include<bits/stdc++.h> using namespace s 阅读全文
posted @ 2026-08-01 18:36
屠桦
阅读(2)
评论(1)
推荐(0)
浙公网安备 33010602011771号