Skip to content

Instantly share code, notes, and snippets.

#include<iostream>
bool isMultiple(int n,int divisor) {
return n % divisor == 0;
}
int main() {
for (int i = 1; i <= 10000000; i++) {
if (isMultiple(i, 3) && isMultiple(i, 5)) {
std::cout<<"FizzBuzz"<<"\n";
#include <iostream>
bool isMultiple(int n,int divisor) {
return n % divisor == 0;
}
int main() {
for (int i = 1; i <= 10000000; i++) {
std::string text = std::string();
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
// Normalized pixel coordinates (from 0 to 1)
fragCoord = fragCoord / iResolution.xy;
vec2 start = vec2(0.2, 0.2);
vec2 end = iMouse.xy / iResolution.xy;
vec2 direction = normalize(end - start);
//
// main.swift
// dijkstra
//
// Created by Owen Morgan on 28/09/2018.
// Copyright © 2018 Owen Morgan. All rights reserved.
//
import Foundation
#include <cstdio>
#include <unordered_map>
#include <vector>
template <typename T>
struct Edge;
template <typename T>
struct Node;
use std::collections::HashMap;
use std::hash::{Hash, Hasher};
struct Node
{
value : i32,
connections : Vec<Edge>
}
impl Hash for Node
// compile with:
// c++ range_for.cpp -std=c++11 -m[sse4.2|avx2|avx|arch=native]
// run with ./a.out array_size
#include <vector>
#include <thread>
#include <cstdio>
#include <numeric>
#include <emmintrin.h>
#include <smmintrin.h>