文章
48
粉丝
317
获赞
57
访问
28.8k
#include<iostream>
#include<queue>
#include<string>
using namespace std;
struct El
{
int a;
int b;
};
bool operator <(El e1, El e2)
{
if ((e1.a * e1.a + e1.b * e1.b) < (e2.a * e2.a + e2.b * e2.b)) return true;
return false;
}
int main()
{
int n;
while (cin >> n)
{
priority_queue<El> pq;
for (size_t i = 0; i < n; i++)
{
string str;
cin >> str;
if (str == "Pop")
{
&...
登录后发布评论
暂无评论,来抢沙发