text
stringlengths
5
1.04M
// ------------------------------------------------------------------ // Fast R-CNN // Copyright (c) 2015 Microsoft // Licensed under The MIT License [see fast-rcnn/LICENSE for details] // Written by Ross Girshick // ------------------------------------------------------------------ #include <cmath> #include <cstdlib>...
/* Copyright 2019 Stanford University, NVIDIA Corporation * * 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 required by app...
namespace glm { // isfinite template<typename genType> GLM_FUNC_QUALIFIER bool isfinite( genType const& x) { # if GLM_HAS_CXX11_STL return std::isfinite(x) != 0; # elif GLM_COMPILER & GLM_COMPILER_VC return _finite(x) != 0; # elif GLM_COMPILER & GLM_COMPILER_GCC && GLM_PLATFORM & GLM_PLATFORM_ANDROID ...
/* * Copyright (c) 2006-2014, Visualization and Multimedia Lab, * University of Zurich <http://vmml.ifi.uzh.ch>, * Eyescale Software GmbH, * Blue Brain Project, EPFL * * This file is part of VMMLib <https://github.com/VMML/vmmlib/> * * R...
// Created on: 1995-07-17 // Created by: Modelistation // Copyright (c) 1995-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 ...
/* Copyright (C) 2005-2011, Thorvald Natvig <thorvald@natvig.com> 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,...
/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or t...
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #include "pch.h" #include "TestCommon.h" #include "TestSource.h" #include "TestHooks.h" #include "TestSettings.h" #include "DependenciesTestSource.h" #include <AppInstallerErrors.h> #include <AppInstallerLogging.h> #include <AppInstall...
#include <iostream> using namespace std; class Person{ public: int age; Person(int initialAge); void amIOld(); void yearPasses(); }; Person::Person(int initialAge) { if (initialAge<0) { age = 0 ; cout << "Age is not valid, se...
/* Median in a row-wise sorted Matrix ================================== Given a row wise sorted matrix of size RxC where R and C are always odd, find the median of the matrix. Example 1: Input: R = 3, C = 3 M = [[1, 3, 5], [2, 6, 9], [3, 6, 9]] Output: 5 Explanation: Sorting matrix elements gives us {1...
#ifndef PYTHONIC_INCLUDE_MATH_MODF_HPP #define PYTHONIC_INCLUDE_MATH_MODF_HPP #include "pythonic/include/utils/functor.hpp" #include "pythonic/include/types/tuple.hpp" #include <cmath> namespace pythonic { namespace math { std::tuple<double, double> modf(double x); DECLARE_FUNCTOR(pythonic::math, modf);...
/* * Copyright (c) 2004-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #inc...
/* * Player - One Hell of a Robot Server * Copyright (C) 2000-2003 * Brian Gerkey, Kasper Stoy, Richard Vaughan, & Andrew Howard * * * 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 Foundati...
#include "AttackCommand.hpp" bool AttackCommand::execute() { if(hero.power >= monster.power) { std::cout << "The hero strikes the Monster!" << std::endl; monster.HP -= hero.power; if(monster.HP > 0) { std::cout << "The monster has " << monster.HP << " HP left!" << st...
/* * Copyright (c) 2007-2014 SlimDX Group * * 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, ...
// Copyright (c) 2014-2017 The Dash Core developers // Copyright (c) 2019 The ExecuteCoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "chainparams.h" #include "dsnotificationinterface.h" #include "in...
/* Copyright 2017 The TensorFlow Authors. 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 Unless required by applicable law or a...
/* * Copyright (c) 2019-2020 Inria * 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...
/* Sưu tầm bởi @nguyenvanhieuvn Thực hành nhiều bài tập hơn tại https://luyencode.net/ */ #include<stdio.h> #include<conio.h> int main() { char kytu; for(kytu = 'A'; kytu <= 'Z'; kytu++) { printf("%4c", kytu); } getch(); return 0; }
//: // \file // \brief arbitrary precision calculator // Accepts a C-style numeric expression that is to be parsed (preferably within // quotes to escape spaces, brackets and other special symbols from the shell); // it may contain the following: // optional spaces (are ignored) // integer and floating point numbers,...
//***************************************************************************** // Copyright 2020 Intel Corporation // // 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.ap...
// Copyright (C) 2009,2010,2011,2012 GlavSoft LLC. // All rights reserved. // //------------------------------------------------------------------------- // This file is part of the TightVNC software. Please visit our Web site: // // http://www.tightvnc.com/ // // This program is free software; y...
/* Excited States software: KGS Contributors: See CONTRIBUTORS.txt Contact: kgs-contact@simtk.org Copyright (C) 2009-2017 Stanford University 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 with...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "chainparams.h" #include "clientversion.h" #include "rpcserver.h" #inclu...
#ifndef BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED #define BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Peter Dimov 2000-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LIC...
#include<iostream> #include<queue> using namespace std; class Stack{ Queue q1; Queue q2; public: void push(int d){ } void pop(){ } int getTop(){ } }
#include "stdafx.h" #include "faster_than_bullets_time.h" #include "hits_store.h" #include "game_state_accumulator.h" #include "level.h" namespace award_system { faster_than_bullets_time::faster_than_bullets_time(game_state_accumulator* owner) : inherited(owner) { m_no_demag_time = u32(-1); } u32 co...
#include "Ball.h" #include <Constants.h> #include <Paddle.h> #include <ctime> #include <iostream> Ball::Ball() { //dummy ctor. } Ball::Ball(sf::Texture* texture, sf::Vector2f initPos, sf::IntRect textureRect) { //Initialize the values. currentPos = initPos; radius = BALL_RADIUS; //Set ball speed....
#include "pch.h" #include "buffer.h" #include "commands.h" #include "descriptor_allocator.h" #include "device_reset_priority.h" #include "globals.h" #include "mem_allocator.h" #include "resource.h" ff::dx12::buffer_base& ff::dx12::buffer_base::get(ff::dxgi::buffer_base& obj) { return static_cast<ff::dx12::buffer_b...
#include <iostream> #include <cmath> #include <climits> using namespace std; bool checkEquilibrium(int arr[], int n) { int sum = 0; for(int i = 0; i < n; i++) { sum += arr[i]; } int l_sum = 0; for(int i = 0; i < n; i++) { if(l_sum == sum - arr[i]) return true; l_sum += arr[i]...
#include "stdafx.h" #include <string> #include <sws/SocketError.h> #include "globals.h" #include "Networking.h" #include "MemoryManagement.h" // for MemManage #include "CommonEnums.h" // for Menu, SubMenu2P #include "AddressList.h" // for CurrentMenu #include "PacketOverloads.h" #include "Events.h" #inclu...
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "third_party/blink/renderer/core/animation/list_interpolation_functions.h" #include <utility> #include "testing/gtest/include/gtest/gtest.h" #i...
//*-- Author : Ole Hansen 12/05/2000 ////////////////////////////////////////////////////////////////////////// // // THaInterface // // THaInterface is the interactive interface to the Hall A Analyzer. // It allows interactive access to all analyzer classes as well as // all of standard ROOT. // ////////////////...
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
#include <iostream> #include <set> using namespace std; inline void use_io_optimizations() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } bool has_distinct_digits(unsigned int number) { set<unsigned int> digits; for (unsigned int i {number}; i > 0; i /= 10) { unsigned int digit ...
#include "myAlgorithm.h" void affiche_population(const vector<solution>& population) { for(unsigned i = 0; i< population.size(); ++i) { for(unsigned j = 0; j< population.size(); ++j) { cout << population[i][j] << " " ; } cout << endl; } } harmonySearch::harmonyS...
#include "RecoVertex/KalmanVertexFit/interface/SimpleVertexTree.h" #include "TROOT.h" #include "TTree.h" #include "TH1F.h" #include <iostream> using namespace std; SimpleVertexTree::SimpleVertexTree(const char *filterName, const MagneticField *magField) : theFitterName(filterName) { vertexTree = new TTree(filterNa...
// File description: // Provides basic StringBuilder setup for Vector classes. #pragma once // Precompiled header: #include GAMEPROJECT_PCH namespace math { /// <summary> /// Contains setup for a string conversion: <see cref="Vector2::toString">, and <see cref="Vector3::toString">. /// </summary> struct VectorString...
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #include "src/media/audio/audio_core/mixer/sinc_sampler.h" #include <iomanip> #include <iterator> #include <memory> #include <fbl/algorithm.h> #include <gte...
#include "soundproducer.h" SoundProducer::SoundProducer() { //initialize position vector producer_position.x = 0; producer_position.y = 0; producer_position.z = 0; track_source_ptr = nullptr; freeRoam = false; picked_for_selection = false; account_number = 0; effect_applied = false; } SoundProduc...
// // IkasAPI.cpp // IkasGame // // Created by Sergio Garcia on 23/2/15. // // #include "IkasAPI.h" #include "../Singletons/GameSettingsManager.h" #include "../Singletons/ZipManager.h" #include "../json/cJSON.h" static const Value JsonURL = Value(ApiURL); bool IkasAPI::init() { _errorCallback = NULL; _suc...
// Copyright (c) 2014-2017 Hartmut Kaiser // // 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) #include <pika/local/init.hpp> #include <iostream> #include <string> #include <v...
/* * Copyright 2009-2017 Alibaba Cloud 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 * * Unless required...
/////////////////////////////////////////////////////////////////////// // File: osdetect.cpp // Description: Orientation and script detection. // Author: Samuel Charron // Ranjith Unnikrishnan // // (C) Copyright 2008, Google Inc. // Licensed under the Apache License, Version 2.0 (the "...
/* * Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES) * * This file is part of Orfeo Toolbox * * https://www.orfeo-toolbox.org/ * * 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 ...
#include "Player.h" #include "Engine.h" #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/epsilon.hpp> #include <limits> #include <algorithm> Player::Player(Model* model, PathfindingNode* initNode) : Renderable(initNode->pos, model) { lastNode = initNode; SetAnimation("stand"); } Player::Player(Model* model, ...
// See docs in ../ops/nn_ops.cc. #define EIGEN_USE_THREADS #include "tensorflow/core/framework/op_kernel.h" #include "tensorflow/core/public/tensor_shape.h" #include "tensorflow/core/kernels/xent_op.h" #include "tensorflow/core/public/tensor.h" #include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor" namespace t...
/* * Copyright (C) 2017-2020 Intel Corporation * * SPDX-License-Identifier: MIT * */ #include "runtime/kernel/kernel.h" #include "test.h" #include "unit_tests/fixtures/device_fixture.h" #include "unit_tests/mocks/mock_context.h" #include "unit_tests/mocks/mock_kernel.h" #include "unit_tests/mocks/mock_program.h" ...
// Copyright Carl Philipp Reh 2009 - 2021. // 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) #include <fcppt/assert_complete.hpp> namespace { //! [assert_complete] template <typename T> void ...
/* Copyright (c) 2014-2015 DataStax 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 required by applicable law or agreed to in writing...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Copyright (c) 2013 The StarCash developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "txdb.h" #include "miner.h"...
// // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com) // // 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) // // Official repository: https://github.com/vinniefalco/json // #ifndef BOOST_JSON_PARSER_HPP #def...
/* __ __ __ |__|__| | __ | | | ||__| ___ ___ __ | | | | | | | || | | | Ubiquitous Internet @ IIT-CNR | | | || | | | C++ edge computing libraries and tools |_______|__||__|__|__| https://github.com/ccicconetti/serverlessonedge Licensed under t...
// Copyright (c) 2011-2014 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "intro.h" #include "ui_intro.h" #include "guiutil.h" #include "util.h" #include <boost/filesystem.hpp> #include ...
// SPDX-License-Identifier: Apache-2.0 // ---------------------------------------------------------------------------- // Copyright 2011-2021 Arm Limited // // 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 ...
version https://git-lfs.github.com/spec/v1 oid sha256:26e94e9181ad7fcf4729f50e634ca897016f603d0e019dc05a76ef291487ea77 size 3852
#include "../bases_2D.hpp" namespace Basis { DynMatrix<double> Dubiner_2D::GetPhi(const uint p, const std::vector<Point<2>>& points) { uint ndof = (p + 1) * (p + 2) / 2; uint npt = points.size(); DynMatrix<double> phi(ndof, npt); std::vector<double> n1(npt); std::vector<double> n2(npt); for...
// See LICENSE_CELLO file for license and copyright information /// @file enzo_EnzoInitialInclinedWave.hpp /// @author Matthew Abruzzo (matthewabruzzo@gmail.com) /// @date Thur April 19 2019 /// @brief [\ref Enzo] Initialization routine for inclined linear MHD waves /// and inclined circularly p...
// Copyright 2021 The IREE Authors // // Licensed under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception #include "iree/compiler/Codegen/Interfaces/BufferizationInterfaces.h" #include "iree/compiler/Di...
#include "x_test_audio1.h" unsigned char x_test_audio1_txt[] = { 0xdb, 0xde, 0xd6, 0xd0, 0xca, 0xbe, 0xaa, 0x96, 0x88, 0x82, 0x80, 0x81, 0x81, 0x85, 0x86, 0x82, 0x63, 0x63, 0x66, 0x70, 0x79, 0x7e, 0x7d, 0x75, 0x6c, 0x67, 0x64, 0x60, 0x5d, 0x58, 0x54, 0x55, 0x3a, 0x34, 0x31, 0x30, 0x33, 0x39, 0x3f, 0x42, 0x41, ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // #include "CppUnitTest.h" #include <assert.h> #include <onnxruntime_c_api.h> wchar_t* GetWideString(const char* c) { const size_t cSize = strlen(c) + 1; wchar_t* wc = new wchar_t[cSize]; mbstowcs(wc, c, cSize); r...
#include <algorithm> #include <vector> #include "caffe/layer.hpp" #include "caffe/util/math_functions.hpp" #include "caffe/vision_layers.hpp" namespace caffe { template <typename Dtype> void PowerLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom, vector<Blob<Dtype>*>* top, const bool init_ps, int* num_...
// Copyright 2014 BitPay, Inc. // Copyright (c) 2017-2019 The ECODOLLAR developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <stdint.h> #include <vector> #include <string> #include <map> #include <univalue.h> ...
// chef wars from code chef #include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { int h,p; cin>>h>>p; while( true ) { h = h-p; if (h <= 0) { cout<<"1"<<endl; break; }...
class Solution { public: vector<int> numOfBurgers(int tomatoSlices, int cheeseSlices) { vector<int> ans; int det = tomatoSlices - 2*cheeseSlices; if(det < 0) return ans; if(tomatoSlices % 2 != 0 ) return ans; if(det % 2 != 0) return ans; if((2*cheeseSlices - tomatoSli...
/* * * Copyright 2015 gRPC authors. * * 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 required by applicable law or agree...
//================================================================================================= /*! // \file src/mtl/TSMatTSMatMult.cpp // \brief Source file for the MTL transpose sparse matrix/transpose sparse matrix multiplication kernel // // Copyright (C) 2012-2017 Klaus Iglberger - All Rights Reserved // //...
// Copyright (c) 2012-2014 The Bitcoin Core developers // Copyright (c) 2014-2015 The Dash Core developers // Copyright (c) 2015-2018 The PIVX developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "netbase.h" #...
// // a sample of cryptoc++ library public keys private keys encryption decryption // #include <iostream> #include <sstream> #include <string> #include <cryptopp/rsa.h> #include <cryptopp/dsa.h> #include <cryptopp/hex.h> #include <cryptopp/emsa2.h> #include <cryptopp/osrng.h> #include <cryptopp/pssr.h> #include <crypt...
// ---------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License // ---------------------------------------------------------------------- #define CATCH_CONFIG_MAIN #include "catch.hpp" #include "../MaxAbsValueEstim...
// Copyright (c) 2017-2018 The PIVX developers // Copyright (c) 2018 The QBICcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "bip38.h" #include "base58.h" #include "hash.h" #include "pubkey.h" #include "...
// BSD 3-Clause License // Copyright (c) 2019, SCALE Lab, Brown University // 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 n...
// // Created by Keren Dong on 2019-06-20. // #include <fmt/format.h> #include <hffix.hpp> #include <kungfu/yijinjing/log/setup.h> #include <kungfu/yijinjing/time.h> #include <kungfu/yijinjing/msg.h> #include <kungfu/wingchun/strategy/context.h> #include <kungfu/wingchun/utils.h> using namespace kungfu::practice; us...
// dear imgui: standalone example application for SDL2 + OpenGL // If you are new to dear imgui, see examples/README.txt and documentation at the top of imgui.cpp. // (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan/Metal graphics context creation, etc.) // **DO NOT USE THIS...
// Generated by Haxe 4.1.5 namespace hx { unsigned char __res_38[] = { 0x80, 0x00, 0x00, 0x80, 0x00 }; }
// Geometric Tools, LLC // Copyright (c) 1998-2014 // Distributed under the Boost Software License, Version 1.0. // http://www.boost.org/LICENSE_1_0.txt // http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt // // File Version: 5.0.0 (2010/01/01) #include "ConformalMapping.h" WM5_WINDOW_APPLICATION(ConformalM...
/* * * Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany * Copyright (C) 2013-2016, J. Riesmeier, Oldenburg, Germany * All rights reserved. See COPYRIGHT file for details. * * Source file for class DRTROIElementalCompositionSequence * * Generated automatically from DICOM PS 3.3-2016e ...
/* * Copyright (c) 2016-2017 Wind River Systems, Inc. * * SPDX-License-Identifier: Apache-2.0 * */ /**************************************************************************** * * @file * Wind River Titanium Cloud - Threading Base Implementation Module" * * This module implements the common thread utility modu...
// Copyright 2011-2020 Wason Technology, LLC // // 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 required by applicable law or...
#include "asmparser.h" #include <QTextStream> #include <QDebug> #include <QRegularExpression> #include <cxxabi.h> namespace { QRegularExpression directiveRe { QStringLiteral("^\\s*\\..*$") }; QRegularExpression labelRe { QStringLiteral("^\\.*[a-zA-Z0-9]+[_]*[0-9]+:$") }; QRegularExpression hasOpcodeRe { QStringLiter...
#include <bits/stdc++.h> #define s(a) scanf("%d", &a) #define p(a) printf("%d\n", a) using namespace std; int main() { long long int N; int max_size = 50; scanf("%lld", &N); int size_arr = 0, arr[max_size], count = 0; while(N){ arr[max_size - 1 - size_arr] = N%10; N /= 10; size_arr++; } ...
/* // Copyright (C) 2018-2022 Intel Corporation // // 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 required by applicable l...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "primitives/block.h" #include "hash.h" #include "crypto/bthhash.h" #inclu...
#include <bits/stdc++.h> using namespace std; #define f(i, a, b) for (ll i=a; i<b; i++) #define fp(i, a, b) for (long long int i=a; i>=b; i--) #define TC(t) while (t--) #define FASTIO ios_base::sync_with_stdio(false);cin.tie(NULL) #define ll long long void readFile() { #ifndef ONLINE_JUDGE ...
#ifndef MARTIN_TEST_TOKEN_ENCLOSURES #define MARTIN_TEST_TOKEN_ENCLOSURES #include "testing.hpp" #include <generators/enclosures.hpp> #include "helpers/validatetree.hpp" #include "helpers/tokennode.hpp" #include "helpers/parseerror.hpp" #include "helpers/subtests.hpp" namespace Martin { class Test_token_enclosu...
/* Copyright 2019 The TensorFlow Authors. 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 Unless required by applicable law or a...
#include <set> using std::set; #include <vector> using std::vector; #include <string> using std::string; #include <map> using std::map; #include <ctime> #include <iostream> #include <cstdlib> #include <deque> #include <memory> #include <utility> #include <boost/asio.hpp> #include "CommWrapper.hpp" #include "rapidXML/...
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "test_runner.h" #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/param.h> #include <sys/wait.h> #...
// Copyright (c) 2013 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #include "shell/app/electron_main.h" #include <algorithm> #include <cstdlib> #include <memory> #include <string> #include <utility> #include <vector> #if defined(OS_POSIX) #include <...
////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2011-2012, John Haddon. All rights reserved. // Copyright (c) 2011-2015, Image Engine Design Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitte...
/*===================== begin_copyright_notice ================================== Copyright (c) 2017 Intel Corporation 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, includi...
#include "smm/groundmath.h" float nextExpRand(float expect){ return -(log(rand()/(float)RAND_MAX)/log(2.78281828)) * expect; }
// Distributed under the MIT License. // See LICENSE.txt for details. #include "Framework/TestingFramework.hpp" #include <array> #include <boost/rational.hpp> #include <cstddef> #include <vector> #include "Domain/Structure/ElementId.hpp" // IWYU pragma: keep #include "Domain/Structure/InitialElementIds.hpp" #includ...
/*********************************************************************************************************************** * OpenStudio(R), Copyright (c) 2008-2019, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved. * * Redistribution and use in source and binary forms, with or without m...
#include <RE/REpch.h> #include <RE/Core.h> namespace RE { App::App() = default; App::~App() = default; void App::Run() { Logger::Init(); RE_LOG_INFO("Ready"); while (true); } }
// This file is part of RAVL, Recognition And Vision Library // Copyright (C) 2001, University of Surrey // This code may be redistributed under the terms of the GNU Lesser // General Public License (LGPL). See the lgpl.licence file for details or // see http://www.gnu.org/copyleft/lesser.html // file-header-ends-here...
#include "commands.h" #include "environment.h" static constexpr const WCHAR *ARGS_FIRST_PLACEHOLDER = L"%FIRST%"; static constexpr const WCHAR *ARGS_SECOND_PLACEHOLDER = L"%SECOND%"; static auto ConstructInfoTitle(const std::wstring &prefix, const ABItem &item) -> std::wstring { std::wstring ret; ret.append...
/*********************************************************************************************************************** ** ** Copyright (c) 2011, 2014 ETH Zurich ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without modification, are permitted provided that the ** follo...
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
//============================================================================ // Copyright 2009-2020 ECMWF. // This software is licensed under the terms of the Apache Licence version 2.0 // which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. // In applying this licence, ECMWF does not waive the privil...