problemscpp
A collection of my answers to algorithm problems in c++.
Public 成员函数 | Public 属性 | 所有成员列表
pat::a::a1026::player结构体 参考

#include <pat.h>

Public 成员函数

 player ()=default
 
 player (const string &arrival_time_str, unsigned p, unsigned tag)
 
bool operator< (const player &p) const
 
bool operator> (const player &p) const
 

Public 属性

unsigned arrival_time = 0
 
string arrival_time_str {}
 
unsigned p = 0
 
unsigned start_time = 0
 
bool vip = false
 
unsigned waiting_time = 0
 

详细描述

在文件 pat.h864 行定义.

构造及析构函数说明

◆ player() [1/2]

pat::a::a1026::player::player ( )
default

◆ player() [2/2]

pat::a::a1026::player::player ( const string &  arrival_time_str,
unsigned  p,
unsigned  tag 
)

在文件 pat.cpp4686 行定义.

4687 : arrival_time_str(arrival_time_str), p(min(120U, p) * 60), vip(tag == 1) {
4688 const int h = stoi(arrival_time_str.substr(0, 2));
4689 const int m = stoi(arrival_time_str.substr(3, 2));
4690 const int s = stoi(arrival_time_str.substr(6, 2));
4691 arrival_time = h * 60 * 60 + m * 60 + s;
4692 }
string arrival_time_str
Definition: pat.h:865
unsigned arrival_time
Definition: pat.h:866
unsigned p
Definition: pat.h:867

引用了 arrival_time , 以及 arrival_time_str.

成员函数说明

◆ operator<()

bool pat::a::a1026::player::operator< ( const player p) const

在文件 pat.cpp4694 行定义.

4694 {
4695 if(start_time != ply.start_time) {
4696 return start_time < ply.start_time;
4697 }
4698 return arrival_time < ply.arrival_time;
4699 }
unsigned start_time
Definition: pat.h:869

引用了 arrival_time , 以及 start_time.

◆ operator>()

bool pat::a::a1026::player::operator> ( const player p) const

在文件 pat.cpp4701 行定义.

4701{ return arrival_time > ply.arrival_time; }

引用了 arrival_time.

类成员变量说明

◆ arrival_time

unsigned pat::a::a1026::player::arrival_time = 0

在文件 pat.h866 行定义.

被这些函数引用 player(), pat::a::a1026::main(), operator<() , 以及 operator>().

◆ arrival_time_str

string pat::a::a1026::player::arrival_time_str {}

在文件 pat.h865 行定义.

被这些函数引用 player().

◆ p

unsigned pat::a::a1026::player::p = 0

在文件 pat.h867 行定义.

◆ start_time

unsigned pat::a::a1026::player::start_time = 0

在文件 pat.h869 行定义.

被这些函数引用 pat::a::a1026::main() , 以及 operator<().

◆ vip

bool pat::a::a1026::player::vip = false

在文件 pat.h870 行定义.

◆ waiting_time

unsigned pat::a::a1026::player::waiting_time = 0

在文件 pat.h868 行定义.

被这些函数引用 pat::a::a1026::main().


该结构体的文档由以下文件生成: