This file contains hidden or 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 NO_S3D_USING | |
#define NO_MATH_USING | |
#include <Siv3D.hpp> | |
#include<boost/lexical_cast.hpp> | |
void Main() | |
{ | |
s3d::Font font(12); | |
while (s3d::System::Update()) | |
{ |
This file contains hidden or 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
// Copyright plasma_effect 2014. | |
// Distributed under the Boost Software License, Version 1.0. | |
//(See accompanying file LICENSE_1_0.txt or copy at | |
// http://www.boost.org/LICENSE_1_0.txt) | |
#pragma once | |
#include<stdexcept> | |
#include<stack> | |
namespace plasma_brain |
This file contains hidden or 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<chrono> | |
#include<random> | |
template<std::size_t N>int sum(int const(&ar)[N]) | |
{ | |
int ret{}; | |
for (int const& x : ar) | |
ret += x; | |
return ret; |
This file contains hidden or 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
// Copyright plasma-effect 2014. | |
// Distributed under the Boost Software License, Version 1.0. | |
//(See accompanying file LICENSE_1_0.txt or copy at | |
// http://www.boost.org/LICENSE_1_0.txt) | |
#pragma once | |
#include<vector> | |
#include<utility> | |
#include<algorithm> |
This file contains hidden or 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
//Copyright(c) 2014, plasma-effect | |
//All rights reserved. | |
// | |
//Redistribution and use in source and binary forms, with or without | |
//modification, are permitted provided that the following conditions are met : | |
//*Redistributions of source code must retain the above copyright notice, | |
//this list of conditions and the following disclaimer. | |
//* Redistributions in binary form must reproduce the above copyright notice, | |
//this list of conditions and the following disclaimer in the documentation | |
//and / or other materials provided with the distribution. |
This file contains hidden or 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> | |
template<class T>struct test | |
{ | |
typedef test<T> this_type; | |
T v_; | |
this_type(T v):v_(v){} | |
this_type():v_(T()){} | |
}; |
This file contains hidden or 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
template<class,class,class>struct torio; | |
template<class T>struct test; | |
template<class T1,class T2,class T3>struct test<torio<T1,T2,T3>> | |
{ | |
typedef T2 type; | |
}; | |
typedef torio<int,double,char> value_type; |
This file contains hidden or 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 CAT(a,b) CAT2(a,b) | |
#define CAT2(a,b) a ## b | |
#define A(a) B a | |
#define B(a) a | |
CAT(x,A((y))) |
This file contains hidden or 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
//problem 1 | |
let rec problem1 n = | |
match n with | |
| 0 -> 0 | |
| i -> if (i%3 = 0)||(i%5 = 0) then i + problem1(n-1) else problem1(i-1) | |
//problem 2 | |
let rec problem2 first second = | |
if first > 4000000 | |
then 0 |
This file contains hidden or 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
//The MIT License(MIT) | |
// | |
//Copyright(c) 2015 plasma-effect | |
// | |
//Permission is hereby granted, free of charge, to any person obtaining a copy | |
//of this software and associated documentation files(the "Software"), to deal | |
//in the Software without restriction, including without limitation the rights | |
//to use, copy, modify, merge, publish, distribute, sublicense, and / or sell | |
//copies of the Software, and to permit persons to whom the Software is | |
//furnished to do so, subject to the following conditions : |
OlderNewer