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 <cs50.h> | |
#include <stdio.h> | |
typedef struct dllist { | |
int n; | |
struct dllist* prev; | |
struct dllist* next; | |
} | |
dllnode; |
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
// recovers jpegs from memory card file | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <cs50.h> | |
#define BLOCK 512 | |
typedef uint8_t BYTE; |
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 <algorithm> | |
using namespace std; | |
int main () { | |
int a, b; | |
double c; | |
while (true) { |
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 java.util.Scanner; | |
public class Taha { | |
public static void main(String[] args) { | |
Scanner in = new Scanner (System.in); | |
String s = in.next(); | |
if (s.charAt(0) == 'a' || s.charAt(0) == 'h') { | |
if (s.charAt(1) == '1' || s.charAt(1) == '8') | |
System.out.println("3"); | |
else | |
System.out.println("5"); |
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> | |
using namespace std; | |
int main() | |
{ | |
long long n, change25 = 0, change50 = 0, remainall = 0, remain25 = 0, remain50 = 0; | |
string a = "YES"; | |
cin >> n; | |
long long ar[n]; |
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 java.util.Scanner; | |
public class Taha { | |
public static void main(String[] args) { | |
Scanner in = new Scanner (System.in); | |
double x1 = in.nextDouble(), min = 0; | |
double y1 = in.nextDouble(); | |
int n = in.nextInt(); | |
double ar[] = new double [n]; | |
for (int i = 0; i < n; i++) { | |
double x2 = in.nextDouble(); |
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> | |
using namespace std; | |
int main() | |
{ | |
int n, mishka = 0, chris = 0; | |
cin >> n; | |
int ar[2]; | |
for (int rnds = 0; rnds < n; rnds++) |
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> | |
using namespace std; | |
int main() { | |
long n, length = 1; | |
cin >> n; | |
long ar[n]; | |
for (int i = 0; i < n; i++) |
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> | |
using namespace std; | |
int main () { | |
long n, ans; | |
cin >> n; | |
ans = (n + 1) / 2; | |
cout << ans; |
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> | |
using namespace std; | |
int main () { | |
long n; | |
cin >> n; | |
long ar[n]; | |
bool won = false; |