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
dir = strcat(pwd, "/"); | |
f1 = strcat(dir, input("audio 1: ","s")); | |
f2 = strcat(dir, input("audio 2: ","s")); | |
[y, FS, BPS] = wavread(f1); | |
[z, FS, BPS] = wavread(f2); | |
FS | |
%y = lin2mu(y(1:400000),0); | |
%z = lin2mu(z(1:400000),0); | |
y = lin2mu(y(1001:50000),0); | |
z = lin2mu(z(1001:50000),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 <stdio.h> | |
#include <unistd.h> | |
int main() { | |
setvbuf(stdout, NULL, _IONBF, 0); | |
for(int i=0; i<100; i++) { | |
usleep(70000); | |
printf("\r"); | |
switch(i%4) { | |
case 0: printf("/"); break; |
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 <cstring> | |
#include <vector> | |
#include <cstdio> | |
#define MAXN 100001 | |
#define MAXST 262144 | |
#define left(i) (i<<1)+1 | |
#define center(l, r) (l+r)>>1 | |
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
int C[MAXN], next[MAXN]; | |
inline int findSet(int i) { | |
return (C[i] == i) ? i : (C[i] = findSet(C[i])); | |
} | |
inline int findNext(int i) { | |
return (next[i] == i) ? i : (next[i] = findNext(next[i])); | |
} | |
inline void unionSet(int i, int j) { | |
C[findSet(i)] = findSet(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 <cstdio> | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
#define foreach(it,c) for(typeof((c).begin()) it=(c).begin();it!=(c).end();++it) | |
vector<int> up, down, eq; | |
long long sumon; |
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> | |
#define MAXN 1001 | |
using namespace std; | |
int main() { | |
int n, k, d[MAXN], s[MAXN], m[MAXN]; | |
cin>>n>>k; | |
for(int i=0; i<n; i++) | |
cin>>d[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
x, y, a, b = [int(x) for x in raw_input().split()] | |
A = [] | |
for i in range(a if a>b else b+1, x+1): | |
for j in range(b, min(i, y+1)): | |
A.append((i, j)) | |
print len(A) | |
for x in A: | |
print x[0], x[1] |
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 <cstdio> | |
#include <cmath> | |
using namespace std; | |
int W, D, A, K; | |
int p1[10], q1[10], p2[10], q2[10]; | |
inline double y1(double x) { |
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 <cstdio> | |
#include <vector> | |
#include <cstring> | |
#define MAXN 3000 | |
using namespace std; | |
char T[60][60]; | |
int r, c, dx[] = {-1, 1, 0, 0}, dy[] = {0, 0, -1, 1}; | |
vector<int> adj[MAXN]; | |
int pi[MAXN]; |
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<cstdio> | |
#include<cstring> | |
using namespace std; | |
const int INF = 1<<30; | |
int M[10005][1005], n, m, pi[1005], c; | |
int A[1005], B[1005], savej[1005]; | |
string T, P; |
OlderNewer