text stringlengths 8 6.88M |
|---|
/**
* @author Dmitry Lunin
* @date 19.09.2018
* @version 1.0
* \file
*/
#include "UTF-8Decoder.h"
#include <algorithm>
#include <string.h>
#include <sys/stat.h>
#include <stdlib.h>
const int MAX_PATH_SIZE = 100;
const int MAX_COMMAND_SIZE = 100;
/**
* @brief class interpreter of FILE* which close itself in de... |
#include <stdio.h>
#include <Windows.h>
#include <conio.h>
#include <iostream>
#include <string.h>
typedef struct Data
{
char fam[20];
char name[20];
char tel[20];
char dey[20];
char mon[10];
char year[10];
};
void poisk(FILE* F1, int& n, Data* arr)
{
errno_t err;
err = fopen_s(&F1, "f1.txt", "r+b");
char str... |
#include <iostream>
template<int M, int K, int S>
struct Unit {
enum { m=M, kg=K, s=S };
};
using Dimless = Unit<0,0,0>;
using M = Unit<1, 0, 0>;
using Kg = Unit<0, 1, 0>;
using S = Unit<0, 0, 1>;
using MpS = Unit<1, 0, -1>;
using MpS2 = Unit<1, 0, -2>;
template<typename U1, typename U2>
struct Uplus {
using... |
#include <SDL.h>
#include <stdio.h>
#include <fstream>
#include <iostream>
#include "game.h"
#include "raycaster.h"
#include "raycaster_fixed.h"
#include "raycaster_float.h"
#include "renderer.h"
using namespace std;
static void DrawBuffer(SDL_Renderer *sdlRenderer,
SDL_Texture *sdlTexture,
... |
#pragma once
namespace breakout
{
enum class EMusicAssetId
{
BreakoutMain = 0,
};
} |
#include <iostream>
// GLEW
#define GLEW_STATIC
#include <GL/glew.h>
// GLFW
#include <GLFW/glfw3.h>
// OpenGL Mathematics
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
// Other includes
#include "Camera.h"
#include "SolarSystem.h"
//#include "core/InputManager.h"
#include "core/RenderingManager.h... |
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
//
// Eigen 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 Softwar... |
#ifndef SVGICONENGINE_H
#define SVGICONENGINE_H
#include <QIconEngine>
#include <QSvgRenderer>
class SVGIconEngine : public QIconEngine {
QByteArray data;
public:
explicit SVGIconEngine(const std::string &iconBuffer);
void paint(QPainter *painter, const QRect &rect, QIcon::Mode mode,
QIcon::State... |
#include <iostream>
#include <string>
#include <set>
using namespace std;
char w_end;
set<string> M;
bool check(int k, string s){
int len = s.length();
if (k == 0){
w_end = s[len -1];
M.insert(s);
return true;
}
if (M.count(s) != 0){
return false;
}
M.insert(s);... |
#include <sstream>
#include <worker/graph.hpp>
#include <worker/render/hypothetical.hpp>
namespace svg {
void render(Graph const & g,
typename Graph::vertex_descriptor root,
std::stringstream & ss) {
svg::hypothetical(g, root, ss);
}
}
|
/*
* Copyright 2016 Freeman Zhang <zhanggyb@gmail.com>
*
* 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 applic... |
#include <iostream>
#include <unistd.h>
using namespace std;
int main() {
//system("echo '\a'"); // Узнать про функцию system
cout << "\a" << endl;
return 0;
}
|
#include <iostream>
#include <iomanip>
//pointer based strings end with a null char: "\0"
//These strings behave like arrays
//String literals are static and cannot be modified
int main(){
//creating an array: ['b','l','u','e','\0']
char color [] = "blue";
const char* colorPtr = "blue"; //poin... |
/*
本题为01背包模板题
注意按照题目要求变化即可
*/
#include<cstdio>
#include<algorithm>
using namespace std;
int n,m,s1,s2,t;//s1为wky水平,s2为老王水平,t为规定时间
int w[3500],v[3500];
int w1[3500];
int f[12900];
int main()
{
scanf("%d%d",&s1,&s2);
scanf("%d%d",&m,&n);
for(int i=1;i<=n;i++)//输入老王做题所需时间,并计算wky所需时间
{
scanf(... |
/*1002*/
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
typedef vector<int> Vint;
Vint *String_to_Vint(const string &s)
{
Vint *v = new Vint;
for (string::const_reverse_iterator iter = s.rbegin(); iter != s.rend(); iter++)
{
... |
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
// Author: Tatparya Shankar
int gcd(int a, int b)
{
if ( b == 0 )
return a;
return gcd( b, a % b );
}
int main()
{
int a, b;
cin >> a >> b;
cout << gcd( a,b ) << endl;
return 0;
} |
#pragma once
#ifndef _RECEIVEPROTO_H
#define _RECEIVEPROTO_H
#include "../pb/srvRes.pb.h"
using namespace std;
namespace CPPClient
{
namespace Net
{
namespace Cmd
{
class ReceiveProto
{
public:
void Receive(const char *buffer);
... |
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/StaticResources.g.uno.
// WARNING: Changes might be lost if you edit this file directly.
#include <_root.app18_bundle.h>
#include <_root.StaticResources.h>
#include <Fuse.Font.h>
#include <Uno.Float.h>
#include <Uno.Float4.h>
#include <Uno.IO.Bu... |
#pragma once
#include <array>
#include <vector>
#include "defs.hpp"
const std::array<point, 4> offs = {{ { 1, 0 }, { 0, 1 }, { -1, 0 }, { 0, -1 } }};
struct City;
std::vector<point> pathfind(City& c, int x1, int y1, int x2, int y2);
// Basically does a flood-fill until it finds one
std::vector<point> pathfind(Cit... |
#include "collisionentity.h"
|
#pragma once
#include <string.h>
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
class animal{
private:
int idCusca=0;
int fericeala;
std::string nume;
int pret;
float reducere;
public:
float GetReducere();
void SetReducere(float x);
virtual ... |
#include "aeGraphicsAPI.h"
namespace aeEngineSDK
{
aeVertexBuffer::aeVertexBuffer()
{
}
aeVertexBuffer::aeVertexBuffer(const aeVertexBuffer & B)
{
*this = B;
}
aeVertexBuffer::~aeVertexBuffer()
{
}
} |
#include "Render.h"
#include <Windows.h>
#include <GL\GL.h>
#include <GL\GLU.h>
#include <math.h>
double f(double a, double b, double t) { return a * (1 - t) + b * t; }
double f2(double p0, double p1, double p2, double p3, double t)
{
return p0 * (1 - t) * (1 - t) * (1 - t) + 3 * t * p1 * (1 - t) * (1 - t) + 3 *... |
/*
* Lanq(Lan Quick)
* Solodov A. N. (hotSAN)
* 2016
* LqFile... - File layer between os and server.
*/
#include "LqOs.h"
#include "LqDef.hpp"
#include "LqFile.h"
#include "LqStr.h"
#include "LqErr.h"
#include "LqConn.h"
#include <string.h>
#include <signal.h>
#if defined(LQPLATFORM_WINDOWS)
#include <Windows.h... |
//First toposort, and then count the connected components. Time-0.190s
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vll vector<ll>
vll AdjList[100000],dfs_num,ts,visit;
void dfs(int u) {
dfs_num[u] = 1;
for (int j = 0; j < (int)AdjList[u].size(); j++) { // default DS: AdjList
... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 1995-2007 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*/
#ifndef OP_URL_PLAYER_H
#define OP_URL_PLAYER_H
#include "module... |
/*Дано номер року. Знайти номер століття, знаючи, що початок 20 століття - 1901 рік.
*/
#include <iostream>
using namespace std;
int main()
{
cout << "Enter year\n";
int k;
cin >> k ;
int n = (k-1) / 100 ;
cout << "Century number: " << n + 1 << endl;
return 0;
/*Альтернативний код з Bool
... |
/****************************************************
* bst.cpp
*
* Constructors and Methods sbinlignum Class
*
* Node.js Addons C/C++
*
* Deps: v8, libuv
*
* (C) 2018 Erick Rettozi
*
* MIT LICENCE
****************************************************/
#include <node.h>
#include "bst.hpp"
using namespace std;
using na... |
#include<iostream>
using namespace std;
int square(int x)
{
return x*x;
}
int main()
{
cout<<"Hello Git";
cout<<square(5);
return 0;
} |
#include <simplecpp>
main_program{
turtleSim();
repeat(6){
repeat(20){
forward(1);
left(3);
}
repeat(120){
forward(1);
right(3);
}
}
}
|
#include "stdafx.h"
#include "ShopScene.h"
ShopScene::ShopScene()
{
}
ShopScene::~ShopScene()
{
}
HRESULT ShopScene::Init()
{
isDebug = false;
showInven = false;
showShop = false;
isDrag = false;
isBuy = false;
bg = new Image;
bg->Init("images/shop.bmp", WINSIZEX, WINSIZEY);
bgPixel = new Image;
bgPixel... |
/* XMRig
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
*
* 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
* ... |
/*
* ulamek.cpp
*
*
*
*/
#include <iostream>
#include "ul_ulamek.h"
using namespace std;
int main(int argc, char **argv)
{
// int a; deklaracja
//int= 6 inicjacja
//Ulamek u1, u2; //wymyslamy nazwe zmiennych, tworzymy 2 zmiennne, (deklaracja obiektu)
Ulamek u1(3, 7); // definicja obiektu
... |
#include <bits/stdc++.h>
using namespace std;
int polyCorners=4, polyX[5], polyY[5], x, y;
bool pointInPolygon();
int main()
{
for(int i=0;i<polyCorners;i++)
scanf("%d %d", &polyX[i], &polyY[i]);
scanf("%d %d", &x, &y);
if(pointInPolygon())
printf("\\O/\n | \n/ \\\n");
else
print... |
// Created on: 1990-12-17
// 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 "Series_executor.hpp"
#include "MainForm.h"
#include <chrono>
using namespace std::chrono;
namespace MarsColonisation
{
void Series_executor::serie()
{
form->SetRun(false);
auto tx = high_resolution_clock::now();
sa->prepare_next_iteration();
form->IncrementSeries();
auto t1 = high_resolution_cl... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
*
* Copyright (C) 2006-2011 Opera Software ASA. All rights reserved.
*
* This file is part of the Opera web browser.
* It may not be distributed under any circumstances.
*
* Johannes Hoff / Jan Borsodi
*/
#include "core/pch.h"
#ifdef S... |
/*
Copyright (c) 2016, M. Kerber, D. Morozov, A. Nigmetov
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditio... |
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
struct item{
int valor;
int idx;
int dono;
};
int calcula_mms(vector<item> itens, int num_pessoas){
vector<int> totais;
for(int i = 0; i < num_pessoas; i++){
totais.push_back(0);
}
for(int i = 0; i < (... |
#pragma once
#include "Resource.h"
#include "afxwin.h"
// FilterCutDialog dialog
extern class MainControl;
class FilterCutDialog : public CDialogEx
{
DECLARE_DYNAMIC(FilterCutDialog)
public:
FilterCutDialog(CWnd* pParent = NULL); // standard constructor
virtual ~FilterCutDialog();
void init(int poseSize);
//... |
#include <arpa/inet.h>
#include "idempotenceoption.hh"
#include "optionset.hh"
#include "sanity.hh"
using namespace std;
namespace S6M
{
void IdempotenceRequestOption::fill(uint8_t *buf) const
{
Option::fill(buf);
SOCKS6WindowRequestOption *opt = reinterpret_cast<SOCKS6WindowRequestOption *>(buf);
opt->window... |
THIS PROJECT READS SENSOR VALUE AND TRY TO UNDERSTAND SYMBOLS GENERATED FROM AMERICAN SIGN LANGUAGE (ASL) CHART
AND DISPLAY ON A SMARTPHONE.
-------PIN CONFIGURATION----------------
A0-A4 : FLEX SENSOR
D4&D5 : FOR BLUETOOTH RX AND TX
A5&A6 : XPIN AND YPIN FOR ACCELROMETER
*/
#include <SoftwareSerial.h>
SoftwareSerial... |
#include "Vector2Double.hpp"
Elysium::Core::Math::Numerics::Vector2Double::Vector2Double()
{
}
Elysium::Core::Math::Numerics::Vector2Double::Vector2Double(double Value)
{
}
Elysium::Core::Math::Numerics::Vector2Double::Vector2Double(double ValueX, double ValueY)
{
}
Elysium::Core::Math::Numerics::Vector2Dou... |
//
// ASM.cpp
// ADT
//
// Created by Jalor on 2020/11/27.
// Copyright © 2020 Jalor. All rights reserved.
//
#include "ASM.hpp"
int min(int a,int b,int c){
if(a > b){
a = b;
}
if(a > c){
a = c;
}
return a;
}
int ASMClass::ASMCalcul(string p,string t){
int m = p.length();
... |
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Modificar.h"
#include "Inicio.h"
#include "Clases.h"
#include "DLaborales.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resour... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "DnE_GameInstance.h"
void UDnE_GameInstance::Init()
{
//가장먼저호출
Super::Init();
SlotName = TEXT("Save Testing");
} |
#ifndef INDEXNODE_H
#define INDEXNODE_H
#include <iostream>
#include <fstream>
using namespace std;
class IndexNode
{
public:
const static int INDEX_NODE_SIZE = 64 ;
const static int MAX_DIRECT_BLOCKS = 10 ;
const static int BLOCK_SIZE = 256;
const static int MAX_FILE_BLOCKS = MAX_DIRECT_BLOCKS+BLOCK_SIZE/... |
//g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out
//g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.05 -DSIZE=2000 && ./a.out
// -DNOGMM -DNOMTL -DCSPARSE
// -I /home/gael/Coding/LinearAlgebr... |
//: C03:Bitwise.cpp
// Kod zrodlowy pochodzacy z ksiazki
// "Thinking in C++. Edycja polska"
// (c) Bruce Eckel 2000
// Informacje o prawie autorskim znajduja sie w pliku Copyright.txt
//{L} printBinary
// Demonstracja operacji na bitach
#include "printBinary.h"
#include <iostream>
using namespace std;
// M... |
/**
* Definition for binary tree
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
#include <iostream>
#include <vector>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *righ... |
// Created on: 1999-02-24
// Created by: Christian CAILLET
// Copyright (c) 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 L... |
#pragma once
//
// structs resolved with ResolveAllStructs
//
extern SYM_FIELD g_StructPoolDescriptor[];
extern SYM_FIELD g_StructEprocess[];
extern SYM_FIELD g_StructMmSessionSpace[];
extern SYM_FIELD g_StructKPRCB[];
extern SYM_FIELD g_StructGeneralLookasidePool[];
//
// functions
//
extern HRES... |
#pragma once
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>
#include <iomanip>
#include <sstream>
using namespace std;
class Dictionary
{
friend class Board;
public:
void toUpperWord(string &word);
bool isValid(string word);
void extractMeanings(string lin... |
#include <fstream>
#include <iostream>
#include <algorithm>
#define infinit INT_MAX
using namespace std;
struct muchie
{
int vi, vf;
double cost;
};
int minim(double *distanta, int *viz, int n)
{
int u = -1;
double distanta_min = infinit;
for(int i=1 ; i<=n ; i++)
if(viz[i] == 0 && distan... |
#include <iostream>
#include <GYH_INIT.h>
using namespace std;
int main(){
GYH_init();
int n;
scanf("%d",&n);
int x;//最小距离
int y;//记录小于0的个数
while(scanf("%d",&x)){
}
return 0;
}
|
#include "TestObject.h"
#include <iostream>
TestObject::TestObject()
{}
TestObject::TestObject(int value):value(value)
{}
void TestObject::DoSomething()
{
std::cout << "Doing something" << std::endl;
}
void TestObject::DoSomethingConst() const
{
std::cout << "Doing something const" << std::endl;
}
int TestObject... |
/*
This file is part of SMonitor.
Copyright 2015~2016 by: rayx email rayx.cn@gmail.com
SMonitor 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 3 of the License, or
(at your option) any later ver... |
// Created on: 2020-01-31
// Created by: Svetlana SHUTINA
// Copyright (c) 2020 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 Lesser General Public License version 2.1 as p... |
// RsaToolbox includes
#include "General.h"
#include "VnaTrigger.h"
#include "VnaChannel.h"
#include "Vna.h"
using namespace RsaToolbox;
// Qt includes
#include <QString>
VnaTrigger::VnaTrigger(QObject *parent) :
QObject(parent)
{
placeholder.reset(new Vna());
_vna = placeholder.data();
_channel.re... |
// -------------------------------------------------------------------------------
//
// DXライブラリアーカイバ Ver5
//
// Creator : 山田 巧
// Creation Date : 2003/09/11
// Version : 1.02
//
// -------------------------------------------------------------------------------
//#define INLINE_ASM
// include ---------------... |
#pragma once
namespace SALES
{
const int QUARTERS = 4;
class Sales
{
double sales[QUARTERS]{ 0 };
double average=0;
double max=0;
double min=0;
//copy the lesser of 4 or n items from the array ar
//to the sales member of s and computes and stores the
//average, maximum, and minimum values of the entere... |
#include "renderer/Konstants.hpp"
#include "renderer/IndexBuffer.hpp"
#include "resources/Chunk.hpp"
#define LIGHT_MIN 0.4f
#define LIGHT_MAX 0.9f
#define LIGHT_OFF 0.02f
class World {
public:
bool wireframe;
private:
Shader* block_shader;
Shader* sun_shader;
ui32 view_distance;
ui32 DirtTextu... |
#define MOD 1000000007
int Solution::hammingDistance(const vector<int> &A) {
long long int n = A.size();
long long int ans = 0;
long long int curr = 0;
for (long long int i = 0; i < 32; i++)
{
curr = 0;
for (long long int j = 0; j < n; j++)
{
if (A[j] & (1 << i))
curr++;
}
ans += (2 * curr * (n... |
/* -*- Mode: c++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*-
**
** Copyright (C) 2011 Opera Software ASA. All rights reserved.
**
** This file is part of the Opera web browser.
** It may not be distributed under any circumstances.
*/
#ifndef EXPONENTIALGROWTHFILE_H
#define EXPONENTIALGROWTHFILE_H
#incl... |
#pragma once
#include "Shape.h"
#include "Triangle.h"
#include "Sphere.h"
#include <vector>
namespace RayTracer
{
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::D... |
#ifndef GROUND_H
#define GROUND_H
#include<iostream>
#include "SFML/Graphics.hpp"
class Ground
{
public:
Ground(sf::RenderWindow& windowPtr);
bool update(bool moveDetected, int direction, sf::FloatRect playerBound);
sf::Vector2i groundedCheck(sf::Vector2f playerorigin);
... |
// Author: Miles Meacham
// Course: CS-1410-X01-deBry-Fall 2015
// Instructor: Professor deBry
// File: Person.cpp
// Date: 9/27/2015
// Contents: project03 The cpp file for the "Person" class
// I delcare that the following source code was written solely by me, or provided by the instructor.
// I understand that cop... |
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
int sec = n;
int ans = 0;
for (int i = 2; i < n+1; i++)
{
n -= i;
if(n==0){
break;
}
else if (n%i==0)
{
ans += 1;
}
// cout... |
/***********************************************************************
h£ºNoiseMeshManager
************************************************************************/
#pragma once
namespace Noise3D
{
class /*_declspec(dllexport)*/ IMeshManager:
public IFactory<IMesh>
{
public:
IMesh* CreateMesh... |
// Copyright (c) 2019 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 Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special ... |
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
int* countDuplicates(int* arr){
int condensed[] = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
int condensedIndex = 0;
int lenBit = 4;
// int arr[] = {1,1,1,1,1,1,1,1,1,1,0,0,... |
//
// This file contains the C++ code from Program 5.1 of
// "Data Structures and Algorithms
// with Object-Oriented Design Patterns in C++"
// by Bruno R. Preiss.
//
// Copyright (c) 1998 by Bruno R. Preiss, P.Eng. All rights reserved.
//
// http://www.pads.uwaterloo.ca/Bruno.Preiss/books/opus4/programs/... |
//知识点:二分图匹配/匈牙利算法
/*
二分图匹配模板
使用匈牙利算法
详见注释
*/
#include<cstdio>
#include<cstring>
#include<ctype.h>
#define int long long
using namespace std;
//===================================================
const int MARX = 1e3+10;
int n,m,e,ans;
bool road[MARX][MARX] , vis[MARX];
int hus[MARX];//hus为int,误写成bool... |
// Copyright 2012 Yandex
#include <boost/filesystem/path.hpp>
#include <stdlib.h>
#include <string>
#include "gtest/gtest.h"
#include "ltr/data/object.h"
#include "ltr/data/data_set.h"
#include "ltr/data/utility/io_utility.h"
#include "ltr/data/utility/data_set_converters.h"
#include "ltr/utility/random_number_ge... |
#include<bits/stdc++.h>
using namespace std;
main()
{
int a, b, c, d;
while(cin>>a>>b>>c>>d)
{
int p , q;
p = max(3*a/10, a-((a*c)/250));
q = max(3*b/10, b-((b*d)/250));
if(p > q)printf("Misha\n");
else if(p < q)printf("Vasya\n");
else
printf("Tie\... |
/*
* =====================================================================================
*
* Filename: hello.cpp
*
* Description: First Hello World in C++
*
* Version: 1.0
* Created: 04/02/2019 08:55:12 AM
* Revision: none
* Compiler: gcc hello.cpp -o hello.out -lm
... |
class Ikarus;
class Ikarus_DZE: Ikarus {
vehicleClass = "DayZ Epoch Vehicles";
displayname = $STR_VEH_NAME_IKARUS_BLUE;
crew = "";
typicalCargo[] = {};
class TransportMagazines {};
class TransportWeapons {};
supplyRadius = 1.8;
};
class Ikarus_TK_CIV_EP1;
class Ikarus_TK_CIV_EP1_DZE: Ikarus_TK_CIV_EP1 {
vehicl... |
#include "function.cpp"
int main(void)
{
fflush(stdin);
struct lista *ctl[15];
int i,i1,i2,j,n,k,v,v1,b,b1;
for (i=0;i<15;i++)
tl[i]=NULL;
system("cls");
printf("Introdu numarul de virfuri n=");scanf("%d",&n);
printf("Introdu lista de adiacenta\n");
for (i=1;i<=n;i++)
{
printf("%d->",i);
do
{
scanf("... |
#include "../include/Actor.h"
#include "../include/WindowInfo.h"
#include "../include/Camera.h"
namespace gnGame {
Actor::Actor()
: velocity()
, bounds()
, intersectPoint()
{
}
bool Actor::fallScreen(float _fallBorder)
{
auto deathBorder = _fallBorder + 64.0f;... |
#include "BattleFighter.h"
BattleFighter::BattleFighter()
{
}
BattleFighter::~BattleFighter()
{
} |
//
// Created by Данил Козловский on 2019-03-27.
//
// Ported from JAVA
//
#include "math.h"
#include "Vec2I.h"
int x, y;
Vec2I::Vec2I() {
setTo(0, 0);
}
Vec2I::Vec2I(int x, int y) {
setTo(x, y);
}
int Vec2I::getX() {
return x;
}
int Vec2I::getY() {
r... |
#include "ControlFlujo.h"
int main(int argc, char *argv[]) {
new ControlFlujo();
return 0;
}
|
#pragma once
namespace ngn {
class App
{
public:
virtual ~App() {}
virtual void run() = 0;
};
typedef App* CreateAppFunc();
typedef void DestroyAppFunc(App*);
} // namespace ngn
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
typedef struct table { //struktura tabulky
int data;
struct table* next;
};
struct table* insertChaining(struct table* table, int key, int *sizeOfTable, int *countOfNumbers);
struct table* init(struct table* table, int ... |
// This file was generated based on /Users/r0xstation/18app/src/.uno/ux13/CollapsibleList.g.uno.
// WARNING: Changes might be lost if you edit this file directly.
#pragma once
#include <Uno.UX.Template.h>
namespace g{namespace Uno{namespace UX{struct Property1;}}}
namespace g{namespace Uno{namespace UX{struct Selector... |
#include <Arduino.h>
#include <SPI.h>
#include <w25q64.hpp>
unsigned char writePage[256];
unsigned char readPage[256];
byte chipId[4] = "";
w25q64 spiChip;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
delay(5000);
spiChip.begin();
spiChip.getId(chipId);
// Print ID
Seria... |
#pragma once
#include "..\Common\Pch.h"
#define PLANE_ELIPSON 5.0F
class Frustum
{
public:
Frustum();
~Frustum();
void SetFrustum(D3DXMATRIX viewproj);
bool CheckPoint(D3DXVECTOR3 position);
bool CheckShpere(D3DXVECTOR3 position, FLOAT radius);
private:
D3DXPLANE mPlane[6];
}; |
//Picked from http://home.iitk.ac.in/~sshekh/codes/notebook.html
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
#define REMOVE_REDUNDANT true
typedef double T;
const T EPS = 1e-16;
struct PT {
T x, y;
PT() {}
PT(T x, T y) : x(x), y(y) {}
PT(const PT &p) : x(p.x), y(p.y) {}
PT opera... |
// Example 12.2 CBLAS, Lapacke
// Created by Oleksiy Grechnyev, IT-JIM 2020
// Documentation : https://software.intel.com/en-us/mkl-developer-reference-c
#include <iostream>
#include <vector>
#include <complex>
#include <cblas.h>
#include <lapacke.h>
using namespace std;
//======================================
vo... |
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
const long long M = 1000000007;
vector<int> v;
int main()
{int n,t = 0;
while (scanf("%d",&n) != EOF)
v.push_back(n);
sort(v.begin(),v.end());
int MAX = v.back();
long long mul = 1,sav = 1;
for (int i = 1;i <= MAX; i++)
{... |
#pragma once
#include "plbase/PluginBase.h"
#include "CBox.h"
#pragma pack(push, 1)
class PLUGIN_API CColBox : public CBox
{
public:
unsigned __int8 m_nMaterial;
unsigned __int8 m_nFlags;
unsigned __int8 m_nLighting;
unsigned __int8 m_nLight;
void Set(CVector const& sup, CVector const& inf, unsigned char mate... |
// -*- C++ -*-
/*!
* @file SpaceNavigatorWin32COM.h
* @brief Space Navigator device access class for Win32
* @date $Date$
* @author Noriaki Ando <n-ando@aist.go.jp>
*
* Copyright (C) 2007 Noriaki Ando
* All rights reserved.
*
* $Id$
*
*/
#pragma once
#import "progid:TDxInput.Device.1" n... |
#include "stackedwidget.h"
QSize StackedWidget::sizeHint() const
{
return currentWidget()->sizeHint();
}
QSize StackedWidget::minimumSizeHint() const
{
return currentWidget()->minimumSizeHint();
}
|
#include<cstdio>
#include<iostream>
#include<string>
#include<queue>
#include<algorithm>
#include<cstdio>
#include<deque>
#include<iomanip>
#include<fstream>
using namespace std;
class card{
public:
char color,size;
card(char a,char b):size(a),color(b){
}
int sizeToInt(){
switc... |
#include "gtest/gtest.h"
#include "../../../options/Option.hpp"
#include "../../../binomial_method/case/Case.hpp"
#include "../../../../binomial_method/method/regular/euro/EuroBinomialMethod.hpp"
#include "../../../../binomial_method/case/CroxRossRubinsteinaCase.hpp"
#include "../../../../options/OptionCall.hpp"
#inclu... |
// Copyright (c) 2022 ETH Zurich
//
// 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/modules/execution.hpp>
#include <pika/testing.hpp>
#include <pika/executio... |
#include <iostream>
using namespace std;
// A function that takes a string and checks if is a number
bool checkNumber(string);
int main(void) {
string str;
cout << "Enter a number: " << endl;
cin >> str;
if (checkNumber(str))
cout << "The input is a number!" << endl;
else
... |
#ifndef _PLATE_1D_PLATE_
#define _PLATE_1D_PLATE_ 1
#include "plate_var_types.h"
#include <math.h>
#include <complex>
using std::complex;
class Plate
{
public:
PL_NUM E1; //Young's modulus
PL_NUM E2; //Young's modulus
PL_NUM nu21; //Poisson's ratio
PL_NUM rho; //composite's density
PL_NUM sigma_x; ... |
#include<iostream>
#include <fstream>
#include<string>
#include<graphics.h>
#include<math.h>
using namespace std;
class Body{
public:
double x,y,m;
double ax, ay;
string name;
};
class Universe {
public:
Body *s;
//garaguudiin medeelliig hadgalna
double g, **gForce;
int n;
//f huchnii ... |
/*
* Copyright (c) 2021 Morwenn
* SPDX-License-Identifier: MIT
*/
#ifndef CPPSORT_DETAIL_CARTESIAN_TREE_SORT_H_
#define CPPSORT_DETAIL_CARTESIAN_TREE_SORT_H_
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <cstddef>
#inclu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.