Skip to content

Instantly share code, notes, and snippets.

30 seconds to mars Atomship Audio Bloc party Bush Chevelle Coldplay Creed Crossfade Danzig

#include <iostream>
#include <fstream>
#include <cmath>
#include <stdlib.h>
using namespace std;
int main() {
int data_size = 0; // size of data set
int n = 0; // Number to test for prime-ness
int number_of_primes = 0;
#include <iostream>
int main () {
for(int i=1; i<10; i++) {
for(int j=1; j<i; j++) {
std::cout << j;
}
std::cout << std::endl;
}
}
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "sys/time.h"
#define TRIALS 1
#define EXPERIMENTS 4
#define MATRIX_SIZE 2048
// [!!] this _CAN_ break if doing something like max(0, ++i)
<script>
$('#link').click(function() {
$('#linkbox').toggle(function() {
$('#linkbox').focus();
});
});
</script>
md5sum * | awk '{print $1}' | sort | uniq -d
1 weight: 6008 IQ: 1300
2 weight: 6000 IQ: 2100
3 weight: 500 IQ: 2000
4 weight: 1000 IQ: 4000
5 weight: 1100 IQ: 3000
6 weight: 6000 IQ: 2000
7 weight: 8000 IQ: 1400
8 weight: 6000 IQ: 1200
9 weight: 2000 IQ: 1900
10 weight: 2000 IQ: 1900
Smoker 5 with tobacco waiting to smoke
Smoker 4 with tobacco waiting to smoke
Smoker 3 with match waiting to smoke
Smoker 2 with match waiting to smoke
Smoker 1 with paper waiting to smoke
Agent 2 giving out tobacco and match
Smoker 1 with paper received other items. Now smoking for the 1 time...
Smoker 0 with paper waiting to smoke
Agent 0 giving out tobacco and paper
Smoker 3 with match received other items. Now smoking for the 1 time...
./smokers
Smoker 5 with tobacco waiting to smoke
Smoker 4 with tobacco waiting to smoke
Smoker 3 with match waiting to smoke
Smoker 2 with match waiting to smoke
Smoker 1 with paper waiting to smoke
Smoker 0 with paper waiting to smoke
Agent 0 giving out tobacco
Smoker 3 with match received other items. Now smoking for the 1 time...
Smoker 3 with match done smoking
Smoker 1075836608 with tobacco received other items. Now smoking...
Smoker 1073985064 with tobacco waiting to smoke
Smoker 3 with match waiting to smoke
Smoker 3 with match received other items. Now smoking...
Smoker 2 with match waiting to smoke
Smoker 1077939556 with paper waiting to smoke
Smoker 1077939556 with paper received other items. Now smoking...
Smoker 1074011456 with paper waiting to smoke
Smoker 1075836608 with tobacco done smoking
Smoker 1075836608 with tobacco waiting to smoke