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
class Solution { | |
public: | |
bool wordBreak(string s, vector<string>& wordDict) { | |
if (s.empty()) | |
{ | |
return false; | |
} | |
if (wordDict.empty()) | |
{ | |
return false; |
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
void Rotate2701(const unsigned char* __restrict__ input, int width, int height, | |
unsigned char* __restrict__ output) | |
{ | |
const std::uint32_t* inputPixels = | |
reinterpret_cast<const std::uint32_t*>(input); | |
std::uint32_t* outputPixels = reinterpret_cast<std::uint32_t*>(output); | |
const std::uint32_t kBlockPixelSize = 8; | |
const std::uint32_t rowBlockCount = width / kBlockPixelSize; |
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 STB_IMAGE_IMPLEMENTATION | |
#define STB_IMAGE_WRITE_IMPLEMENTATION | |
#define _CRT_SECURE_NO_WARNINGS 1 | |
#include <stb_image.h> | |
#include <stb_image_write.h> | |
#include <vector> | |
#include <chrono> | |
#include <iostream> | |
void Rotate2701(const unsigned char* input, |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace GaussianOffsetsCalculator | |
{ | |
class Program | |
{ | |
private static long[] _fracCache = new long[30]; |
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 <type_traits> | |
#include <limits> | |
#include <cassert> | |
enum class uint32_t : unsigned int {}; | |
constexpr uint32_t operator""_u32(unsigned long long x) { | |
using underlying = std::underlying_type_t<uint32_t>; | |
assert(static_cast<unsigned long long>(std::numeric_limits<underlying>::max()) >= x); | |
return uint32_t{static_cast<underlying>(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 <type_traits> | |
#include <functional> | |
#include <tuple> | |
#include <utility> | |
#include <iostream> | |
#include <memory> | |
template<int I> | |
struct Placeholder | |
{ |
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 UNICODE | |
#include <string> | |
#include <experimental/generator> | |
#include <iostream> | |
#include <functional> | |
#include <string_view> | |
#include <Windows.h> | |
using namespace std::experimental; |
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 <variant> | |
#include <functional> | |
#include <memory> | |
#include <iostream> | |
#include <thread> | |
#include <chrono> | |
#include <stdexcept> | |
#include <Windows.h> | |
using Win32Handle = std::unique_ptr<void, void (*)(void *) noexcept>; |
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 <cstdint> | |
#include <Windows.h> | |
#include <cassert> | |
#include <thread> | |
#include <iostream> | |
struct Mutex | |
{ | |
public: | |
void lock() |
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
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Diagnostics; | |
using System.Diagnostics.Contracts; | |
namespace Calculator | |
{ | |
enum SyntaxKind | |
{ |
NewerOlder