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
int main() | |
{ | |
return 0; | |
} |
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 <iostream> | |
#include <vector> | |
using namespace std; | |
template<typename T> | |
class Matrix | |
{ | |
public: | |
Matrix(size_t height, size_t width, const T& value = T()) : m_data(height, vector<T>(width, value)) |
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 <iostream> | |
#include <string> | |
using namespace std; | |
int to_decimal(char c) | |
{ | |
if (isdigit(c)) | |
{ | |
return c - '0'; |
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
// This solution does not work for UVA 681. | |
// Possibly due to non-polygon inputs which does not match the criteria of Melkman's algorithm. | |
#include <iostream> | |
#include <vector> | |
#include <deque> | |
#include <algorithm> | |
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
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
template<typename T> | |
class point | |
{ | |
public: |
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 <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <numeric> | |
#include <iomanip> | |
#include <cmath> | |
using namespace std; | |
template<typename T> |
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 <iostream> | |
#include <iomanip> | |
#include <list> | |
#include <string> | |
#include <map> | |
using namespace std; | |
template<typename T> | |
list<string> to_bangla_strings(T num) |
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 <iostream> | |
#include <queue> | |
#include <vector> | |
#include <functional> | |
using namespace std; | |
template<typename T> | |
class dataset | |
{ |
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 <iostream> | |
#include <vector> | |
#include <numeric> | |
using namespace std; | |
size_t get_num_of_moves(const vector<size_t>& stack_heights) | |
{ | |
size_t average_height = accumulate(stack_heights.begin(), stack_heights.end(), 0) / stack_heights.size(); | |
return accumulate(stack_heights.begin(), stack_heights.end(), 0, [average_height](size_t moves, size_t current_height) |
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
import urllib.request | |
import json | |
def request_gists(username): | |
url = 'https://api.github.com/users/' + username + '/gists' | |
with urllib.request.urlopen(url) as response: | |
text = response.read() | |
for gist in json.loads(text): | |
for filename in gist['files']: |
NewerOlder