This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MedianStream { | |
public: | |
// Constructor | |
MedianStream() { | |
numValues = 0; | |
} | |
// Adds integer value to the stream | |
void addNumber(int x) { | |
numValues++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MedianStream { | |
public: | |
// Constructor | |
MedianStream() { | |
numValues = 0; | |
} | |
// Adds integer value to the stream | |
void addNumber(int x) { | |
numValues++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MedianStream { | |
public: | |
// Constructor | |
MedianStream(); | |
// Adds integer value to the stream | |
void addNumber(int x); | |
// Returns median of all numbers seen so far | |
double getMedian(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define MAXL 10010 | |
#define MAXN 110 | |
typedef struct{ | |
int x; | |
int y; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// filho_de_malter.cpp | |
// | |
// Created by Lucca Siaudzionis on 07/08/15. | |
// | |
// Filho de Malter - Noic | |
#include <cstdio> | |
#include <vector> | |
using namespace std; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// estrela.cpp | |
// programas2 | |
// | |
// Created by Lucca Siaudzionis on 18/03/13. | |
// Copyright (c) 2013 Luccasiau. All rights reserved. | |
// | |
#include <cstdio> | |
#include <vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <cstring> | |
#include <algorithm> | |
using namespace std; | |
struct t_edge{ | |
int x; | |
int y; | |
int c; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// halloween.cpp | |
// | |
// Created by Lucca Siaudzionis on 03/03/15. | |
// | |
// URI 1656 - Doces do Dia das Bruxas | |
#include <cstdio> | |
//------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// halloween.cpp | |
// | |
// Created by Lucca Siaudzionis on 03/03/15. | |
// | |
// URI 1656 - Doces do Dia das Bruxas | |
#include <cstdio> | |
//------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// reino_de_succa.cpp | |
// | |
// Created by Lucca Siaudzionis on 08/06/15. | |
// | |
// Reino de Succa - Noic | |
#include <cstdio> | |
#include <algorithm> | |
using namespace std; |
NewerOlder