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
#!/usr/bin/env python2 | |
# vim: set fileencoding=utf8 | |
import os | |
import sys | |
import requests | |
import urlparse | |
import re | |
import argparse | |
import random |
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
//Matrix multiplication | |
//matrix1: m x s | |
//matrix2: s x n | |
#include <stdio.h> | |
void matrixInput(int m, int n, float (*a)[n]); | |
void MatrixMultiply(int m, int s, int n, | |
float (*matrix1)[s], float (*matrix2)[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
#include <stdio.h> | |
#define MaxVertices 100 | |
typedef struct{ | |
int vertices[MaxVertices]; | |
int edge[MaxVertices][MaxVertices]; | |
int numV; | |
}adjMatrix; | |
void createGraph(adjMatrix *G, int 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
#define MaxVertices 100 | |
typedef struct{ | |
int vertices[MaxVertices]; | |
int edge[Maxvertices]; | |
int numV; | |
int numE; | |
}adjMatrix; | |
void createGraph(adjMatrix &G, int n, int E) |
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
______ad88888888888888888888888a, | |
________a88888"8888888888888888888888, | |
______,8888"__"P88888888888888888888b, | |
______d88_________`""P88888888888888888, | |
_____,8888b_______________""88888888888888, | |
_____d8P'''__,aa,______________""888888888b | |
_____888bbdd888888ba,__,I_________"88888888, | |
_____8888888888888888ba8"_________,88888888b | |
____,888888888888888888b,________,8888888888 | |
____(88888888888888888888,______,88888888888, |
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> | |
void rank(int *p1, int *p2, int *p3); | |
void swap(int *p1, int *p2); | |
int main(void) | |
{ | |
int a, b, c; | |
while(scanf("%d %d %d", &a, &b, &c) != EOF) { |
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> | |
void swap(float *, float *); | |
void rank(float *); | |
int main(void) | |
{ | |
float a[5]; | |
int i, j; |
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> | |
void input(int *, int); | |
void output(int *, int); | |
int main(void) | |
{ | |
int a[100], n; | |
while(scanf("%d", &n) != EOF) { |
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> | |
void input(int *, int); | |
void output(int *, int); | |
void swap(int *, int *); | |
void sort(int *, int); | |
int main(void) | |
{ | |
int a[100], 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
#include <stdio.h> | |
void sumDiff(int, int, int *, int *); | |
int main(void) | |
{ | |
int a, b, sum, diff; | |
while(scanf("%d %d", &a, &b) != EOF) { | |
sumDiff(a, b, &sum, &diff); |