文章

1

粉丝

18

获赞

0

访问

146

头像
开门人和关门人 题解:
P1333 浙江大学机试题
发布于2024年4月11日 17:41
阅读数 146

#include<iostream>
#include<algorithm>

using namespace std;

int main()
{
    int n;
    while (cin >> n) {
        string n1 = "",n2="";
        string t1, t2;
        for (int i = 0; i < n; i++) {
            string a, b, c;
            cin >> a >> b >> c;
            if (n1 == "") {
                n1 = a, n2 = a;
                t1 = b;
                t2 = c;
            }
            else {
                if (b < t1) {
                    n1 = a;
&nbs...

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发