Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <stdlib.h>
#define QUEUE_SIZE 10
typedef char element;
typedef struct {
element queue[QUEUE_SIZE];
int front, rear;
} QueueType;
#include <stdio.h>
#include <stdlib.h>
#define QUEUE_SIZE 5
typedef char element;
typedef struct {
element queue[QUEUE_SIZE];
int front, rear;
} QueueType;
#include <stdio.h>
#include <stdlib.h>
#define QUEUE_SIZE 5
typedef char element;
typedef struct {
element queue[QUEUE_SIZE];
int front, rear;
} QueueType;
#include <cstdio>
#include <set>
using namespace std;
const int _size = 100005;
int n, k, m[_size];
multiset<int> s;
int get_minmax(multiset<int> s) {
return (*s.begin()) * (*s.rbegin());
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Aliens Abducted Me - Report an Abduction</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
@uhmseohun
uhmseohun / socket_select_function.c
Created May 28, 2021 06:05
socket_select_function
socket1 = Socket()
socket2 = Socket()
FD_ZERO(&read);
while (1) {
FD_SET(socket1, &read);
FD_SET(socket2, &read);
state = select(maxfd+1, &read, 0, 0, 0);
switch (state) {