text
stringlengths
8
6.88M
#include "stdafx.h" #include "level_tilemap.h" #include "level_properties.h" #include "level_style.h" #include "rom_file.h" #include "tile.h" int RareDecompress(Buffer& dst, const Buffer& src); bool LevelTilemap::Load(CartFile& cart, const LevelProperties& prop, const LevelStyle& style) { CartFi...
#ifndef PERMISSION_H_ #define PERMISSION_H_ #define NUMBER_PERMISSION_PROPERTIES 3 enum PermissionType { INSERT = 1, UPDATE = 2, DELETE = 3, READ = 4 }; class Permission { protected: int ID; std::string name; std::string description; public: Permission(); ~Permission(); ...
#include "shaders.h" #include "../__trash.h" void readShaderFile(const char* file_path, const GLchar* pShaderCode) { std::ifstream input(file_path, std::ios::in | std::ios::binary); char c; char* ptr = pShaderCode; while (input.get(c)) { //printf("%c", c); *ptr = c; ptr++; ...
/** * image.cpp - Image representation. */ #include <cstring> #include <cstdlib> #include <fstream> #include <sstream> #include <iostream> #include "image.h" #include "neural_network.h" using namespace std; /** * getPixelEncoding - Return a flattened and normalized pixel matrix. */ vector<double> Image::getPixe...
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
/**************************************************************************** ** Meta object code from reading C++ file 'widget.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.7.1) ** ** WARNING! All changes made in this file will be lost! **************************************************************...
#include <bits/stdc++.h> using namespace std; #define TESTC "" #define PROBLEM "102" #define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0) int main(int argc, char const *argv[]) { #ifdef DBG freopen("uva" PROBLEM TESTC ".in", "r", stdin); freopen("uva" PROBLEM ".out", "w", stdout); #endif int BCG,BGC,C...
../1099/E.cpp
#ifndef TABLE_H #define TABLE_H #include<vector> #include<string.h> using namespace std; class Attribute { public: short type;//三种类型int 1, float 2, char 3 short length;//只有char才有意义, 长度为定义的大小 string attrname; bool primary;//这个属性是否是primary bool unique;//这个属性是否是unique string indexname;//这个属性的index...
#ifndef BLOCKCHAIN_TRANSACTION_H #define BLOCKCHAIN_TRANSACTION_H #include <cstdint> #include <ctime> #include <iostream> using namespace std; class Transaction { public: Transaction(string from, string to, double amount); string from; string to; double amount; time_t timeT; }; #endif //BLOCKCHA...
#include<iostream> #include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<string.h> using namespace std; int lru_clock(int ibuf[BUFSIZ],int len,int frames) { int queue[frames][2],pos=0,flag=0,pointer=0,pagerep=0; for(int i=0;i<frames;i++) { queue[i][0]=-1; queue[i][1]=0; } for(int i=0;i<len;i++) { ...
#pragma once #include <iostream> #include "sort.hpp" namespace non_std { template <typename K, typename V> long binary_search(std::vector<Node<K, V>> vec, K key) { long left{}; long right{vec.size()-1}; while (left <= right) { std::cout << left << ' ' << right << std::end...
#include <SDL_ttf.h> #include "Entity.h" class Score : public Entity { public: Score(); ~Score(); TTF_Font* Sans { nullptr }; SDL_Surface* surfaceMessage { nullptr }; int score { 0 }; // the score int digits { ...
/// Switch.cpp #include "Switch.hpp" #include <iostream> #include <iomanip> #include <stdio.h> using namespace std; #define NANO 1000000000 Switch::Switch() { clock_gettime(CLOCK_MONOTONIC, &m_lastActiveTime); } Switch::Switch(int debounceTime):m_switchValue(false), m_debounceTime((double)debounceTime / 1000), m_...
#ifndef SPRING_H #define SPRING_H #include "terrain.h" // 弹簧 class Spring : public Terrain { Q_OBJECT public: Spring(QObject *parent = nullptr); Spring(int x, int y, int width, int height, QObject *parent = nullptr); }; ...
/* Delete Node at a given position in a linked list Node is defined as struct Node { int data; struct Node *next; } */ Node* Delete(Node *head, int position) { // Complete this method Node *cur; cur = head; if(position == 0){ head = hea...
/*==================================================================== Copyright(c) 2018 Adam Rankin 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 limitati...
/** * @file sensor_entity_type.h * * @copyright 2017 3081 Staff, All rights reserved. * * @author Zijing Mo <zijingmo888@gmail.com> */ #ifndef SRC_SENSOR_ENTITY_TYPE_H_ #define SRC_SENSOR_ENTITY_TYPE_H_ /******************************************************************************* * Includes ****************...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- * * Copyright (C) Opera Software ASA 1995 - 2004 * * class ES_Runtime */ #ifndef ES_PROGRAM_CACHE_H #define ES_PROGRAM_CACHE_H #ifndef _STANDALONE #include "modules/hardcore/mh/mh.h" #endif // _STANDALONE #include "modules/util/simset.h"...
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <functional> #include <queue> #include <string> #include <cstring> #include <numeric> #include <cstdlib> #include <cmath> using namespace std; typedef long long ll; #define INF 10e10 #define rep(i,n) for(int i=0; i<n; i++) #define r...
#include <cstdio> int main(){ int h; scanf("%d", &h); float p = (h-100)*0.9*2; printf("%.1f\n", p); return 0; }
#ifndef PLAYER_HPP #define PLAYER_HPP #include "box2d/box2d.h" #include "body.hpp" #include <vector> #include "agent.hpp" // #include "olcPixelGameEngine.h" class Player : public Agent { public: std::vector<void*> weapons; Player(); Player(b2World& world, float posX = 0.f, float posY = 0.f, b2Shape* shape = nullpt...
#pragma once //////////////////////////////////////////////////////////////////////////////// #include "cellogram/State.h" #include <Eigen/Dense> #include <igl/colormap.h> #include <igl/opengl/glfw/Viewer.h> #include <igl/opengl/glfw/imgui/ImGuiMenu.h> #include <imgui/imgui.h> ////////////////////////////////////////...
#include "intersection.h" intersection::intersection(const double distance, std::shared_ptr<intersectable> object) : _distance(distance), _object(object) {} auto intersection::distance() const -> double { return _distance; } auto intersection::object() const -> std::shared_ptr<intersectable> { return _object; }
// Copyright (c) 2018 Mikael Simberg // // SPDX-License-Identifier: BSL-1.0 // 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) // This example benchmarks the time it takes to resume and suspend the pika // runtime...
#ifndef PRINT_MATRIX_H #define PRINT_MATRIX_H #include <vector> using namespace std; void printMatrixCore(const vector<vector<int> > &matrix, vector<int> &result, int row, int col, int rows, int cols) { //小于等于零行/列 if (rows <= 0 || cols <= 0) return; //一行/列 if (rows == 1) { while (cols != 0) { ...
# include <stdlib.h> #include<iostream> using namespace std; int main () { char *** p; // memory w char ** q; // memory x char * w; // memory y char x; // memory z q = ( char **) malloc ( sizeof ( char *)); // memory 1 w = ( char *) malloc ( sizeof ( char )); // memory 2 x = 'x'; p = &q; // point 1 *p...
#include <iostream> #include "voting_machine.h" using namespace std; using namespace foobar; int main() { voting_machine machine; std::string voter; std::string type; std::string votee; while (std::cin >> voter) { std::cin >> type; std::cin >> votee; if (type == "pick"...
/* * Copyright (c) 2011 Pierre-Etienne Bougué <pe.bougue(a)gmail.com> * Copyright (c) 2011 Florian Colin <florian.colin28(a)gmail.com> * Copyright (c) 2011 Kamal Fadlaoui <kamal.fadlaoui(a)gmail.com> * Copyright (c) 2011 Quentin Lequy <quentin.lequy(a)gmail.com> * Copyright (c) 2011 Guillaume Pinot <guillaume.pino...
#include "stdafx.h" #include "InstateLocation.h" #include "Qso.h" InstateLocation::InstateLocation(Qso *qso) : Location(qso) { } InstateLocation::~InstateLocation() { }
#pragma once class SyncLocker { CRITICAL_SECTION* cs; public: SyncLocker(CRITICAL_SECTION& cs) { this->cs = &cs; EnterCriticalSection(this->cs); } ~SyncLocker() { LeaveCriticalSection(this->cs); } operator bool() { return false; } }; #define synchronized(obj) if (SyncLocker __sy...
#pragma once #include "Renderer.h" class Texture{ private: unsigned int m_RendererID; std::string m_FilePath; unsigned char* m_LocalBuffer; int m_Width, m_Height, m_BPP; unsigned int unit; const char* m_Type; public: Texture() {}; Texture(const std::string& path, unsigned int slot = 0,...
#include <iostream> #include <iterator> #include <vector> #include <string> #include <algorithm> using namespace std; int main() { vector<string>mats; string temp; cout << "Enter Mat's guest list (empty line to quit):\n"; while (getline(cin, temp) && temp.size() > 0) mats.push_back(temp); ostream_iterator<stri...
#include <SDL2/SDL.h> #ifdef _WIN32 #include <Windows.h> #include <gl/GL.h> #else #error Unsupported platform #endif #include "Math.hpp" #include "Timer.hpp" #include "Physics.hpp" #include <vector> using namespace PHYSICS_NAMESPACE; struct Mouse { enum { LEFT = 1, MIDDLE, RIGHT }; bool buttons[4]; f32...
#include "stdafx.h" #include "K2TieredVector.cpp" //#include "TieredVector.cpp" #include <vector> #define SIZE 10000 #define SEED1 1a #define SEED2 2 void testInsertion(RankSequence& ds, int32_t* order) { RESEED(SEED1); for (int32_t i = 0; i < SIZE; i++) { int32_t item = RAND_FUNC() % SIZE; ds.insertElemAt(orde...
#include "Game.h" int Game::gameState = 1;
class G18_DZ : glock17_EP1 { displayName = $STR_DZ_WPN_G18_NAME; descriptionShort = $STR_DZ_WPN_G18_DESC; model = "\RH_de\RH_g18.p3d"; picture = "\RH_de\inv\g18.paa"; reloadMagazineSound[] = {"\RH_de\sound\glock_reload.wss",0.1,1,20}; modes[] = {"Single","Fullauto"}; class Single: Mode_SemiAuto { begin1[]...
#pragma once #include "UtH\UtHEngine.hpp" #include "Util.h" template<typename T> class Stat { static_assert(std::is_arithmetic<T>::value, "error: type must be arithmetic"); T m_min, m_max, m_value; public: Stat() = delete; Stat(const T& min, const T& max); Stat(const T& min, const T& max, const T& value); Sta...
#pragma once #include "Engine/graphics/Shader.h" /*! *@brief モデルエフェクト。 */ class ModelEffect : public DirectX::IEffect { protected: std::wstring m_materialName; Shader* m_pVSShader = nullptr; Shader* m_pPSShader = nullptr; Shader m_vsShader; Shader m_psShader; Shader m_vsShadowMap; //シャドウマップ生成用の頂点シェーダー。 Sha...
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- ** ** Copyright (C) 1995-2007 Opera Software AS. All rights reserved. ** ** This file is part of the Opera web browser. It may not be distributed ** under any circumstances. ** */ #include "core/pch_system_includes.h" #ifdef VEGA_BACKENDS_US...
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
#include <iostream> int preDecr(int &arg) { arg = arg - 1; return arg; } int posDecr(int &num) { int arg = num ; num -= 1; return arg; } int main() { int par; std::cout << "i = "; std::cin >> par; int num = par; std::cout << "--i = " << preDecr(par) << std::endl; std::cout...
//处理自动站小时数据记录与数据库交互的操作 //最后修改 2010 8 6 18:15 #include "aws_hour_database.h" void deal_all_proc() { std::vector<aws_hour_record> records; CTime last_time,curtime; bool insert_success=true; GetLastReadTime(last_time); curtime = last_time + CTimeSpan(0,1,0,0); //从上次最后插入数据库时间后开始 while(curtime<=...
#pragma once #include "bricks/core/types.h" #include "bricks/core/pointer.h" #include "bricks/core/exception.h" #if BRICKS_ENV_MINGW #include <sys/param.h> #endif #ifdef __GLIBC__ #include <endian.h> #endif #if (defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN) || (defined(_BYTE_ORDER) && _BYTE_ORDER == _LI...
#pragma once #include <Windows.h> #include <mfidl.h> #include <mutex> #include <future> #include <vector> #include <valarray> #include "SafeQueue.h" #include <d3d11.h> #include <dxgi.h> #include <wrl.h> using namespace Microsoft::WRL; extern "C" { #include <libavutil\audio_fifo.h> #include <libavcodec\avcodec.h> #in...
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// // Знаковые и беззнаковые // V 1.0 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// #include<iostream> #include<limits.h> using namespace std; int main() { int var = 255; // Знаковая переменная unsign...
#include<iostream> #include<vector> #include<algorithm> using namespace std; class Solution { public: string addBinary(string a, string b) { //基本思想:逐位计算,从末位一直往前逐位相加,逢2进位 int i, carry = 0; //长度不够的串在前面补0 if (a.size() < b.size()) a.insert(0, b.size() - a.size(), '0'); else b.insert(0, a.size() - b.size(),...
#ifndef COLOR_H # define COLOR_H # include "engine.h" class Color { public: unsigned char r; unsigned char g; unsigned char b; static std::vector<Color*> table; static std::vector<Color*> ntable; static double max_mass; static double min_mass; Color(); Color(int index); Color(double m...
#include "Fire.h" const float EXPIRY_DELAY = 1.0f; Fire::Fire() : Element() { } void Fire::Init() { active = 0; time = 0; } void Fire::Update(float dt) { if (active) { time += dt; if (time >= EXPIRY_DELAY) { time = 0; active = 0; } } }...
#pragma once class CSteamID; class CSharedObject; enum ESOCacheEvent { eSOCacheEvent_None = 0, eSOCacheEvent_Subscribed = 1, eSOCacheEvent_Unsubscribed = 2, eSOCacheEvent_Resubscribed = 3, eSOCacheEvent_Incremental = 4, eSOCacheEvent_ListenerAdded = 5, eSOCacheEvent_ListenerRemoved = 6, }; class ISharedObject...
/* * Game.cpp * * Created on: Apr 1, 2015 * Author: eddy */ #include "Game.h" #include <algorithm> #include "pair_compare.h" #include <string> Game::Game() : p1(), p2(), p3(), p4(), ui(){ initscr(); refresh(); player_count = 0; play = true; all_players_done = false; } Game::~Game(void){ endwin(); } ...
#include <cstdio> #include <ctime> #include <cmath> #include <cstring> struct work { int a; int b; double x; double y; char *date; int group_index; char surname[64]; char name[64]; char middle_name[64]; }; int main(int argc, char *argv[]) { int a = 13; int b = 19; doub...
#include "graph.hpp" using namespace std; int main(int, char**) { cin.sync_with_stdio(false); cin.tie(nullptr); readGraph(cin, [&](auto graph) { graph.toDot(cout); }); return 0; }
#include<iostream> #include<vector> using std::vector; #include<algorithm> #include<string> using std::string; /* Write a function to find the longest common prefix string amongst an array of strings. */ class Solution { public: string longestCommonPrefix(vector<string>& strs) { if (strs.size() == 0)return ""; ...
#include "utils/service_thread.hpp" #include "utils/log.hpp" #include "utils/assert.hpp" #include "utils/game_def.hpp" #include "db/connector.hpp" #include "utils/process_utils.hpp" #include "utils/time_utils.hpp" #include "utils/string_utils.hpp" #include "utils/json2pb.hpp" #include "config/utils.hpp" #include "confi...
#pragma once namespace texture { class DXTexture; struct Material; } namespace render { struct LineVertex { D3DXVECTOR3 pos; D3DCOLOR color; LineVertex(float x, float y, float z, DWORD color) : pos(x, y, z), color(color) {} LineVertex() {} }; void drawLine(const D3DXVECTOR3* vertices, int count, D3DC...
// Tue May 3 16:49:07 EDT 2016 // Evan S Weinberg // Include file for eigenvalue routines. #ifndef ESW_EIGENVALUE #define ESW_EIGENVALUE // Uncomment to print warnings. //#define VERBOSE_WARN #include <complex> using std::complex; // Struct that contains information that // all matrix functions return. // Retu...
#include "InetAddress.h" #include <string.h> // ::memset namespace chatty { namespace net { InetAddress::InetAddress() { ::memset(&addr_, 0, sizeof addr_); } InetAddress::InetAddress(const struct sockaddr &addr) : addr_(addr) {} } // namespace net } // namespace chatty
#ifndef RIVER_H #define RIVER_H #include <string> #include <cstring> const int SCENE_HEIGHT=24, SCENE_WIDTH=72; const int BUFFER_SIZE = 100; enum Status {VALID_GOAL_STATE=2, VALID_NONGOAL_STATE=1,ERROR_INVALID_CANNIBAL_COUNT=-1, ERROR_INVALID_MISSIONARY_COUNT=-2, ERROR_INVALID_MOVE=-3, ERROR_MISSIONARIES_EATE...
/* * File: Objeto3D.h * Author: raul * * Created on 20 de enero de 2014, 23:49 */ #ifndef OBJETO3D_H #define OBJETO3D_H #include "TAfin.h" class Objeto3D { public: Objeto3D(){ marcoDeCoordenadas = new TAfin(); } virtual void dibuja() = 0; private: TAfin* marcoDeCoordenadas; }; #endif...
#ifndef __MERCHANT_H_ #define __MERCHANT_H_ #include "BaseGameEntity.h" #include "StateMachine.h" class Event; class Merchant : public BaseGameEntity { private: StateMachine<Merchant>* _sm; public: Merchant(int id); virtual ~Merchant(); public: void Update(); virtual bool HandleEvent(const Event& src_event); ...
/* * byte_median.h * * Created on: 25 Feb 2016 * Author: dane */ #ifndef BYTE_MEDIAN_H_ #define BYTE_MEDIAN_H_ #include <type_traits> #include "thread_pool.h" namespace algo { template<class elem_type, int bitcount> void count_elements(elem_type _arr[], size_t _start, size_t _finish, size_t _counts[], i...
#ifndef EMPLOYEE_H #define EMPLOYEE_H #include<iostream> #include<string> #include"person.h" class employee :public Person { private: std::string post,Pass; public: employee(std::string Name, std::string Family, std::string Phone, std::string Code, std::string post , std::string Pass ) :Person(Name, Fam...
#include <stdio.h> #include <malloc.h> #include <queue> using namespace std; typedef struct Node { int data; struct Node *left, *right; } Node; Node* new_Node(int data){ Node *node = (Node*)malloc(sizeof(Node)); node->data = data; node->left = node->right = NULL; return node; } int ...
#include <stdio.h> #include <stdlib.h> #include <conio.h> #define MAX 100 #include <locale.h> faltas () { int horas_dadas,creditos,faltas; int total_faltas,pode_faltar; printf ("\nHoras de aulas dadas: "); scanf ("%d",&horas_dadas); printf ("\nQuantos creditos: "); scanf ("%d",&creditos); printf ("\nQ...
#include <windows.h> #include "namepipe.h" #include "util.h" HANDLE NamePipe::open() { bool fSuccess; DWORD dwMode; int count = 1000; while (1) { printf("opening name pipe:%s\n", pipename_); handle_ = CreateFileA(pipename_, // pipe name GENERIC_READ | GENERIC_WRITE, // read ...
/* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*- * * Copyright (C) 1995-2010 Opera Software AS. All rights reserved. * * This file is part of the Opera web browser. * It may not be distributed under any circumstances. * * @author Alexey Feldgendler */ #include "core/pch.h" // This file includes a number...
// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration...
#pragma once #include "skse/NiRenderer.h" #include "skse/NiTypes.h" class NiD3DVertexShader { public: UInt32 unk00; // 00 UInt32 unk04; // 04 UInt32 unk08; // 08 UInt32 unk0C; // 0C UInt32 unk10; // 10 UInt32 unk14; // 14 UInt32 unk18; // 18 UInt32 unk1C; ...
class Pickup_PK_GUE; class Pickup_PK_GUE_DZ: Pickup_PK_GUE { scope = 2; displayName = "$STR_VEH_NAME_PICKUP_GUE_PKT"; vehicleClass = "DayZ Epoch Vehicles"; crew = ""; typicalCargo[] = {}; class TransportMagazines {}; class TransportWeapons {}; terrainCoef = 2.5; class Turrets; // External class reference c...
#ifndef ATARIBREAKOUT_H #define ATARIBREAKOUT_H #include <QWidget> #include <vector> #include <random> #include <cmath> #include <QPainter> #include <windows.h> #include <QTimer> #include <QKeyEvent> class Ball { public: Ball(int X, int Y, int r, int v); void move(); void setVel(int V); void setDir(i...
#pragma once #include <iostream> #include <map> #include <vector> #include <queue> #include <set> #include <stack> #include <string> #include <fstream> #include <algorithm> #include <sstream> #include <cstring> #include <cctype> #include <math.h> #include <ctime> #include "Student.h" #include "util.h" // Set to fals...
#include "battleTechniques.hpp" #include <QDebug> BattleTechniquesGUI::BattleTechniquesGUI() : m_Table_WeaponGUIMelee(new QTableWidget) , m_Table_WeaponGUIRanged(new QTableWidget) , m_Layout_WeaponGUI(new QHBoxLayout) , m_Frame_WeaponGUI(new QFrame) { initGUI(); } BattleTechniquesGUI::Weapons::Weapons(QString weaponC...
/* BEGIN LICENSE */ /***************************************************************************** * SKCore : the SK core library * Copyright (C) 1995-2005 IDM <skcontact @at@ idm .dot. fr> * $Id: output.cpp,v 1.15.2.2 2005/02/17 15:29:21 krys Exp $ * * Authors: W.P. Dauchy * Mathieu Poumeyrol <poumeyrol...
#ifndef SERVERNETWORKCONTROLLER #define SERVERNETWORKCONTROLLER #include <QObject> #include <QtNetwork> class NetworkController : public QObject { Q_OBJECT public: NetworkController(const QString& url = "http://192.168.155.11:8999/setting"); void request_server(QString cmd, QString type, int s...
/* =========================================================================== Copyright (C) 2017 waYne (CAM) =========================================================================== */ #pragma once #ifndef ELYSIUM_CORE_DATA_OLEDB_OLEDBCONNECTION #define ELYSIUM_CORE_DATA_OLEDB_OLEDBCONNECTION #ifnde...
#pragma once #include "../../Toolbox/Toolbox.h" #include <string> struct aiMaterial; namespace ae { class Texture; class Material; class BlinnPhongMaterial; class CookTorranceMaterial; class ToonMaterial; namespace priv { /// <summary>Load the Blinn-Phong supported parameters from model file.</summary> ...
// Created on: 1990-12-13 // Created by: Remi Lequette // Copyright (c) 1990-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU ...
#include <deplacement.h> AccelStepper motor_G(1, step_G, dir_G);//declaration du moteur gauche AccelStepper motor_D(1, step_D, dir_D);//declatation du moteur droit Servo tour; byte teste=0; byte mouvement,recepetion_tram[5],tableau_dep[5],com=0,etat=0,etatp=0,avar=0,NBbyte=0; int xp=750,yp=300,ap=0; int go=0, turndep...
#include <iostream> #include <vector> #include <set> #include <map> using namespace std; class Solution { private: set<string> dict; map< string, vector<string> > strToSentences; vector<string> wordBreak(string s) { if(s.empty()) return vector<string>(1, ""); if(strToSentences.find(s) != strT...
#include <iostream> using namespace std; /* → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → → */ #define int long long int #define ld long double #define F first #define S second #define P pair<int,int> #define pb push_back #define endl '\n' /* → → → → →...
# include <iostream> # include <conio.h> struct direccion { char calle [ 20 ]; int cp; char ciudad [ 20 ]; }; struct persona { char nombre [ 20 ]; int edad; float estatura; struct direccion dire; }; int main ( int argc, char ** argv) { struct persona p1 [ 5 ]; struct persona * apuntador; cout<< " nom...
/* * Copyright (c) 2011 Pierre-Etienne Bougué <pe.bougue(a)gmail.com> * Copyright (c) 2011 Florian Colin <florian.colin28(a)gmail.com> * Copyright (c) 2011 Kamal Fadlaoui <kamal.fadlaoui(a)gmail.com> * Copyright (c) 2011 Quentin Lequy <quentin.lequy(a)gmail.com> * Copyright (c) 2011 Guillaume Pinot <guillaume.pino...
#include <iostream> #include <sstream> #include <cstdlib> #include <cstdio> #include <vector> #include <queue> #include <deque> #include <stack> #include <list> #include <map> #include <set> #include <ctime> #include <cmath> #include <string> #include <cctype> #include <cstring> #include <algorithm> #i...
#include <iostream> #include <cstdio> using namespace std; char *s, q; int n; void set(){ cin >> q >> n; s = new char[n]; for(int i = 0; i < n; i++){ fflush(stdin); cin >> s[i]; } } bool compare(int a, int b, int k){ switch(k){ case 1: return a < b; case -1: return...
#include <iostream> #include <fstream> #include "options.h" #include "analytic_gas_disk.h" #include "fargo_gas_disk.h" #include "int_euler.h" #include "int_rungekutta2.h" #include "int_rungekutta4.h" #include "int_rungekutta8.h" #include "redutilcu.h" #include "red_constants.h" #include "red_macro.h" #ifdef __GNUC__...
/** * Given a binary tree, flatten it to a linked list in-place. * * For example, * Given * * 1 * / \ * 2 5 * / \ \ * 3 4 6 * The flattened tree should look like: * 1 * \ * 2 * \ * 3 * \ * 4 * \ * 5 * \ * 6 */ /*...
//By SCJ //#include<iostream> #include<bits/stdc++.h> using namespace std; #define endl '\n' #define maxn 5005 #define INF 0x3f3f3f3f int n,m,T; struct Edge{ int to,cost; }; vector<Edge> G[maxn]; int dp[maxn][maxn]; int nx[maxn][maxn]; bool used[maxn]; void dfs(int v) { if(used[v]) return ; used[v]=1; for(Edge e:G[...
#include <stdio.h> #include <iostream> #include <math.h> #include <algorithm> #include <memory.h> #include <set> #include <map> #include <queue> #include <deque> #include <string> #include <string.h> #include <vector> typedef long long LL; typedef long double ld; typedef unsigned long long ull; const ld PI = acos(-1.)...
#pragma once #include "BottomUpParser.h" #include<iostream> #include"LR1State.h" class LR1Parser : public BottomUpParser { public: LR1Parser(set<string>terminators, set<string> nonTerminators, vector<vector<string>> productions, string begin = "S1", string end = "$", string none = "none"); ~LR1Parser(); unordered_...
#pragma once #include <maya/MPxDeformerNode.h> class SwirlDeformer : public MPxDeformerNode { public: static void *creator(); static MStatus initialize(); virtual MStatus deform(MDataBlock &block, MItGeometry &iter, const MMatrix &mat, unsigned int multiIndex); virtual MObject &accessoryAttribute() const;...
#include<iostream> using namespace std; int main (){ int A , B , C , MAIORAB, MAIOR; cin >> A >> B >> C; MAIORAB = ( A + B + abs(A - B) )/ 2; MAIOR = ( C + MAIORAB + abs( MAIORAB - C ) )/2; cout << MAIOR << " eh o maior"<<endl; return 0; }
#include <iostream> using namespace std; //Função que recebe o vetor como ponteiro. void Funcao(int *y, int*num){ //Criação de duas variaveis para maximo e minimo como ponteiro int *max,*min; //inicializando os valores das variaveis com o primeiro numero do vetor max = &num[0]; min = &num[0]; for(int...
// Copyright (c) 2011-2017 The Cryptonote developers // Copyright (c) 2017-2018 The Circle Foundation & Conceal Devs // Copyright (c) 2018-2023 Conceal Network & Conceal Devs // // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php....
// // Vertex.cpp // PPBFS // // Created by Denis Sancov. // Copyright © 2016 University of Crete. All rights reserved. // #include "Vertex.hpp" using namespace std; Vertex::Vertex(int value) { this->_value = value; this->neighbors = new vector<Vertex *>; }
#include "Json.h" #include <iostream> #include <vector> #include <map> #include <string> #include <sstream> #include <fstream> #include <cstring> #include <queue> #include <future> using namespace std; string deserialize(const string& inputString) { string outputString = ""; for (size_t i = 0; i < inp...
/**************************************************************************** * * * Author : lukasz.iwaszkiewicz@gmail.com * * ~~~~~~~~ * * Lice...
#define SDL_PLUSPLUS_INIT #include <sdl/init> #include <SDL2/SDL.h> #define LOG(...) fprintf(stdout, __VA_ARGS__) namespace sdl { namespace detail { extern _init init; _init::_init() { SDL_Init(SDL_INIT_EVERYTHING); LOG("%s\n", "SDL init"); } _init::~_in...
#include "inserisci.h" #include "dettagliovino.h" #include "utils.h" #include "vino.h" #include <QLabel> #include <QFormLayout> #include <QString> #include <QFileInfo> #include <QFileDialog> #include <QBuffer> void DettaglioVino::setFoto(const QPixmap &p) {immagine->setPixmap(p);} DettaglioVino::DettaglioVino(VinoL...
/** * Copyright (C) 2008 by The Regents of the University of California * Redistribution of this file is permitted under the terms of the GNU * Public License (GPL). * * @author Junghoo "John" Cho <cho AT cs.ucla.edu> * @date 3/24/2008 */ #include <cstdio> #include <cstring> #include <cstdlib> #include <iostrea...