Skip to content

Instantly share code, notes, and snippets.

View MohamedTaha98's full-sized avatar

MohamedTaha98

View GitHub Profile
#include <iostream>
using namespace std;
int main()
{
int n, m, moves;
cin >> n >> m;
if (n <= m)
#include <iostream>
using namespace std;
int main() {
long n, m, a, flagstones;
cin >> n >> m >> a;
if (n % a == 0 && m % a == 0)
flagstones = (n / a) * (m / a);
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
long long x, y;
char op;
/**
* fifteen.c
*
* Computer Science 50
* Problem Set 3
*
* Implements Game of Fifteen (generalized to d x d).
*
* Usage: fifteen d
*
/**
* helpers.c
*
* Computer Science 50
* Problem Set 3
*
* Helper functions for Problem Set 3.
*/
#include <cs50.h>
#include <cs50.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
int main (int argc, string argv[]) {
if (argc != 2) {
printf ("Please Enter 1 Key\n");
return 1;
}
#include <cs50.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
int main (int argc, string argv[]) {
if (argc != 2) {
printf ("Please Enter Exactly 1 Key\n");
return 1;
}
#include <iostream>
using namespace std;
int main () {
long long n;
cin >> n;
long ar[n];
for (int i = 0; i < n; i++)
@MohamedTaha98
MohamedTaha98 / Fake NP.cpp
Created June 17, 2017 20:52
Problem Solving
#include <iostream>
using namespace std;
int main () {
long l, r;
cin >> l >> r;
if (l == r)
cout << l;
@MohamedTaha98
MohamedTaha98 / Team.cpp
Last active June 21, 2017 15:36
Problem Solving
#include <iostream>
using namespace std;
int main() {
int n, solved = 0, sures;
cin >> n;
int ar[3];
for (int probs = 0; probs < n; probs++) {