Skip to content

Instantly share code, notes, and snippets.

View fa7ad's full-sized avatar

Fahad Hossain fa7ad

View GitHub Profile
#include <iostream>
#include <algorithm>
void clearIO()
{
int ch;
while ((ch = std::cin.get()) != std::cin.eof() && ch != '\n');
}
int main(int argc, char* argv[])
@fa7ad
fa7ad / triangleArea.cpp
Last active March 8, 2016 13:08
Area of Triangle - I tried to solve [this](https://algo.codemarshal.org/problems/556b5fc29c5e850300c49caf) using Heron's formula, but CodeMarshal won't accept it
#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
void clearIO()
{
int ch;
while ((ch = std::cin.get()) != std::cin.eof() && ch != '\n');
}
@fa7ad
fa7ad / FizzBuzzExtreme.cpp
Last active March 10, 2016 12:23
Original code by fb/fariha.tasnim.9469 | Problem: https://algo.codemarshal.org/problems/556c9f097b4cec0300d4ab93
#include <iostream>
#include <string>
#include <sstream>
// Prototype
void clearBuf();
int main(){
int lines;
std::cin >> lines;
#include <iostream>
#include <algorithm>
#include <sstream>
#include <string>
#include <vector>
// Prototypes
std::string calculateMode(std::vector<int> array);
int main() {
@fa7ad
fa7ad / mTable.cpp
Last active March 18, 2016 02:14
Simple Multiplication table given the input. Codemarshal DIU challenge
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
for(int i = 1; i < 11; i++){
cout << n << " x " << i << " = " << n*i << "\n";
}
@fa7ad
fa7ad / chickenEgg.cpp
Last active March 18, 2016 02:21
Chicken-Egg problem for DIU algo challenge on CodeMarshal.
#include <bits/stdc++.h>
using namespace std;
int main()
{
int cn;
ostringstream out;
cin >> cn;
for(int i = 0; i < cn; i++){
long double term, counter = 0;
#include <bits/stdc++.h>
using namespace std;
int main()
{
int cn;
ostringstream oss;
cin >> cn;
for (int i = 0; i < cn; i++) {
@fa7ad
fa7ad / gist:fbe548a6844d80a259b30ff255421add
Created May 7, 2016 04:17
Sublime Text 3 Build 3083 License Key - CRACK
### yo probe esta:
—– BEGIN LICENSE —–
J2TeaM
2 User License
EA7E-940282
45CB0D8F 09100037 7D1056EB A1DDC1A2
39C102C5 DF8D0BF0 FC3B1A94 4F2892B4
0AEE61BA 65758D3B 2EED551F A3E3478C
C1C0E04E CA4E4541 1FC1A2C1 3F5FB6DB
@fa7ad
fa7ad / custom.conf
Created October 18, 2016 17:22
/etc/gdm/custom.conf
# GDM configuration storage
[daemon]
# Uncoment the line below to force the login screen to use Xorg
WaylandEnable=false
[security]
[xdmcp]
@fa7ad
fa7ad / ngon.cpp
Last active March 22, 2017 19:49
N-gon checker from codemarshal
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long polygons;
cin >> polygons;
ostringstream outputText;
for (long long c = 0; c < polygons; c++)