text
stringlengths
8
6.88M
#include "ros/ros.h" //Librerias propias usadas #include "constantes.hpp" #include "camina/v_repConst.h" // Used data structures: #include "camina/EspacioTrabajoParametros.h" // Used API services: #include "vrep_common/VrepInfo.h" // Global variables (modified by topic subscribers): bool simulationRunning=true; bool se...
#include<iostream> using namespace std; int dp[5000]; int dp2[21]; int missile[5000]; int n; int main() { cin >>n; for(int i=0;i<n;i++) { cin >>missile[i]; dp[i]=1; } for(int i=0;i<n;i++) { for(int j=0;j<i;j++) { if(missile[j]<=missile[i]) { dp[i]=max(dp[i],dp[j]+1); } } } int ans1=0,a...
#include "CheckboardTexture.h" #include "ConstantTexture.h" #include "Base/PCH.h" #include "tinyxml2.h" #include "Base/ParseHelper.h" CheckboardTexture::CheckboardTexture() { } CheckboardTexture::CheckboardTexture( ConstantTexture* tex1 , ConstantTexture* tex2 ) { texture1 = tex1; texture2 = tex2; } CheckboardTe...
//$Id$ //------------------------------------------------------------------------------ // TATCException //------------------------------------------------------------------------------ // GMAT: General Mission Analysis Tool. // // Copyright (c) 2002-2014 United States Government as repres...
#ifndef MAIN_WINDOW_H #define MAIN_WINDOW_H #include <QDialog> #include <QMainWindow> #include <QtWidgets> #include <QtGui> namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: int tasks_count = 0, tests_count = 0, current_test = 1; QString contest_name, task_name;...
#include<stdio.h> int dis[7],book[7],h[7],pos[7],size; //dis存放生成树与其他顶点的距离,book标记已是树的顶点 //h用来保存堆,pos用来存储每个顶点在堆中的位置,size为堆的大小 void swap(int x,int y);//交换堆中结点x与结点y的值 void siftdown(int i);//从结点i开始向下调整堆 void siftup(int i);//从结点i开始向上调整堆 int pop();//从堆顶取出一个元素 int main() { int n,m,i,j,k; //u,v,w,next数组根据实际情况来设置构建邻接表,此图是无向图,要...
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include "signedindialog.h" #include "dllmysql.h" #include "rfiddll.h" #include "pincodedll.h" namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent ...
#include "Level2Button.h" #include "View.h" Level2Button::Level2Button(QGraphicsScene *Scene) : level2Scene{Scene} { clickl2 = false; //set picture setPixmap(QPixmap(":/images/level2.png")); //add to scene Scene->addItem(this); //setPos setPos(450,537); //create level2 button music ...
/////////////////////////////////////////////////// // CREATE BY CA1CVI http://www.antofalinux.cl // BASED ON THE WORK OF JI3BNB // 45.45 baud BAUDOT TELEMETRY BEACON 1.5 // http://k183.bake-neko.net/ji3bnb/page13.html // DESIGNED FOR AMATEUR RADIO COMMUNICATION // THIS PROGRAM IS IN THE PUBLIC DOMAIN...
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <string> using namespace std; class A { public: A(int i) : a(i) //参数列表初始化 { //a = i; } int a; }; class B { public: int data{ 1 }; int data2 = 1; A tmp{ 10 }; string name{ "mike" }; }; int main(void) { B obj; cout...
#include "complex.h" // complex operator + Complex Complex::operator +( const Complex& rhw ) { Complex temp; temp.m_real = m_real + rhw.m_real; temp.m_unreal = m_unreal + rhw.m_unreal; return temp; } Complex Complex::operator +( const double re ) { Complex temp; temp.m_real = m_real + re; temp.m_unreal = m_unr...
// Fie 4 puncte din R^2, oricare 3 necoliniare // daca cele 4 puncte au acoperire convexa, dar nu e convex // In caz afirmativ, sa se studieze pozitia punctului A[3] fata de // cercul circumscris triunghiului A[0]-A[1]-A[2] // daca suma unghiurilor A[1] si A[3] // -formeaza 180 grade ...
// ***************************************************************** // This file is part of the CYBERMED Libraries // // Copyright (C) 2007 LabTEVE (http://www.de.ufpb.br/~labteve), // Federal University of Paraiba and University of São Paulo. // All rights reserved. // // This program is free software; you can redist...
#include "sw_graph_vec.h" /*********************************** class members *****************************/ //////////////////////////////////////////////////////////////////////////////////// void alpha_expansion_vec:: computeKnnNeighbours(int Knn) { neighbrs_.clear(); vector<vector<float> > dist; neighbrs_ = ...
#include "mutex.h" int main() { mutex m; m.value = 0; enter_mutex(&m); leave_mutex(&m); enter_mutex(&m); leave_mutex(&m); return 0; }
#include<bits/stdc++.h> using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("input.in","r",stdin); freopen("output.in","w",stdout); #endif int t; cin>>t; while(t--) { int n; cin>>n; int c5=0; int c2=0; int ctr=0; for(int i=1;i<=n;i++) { if(i%10==0) { ...
#include <iostream> #include <list> #include <algorithm> #include <map> #include "better-graph.h" #include "priority_queue.h" using namespace std; void showPath(std::map<string, string> camefrom, std::map<string, int> dist, string v, string u) { list<string> path; int pathdist = 0;; string crawl = u; p...
#pragma once #ifndef UILABEL_H #define UILABEL_H namespace UI { } #endif /*UILABEL_H*/
#include "Rubber.h" #include "RegUtil.h" #include "Inlines.h" const ItemTypeEnum Rubber::ItemType = eItemRubber; const int Rubber::TypeNameID = 147; const int Rubber::ToolID = 32990; const int Rubber::CursorID = 602; const unsigned Rubber::AllowedViews = 1; Rubber* Rubber::COMCreate() { /*CComObject<Rubber>* obj = ...
/*************************************************************************** Copyright (c) 2020 Philip Fortier This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or...
#include "Player.h" Player::Player(sf::RenderWindow * window) { pos_ = sf::Vector2f(40*70, 15*70); this->window = window; this->Frame = 0; column = 0; line = 0; width = 30; height = 35; count = 4; speed = 0.06; step = 7; blood = 100; blueFlagNumber = 40; redFlagNumber = 40; for (int i = 0; i < coun...
/* Copyright (c) 2005-2023, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
/* **************************************************** * Author : M_Kepler * EMail : m_kepler@foxmail.com * Last modified: 2018-11-18 22:41:27 * Filename : dbf_read.h * Description : 以二进制形式读入dbf文件 * dbf文件的二进制文件格式: http://www.xumenger.com/dbf-20160703/ * 编辑器中看到的的十六进制是: 9f17 对应的十...
/************************************************************************************* * Name: Akardet Sam Tancharoensuksavai * Course: 4110.002 - Algorithms * Assignment: Homework 3 * Date: 09/29/16 * Description: Basic implementation of Dijkstra's algorithm as described in * Section 24.3 of C...
#include <bits/stdc++.h> using namespace std; int main() { int x = 0, a = 0, g = 0, d = 0; while (cin >> x, x != 4) { if (x == 1) a++; else if (x == 2) g++; else if (x == 3) d++; } cout << "MUITO OBRIGADO" << endl; cout << "Alc...
#include <bits/stdc++.h> using namespace std; #define ll long long #define ar array int main() { ios::sync_with_stdio(0); cin.tie(0); int t; cin>>t; while(t--) { int n; cin>>n; int a[n] , maxv = INT_MIN; for(int i = 0; i< n ; i++) { cin>>a[i]...
/* * Copyright (C) 2003 Marc-Antoine Ruel at Cardinal Health * * This file is part of TN5250 * * TN5250 is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1, or (at your op...
#ifndef SANDBOXSIFT_H #define SANDBOXSIFT_H #include "opencv2\core\core.hpp" ///< basic datastructures and functions #include "opencv2\imgproc\imgproc.hpp" ///< image processing such as cv::resize #include "opencv2\core\types_c.h" ///< cvround & datatype convenience definitions #include "opencv2\features2d\featu...
#ifndef PEN_H_ #define PEN_H_ #include "Graph.h" class Pen : public Graph { public: Pen(); void draw(); private: }; #endif // !PEN_H_ #pragma once
#include "circleitem.h" #include <QPainter> CircleItem::CircleItem(int id) : GrawItem(id) { } QRectF CircleItem::boundingRect() const { return QRectF(-20, -20, 40, 40); } void CircleItem::paint(QPainter *painter, const QStyleOptionGraphicsItem */*option*/, QWidget */*widget*/) { if (isSelec...
#include <bits/stdc++.h> using namespace std; class minHeap { int *arr; int capacity; int size; public: minHeap(int capacity, int size, const int *a) { this->capacity = capacity; this->size = size; arr = new int[capacity]; for (int i = 0; i < size; ++i) ...
/* parser.h -*- C++ -*- Rémi Attab (remi.attab@gmail.com), 12 Apr 2015 FreeBSD-style copyright and disclaimer apply */ #include "json.h" #pragma once namespace reflect { namespace json { /******************************************************************************/ /* GENERIC...
// 应该是hash题,要查附近的8个位置是不是有垃圾 // 数据范围是1e9,直接hash是不行的,而且还有两维 // 当成字符串来hash的话呢?用进阶的办法*P%MOD,确实可以,n是1e3,冲突概率不大 // 或者用排序的方法,数量级不大复杂度也完全够 // 弄成一个结构体,两个数组,一个按照x排序,一个按照y排序 // 但还是有点小麻烦,因为可能很多x相同,还得找到第一个x不同的,判断是不是x+1/x-1 // 还是hash吧 // 但是返回的虽然是整数但是还是太大啊,不能开数组hash,难道再用一个vector来存? // 而且好像这个是针对字符的hash,如果我直接用X*Range+Y求模的方法呢?%MOD=1e6...
// // Created by Nitish Mohan Shandilya on 7/13/20. // namespace PracticeExercisesWithoutTemplates { // Exceptions struct LinkedListEmptyException : exception { const char* what() const noexcept { return "Linked List is Empty!!"; } }; struct Node { int data; Node* next; Node(const int inp...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "../base.h" #include "Windows.ApplicationModel.Search.0.h" #include "Windows.Storage.Streams.0.h" #include "Windows.Foundation.1.h" #include "Windows.Foundation.Collections.1.h" #inclu...
#include<iostream> #define N 6 int parent[N]; using namespace std; int cost[N][N] = { {0, 8, 2, 0, 4, 0}, {8, 0, 4, 1, 0, 2}, {2, 4, 0, 0, 3, 7}, {0, 1, 0, 0, 0, 1}, {4, 0, 3, 0, 0, 9}, {0, 2, 7, 1, 9, 0}, }; int find_v(int i); void union1(int i, int j); void kruskalMST(); int main() { } int find_v(int i) ...
#include <whiskey/Core/Types.hpp> namespace whiskey { unsigned int getCharWidth(Char32 value) { if ((value & 0xff) == value) { return 1; } else if ((value & 0xffff) == value) { return 2; } else { return 4; } } }
// // Copyright (c) 2017-2019 Native Instruments GmbH, Berlin // // 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, cop...
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; #define pb push_back #define rsz resize #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() using pi = pair<int, int>; #define f first #define s second #define mp make_pair void setIO(string name = "bcount") { ...
/* NO WARRANTY * * BECAUSE THE PROGRAM IS IN THE PUBLIC DOMAIN, THERE IS NO * WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE * LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE AUTHORS * AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT * WARRANTY OF ANY KIND, EITHER E...
/************************************************************* * > File Name : P3372_block_2.cpp * > Author : Tony * > Created Time : 2019/06/01 15:53:35 * > Algorithm : [DataStructure]Block **************************************************************/ #include <bits/stdc++.h> usi...
// Problem : Mean Inequality // Link: https://codeforces.com/contest/1526/problem/A #include<bits/stdc++.h> using namespace std; int main(){ int t=0; cin >> t; while(t>0){ int n; vector<int> integers; cin >> n; int a; for(int i=0; i<2*n; ++i){ ...
# BinaryTreeThd 二叉树的线索化 #pragma once #include<iostream> #include<assert.h> using namespace std; enum PointerTag { THREAD,//需要线索化 LINK//不需要线索化 }; template<class T> struct BinaryTreeNodeThd { public: BinaryTreeNodeThd(const T& x) :_data(x) ,_left(NULL) ,_right(NULL) ,_leftTag(LINK) ,_rightTag(LINK) {} pu...
#ifdef HAS_VTK /////////////////////////////////////////////////////////////// // Find the average distance of a set of points from a surface // #include <vtkPointData.h> #include <vtkPolyData.h> #include <vtkPolyDataReader.h> #include <irtkImage.h> char *surface_name = NULL; int main(int argc, char **argv){ b...
#include "stdafx.h" #include "Hero.h" Hero::Hero() { // Set stats level = 3; health = 10; maxHealth = 10; xp = 0; attack = 2; strength = 2; defence = 1; gameOver = false; gameWon = false; } Hero::~Hero() {} void Hero::increaseLevel() { level++; attack++; strength++; defence++; maxHealth = (maxHe...
#include <iostream> #include "strings.h" using namespace std; using namespace qtl; void SplitTest(const string& s, const string& c); int main() { cout << "--------------------" << endl; SplitTest("", "/"); cout << "--------------------" << endl; SplitTest("http://www.baidu.com/?key=value#page1", ""); cout << "-...
#ifndef __VECN_FLEXIBLE__ #define __VECN_FLEXIBLE__ #include <vecn_interface_base.h> namespace Common { // **************************************** // submat template <typename T> class submatflex : public mat_interface_base<T>, public ele_set_base<T> { public: submatflex(mat_interface_base<T> &mat_, ...
#include <FastCG/Rendering/RenderBatchStrategy.h> #include <algorithm> namespace { struct RenderBatchComparer { bool operator()(const FastCG::RenderBatch &rLhs, const FastCG::RenderBatch &rRhs) const { return rLhs.type < rRhs.type; } }; } namespace FastCG { void R...
#pragma once #include "targetver.h" #include <stdio.h> #include <tchar.h> #include <iostream> #include <fstream> #include <sstream> #include <vector> #include <algorithm> #include <functional> #include <iterator> #include <list> #include <limits> #include <queue> #include <memory> #include <unorder...
#pragma once #ifndef __MICVOL_H__ #define __MICVOL_H__ #include <Mmsystem.h> typedef struct MixerControlStruct { short nIndex; short nDeviceNum; unsigned int nLineID; int nMax; char DeviceName[64]; MIXERCONTROL m_ctlMixerSpeaker; MIXERCONTROL m_ctlMixerMute; } MCS; class CMicVolume { public: HMIXER h_mix; ...
#ifndef SCORE_HPP #define SCORE_HPP #include <vector> #include <stdio.h> #include "logging/term_display.h" #include "Mark.hpp" /* multi criterion score computation */ // Using heritage of mark since a score can be used as a Mark of a score class Score : public Mark {//TODO pass Mark to private and handle conflicts ...
#pragma once #include <vector> #include "drake/examples/kuka_iiwa_arm/iiwa_world/iiwa_wsg_diagram_factory.h" #include "drake/examples/kuka_iiwa_arm/pick_and_place/pick_and_place_configuration.h" #include "drake/multibody/rigid_body_plant/rigid_body_plant.h" #include "drake/systems/framework/diagram.h" namespace drak...
// Fill out your copyright notice in the Description page of Project Settings. #include "TTT.h" #include "TTTPlayerController.h" #include "TTTIronPlayer.h" #include "TTTPawn.h" #include "GameField.h" #include "TTTGameMode.h" ATTTGameMode::ATTTGameMode() { PlayerControllerClass = ATTTPlayerController::StaticClass();...
/* Copyright (c) 2013-2014 Sam Hardeman 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, dist...
#include <iostream> #include "gcd.h" #include "fib.h" using namespace std; int main() { cout << "gcd(60, 24) = " << t_gcd<60, 24>::res << endl; cout << "gcd(8, 18) = " << t_gcd<8, 18>::res << endl; cout << "-----" << endl; cout << "gcd(60, 24) = " << c_gcd(60, 24) << endl; cout << "gcd(8, 18) ...
#include<iostream> #include<cmath> using namespace std; int maxSumSubarray(int arr[], int n) { int maxend = arr[0]; int res = arr[0]; for (int i = 1; i < n; i++) { maxend = max((maxend + arr[i]), arr[i]); res = max(maxend, res); } return res; } int main() { int arr[] = { 1, -2, 3, -1, 2 }, n = 5;...
#pragma once #ifndef TUPLE_H #define TUPLE_H #include <string> #include <vector> using namespace std; class Tuple : public vector<string> { public: Tuple(); private: }; #endif
#include <iostream> using namespace std; int main () { bool f[26][26][100]; int a[26][26]; int n; cin>>n; for (int i=1; i<=n; i++) for (int j=1; j<=i; j++) cin>>a[i][j]; f[1][1][a[1][1]] = true; for (int i=2; i<=n; i++) for (int j=1; j<=i; j++) for (int k=0; k<=99; k++) { ...
/*#include "Application.h" Application::Application() { } Application::~Application() { } void Application::run() { /*bool program_exit = false; string directory; int choice; while (!program_exit) { cout << "---------------------------" << endl; cout << "1. 이메일 검색" << endl; cout << "2. 주민등록번호 검색" << en...
#include<bits/stdc++.h> using namespace std; #define MAX 1000000 typedef long long ll; void getprimes(vector<int>& pri) { bool* primes = new bool[MAX+1]; for(int i=0;i<=MAX;i++) { primes[i]=true; } primes[0]=false; primes[1]=false; for(int i=2;i*i<=MAX;i++) { if(primes[i]==true) // is a prime { // ma...
/* * SPDX-FileCopyrightText: (C) 2014 Daniel Nicoletti <dantti12@gmail.com> * SPDX-License-Identifier: BSD-3-Clause */ #include "hello.h" #include "root.h" #include <Cutelyst/Plugins/Session/Session> #include <QCoreApplication> #include <QDebug> HelloWorld::HelloWorld(QObject *parent) : Cutelyst::Application...
stack<int> s; int min1; MinStack::MinStack() { min1=-1; while(!s.empty())s.pop(); } void MinStack::push(int x) { if(s.empty()) { s.push(x); min1=x; } else { if(x<min1) { s.push(2*x-min1); min1=x; } else s.push(x); }...
#ifndef PROTOCOL_H #define PROTOCOL_H #include "../CommonFiles/Constants.h" class Protocol { public: static QString serverEmptyRespond(); static QString clientLastVersionRequest(); static QString serverVersionRespond (const QString &version); static QString clientSignUpRequest(const QString& login, co...
///////////////////////////////////////////////////////////////////////////// // Name: wx/richtext/richtextbuffer.h // Purpose: Buffer for wxRichTextCtrl // Author: Julian Smart // Modified by: // Created: 2005-09-30 // RCS-ID: $Id: richtextbuffer.h 61097 2009-06-17 21:10:29Z JS $ // Copyright:...
#include "turncomponenton.h" TurnComponentOn::TurnComponentOn(Room *r) { _room = r; } void TurnComponentOn::execute(std::string s) { _room->turnOnComponent(s); }
#include "PoolConnections.h" namespace database { std::unique_ptr<PoolConnections> PoolConnections::instance_(nullptr); std::mutex PoolConnections::my_mutex_; PoolConnections::PoolConnections() { for (std::size_t i = 0; i < POOL_SIZE; ++i) { Connection conn; pool_.emplace_back(std::pair<Connectio...
#include "span/io/streams/Filter.hh" #if __has_include(<string_view>) #include <string_view> using std::string_view; #else #include <experimental/string_view> using std::experimental::string_view; #endif #include "span/Common.hh" #include "span/exceptions/Assert.hh" namespace span { namespace io { namespace st...
#pragma once #include "client\Graphics\Shader.h" #include "SGeode.h" #include <vector> using namespace std; #define POSITION_LOCATION 0 #define NORMAL_LOCATION 1 #define OFFSET_LOCATION 2 #define NOISES_LOCATION 3 #define SCALES_LOCATION 4 #define M_PI 3.14159265359 #define M_PI_2 1.57079632679 class Clouds : publ...
// distance.cpp // increment counter variable with ++ operator // uses unnamed temporary object #include <iostream> using namespace std; #include "distance.h" //Display as 2'-9" format void Distance::ShowDist() const { std::cout << feet() << "\'- " << inches() << "\"" << std::endl; } // Create operator to combine...
/* * Copyright (c) 2012 Joey Yore * * 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, dist...
#include <iostream> using namespace std; int main() { int n, s; cin >> n; int a[n]; for (int i=0; i<n; ++i){ a[i]=0; } for (int i=0; i<n; i++) { cin >> s; a[s]++; } int tong =0; for (int i=0; i<10; i++) { if (a[i]>0){ tong++; ...
#include "NCK.h" #include "..\MyLog.h" #include <string.h> #define ErrorMsg Shim::Logging::PrintLog #define MAX_G_CODE_BLOCK 256 #define MAX_G_CODE_LENGTH 256 namespace Shim { namespace CNC { namespace NCK { namespace Interpreter { static Queue<char*> G_Code_Buffer(MAX_G_CODE_BLOCK); static bo...
#include "DUIPopupWindow.h" #include "DUIDdb.h" #include "DUIToolBar.h" #if WINVER < 0x0500 #define COMPILE_MULTIMON_STUBS #include <multimon.h> #endif // WINVER < 0x0500 DUI_BGN_NAMESPCE //////////////// CMinMaxInfo //////////////////////// CMinMaxInfo::CMinMaxInfo() { m_ptMaxTrackSize.x = m_ptMaxTrackSize.y = 0...
#ifndef PC_ALGORITHMS_H #define PC_ALGORITHMS_H #include <iostream> #include <pcl/io/io.h> #include <pcl/io/pcd_io.h> #include <pcl/io/ply_io.h> #include <pcl/visualization/cloud_viewer.h> #include <pcl/point_types.h> #include <pcl/filters/passthrough.h> #include <pcl/filters/statistical_outlier_removal.h> #include <p...
#ifndef MockICompressor_h #define MockICompressor_h #include <gmock/gmock.h> #include <compressor/compressor.h> #include <compressor/task/encoder.h> #include <compressor/task/decoder.h> class MockICompressor : public compressor::ICompressor { public: MOCK_METHOD(void, encode, (compressor::IEncoderTask&), (overri...
// Program to find maximum, minimum among two numbers. #include <iostream> using namespace std; int main() { int n1, n2; cin >> n1 >> n2; int max, min; if (n1 > n2) { max = n1; min = n2; } else { max = n2; min = n1; } cout << "Max" << max << e...
//#include <bits/stdc++.h> #include <iostream> #include <algorithm> //#include <iomanip> //#define LOCAL #define Inf 0x3f3f3f3f #define NeInf 0xc0c0c0c0 #define REP(i,n) for(int i=0;i<n;++i) using namespace std; int R,n; int a[1005]; int main(){ #ifdef LOCAL freopen("./file/in.txt","r",stdin); /...
#include "edge.hpp" static PyObject* SkpCurve_getedges(SkpCurve *self, void *closure) { SKP_GET_ELEMENTS( SUCurveGetNumEdges, SUCurveGetEdges, SUEdgeRef, _su_curve, _su_edge, "cannot get edges", SkpEdge, SkpEdgeType ) }
#include <VirtualWire.h> #include <Adafruit_Sensor.h> #include <DHT.h> float d1; float d2; float d3; float d4; float d5; float d6; float p1; float p2; float p3; float p4; float p5; float p6; float alfa = 0; float alfa2 = 0; float beta = 0; float mat = 0; int analogPin1 = 1; int analogPin2 = 2; int analogPin3 = 3; i...
/******************************************************************************* * Cristian Alexandrescu * * 2163013577ba2bc237f22b3f4d006856 * * 11a4bb2c77aca6a9927b85f259d9af10db791ce5cf884bb31e7f7a889d4fb385 ...
#ifndef ROSE_NAME_QUERY #define ROSE_NAME_QUERY #include "AstProcessing.h" #include <functional> typedef Rose_STL_Container< std::string > NameQuerySynthesizedAttributeType; namespace NameQuery{ typedef AstQueryNamespace::QueryDepth QueryDepth; typedef NameQuerySynthesizedAttributeType (*roseFunctionPoin...
#include "framework.h" #include "headers.h" #include <ctime> extern HWND ghWnd; extern HDC hMainDC; extern HDC hBufferDC; extern HDC hBackBufferDC; extern RECT clientRect; extern void(*UPDATE)(); void(*EVENT)() = nullptr; void run() { Camera& camera = Camera::getInstance(); static clock_t time = clock(); clock_t...
#ifndef MATERIAL_H #define MATERIAL_H #include <string> #include <glm/glm.hpp> using namespace std; class Material { private: string materialId; string textureFile; glm::vec3 ka; glm::vec3 ks; glm::vec3 kd; float ns; public: Material(string materialId); void setMaterialId(string materialId); string getMate...
#include<bits/stdc++.h> using namespace std; class Solution { public: int findJudge(int N, vector<vector<int>> &trust) { vector<bool> t(N, true); for (auto a : trust) t[a[0] - 1] = false; int judge = -1; for (int i = 0; i < N; i++) if (t[i]) ...
// defines pins numbers /* * * Project Name: E-Parking Management * Author List: Chetan Malviya , Manas Solanki * Filename: Nano_Code_.ino * Functions: s...
#include "Common.h" class CircularBuffer { private: int tail; int length; //vector<float> buffer; float *buffer; int accessible; public: CircularBuffer(); CircularBuffer(int l); void Put(float v); void Put(int i, float v); float AtPosition(int i); };
/* CTC GO! MOTION PROJECT - Spin-A-Wheel This sketch is written to accompany Stage 2 of the Spin-a-Wheel project */ #include <Servo.h> ______ servo_wheel; ______ servo_pointer; int button_1 = 2; int button_2 = 3; int buttonState_1; int buttonState_2; void setup() { pinMode(button_1, INPUT); pinMode(butt...
#pragma once #include "../pch.h" #include "ConfigFileException.h" ConfigFileException::ConfigFileException(const std::string& msg) : errorMessage(msg) {} const char* ConfigFileException::what() const throw () { return errorMessage.c_str(); }
#ifndef ELLIPSE_H_ #define ELLIPSE_H_ #include "Graph.h" #define PI 3.14159f class Ellipse_ :public Graph { public: Ellipse_(); void draw(); private: }; #endif // !ELLIPSE_H_ #pragma once
/** * Calculate the total luminosity and flux within the specified radius. * * Base on 'fit_beta_sbp.cpp' and supersede 'calc_lx.cpp' * * Author: Junhua Gu */ #include <iostream> #include <fstream> #include <sstream> #include <list> #include <algorithm> #include "beta_cfg.hpp" #include "dump_fit_qdp.hpp" #includ...
#include "drake/multibody/parsers/parser_common.h" #include <string> #include <utility> #include "drake/common/text_logging.h" #include "drake/multibody/joints/drake_joint.h" #include "drake/multibody/joints/fixed_joint.h" #include "drake/multibody/joints/floating_base_types.h" #include "drake/multibody/joints/quater...
// Number of integers to be sorted = 100,000. // Array stored in file "integer_array.txt". #include<bits/stdc++.h> using namespace std; int* merge_sort(int* arr, int len); long long int inversions = 0; int main(){ int len = 100000; int arr[len]; ifstream file("integer_array.txt"); if (file.is_open()) ...
#include <bits/stdc++.h> #define ll long long using namespace std; typedef tuple<ll, ll, ll> tp; typedef pair<ll, ll> pr; const ll MOD = 1000000007; const ll INF = 1e18; template <typename T> void print(const T &t) { std::copy(t.cbegin(), t.cend(), std::ostream_iterator<typename T::value_type>(std::co...
/* * SPDX-FileCopyrightText: (C) 2013-2022 Daniel Nicoletti <dantti12@gmail.com> * SPDX-License-Identifier: BSD-3-Clause */ #ifndef GRANTLEE_VIEW_P_H #define GRANTLEE_VIEW_P_H #include "grantleeview.h" #include "view_p.h" #include <grantlee/cachingloaderdecorator.h> #include <grantlee/engine.h> #include <grantlee/...
#include "Intern.hpp" #include "RobotomyRequestForm.hpp" #include "ShrubberyCreationForm.hpp" #include "PresidentialPardonForm.hpp" /* ************************************************************************** */ /* OUTTER FONCTIONS */ /* **********************...
#include "system.h" static unsigned int next_id = 0; unsigned int ecs::SystemBase::nextID() { return next_id++;; }
#include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <stdint.h> #include "codegen/il2cpp-codegen.h" #include "vm/CachedCCWBase.h" #include "os/Unity/UnityPlatformConfigure.h" #include "il2cpp-object-internals.h" template <typename R> struct VirtFuncInvoker0 {...
#include<bits/stdc++.h> using namespace std; void maxsubsum(int a[],int n){ int currsum[n+1];int sum,max1=INT_MIN; for(int i=1;i<=n;i++){ currsum[i]=currsum[i-1]+a[i-1]; } for(int i=1;i<=n;i++){ for(int j=1;j<=i;j++){ sum=currsum[i]-currsum[j-1]; max1=max(max1,sum); } } cout<<"...
// // main.cpp // lab_2 // // Created by Christopher Chandler on 2/15/16. // Copyright © 2016 Christopher Chandler. All rights reserved. // #include <iostream> #include "Time.h" #include <algorithm> #include <vector> int main(int argc, const char * argv[]) { // insert code here... vector<Time> times; ...
// // Created by tian on 2020/4/14. // #ifndef NELIVEPUSHCLIENT_VIDEOCHANNEL_H #define NELIVEPUSHCLIENT_VIDEOCHANNEL_H #include <pthread.h> #include <x264.h> #include <cstring> #include <rtmp.h> #include "macro.h" class VideoChannel { typedef void(*VideoCallback)(RTMPPacket *packet); public: VideoChannel(); ...