首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
buluoxu
2024年3月15日 22:05
日志排序 题解:vector+sort 借鉴了同体解内的输入方式
P1227
回复 0
|
赞 16
|
浏览 1.4k
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; struct loggle{ string task; string shijian; float haoshi; }; bool comp(loggle lhs, loggle rhs) { if(lhs.haoshi < rhs.haoshi) return true; else if(lh...
easymoney
2024年3月14日 15:31
日志排序 题解:
P1227
回复 0
|
赞 3
|
浏览 2.1k
//借鉴nicooy #include <stdio.h> #include <algorithm> #include <iostream> #include <string> using namespace std; struct record { string name; string start; double time; }; bool asc(record a,record b){ ...
18937485169
2023年3月27日 00:19
大模拟——三部走(1.数据输入、2.数据处理、3.数据输出)
P1227
回复 0
|
赞 6
|
浏览 4.3k
#include <bits/stdc++.h> using namespace std; struct run_log{ string name,cost_time_str; int y,m,d,h,min,s,ms; double cost_time; string block1,block2,block3; }; bool cmp(run_log l1,run_log l2){ if(l1.cost_time<l2.cost_time) return tr...
wenjuice
2022年3月6日 23:21
毫秒和运行时间不能用字符串比较,要转double比较
P1227
回复 0
|
赞 6
|
浏览 6.6k
比如 '40' > '350' ,但实际40<350,因此要转double比较
ccxx123
2021年2月10日 19:02
字符串拆分,排序
P1227
回复 0
|
赞 7
|
浏览 11.9k
#include<iostream> #include<algorithm> #include<string> #include<cstring> using namespace std; typedef struct record { string task; string date; string cost_time; double second; &nb...
1
2
题目
日志排序
题解数量
15
发布题解
在线答疑
热门题解
1
完成率100%,字符串处理 + 排序(注意毫秒数和运行时间并不是字节序越小一定时间越早/短)
2
日志排序 题解:c++ ,这题空格很多,哪都是,还是直接分割吧
3
日志排序 题解:使用sort,将运行时间换为double
4
日志排序 题解: C++ , 存储整串,用 sstream 分解,输出整串
5
还是sort
6
日志排序 题解:
7
日志排序 题解:75%通过写cmp用sort(a,a+n,cmp)
8
日志排序 题解:暴力(部分坑点有注释)
9
日志排序 题解:vector+sort 借鉴了同体解内的输入方式
10
日志排序 C语言题解:qsort排序