Skip to content

Instantly share code, notes, and snippets.

@Hacv16
Created March 16, 2024 00:14
Show Gist options
  • Save Hacv16/d34573abbff945314bfac7c190d94be1 to your computer and use it in GitHub Desktop.
Save Hacv16/d34573abbff945314bfac7c190d94be1 to your computer and use it in GitHub Desktop.
struct Evento
{
int tempo, tipo, id;
Evento(int a = 0, int b = 0, int c = 0) : tempo(a), tipo(b), id(c) { }
// O elemento id eh util quando temos que responder queries
// Pode ser que seja util guardarmos outras informacoes tambem
bool operator < (Evento outro)
{
if(tempo == outro.tempo) return tipo < outro.tempo;
return tempo < outro.tempo;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment