-
// // main.cpp // test 5 // // Created by Jacky Roth on 2019/2/26. // Copyright © 2019 Jacky Roth. All rights reserved. // #include <iostream> #include <stdio.h> #include <math.h> #include <string.h> #include <algorithm> #include <vector> #include <unordered_map> using namespace std; //mp记录每辆车所停留的时间 unordered_map<string, int>mp; struct car { char id[10]; int time,flag; //flag 为0 表示in flag 为1 表示out }temp; vector<car>input,res; vector<string>ans; bool cmp(const car &a,const car &b){ if (strcmp(a.id, b.id)!=0) { return strcmp(a.id, b.id)<0; }else { return a.time<b.time; } } bool cmp1(const car &a,const car &b){ return a.time<b.time; } bool cmp2(string a,string b){ return a<b; } int main(int argc, const char * argv[]) { int N,K,hh,mm,ss; char flag[5]; scanf("%d%d",&N,&
PTA A1095 stl库的使用和排序
最新推荐文章于 2023-01-16 18:42:46 发布