Skip to content

Instantly share code, notes, and snippets.

@Flaze07
Flaze07 / NF
Last active June 15, 2018 11:29
import std.stdio;
auto factors( T )( T number )
{
import std.math;
bool[ T ] result;
for( size_t i = 1; i <= cast( uint ) sqrt( cast( double ) number ); ++i )
{
if ( number % i == 0)
program CountSubarrays;
var
TestCases : integer ;
ArrLen : longint ;
Arr, temp : array of longint ;
i, j, x : integer ;
TotalAscending : longint ;
OuterLoopFlag : boolean ;
begin
@Flaze07
Flaze07 / tgui problem.cpp
Created July 11, 2017 16:32
hi...somehow menu.draw() has a problem
#include <TGUI/TGUI.hpp>
#include "include/apple.hpp"
#include "include/snake1.hpp"
#include "include/snake2.hpp"
int main()
{
sf::RenderWindow app_win{sf::VideoMode{450, 450}, "snake vs snake"};
sf::Vector2f win_size{(float) app_win.getSize().x, (float) app_win.getSize().y};
#include <SFGUI/SFGUI.hpp>
#include <SFGUI/Widgets.hpp>
#include <SFML/Graphics.hpp>
int main()
{
enum class Option {none, rectangle, circle};
Option option = Option::none;
sf::RenderWindow win{sf::VideoMode{400, 400}, "sfgui test"};
sfg::SFGUI sfgui;
#include <iostream>
int main()
{
enum class Condition {bigger, smaller, equal};
int input1;
int input2;
Condition condition;
std::cout << "enter first number\n";
std::cin >> input1;