text
stringlengths
8
6.88M
#include<stdio.h> #include<stdlib.h> int Intersection(int [],int [],int ,int); int main(){ int arr1[]={1,2,5,7,8}; int arr2[]={1,3,5,7,8}; int size1=sizeof(arr1)/sizeof(arr1[0]); int size2=sizeof(arr2)/sizeof(arr2[0]); Intersection(arr1,arr2,size1,size2); return 0; } int Intersection(int arr1[],int ...
#include <windows.h> #include <gl/glut.h> void DoDisplay(); void DoMenu(int value); int Action; int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance ,LPSTR lpszCmdParam,int nCmdShow) { glutCreateWindow("OpenGL"); glutDisplayFunc(DoDisplay); glutCreateMenu(DoMenu); glutAddMenuEntry("빨간색 배경",0); glu...
#include <iostream> #include "set.h" using namespace std; template <typename T> class BstSet:public Set<T>{ private: class Node{ public: T key; Node *left; Node *right; Node(const T & k):key(k), left(NULL), right(NULL){} }; Node *root; public: BstSet():root(NULL)...
#include "CommandsBinding.h" #include "ResolveCMD.h" int main(){ EZIO *pRoot = new directory("/"); CMD::binding(pRoot); EZIO *ctest = new directory("ctest"); pRoot->Add(ctest->set_not_global()->set_display()->set_not_exec()); ctest->Add((new directory("tecst1"))->set_not_global()->set_display()->...
#include "TestScreen.hpp" namespace noma { /*TestScreen::TestScreen() { } TestScreen::~TestScreen() { } void TestScreen::initialize() { } void TestScreen::update(double dt) { } void TestScreen::render() { }*/ }
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) #define ok() puts(ok?"Yes":"No"); #define chmax(x,y) x = max(x,y) #define chmin(x,y) x = min(x,y) using namespace std; using ll = long long; using vi = vector<int>; using ii = pair<int, int>; using vvi = vector<vi>; using vii = vector<ii>; using gt...
#include<iostream> void _9_1_numsTriangle(int); void _9_2_searchMaxDivSum(int); void _9_3_searchAmicablePairs(int); void _9_4_printThreeDigitNums(int); void _9_5_findY(int); void _9_6_findY(int); void _9_7_findLargestDigit(int); int main() { int i = 0; _9_1_numsTriangle(i); _9_2_searchMaxDivSum(i); _9_3_searchAmic...
// // Copyright Jason Rice 2017 // 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) // #ifndef NBDL_WEBUI_DETAIL_NODE_RENDERER_HPP #define NBDL_WEBUI_DETAIL_NODE_RENDERER_HPP #include <boost/hana/string.hpp> #includ...
/************************************************************************* > File Name: main.cpp > Author: Jason > Mail: jie-email@jie-trancender.org > Created Time: 2017年03月28日 星期二 16时58分39秒 ************************************************************************/ #include "echo.h" #include <muduo/base/Logging.h...
#include "buffaction.h" #include "buff.h" #include "battlecontroller.h" #include "unit.h" bool BuffAction::isValidate() const { return _params.battleController != nullptr; } void BuffAction::activateString(bool dead) { uint8 target = _params.carrier; uint8 owner = _params.owner; stat buff1 = 0; st...
/* Rishabh Arora IIIT-Hyderabad */ #include <bits/stdc++.h> using namespace std; typedef pair<long long int,long long int> II; typedef vector<long long int> VI; typedef vector<II> VII; typedef long long int LL; typedef unsigned long long int ULL; #define MAXSIZE 100005 #define mod 1000000007 #define rep(i, a, ...
#include <iostream> #include "matrice.h" #include <stdlib.h> #include <math.h> using namespace std; void GC(matrice& x, matrice& A, matrice& b, matrice& x0, int iterations_max); int main() { /* cout << "Hello world!" << endl; int nbl=5, nbc=5; matrice A(nbl,nbc); matrice B = A; // ou...
#include <iostream> #include <stack> #define LEFTP '(' #define RIGHTP ')' using namespace std; string itsCorrect(string line) { stack<char> p; char c; for (int i = 0; i < line.length(); i++) { c = line[i]; if (c == LEFTP or c == RIGHTP) { if (p.empty()) p.push(c); ...
#include <iostream> using namespace std; int main() { int a; cin >> a; (a % 2) == 0 ? cout << "even" : cout << "odd"; }
#ifndef MOVERIGHTEVENT_HPP #define MOVERIGHTEVENT_HPP #include "Event.hpp" #include <string> using namespace std; class MoveRightEvent: public GameEvent{ public: MoveRightEvent(); MoveRightEvent(string s); string EventToString(); }; #endif
#include<iostream> #include<vector> #include<utility> #include<queue> #define NMAX 100 using namespace std; typedef long long nat; typedef pair<int, int> pii; typedef pair<nat, int> pni; typedef pair<nat, pair<int, int> > pnii; class Dijkstra{ // 正の重みをもつグラフの最短路を求めるアルゴリズム public: vector<vector<pni>> ...
#include <iostream> #include "CircleType.h" using namespace std; CircleType::CircleType() {} void CircleType::setRadius(double r) { if (r>=0) radius = r; else radius = 0; } double CircleType::getRadius() { return radius; } double CircleType::area() { return 3.1416 * radius * radius; } double Circl...
// // Created by wojtekreg on 15.01.18. // #ifndef PYRAPORTFEL_IKE_H #define PYRAPORTFEL_IKE_H #include "Aktywa.h" class IKE : public Aktywa { private: double miesiecznaWplata; double oprocentowanie; int czasTrwania; double podatekZaZbytWczesneZakonczenie; void setMiesiecznaWplata(double miesiec...
#include <string> #include <unordered_map> #include <set> using namespace std; const int PN = 10000+3; unordered_multimap<string, int> tagHash; unordered_map<int, int> idHash; set<pair<int, int>> searchSetAsc; set<pair<int, int>, greater<pair<int, int>>> searchSetDsc; int pCnt; struct product { int id, price;...
#include <bits/stdc++.h> #define TAB '\t' using namespace std; class A { int a, b; static int i; public: A(); A(int); A(int, int); A operator+(A &); void out(); ~A(); }; int A::i = 0; A::A() { i++; a=0; b=0; } A::A(int x) { i++; a=x; b=0; } A::A(int x, int y) { i++; a=x; b=y; } A::~A() ...
//---------- Interface de la classe <Fichier> (fichier Fichier.h) ------ #if ! defined ( FICHIER_H_ ) #define FICHIER_H_ using namespace std; //--------------------------------------------------- Interfaces utilis?es #include <iostream> #include <string> #include <vector> #include <fstream> #include <sstream> #inclu...
/* ** Copyright (c) 2016, Xin YUAN, courses of Zhejiang University ** All rights reserved. ** ** This program is free software; you can redistribute it and/or ** modify it under the terms of the 2-Clause BSD License. ** ** Author contact information: ** yxxinyuan@zju.edu.cn ** */ /* Internal Header */...
#pragma once // // SpatialEncoder.h // PianoPlayer // // Created by Ben Smith on 10/10/11. // Copyright 2011 __MyCompanyName__. All rights reserved. // // linear STM spatial encoder model #include <iostream> #define ENCODER_DECAY_RATE 0.2 using namespace std; enum DecayModel { LinearDecay, ExponentialD...
#include "../Shape/enemies.h" #include <ctime> #include "ISoundAPI.h" #include "../AppSDL/SDLSoundAPI.h" GameObjectsLibrary::Enemies::Enemies(IWindowAPI& _windowApi, Point& _position, int _radius, int _speed, ISoundAPI * _soundApi) : Ball(_windowApi, _position, _radius), vector(0, _speed) { soundApi = _soundApi; ...
// addrspace.cc // Routines to manage address spaces (executing user programs). // // In order to run a user program, you must: // // 1. link with the -N -T 0 option // 2. run coff2noff to convert the object file to Nachos format // (Nachos object code format is essentially just a simpler // version of the UNIX exe...
// Note that by default C++ creates a max-heap // for priority queue #include <iostream> #include <queue> using namespace std; void showpq(priority_queue <int> gq) { priority_queue <int> g = gq; while (!g.empty()) { cout << '\t' << g.top(); g.pop(); } cout << '\n'; } void sh...
/** * Copyright (C) 2017 Alibaba Group Holding Limited. All Rights Reserved. * * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * ...
// main.cpp // ICS46 Winter 2021 Project 2 // Name: Keyu Zhang // ID: 19898090 // UCINetID: keyuz4 // log the events during the simulation and print to standard output #ifndef LOG_HPP #define LOG_HPP class Log { public: // prints the current simulation time void printCurrentTime(unsigned int currentTime, boo...
#include <iostream> #include <vector> #include <cstdlib> using namespace std; class Solution { public: int minPathSum(vector<vector<int>> &grid) { int answer = 0; // Initialize vector<vector<int>> dp = grid; for (int i = 0; i < grid.size(); i++) { for (int j = 0; j < grid[0].size(); j++) ...
#include <iostream> #include<vector> #include <algorithm> #include <string> using namespace std; /* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } }; */ class Solution { public: ListNode* EntryNodeOfLoop(ListNode* pHead) { if(pHead == ...
#include <bits/stdc++.h> using namespace std; typedef pair<int, pair<int,int> > PII; const int N = 150001; int n; PII a[N]; bool cmp(const PII & a, const PII & b) { return (a.first > b.first || (a.first == b.first && a.second.first < b.second.first)); } int main() { scanf("%d", &n); for (int i = 0 ; i < n;...
#ifndef DETERMINISTIC_TREE_H #define DETERMINISTIC_TREE_H #include "TreeDemo.h" class DeterministicTree : public TreeDemo { public: DeterministicTree(unsigned int Res_X,unsigned int Res_Y,unsigned int texture_id); virtual ~DeterministicTree() override; }; #endif // DETERMINISTIC_TREE_H
#ifndef FISHY_VFS_UTIL_H #define FISHY_VFS_UTIL_H #include "path.h" #include "vfs_types.h" namespace vfs { namespace util { static const char *TMP_PATH = "tmp/"; /** * @param src a logical file path * @return stats structure for the given file */ FileStats Stat(const Path &src); /** * Perform a copy of {@code ...
/** Implementation file for the "Editor" class. @file Editor.cpp */ #include"Editor.h" #define ARROWUP 72 #define ARROWDOWN 80 #define ARROWLEFT 75 #define ARROWRIGHT 77 void placeCursorAt(Point coordinate) { COORD coord; coord.X = coordinate.getX(); coord.Y = coordinate.getY(); SetConsoleCursorPosition( Ge...
#include "FileHandle.h" #include <stdlib.h> #include <string.h> #include <stdint.h> #include <list> FileHandle Log; FileHandle Drives[100]; FileHandle Fout; char* NextLine(FILE* f); bool IsFailedBlock(char x); bool ParseNumbers(const char* line, uint64_t& position, uint64_t& length); uint64_t Hex64(char* s, char* e...
// Created by wangwenjie on 2014/01 #include "ScrollDoubleLayer.h" #include "ScrollMenuItem.h" USING_NS_CC; #define CALL_DOEVENT(_selector) if (_selector) { _selector(node, e, scroll); } ScrollDoubleLayer * ScrollDoubleLayer::create(const char * keyLeft, ScrollDragDir dragLeft, int countLeft, bool clickAbleLeft, c...
#include "FFTW_solver.h" int main() { FFTW_solver fftw; fftw.solve(); return 0; }
#ifndef __FILE_SLAM_SIM__ #define __FILE_SLAM_SIM__ #include <vec2.h> #include <vecn_fixed.h> #include <slam.h> namespace Slam { using Common::vec2d; using Common::vec2i; template <int n, int m> class Field : public Common::mat<bool, n, m>, public grid_interface { public: Field(double h_) : h(h_), ...
#ifndef _SERVICIOAUTORRESPUESTA_H #define _SERVICIOAUTORRESPUESTA_H #include "servicio.h" #include "dominio.h" class cServicioAutorrespuesta:public cServicio { public: //Constructor e iniciador cServicioAutorrespuesta(cDominio *dominio); bool iniciar(); //Agrega una autorrespuesta en el sistema int agrega...
#include<stdio.h> #include<math.h> int main(){ printf("hello world\ooo"); int i=0; int _m=9; for(i=0;i<20;i++){ i=i+2; } int k= return 0; }
/* 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...
//program for hello world #include<iostream.h> #include<conio.h> void main() // main functoin { clrscr(); cout<<"\n Hello World "; // cout used for out put getch(); }
//question-3 #include<iostream> using namespace std; class Date { private: int month; public: Date(int m) { if(m>=1&&m<=12) { month=m; } else { month=1; } } int displayDate() { return month; } }; int main() ...
// -*- C++ -*- // // Copyright (C) 1998, 1999, 2000, 2002 Los Alamos National Laboratory, // Copyright (C) 1998, 1999, 2000, 2002 CodeSourcery, LLC // // This file is part of FreePOOMA. // // FreePOOMA is free software; you can redistribute it and/or modify it // under the terms of the Expat license. // // This progr...
/* traits.cpp -*- C++ -*- Rémi Attab (remi.attab@gmail.com), 04 Apr 2015 FreeBSD-style copyright and disclaimer apply Implementation of the traits class. */ #include "reflect.h" namespace reflect { /****************************************************************************...
/* *********************************************************** * JLMD++ A C++ version of LJMD motived by LAMMPS. * * http://sites.google.com/site/akohlmey/software/ljmd * and http://lammps.sandia.gov/ * * Some routines are taken in whole or in part from LJMD * or LAMMPS. This software is distributed under the ...
// This file is subject to the terms and conditions defined in 'LICENSE' included in the source code package #ifndef JACTORIO_INCLUDE_CORE_CONVERT_H #define JACTORIO_INCLUDE_CORE_CONVERT_H #pragma once #include <type_traits> #include <typeinfo> #include "jactorio.h" namespace jactorio { /// Performs cast, data ...
#include "desktop.h" namespace loss { Desktop::Desktop(float width, float height, uint32_t id) : _width(width), _height(height), _id(id) { } uint32_t Desktop::id() const { return _id; } float Desktop::width() const { return _width; } v...
#include <cstdio> #include <cstring> #include <iostream> using namespace std; typedef long long ll; const int maxn = 105; typedef struct matrix { ll** data; int r, c; // 空矩阵 matrix(int _r, int _c) : r(_r), c(_c) { init(); } // 单位矩阵 matrix(int n) : r(n), c(n) { init(); for (int i...
/* 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...
#include "test_util.h" void TEST_RM_6(const string &tableName, const int nameLength, const string &name, const int age, const float height, const int salary) { // Functions Tested // 0. Insert tuple; // 1. Read Tuple // 2. Delete Table ** // 3. Read Tuple cout << "****In Test Case 6****" << end...
#pragma once #include "PresetInfo.h" #include "render/context.h" struct PresetBundle { bool enabled = true; std::string path; std::string name; std::map<std::string, PresetInfoPtr> presets; ...
// Clang includes #include "clang/AST/ASTConsumer.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" #include "clang/AST/Type.h" #include "clang/AST/Expr.h" #include "clang/ASTMatchers/ASTMatchFinder.h" #include "clang/ASTMatchers/ASTMatchers.h" #include "clang/Basic/Diagnostic.h" #include "clang/Front...
// ardulogger // // Copyright 2017 by Phillip Yialeloglou // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless requi...
#include"sw_codingEdit.h" #include"sw_functions.h" #include"sw_graph_str.h" using namespace SW; float Letter::TR_ = 0.01; //先进行定义,static 类成员的定义只能在 main()函数外,否则会出错 //----------------------------------------isWordValid-------------------------------------------------------------------// // 判断编码是否有效 bool isWordValid(s...
#include<bits/stdc++.h> using namespace std; bool solve(vector<pair<int,int>>& locations,vector<pair<int,int>>& targets,int m,int n,int d) { for(int i=0;i<n;i++) { int count = 0; for(int j=0;j<m;j++) { int value= abs(locations[i].first - targets[j].first)+abs(locations[i].second - locations[j].second); ...
// This file has been generated by Py++. #ifndef BasicRenderedStringParser_hpp__pyplusplus_wrapper #define BasicRenderedStringParser_hpp__pyplusplus_wrapper void register_BasicRenderedStringParser_class(); #endif//BasicRenderedStringParser_hpp__pyplusplus_wrapper
// ****************** HydroSimulatorW32.h ******************************* // Generated by TwinCAT Target for MATLAB/Simulink (TE1400) // MATLAB R2019a (win64) // TwinCAT 3.1.4022 // TwinCAT Target 1.2.1237 // Beckhoff Automation GmbH & Co. KG (www.beckhoff.com) // **************************************************...
#include<algorithm> #include<iostream> #include<vector> using namespace std; /*int main() { string s,s1,s2; vector<string>v1; cin>>s>>s1; v1.push_back(s); v1.push_back(s1); int l = v1.size(); s2 = v1[1]; cout<<v1.size()<<endl; v1.erase(remove(v1.end(),v1.end(),s2)); cout<<v1.size()<<endl; ...
class Solution { public: bool isCousins(TreeNode* root, int x, int y) { if (!root || (!root->left && !root->right)) return false; queue<TreeNode *> q{{root}}; while (!q.empty()) { bool foundFirst = false; for (int i = q.size(); i > 0; --i) { TreeNode *...
#ifndef __GEOMETRY2D_H__ #define __GEOMETRY2D_H__ #include <Eigen/Eigen> using namespace Eigen; #include <assert.h> typedef std::vector<Vector2d> StdVector2d; const double epsilon = 1e-5; inline double triangle_area(const Vector2d& a, const Vector2d& b, const Vector2d& c) { return fabs((c(0)*(a(1) - b(1)) + a(0)*...
#pragma once #include <map> #include <vector> #include <sstream> #include <iomanip> class HexEncoder { public: HexEncoder() { for (char number = '0'; number <= '9'; ++number) { hex_to_bin_table_.emplace(number, (number - '0')); } for (char letter = 'a'; letter <= 'f'; ++letter)...
#include <Geometry/Texture.h> #include <Math/Vectorf.h> #include <Geometry/Ray.h> #include <Geometry/Triangle.h> #include <Geometry/CastedRay.h> #include <stdlib.h> #include <iostream> #include <Geometry/RGBColor.h> #include <Geometry/Material.h> #include <Geometry/PointLight.h> #include <Geometry/Camera.h> #include <G...
#include <bits/stdc++.h> using namespace std; bool check(int b[] ,int n) { for(int i= 0;i<n;i++) { if(b[i] == 0) return false; } return true; } int main() { int t; cin>>t; while(t--) { int n ; cin>>n; int a[n]; for(int i = 0; i< n; i++ ) { ...
#pragma once #ifndef __CE_CHIP_HPP__ #define __CE_CHIP_HPP__ #include "clan_Enti.h" #define HELPCONTENT_TXT "image\\clanImage\\Help\\Help.msg" class CLANEntity_chip: public CLANEntity { public: CLANEntity_chip(); ~CLANEntity_chip(); int Init(int Life); int Clear(); void Main(); void RenderMain(); void Draw...
#include <bits/stdc++.h> #define MAX_V 26 using namespace std; vector<int> G[MAX_V]; bool visited[MAX_V]; vector<int> vertice; void dfs(int V) { visited[V] = true; vertice.push_back(V); for (auto i : G[V]) { if (!visited[i]) { dfs(i); } } } int main() { ...
/***************************************************************************************************** * 剑指offer第61题 * 请实现一个函数按照之字形打印二叉树,即第一行按照从左到右的顺序打印,第二层按照从右至左的顺序打印, 第三行按照从左到右的顺序打印,其他行以此类推。 * Input: 二叉树 * Output: 二叉树之字形打印 * * Note: * 不同于广度遍历二叉树,在之字形打印中,需要按照深度的奇偶性将两者分开,因此需要两个栈进...
#include <bits/stdc++.h> #include <cassert> #define rep(i, N) for (int i = 0; i < (N); ++i) #define rep2(i, a, b) for (ll i = a; i <= b; ++i) #define rep3(i, a, b) for (ll i = a; i >= b; --i) #define pb push_back #define eb emplace_back #define fi first #define se second #define nl '\n' #define endl '\n' #define all(c)...
#pragma once #include <string> using namespace std; /*Summary: Methods: Encryption:Pushes 'X' char for empty spaces. Uses string iterator to point place in string message. Encrypt beginning right-top. Decryption:Defines char array pointer size message length. Push characters in message beggining right-top. Read t...
//h #include<iostream> #include<vector> #include <memory> #include "tic_tac_toe.h" #include "tic_tac_toe_3.h" #include "tic_tac_toe_data.h" using std::vector; #ifndef TIC_TAC_TOE_MANAGER_H #define TIC_TAC_TOE_MANAGER_H class TicTacToeManager { public: TicTacToeManager() = default; TicTacToeManager(TicTacToeData& ...
// @copyright 2017 - 2018 Shaun Ostoic // Distributed under the MIT License. // (See accompanying file LICENSE.md or copy at https://opensource.org/licenses/MIT) #pragma once #include <distant/security/privileges.hpp> #include <distant/security/access_token.hpp> namespace distant::security::privileges { inline bool...
/************************************************* * Publicly released by Rhoban System, August 2012 * www.rhoban-system.fr * * Freely usable for non-commercial purposes * * Licence Creative Commons *CC BY-NC-SA * http://creativecommons.org/licenses/by-nc-sa/3.0 *************************************...
#include<bits/stdc++.h> using namespace std; string solve(string input,vector<string>& keypad) { string output; for(int i=0;i<input.size();i++) { if(input[i]==' ') { output= output + "0"; } else { output = output + keypad[input[i]-'A']; } } return output; } int main() { string input; getline...
#ifndef FISHY_BLOB_INL #define FISHY_BLOB_INL namespace core { namespace memory { /** * */ inline ConstBlob::ConstBlob() : m_size(0), m_pData(nullptr) { } /** * */ inline ConstBlob::ConstBlob(const u8 *const data, const size_t size) : m_size(size), m_pData(data) { } /** * */ inline ConstBlob::ConstBlob(co...
/* * Copyright (C) 2007-2015 Frank Mertens. * * Use of this source is governed by a BSD-style license that can be * found in the LICENSE file. * */ #include <flux/File> #include <flux/Format> #include <flux/tar/TarCommon> #include <flux/tar/TarReader> namespace flux { namespace tar { Ref<TarReader> TarReader::...
#pragma once #include <distant/concepts/boolean_validator.hpp> namespace distant::concepts { template <class Derived> struct handleable : public boolean_validator<handleable<Derived>> { bool valid() const noexcept { return static_cast<const Derived*>(this)->handle_.valid(); } const auto& handle() const no...
f = [1, 2] while len(f) <= 120: f.append(f[-1] + f[-2]) def to_decimal(n): if len(n) == 1: return f[0] * int(n[0]) return int(n[0]) * f[len(n)-1] + to_decimal(n[1:]) def to_fibinary(n): ans = '' idxf = 0 while f[idxf] <= n: idxf += 1 idxf -= 1 while idxf >= 0: ...
int Solution::solve(string x, string y) { int m = x.size(); int n = y.size(); int dp[m+1][n+1]; for(int i=0;i<=m;i++){ for(int j=0;j<=n;j++){ if(i==0 || j==0){ dp[i][j] = 0; } } } for(int i=1;i<=m;i++){ for(int j=1;j<=n;j+...
#include <sc2api/sc2_api.h> #include <sc2utils/sc2_manage_process.h> #include <Kubot.h> #include <utils/UnitTraits.h> int main(int argc, char* argv[]) { sc2::Coordinator coordinator; coordinator.LoadSettings(argc, argv); Kubot bot; coordinator.SetParticipants({ sc2::CreateParticipant(sc2::R...
/** * @file MockFunctor.h * @author seckler * @date 18.04.18 */ #pragma once #include <gmock/gmock.h> #include "autopas/autopasIncludes.h" #include "autopas/cells/ParticleCell.h" #include "autopas/containers/verletListsCellBased/verletLists/VerletListHelpers.h" #if defined(AUTOPAS_CUDA) #include "autopas/utils/Cu...
#ifndef QUADRATIC_KOCH_CURVE_H #define QUADRATIC_KOCH_CURVE_H #include "Demo2D.h" #include <DemoUtils/DrawSkeleton.h> class QuadraticKochCurve : public Demo2D { private: TreeNode *QuadraticKochCurveSkeleton; public: virtual void Draw() override { glColor3f(0.0,0.0,0.0); DrawSkeleton DrawSkel; DrawSkel.Dra...
#include <string> #include <fstream> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #define BUFF 2048 int main() { unsigned char buff[BUFF] = { 0 }; sockaddr sa; sockaddr_in *sin = (sockaddr_in *) &sa; int sk ...
// C++ for the Windows Runtime vv1.0.170303.6 // Copyright (c) 2017 Microsoft Corporation. All rights reserved. #pragma once #include "Windows.Media.SpeechRecognition.1.h" #include "Windows.Foundation.1.h" WINRT_EXPORT namespace winrt { namespace ABI::Windows::Foundation::Collections { #ifndef WINRT_GENERIC_e2fcc7...
/******************************************************************************** ** Form generated from reading UI file 'test.ui' ** ** Created by: Qt User Interface Compiler version 5.6.1 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! **********************************************...
#include "turnroomoff.h" TurnRoomOff::TurnRoomOff(House *h) { _house = h; } void TurnRoomOff::execute(std::string s) { _house->turnRoomOff(s); }
// This file has been generated by Py++. #include "boost/python.hpp" #include "generators/include/python_CEGUI.h" #include "Colour.pypp.hpp" namespace bp = boost::python; void register_Colour_class(){ { //::CEGUI::Colour typedef bp::class_< CEGUI::Colour > Colour_exposer_t; Colour_exposer_t Colo...
#ifndef MESSAGE_H #define MESSAGE_H #include "DataTypes.h" class Message{ protected: INT m_src,m_dst; }; #endif // MESSAGE_H
/* 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: StataVariables.cpp * Author: adrianmo * * Created on May 28, 2014, 10:50 AM */ #include "StataVariables.h"
#pragma once #include <Windows.h> #include <stdint.h> #include <iostream> #include <vector> #include <string> #include <filesystem> #include "portable_executable.hpp" #include "utils.hpp" #include "nt.hpp" #include "intel_driver.hpp" #define PAGE_SIZE 0x1000 namespace kdmapper { typedef bool (*mapC...
#include <stdio.h> #include <sys/stat.h> #include <string.h> #include <string> #include <libgen.h> #include <stdlib.h> #include "utils.h" #ifndef UTILS #define UTILS using namespace std; int CheckDir(const char *dirname) { struct stat st; if(stat(dirname,&st) != 0) { if( mkdir(dirname,0700...
#include<sys/types.h> #include<sys/socket.h> #include<netdb.h> #include<unistd.h> #include<arpa/inet.h> #include<netinet/in.h> #include<stdio.h> #include<string.h> #include<stdlib.h> #include<iostream> #include<string> #include<map> #define STDIN 0 #define VERSION 3 #define JOIN 2 #define SEND 4 #define FWD 3 #d...
// // DBHelper.h // SMFrameWork // // Created by KimSteve on 2016. 12. 7.. // // SQLiteWrapper 또는 RealmWrapper를 상속받아 테이블을 정의하고 초기 데이터를 세팅하는 상속 클래스 #ifndef DBHelper_h #define DBHelper_h #include "SQLiteWrapper.h" class DBHelper : public SQLiteWrapper { public: static DBHelper* getInstance(); protected: ...
class Solution { public: int kthSmallest(vector<vector<int>>& matrix, int k) { int left = matrix[0][0], right = matrix.back().back(); while (left < right) { int mid = left + (right - left) / 2, cnt = 0; for (int i = 0; i < matrix.size(); ++i) // since end of r...
#ifndef _APP_SAVER_HPP_ #define _APP_SAVER_HPP_ #include <map> #include <string> #include "Saver.hpp" using namespace std; class AppSaver { public: AppSaver() {} ~AppSaver() {} bool save(const char* filename, SceneGraph& wrl); void registerSaver(Saver* saver); private: map<string, Saver*> _registry; ...
#include "ViewAndRecord.h" #include <iostream> #include "Source/Simulation.h" #include "Source/Common/Exception.h" namespace solar { ViewAndRecord::ViewAndRecord(const std::string& outFileName, viewer_p viewer) : outFile(outFileName), viewer(std::move(viewer)) { assert(this->viewer); } ViewAndRecord::~ViewAn...
#include <whiskey/Messages/Message.hpp> #include <whiskey/Core/Assert.hpp> #include <whiskey/Core/Color.hpp> #include <whiskey/Source/Source.hpp> namespace whiskey { Message::Message(Token token, Message::Severity severity, std::string description) : token(token), severity(severity), description(description) { } ...
#include <stdio.h> int main() { long long i, t, n, gedungke, gedungdari, staminanya , sum1 = 0, sum2=0, max=0; scanf("%lld", &t); scanf("%lld", &n); for(i=0;i<1;i++){ scanf("%lld", &gedungke); gedungdari=gedungke; scanf("%lld", &staminanya); sum1 = staminanya + sum1; ...
// -*- C++ -*- // // Copyright (C) 1998, 1999, 2000, 2002 Los Alamos National Laboratory, // Copyright (C) 1998, 1999, 2000, 2002 CodeSourcery, LLC // // This file is part of FreePOOMA. // // FreePOOMA is free software; you can redistribute it and/or modify it // under the terms of the Expat license. // // This progr...
# include <cstdio> # include <algorithm> using namespace std; # define MAXN 65 int main() { char str[4][MAXN]; char DAY,H,M; char week[7][4] = {"MON","TUE","WED","THU","FRI","SAT","SUN"}; //freopen("input.txt","r",stdin); for(int i = 0; i < 4; i++){ scanf("%s",str[i]); } int tm...