blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 247 | content_id stringlengths 40 40 | detected_licenses listlengths 0 57 | license_type stringclasses 2
values | repo_name stringlengths 4 111 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 58 | visit_date timestamp[ns]date 2015-07-25 18:16:41 2023-09-06 10:45:08 | revision_date timestamp[ns]date 1970-01-14 14:03:36 2023-09-06 06:22:19 | committer_date timestamp[ns]date 1970-01-14 14:03:36 2023-09-06 06:22:19 | github_id int64 3.89k 689M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 25
values | gha_event_created_at timestamp[ns]date 2012-06-07 00:51:45 2023-09-14 21:58:52 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-08-24 19:49:39 ⌀ | gha_language stringclasses 159
values | src_encoding stringclasses 34
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 7 10.5M | extension stringclasses 111
values | filename stringlengths 1 195 | text stringlengths 7 10.5M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0325fd045936e6d462b8c409f97edc08b474d89d | b1f90b1061de9e5454fd0033e0d4d7c25e28c0cc | /pub_desired_states/src/pub_desired_states.cpp | 522c603b8eaa6deb418ffc943f8cbe883d7cb189 | [] | no_license | OsvaldoSH/turtlebot_control | d2df49d84a63ad153ec67f6a98581f4843d33296 | a1bcb7a22482c8aa082f352dc9ca42fb0f2bd330 | refs/heads/master | 2023-01-02T01:32:49.031085 | 2020-10-26T19:55:29 | 2020-10-26T19:55:29 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,860 | cpp | pub_desired_states.cpp | #include <pub_desired_states.h>
// constructor -----------------------------------------------------------------
DesiredStates::DesiredStates(ros::NodeHandle &nh): nh_(nh){
initializePublishers(); // initialize publishers
initializeServices(); // initialize services
loadParameters(); ... |
e40e6e6800eb24a7a86772e09c8c850481de3f01 | 81da123c0e0d9b750fe1eab7994bf214001babf7 | /src/pyprogressivex/include/progressivex_python.h | 27e91f9b95efa10add8c05e02bd8082f5a1ba604 | [] | no_license | ashishd/progressive-x | 9db2da9ba5e1b0564a0e2091edcbb8227313e0a9 | 81638a614da91379ab1b57e8f720b76d8a2410b9 | refs/heads/master | 2023-04-03T21:15:43.688945 | 2021-04-26T11:13:59 | 2021-04-26T11:13:59 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,470 | h | progressivex_python.h | #include <vector>
#include <string>
int find6DPoses_(
const std::vector<double>& imagePoints,
const std::vector<double>& worldPoints,
const std::vector<double>& intrinsicParams,
std::vector<size_t>& labeling,
std::vector<double>& homographies,
const double &spatial_coherence_weight,
const double &threshold,
co... |
fdcf258a3038f9c057433609fcb4cb3097c1a174 | 7f48f869db81c354c4e6db3a461e351d64366568 | /sort/8.Count_Sort.cpp | fd8cce6c837d9433b35087a23fb2dddb3c613f45 | [] | no_license | caogenwang/suanfa | 83566622f7014ad2d50d9cb1d137aa1b15944b4d | c4620a951f4034d5c45a590334eee326ad5c9e4b | refs/heads/master | 2023-07-07T09:13:18.795136 | 2021-08-05T09:15:19 | 2021-08-05T09:15:19 | 285,454,647 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,796 | cpp | 8.Count_Sort.cpp | #include <stdio.h>
#include <stdlib.h>
void count_sort(int *a,int length)
{
int max = 0;
if (length < 2 || a == NULL)
{
return;
}
for (int i = 0; i < length; i++)
{
if (a[i] > max)
{
max = a[i];
}
}
int len = max+1;
int *b = new int[len];
... |
df6c3dd43e74f313206ff3916e9c90a660a70e52 | 0675b8d9aed88610951e18934fd278e09be5966e | /VkWindow.cpp | 0e48c2bb08b04dcbc6ac19048066e6f14bd12378 | [] | no_license | Tempest12/vulkan_meme | 85385c26acd88e5b9b3b72cbbbee284cea33babe | ceb07baf9a275e81665751a39295e91bc2cb8ed3 | refs/heads/master | 2020-04-25T07:13:01.690845 | 2019-02-27T01:12:26 | 2019-02-27T01:12:26 | 172,607,229 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,459 | cpp | VkWindow.cpp | #include <iostream>
#include <GLFW/glfw3.h>
#include "Config.hpp"
#include "Log.hpp"
#include "Main.hpp"
#include "VkWindow.hpp"
VkWindow::VkWindow(void)
{
// Get Window Config:
this->windowHeight = Util::Config::convertSettingToInt("Window", "window_height");
this->windowWidth = Util::Config::convertSet... |
a6af6f3d44d4f3b5e759b23b5e7f9d4c3f1c9feb | 7160765013ad691342fc403e78b141ac579b7fb8 | /Ship.cpp | c46284af32e856bf12f5e692ec50ffa5949732e1 | [] | no_license | kylxbn/kanji-invaders | ba1a7a944e2e68dbd6fb737fd5f681179b1387c1 | 6da9932d41275083f2bedc222abaa4867bbb9d30 | refs/heads/master | 2023-06-26T10:42:25.944758 | 2020-01-25T15:47:58 | 2020-01-25T15:47:58 | 349,651,810 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,921 | cpp | Ship.cpp | #include <SDL.h>
#include <string>
#include <cstdlib>
#include "Ship.h"
#include "EnemyMissile.h"
#include "Boss.h"
Ship::Ship(SDL_Window* w, SDL_Renderer* r, Enemy* el[], int* ec, EnemyMissile* em[], int* EMSize, Boss* b)
{
enemyList = el;
enemyCount = ec;
missileList = em;
missileCount = EMSize;
... |
c196e06fb4c16600059e4a41343945be5510080e | 6c755bc109be462652ebd321145aa930f20726cd | /1/2_Cuatrimestre/MP/Practicas/vectores/rangos.cpp | 8aaf084dcde0d6866fdf5098cc76731b65f7e1fd | [] | no_license | jagolu/Universidad | 150dcbc66a087dd09849b126076f92e022faeba7 | e26fa9847167ab3919d700bcb975e0b1fd813839 | refs/heads/master | 2021-01-19T00:40:38.709662 | 2019-07-02T15:01:58 | 2019-07-02T15:01:58 | 73,117,449 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 2,634 | cpp | rangos.cpp | #include <iostream>
#include <cstdlib> // rand, atoi
#include <ctime> // time
#include <iomanip> // setw
using namespace std;
// Genera un valor del intervalo [minimo,maximo]
inline
int Uniforme(int minimo, int maximo)
{
double u01= std::rand()/(RAND_MAX+1.0); // Uniforme01
return minimo+(maximo-minimo+1)*u01;
}
... |
a29a6647549647f29af288f20fccbea0e9eb322e | d2190cbb5ea5463410eb84ec8b4c6a660e4b3d0e | /hydra2-4.9w/particle/hparticledef.h | 1c5c06ff61a91c0acac5aaeca9763d0e2d9feb99 | [] | no_license | wesmail/hydra | 6c681572ff6db2c60c9e36ec864a3c0e83e6aa6a | ab934d4c7eff335cc2d25f212034121f050aadf1 | refs/heads/master | 2021-07-05T17:04:53.402387 | 2020-08-12T08:54:11 | 2020-08-12T08:54:11 | 149,625,232 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 12,951 | h | hparticledef.h | #ifndef __HPARTICLEDEF_H__
#define __HPARTICLEDEF_H__
#include "Rtypes.h"
#include "haddef.h"
typedef Float16_t SmallFloat;
const Cat_t catParticleCand = PARTICLE_OFFSET + 1;
const Cat_t catParticleEvtInfo= PARTICLE_OFFSET + 2;
const Cat_t catParticleDebug = PARTICLE_OFFSET + 3;
const Cat_t catParticleCal = PA... |
42d36927f17a6f449936b4359bc20e9d930207e5 | 82dac3ee9a1bc656f3fc8b68620c3fd430af6bb5 | /Assignment2/source/Library.Shared/PerspectiveCamera.h | 2ffd7831c28624827111453436204240aaccf87b | [
"MIT"
] | permissive | Siddhant628/Solar-System | 3465fc50b80f4024d51460adac49b6ba719fc99e | 9f34e9f3f169c518f1e503b1b3f470e6ba486297 | refs/heads/master | 2021-01-25T00:56:47.283331 | 2017-06-18T18:13:56 | 2017-06-18T18:13:56 | 94,703,938 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 938 | h | PerspectiveCamera.h | #pragma once
#include "Camera.h"
namespace Library
{
class GameTime;
class PerspectiveCamera : public Camera
{
RTTI_DECLARATIONS(PerspectiveCamera, Camera)
public:
explicit PerspectiveCamera(Game& game);
PerspectiveCamera(Game& game, float fieldOfView, float aspectRatio, float nearPlaneDistanc... |
beb34b02e24e1e0dbf07c311e0ae1274572841f5 | 4d93f9e68a169d03714f5151ecd26a6acffc6aa5 | /841Graph.cpp | 16ba0695166145e7f00da549904645220520e67d | [] | no_license | ShenpaiSharma/LeetCode | 4baf54662f45e1cedbd94129f2acf71dfeb67b28 | edd0a90746220277888897a5e6d261c5a180fa8e | refs/heads/main | 2023-02-27T16:06:15.534460 | 2021-01-19T11:24:22 | 2021-01-19T11:24:22 | 308,933,059 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,133 | cpp | 841Graph.cpp | class Solution {
public:
bool canVisitAllRooms(vector<vector<int>>& rooms) {
int N = rooms.size();
set<int> s;
vector<int> adj[N];
s.insert(0);
for(int i : rooms[0])
{
adj[0].push_back(i);
//adj[i].push_back(0);
s.insert(i);
... |
6ae7da07ef5c59460e15ef0b062b7fe5861d1d7a | fb8f6ed488306216e88996d52caf1df0a7e0b603 | /343. Integer Break-Dynamic.cpp | dd8060cc25c8b94fc419dd72b0a4931136dd058a | [] | no_license | YiranCdr/SuYiran-15336161-AlgorithmsTestFromLeetCode | 9916e5880883c6fde13963e86755fd092fec80b5 | d543fe2f7df8e7ac3f269784a91990b5b6e42672 | refs/heads/master | 2021-01-20T13:26:50.909476 | 2017-07-13T07:58:00 | 2017-07-13T07:58:00 | 82,690,619 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,329 | cpp | 343. Integer Break-Dynamic.cpp | /*
Description
Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get.
For example, given n = 2, return 1 (2 = 1 + 1); given n = 10, return 36 (10 = 3 + 3 + 4).
Note: You may assume that n is not less than 2... |
48c1e4a2aaba36715429bff57cbce89c9ce5e178 | c8a413bc4f470e0a9e6d4f60a48b9de9014ab25a | /LeetCode/Data Structures/BlackRed Tree.h | b9d923a88d92466a8ff18fc9941e67ebe77bad1d | [] | no_license | mversace/LeetCode | cc97646d23c6613b1eb13033395f47c6208a5c3f | 7082cf94f1e7f7066c18d75015417fec413acea0 | refs/heads/master | 2021-09-14T20:59:50.661130 | 2018-05-19T13:54:47 | 2018-05-19T13:54:47 | 115,349,790 | 1 | 0 | null | null | null | null | GB18030 | C++ | false | false | 1,720 | h | BlackRed Tree.h | #pragma once
/*
红黑树
通过左旋,右旋达到相对平衡的二叉树结构
*/
#include "ITree.h"
class CBlackRedTree : public ITree
{
public:
virtual tTreeData* AddNodeChild(int nValue) override;
virtual tTreeData* DelNodeChild(int nValue) override;
private:
void FixTheTree(tTreeData* pNode);
void LeftRotate(tTreeData* pNode);
void RightRotate(... |
d21c7bdc2c9ae0598cde9e1d1ef43fa11d11e598 | 2d6f3851b9a14c7fa4327d5ba09451e64964e07c | /src/palladio/AttributeConversion.h | 42b70641fcec3de20650e9e2242ac2e23231ecb6 | [
"LicenseRef-scancode-proprietary-license",
"Apache-2.0"
] | permissive | LTHODAVDOPL/palladio | 84d0666bd94dfad761f29a11b0d18a3366293f28 | c527c474e6f05ebae7723c71a017b4d2c8079267 | refs/heads/master | 2020-07-03T06:17:37.717662 | 2019-07-30T10:18:08 | 2019-07-31T06:45:36 | 201,816,999 | 1 | 0 | Apache-2.0 | 2019-08-11T21:31:30 | 2019-08-11T21:31:30 | null | UTF-8 | C++ | false | false | 2,487 | h | AttributeConversion.h | /*
* Copyright 2014-2019 Esri R&D Zurich and VRBN
*
* 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... |
0767e50c64962deea7c6e6ae48cd71f2b49113ea | 226b8f01fe88e4abfbc548e4aeee50926d06a4e5 | /inverterselection.h | fff62d131bc89cd2be2ea2c0f4cf57a81a491c9f | [] | no_license | MaciekMr/SofarInverter | 962b5d5f364303d8422262dd6e878e92263d781c | 870c404ac765287df8638be86b6720081428e21d | refs/heads/master | 2020-07-22T09:06:34.486758 | 2019-10-24T22:20:09 | 2019-10-24T22:20:09 | 207,143,565 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,824 | h | inverterselection.h | #ifndef INVERTERSELECTION_H
#define INVERTERSELECTION_H
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox>
#include <QtWidgets/QListView>
#include <QtWidgets/QListWidget>
#include <QDialog>
#include <list>
/* XPM */
static char *inverter_i... |
796d8829283e4986a811208176bea2bd8f6ed416 | 547e4922462dd4c433fca776fd7cb4ed9d9a41fe | /BMS/display.ino | f7149c8d58efd64e078eded9f0572371d3dd9dde | [] | no_license | MoAlbrecht/BMS-Lab_FSB3 | 4b1d11e9646b7a0c45de4db2099c71a97ebbd306 | 5d853380e405030caf32576c7e37505c3e355563 | refs/heads/main | 2023-09-04T23:29:19.745828 | 2021-11-25T07:14:26 | 2021-11-25T07:14:26 | 429,392,453 | 0 | 1 | null | 2021-11-18T10:50:03 | 2021-11-18T10:50:03 | null | UTF-8 | C++ | false | false | 3,275 | ino | display.ino | void showMeasurementValues()
{
static uint32_t lastCall = 0;
int i;
// do not call more often than once per second
if (millis()-lastCall < 1000)
return;
lastCall = millis();
// write Cell Voltages on screen
for (i = 1; i <= 4; i++)
{
writeText(i*68-52, 4, 2, "V"+String(i), ILI9341... |
08b77d371d0e5562a6dbba24e530a39c33587145 | 14c4f791145458872cadb6b13ef07dc7f0a1b512 | /src/core/Edge.h | 18fa6b3403673d9549f7b03b3c17fddda1bf0047 | [
"MIT"
] | permissive | wrvsrx/mesh_simplify | 98903f9bc405ecaf2c4acc54a5dbba7845452341 | 9f0ca979e4c25d9a140ea37b61fccd49fc3e944d | refs/heads/master | 2021-02-14T11:41:57.284297 | 2020-04-04T12:55:27 | 2020-04-04T12:55:27 | 244,801,496 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 385 | h | Edge.h | #pragma once
#include "Vec.h"
#include <cstddef>
#include <utility>
class Edge {
public:
Edge(std::size_t rank1, std::size_t rank2);
double cost_;
Vec<double, 3> position_;
std::pair<std::size_t, std::size_t> pair_;
bool ischanged_;
bool isdeleted_;
protected:
friend bool operator==(Edge const &, Edge c... |
138f56d4edd6ec2504a3c09fe5aac81551f263d7 | 449f6ef1fc08dd2cfca73ef76b47a625e278ad30 | /7-object-oriented-design/book-reader.cpp | f9b5410315da3b3fad869fd0ace1ee7c5a32753d | [] | no_license | jfur1/CTCI | c2e94b01ef5e645b2454334cd5fe4c9b078cfe5b | 44cf2ab3c8db4014ba5c1b59e931fc3686ddf929 | refs/heads/master | 2023-05-29T11:33:42.919363 | 2021-06-15T19:15:05 | 2021-06-15T19:15:05 | 271,900,440 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,243 | cpp | book-reader.cpp | /*
Author: John Furlong
Date: June 12, 2020
Description: Online Book Reader
Design the data structures for an online book reader system.
*/
#include <iostream>
using namepsace std;
struct Page{
int page_num;
string contents;
int chapter;
};
class Book{
private:
int year;
int bookID... |
ee5591efde626b9f8d2d70f9ebad976a65ebd864 | e74668cefe292c4817da81e8b38ec0fe29011713 | /Logica de programacao/22_54.cpp | bfad13eea75e53dbcc8f854e6da7d08dd08c97c6 | [] | no_license | Evandr0/Senai | 398ef01d3c563369f9fae13e82084d447d9661d2 | 198f45db5ed301d26b7c90a2bf7833110ca20ace | refs/heads/master | 2021-06-18T02:32:22.108072 | 2021-06-08T00:35:54 | 2021-06-08T00:35:54 | 192,743,233 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,001 | cpp | 22_54.cpp |
float descontoassociado = 0, desconto = 0, multa = 0, total, valor1;
String nome, convenios, s, n, imprimir;
int dias;
//==================== Desconto por tempo(dias) ====================
int diaria1 = 5, diaria2 = 10, diaria3 = 11;
//==================== Valor das diarias =====================
int d1 = 100, d2 = 9... |
d52ba0f22e57a9d815ab814d307d7d8e7598f752 | 01d95aedc9106ec6439dd25dd2437b24c34dfbf0 | /Classes/HUDLayer.h | 6b33c9ddccd8cca0cc810dd1bae4d56a58cb8a40 | [] | no_license | antiwise/chickencrossing-windows | dda6eb4509572700da6aa237a9bc2f8a5f64a585 | e293b1d81abe55164993e20105c1b70b1ba61104 | refs/heads/master | 2021-01-19T18:32:32.591952 | 2015-02-26T04:18:02 | 2015-02-26T04:18:02 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,031 | h | HUDLayer.h | #ifndef __HUDLAYER_H__
#define __HUDLAYER_H__
#include "cocos2d.h"
using namespace cocos2d;
//http://www.raywenderlich.com/40544/cocos2d-x-tile-map-tutorial-part-2
class HudLayer : public cocos2d::CCLayer
{
private:
CCLabelTTF * _highScoreLabel;
CCLabelTTF * _scoreLabel;
CCLabelTTF * _livesLabel;
CCLabelTT... |
4a2ff9f2685676b1bfffc11ca1c3769484c7f2f0 | 8c36e1298fe85c83f09fcbeb7781efc53b4cd5ca | /Source/BrickBreak/level/brick/EngineeringBrick.cpp | b9ca7520aeb769f18a2b09d4a2b841ffe95367b2 | [] | no_license | MihaiAlexandru1606/EGC---Brick-Breaker | 1891e6168e1f6aa72ed6bfca045f5ffcff6088ee | 2da06d98c107cedbdc96fba19cf566ecad0ba9c2 | refs/heads/master | 2020-04-22T20:47:21.426435 | 2019-02-14T11:02:22 | 2019-02-14T11:02:22 | 170,652,216 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 350 | cpp | EngineeringBrick.cpp | #include "EngineeringBrick.h"
EngineeringBrick::EngineeringBrick(float startX, float startY):
Brick(startX, startY)
{
this->resistance = 7;
}
EngineeringBrick::~EngineeringBrick()
{
}
std::string EngineeringBrick::getName()
{
return std::string("engineeringBrick");
}
void EngineeringBrick::reset()
{
Brick::rese... |
d9beb1e338c97ba51e1eb0be5679c104fb3ee5bf | de5e86c71ff55cfb93514771dea1f6a940462887 | /worker.cpp | b73e6f19e6b24ccb0a708f6a25491d95321f32c8 | [] | no_license | USgHIFU/ViewTest | acfe58baef063699314cdb04b8ab2c3bfc0611a6 | f6860bf80e36f4f2fee21960033289cfeddef64f | refs/heads/master | 2016-08-04T08:58:42.227805 | 2015-08-30T09:21:32 | 2015-08-30T09:21:32 | 41,622,914 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 829 | cpp | worker.cpp | #include <QDebug>
#include "worker.h"
worker::worker(QObject *parent) : QObject(parent)
{
}
void worker::setScene(DispWidget* myScene)
{
m_scene = myScene;
}
void worker::doWork()
{
qreal width = m_scene->sceneRect().width();
qreal height = m_scene->sceneRect().height();
QPointF topLeft = m_scene->sc... |
af6ac45237bbd75386ae0ff3cffc10680d75a4a3 | eafc5ac599f2e96c3ca61612abb109eba2abe655 | /customSolvers/edcSimpleFoam/run/flameD_EDC/constant/polyMesh/faces | 75cc5f05cbedd8524b3d966176777f658be6596a | [] | no_license | kohyun/OpenFOAM_MSc_Thesis_Project | b651eb129611d41dbb4d3b08a2dec0d4db7663b3 | 11f6b69c23082b3b47b04963c5fc87b8ab4dd08d | refs/heads/master | 2023-03-17T22:34:57.127580 | 2019-01-12T07:41:07 | 2019-01-12T07:41:07 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 418,174 | faces | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5.x |
... | |
a5902d0a9ad1e07a507b84763a39064e64f23f14 | c6809536f38d3034124eb0455464eafd33306e88 | /coursera2.2.6.cpp | 2821d988614f4860d00bec84d45033e53b44e4ea | [] | no_license | Saurabhsahab/Coursera-Algorithm-Toolbox-Assignments-Solutions | 7eb655d5882cf2f67a9d7cd14fb7385cc109e786 | 335dcf41130157313bfcf26d9a8d0c22d86b7f26 | refs/heads/master | 2023-02-09T08:44:02.427399 | 2020-12-31T18:20:10 | 2020-12-31T18:20:10 | 254,121,195 | 3 | 5 | null | null | null | null | UTF-8 | C++ | false | false | 360 | cpp | coursera2.2.6.cpp | //Saurabhsahab
#include<bits/stdc++.h>
using namespace std ;
int main (){
long long int n,p=2,i,j,k;
cin>>n;
long long int a[100001];
a[0]=0;a[1]=1;
for(i=2;i<=100000;i++){
a[i]=(a[i-1]+a[i-2]+1)%10;
}
for(j=2;j<=100000;j++){
if(a[j]==0&&a[j+1]==1){
break;
}
e... |
1551918a64fcd95d9ef39fe98d7bcf0518c3a1f0 | 83dd1a88dfc15a9f82f7dc6753862f861fb665cb | /sumofnatural.cpp | 5313dee9bb489da5a9a6210954a96a5914b634f5 | [] | no_license | yuvatimankar/data-structures-cpp | 781bcb845a3381a4cc99e7ff6f0cc005a065c40a | ec9fee8e18694ab52bd4b2a1d717668ea6a04109 | refs/heads/main | 2023-07-19T06:14:39.805483 | 2021-09-22T02:53:42 | 2021-09-22T02:53:42 | 403,269,488 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 274 | cpp | sumofnatural.cpp | // sum of !st natural number using recusrion
#include<iostream>
using namespace std;
int sum(int n)
{
if(n==0)
return 0;
else
return sum(n-1)+n;
}
int main()
{
int n;
cin>>n;
int r;
r=sum(n);
cout<<r<<endl;
return 0;
} |
eca1a84786a53fe510ebe71528c50a54eb145d96 | 84085ec2fb0475253ca3bcfbc38dc9e1c0ab7d1f | /Assignment1-OOP/main.cpp | 9c38d0303e33009f9163871d7c470a3097a9cc4c | [] | no_license | whoule/GAME253_Assignment1 | ef5507153128e0f368787e54bfdeed8974b6a16f | 2030cd7c7a71210c7dc9772c0a937141f2b57c1b | refs/heads/master | 2021-04-05T23:36:23.671906 | 2018-03-12T20:09:14 | 2018-03-12T20:09:14 | 124,938,079 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 672 | cpp | main.cpp | //main.cpp
#include <iostream>
#include "Weapon.h"
#include "Player.h"
#include "Rifle.h"
int main() {
///Variables
///Weapon randomizes gun between primary, secondary and grenade
///Rifle is a primary weapon only class using inheritance
Weapon w1, w2, w3;
Rifle r1, r2;
Player p;
std::cout << "**************... |
9d6a5b16e1de59fc200b9b1a39b6b0dcfa814d02 | 6596b458f9585eead6e127f28e5248ff5be70705 | /Ch11/6/stonewt.cpp | a8a4bcfdbbcd99a7e7010a81360c097f36172e0a | [] | no_license | Tomev/SPrata | 5cff8fb82da0b3b3f2f2d85e78dff549851f5bec | 5558608ac611e9c67c967ae74b3406a8b90a99c2 | refs/heads/master | 2020-04-05T21:15:28.108573 | 2019-09-07T13:45:00 | 2019-09-07T13:45:00 | 157,214,139 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,340 | cpp | stonewt.cpp | //
// Created by Tomev on 23.08.2019.
// A Stonewt class implementation from S. Prata's C++ Primer Plus VI ed.
// Modified as instructed in problem 11.5.
// Note that I'm leaving methods I presented in the book as they were even if they are incorrect.
//
#include <iostream>
#include "stonewt.h"
using std::cout;
Sto... |
b8ce25efbbe3708aef26687015a4247374822c8a | 348929c1b3bbcf91de71f52c8d34c5c37160eda2 | /OOProjketovanje/OOP-LV5-Kalkulator/Qt_LV5_Kalkulator/widget.cpp | b72644a2418cf24dcf8f5128ff478f71ef550dbd | [] | no_license | pavle-doby/Elfak_lab_vezbe | 385c9592d9e23fa3d4d70e4cb7251387d40f3099 | 262ac7c75e719b82ac61e3f80b8608c4b401e966 | refs/heads/master | 2021-10-14T04:32:42.956300 | 2018-10-24T00:41:58 | 2018-10-24T00:41:58 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,494 | cpp | widget.cpp | #include "widget.h"
#include "ui_widget.h"
#include <QMessageBox>
#include <QPushButton>
Widget::Widget(QWidget *parent) :
QWidget(parent),
ui(new Ui::Widget),
kalkulator(new CalculatorLogic)
{
ui->setupUi(this);
setAllBtnExpanding();
poveziBtnSaSlotovima();
connect(kalkulator,SIGNAL(res... |
d70e1fddea20837acb6e8bca8d4902b2f7337166 | 27707bdfc9abb761dd98062390fc33c00178f1c6 | /oops9_5.cpp | aa38e18b006208ac358b06d0fcfcc277fb29ae84 | [
"MIT"
] | permissive | skyh0rn/Codechef | e1dfb60c52ecb3d1c30d48cc685794d6f9305e26 | 83821c0b6056e3d631ad1d3273b41727074537bb | refs/heads/master | 2023-04-15T08:16:50.120468 | 2021-05-08T06:14:17 | 2021-05-08T06:14:17 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 448 | cpp | oops9_5.cpp | #include<iostream>
using namespace std;
template<class t>
void swap1(t &a, t &b)
{
t c;
c=a;
a=b;
b=c;
}
int main()
{
int a=29;
int b=20;
float c=23;
float d=26;
cout<<"a before"<<a;
cout<<"b before"<<b;
cout<<"c before"<<c;
cout<<"d before"<<d;
swap1(a,b);
cout<<"a after"... |
6e2984cb7ec81888f07d7ef5818b53d7e8555ee8 | 21279d1f958c74164f83667d484fecdd7ab731e6 | /src/backend/saturnpos.cpp | 79072747b31efece7664d9beea082ef34f0b5380 | [] | no_license | thelastpolaris/SaturnPOS | 6b029dc0a658c7439887c5b3ede6aef05a546d62 | 3c4a71615edb836b6a89bac467fccbcb952ac683 | refs/heads/master | 2021-01-10T02:30:50.021291 | 2016-04-10T18:16:56 | 2016-04-10T18:16:56 | 50,136,760 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 712 | cpp | saturnpos.cpp | #include "saturnpos.h"
SaturnPOS* SaturnPOS::pinstance;
SaturnPOS::SaturnPOS(QObject *parent) : QObject(parent)
{
pinstance = this;
standardPath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
QDir sp(standardPath);
if(!sp.exists()) {
sp.mkpath(standardPath);
}
d... |
7e8292188ab1daa33cb984a4db9658c06b2d3250 | 31bf5ae2e9223537cd03bf3bb6c1ec02f51177df | /Library/Il2cppBuildCache/WebGL/il2cppOutput/UnityEngine.InputLegacyModule_Attr.cpp | cc0928608059706133de8783d96d684eec6d8d4e | [] | no_license | mattyucf/rubys-new-adventure | 5e949ffbdf02789b9a35c2e19f3ba6f0961e2afb | 7ce7b1396969ffa20f22505507d55a1b90da9ba8 | refs/heads/main | 2023-06-27T15:57:08.029864 | 2021-08-04T16:24:55 | 2021-08-04T16:24:55 | 392,371,463 | 0 | 0 | null | 2021-08-04T16:24:56 | 2021-08-03T15:56:50 | C# | UTF-8 | C++ | false | false | 130 | cpp | UnityEngine.InputLegacyModule_Attr.cpp | version https://git-lfs.github.com/spec/v1
oid sha256:90010e6358247c3380557d45e38c6b5a30a53e7558cdafbaa545d2bfca3af4ca
size 97323
|
155b875cfb2e3e672fe68ea284780f6829d18d37 | bceeb687ec01a75d66813aa38a164b251d3a80bb | /codice_vivado/codice_vivado_sep/test_func.cpp | af1559e52cf86646d5b28c94d66094f6acccab7f | [] | no_license | alsadiamir/SistemiDigitaliProgetto | e06b0f85ff4c97e0bb979b6eefe885a195572b17 | 258c8d29bd5b6cd54069d1a5cfcfce3be39249ef | refs/heads/master | 2021-07-01T16:45:33.900939 | 2021-03-23T08:45:49 | 2021-03-23T08:45:49 | 225,047,539 | 2 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 999 | cpp | test_func.cpp | #include "test_func.h"
unsigned int pseudo_random(unsigned int seed, int load) {
static ap_uint<32> lfsr;
if (load ==1 )
lfsr = seed;
bool b_32 = lfsr.get_bit(32-32);
bool b_22 = lfsr.get_bit(32-22);
bool b_2 = lfsr.get_bit(32-2);
bool b_1 = lfsr.get_bit(32-1);
bool new_bit = b_32 ^ b_22 ^ b_2 ^ b_... |
6f428c3a3fb0c0c4a1098c0d0e9fe392d5f13227 | 635c344550534c100e0a86ab318905734c95390d | /wpilibc/src/main/native/cpp/Compressor.cpp | 2479ffc1e397a6fedb3c90dd7cf47007786a985b | [
"BSD-3-Clause"
] | permissive | wpilibsuite/allwpilib | 2435cd2f5c16fb5431afe158a5b8fd84da62da24 | 8f3d6a1d4b1713693abc888ded06023cab3cab3a | refs/heads/main | 2023-08-23T21:04:26.896972 | 2023-08-23T17:47:32 | 2023-08-23T17:47:32 | 24,655,143 | 986 | 769 | NOASSERTION | 2023-09-14T03:51:22 | 2014-09-30T20:51:33 | C++ | UTF-8 | C++ | false | false | 2,585 | cpp | Compressor.cpp | // Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#include "frc/Compressor.h"
#include <hal/FRCUsageReporting.h>
#include <hal/Ports.h>
#include <wpi/sendable/SendableBu... |
352d0f0c6cc758025d358d4633635099dbbdc4af | 95fb0b0e11ce3dcac8b6321d6833ca0aaf1cb4a6 | /SlmInterface/waveWriter.inl | b0304a9f2543635af993bff1e4ac7b94720cbc5d | [] | no_license | parsley72/SlmInterface | efd639085f1bf301e982bb8483246b760325cc76 | d3efedd7b10c4625cf58f9420ee5a57444661058 | refs/heads/master | 2016-09-06T12:57:59.517380 | 2015-08-23T09:11:37 | 2015-08-23T09:11:37 | 26,071,277 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,874 | inl | waveWriter.inl | #ifndef _WAVEWRITER_H_
#error "do not include this file directly, include waveWriter.h instead"
#endif
#include <assert.h>
#include <fstream>
WaveWriter::WaveWriter( unsigned int bits, unsigned int samplerate, unsigned int channelmode ) :
_bits ( bits ),
_rate( samplerate )
{
assert( ( channelmode == WaveWriter::... |
727e8fd02d7c82199f49f60b373561827a547289 | 6cf2e78840970768168f583716e8826b1902dafa | /learning-dsa/work-in-uni/praktikum-daa/week-05/shkola.cpp | c69eb8a7371f7b0864f71eeca80837a270936ce7 | [] | no_license | dianvaltodorov/learning-code | e4b3e5034c68cdf9d1e38f8b6a12af1d51d2e167 | a92605345829e051c0b2420de6f3dfc1fe5eb65a | refs/heads/master | 2021-01-17T12:24:58.618311 | 2016-02-02T17:48:55 | 2018-06-21T06:53:16 | 49,488,021 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 603 | cpp | shkola.cpp | #include<iostream>
#include<vector>
#include<stdio.h>
#define MAXN 1<<9
int n, m, x, y;
using namespace std;
vector < vector < int > > ne;
int used[MAXN];
void dfs(int i)
{
used[i] = 1;
for(int k = 0; k < ne[i].size(); k++)
{
int cur = ne[i][k];
if(!used[cur])
{
dfs(cur);
}
}
}
int main... |
3bb97dfde142770fe14fc874f5c92f022f954b9e | 8438ba4a65b4b587271ee7d9a7cbe63ee594af0d | /EngineGlobals.hpp | 2e44076b41789e6c6db09e0266033563ab598a80 | [] | no_license | LGriggles/3DGameEngine | 1531b74b6c0bdef511eed1498a8daf3c8d526391 | e98da894655bfb073f934d0c6619ef573db5713d | refs/heads/master | 2016-09-06T17:42:40.785926 | 2015-03-29T01:51:44 | 2015-03-29T01:51:44 | 30,948,327 | 2 | 5 | null | 2015-03-28T17:29:27 | 2015-02-18T02:09:27 | C++ | UTF-8 | C++ | false | false | 218 | hpp | EngineGlobals.hpp | #ifndef ENGINEGLOBALS_HPP
#define ENGINEGLOBALS_HPP
/*! A texture */
class EngineGlobals
{
public:
float _screenWidth; //!< Screen width
float _screenHeight; //!< Screen height
};
#endif // !ENGINEGLOBALS_HPP
|
3ddd80d975a2ebe8d95faf94ecd2ef3f00711120 | 2f6f4953d35e53d3d86ad4e959d9f032d4bb3c4c | /startalk_ui/minichatinfo.h | ef39dce1531e4db0b70a4ca4aa37c9d95a083f10 | [
"MIT"
] | permissive | xuepingiw/open_source_startalk | c9b6866b736d51798394486de2b6181a49f38466 | 44d962b04039f5660ec47a10313876a0754d3e72 | refs/heads/master | 2020-04-29T03:00:00.190179 | 2019-03-27T07:01:40 | 2019-03-27T07:01:40 | 175,791,902 | 0 | 0 | MIT | 2019-03-15T09:43:22 | 2019-03-15T09:43:18 | null | UTF-8 | C++ | false | false | 1,073 | h | minichatinfo.h | #ifndef MINICHATINFO_H
#define MINICHATINFO_H
#include <QWidget>
#include "ui_minichatinfo.h"
class MiniChatInfo : public QWidget
{
Q_OBJECT
public:
MiniChatInfo(QWidget *parent = 0);
~MiniChatInfo();
void setDisplayName(const QString& string);
QString getDisplayName();
void setDescription(c... |
85666111804cc064eaa9b4f9cafbd8c756da50c8 | eafbc3ea18b0d622598c8ebcf01bca0dbecb0f52 | /INTERFACES/punteros/punteros.cpp | 7585bb12648391f67e680010e7473e9e39bdd066 | [] | no_license | lechugita13/AD-JAVA | 2541f8ae532a525eb1ce382b51d0cedebd554d68 | dc190520240d173062651f8aef1092346de42486 | refs/heads/master | 2023-01-09T17:22:20.230959 | 2020-03-03T13:47:12 | 2020-03-03T13:47:12 | 210,405,888 | 0 | 0 | null | 2023-01-07T14:41:43 | 2019-09-23T16:45:58 | C++ | UTF-8 | C++ | false | false | 882 | cpp | punteros.cpp | #include <stdio.h>
#include <iostream>
using namespace std;
bool esPositivo (int num){
return num>=0;
}
void hazPositivo(int *puntero){
if ( ! esPositivo(*puntero))
*puntero = -*puntero;
}
int main (int argc, char *argv[]) {
int i;
i = 8;
//Forma de declarar punteros linea ... |
ffd03dbdbfe35b6f41afb3b34315df6e64c53d7d | e56fdd303df6bc2e62075eda46c2048b47e10ed4 | /TEC Chess Console/TEC Chess Console/ChessBoard.h | 1a127db9068b5534883caf64b85a35ac7a9e48db | [
"MIT"
] | permissive | smbraden/TEC-Chess-Project | 2809ecbb0ca9e92fed5526346d448c9a07785fe1 | e5b7b43db48e07796daec3bba2fdbf3d6ccd21d3 | refs/heads/master | 2023-04-23T11:05:33.546291 | 2020-11-09T20:07:38 | 2020-11-09T20:07:38 | 297,445,251 | 0 | 0 | MIT | 2020-10-08T05:13:09 | 2020-09-21T19:50:02 | C++ | UTF-8 | C++ | false | false | 1,157 | h | ChessBoard.h | /*/-------------------------------------------------------------------------------------//
Filename: ChessBoard.h
Contributor: Sonja Braden
Date: 10/16/2020
Reference:
Description:
//-------------------------------------------------------------------------------------/*/
... |
562acac2a4938e2ab5839142237646765a3cd06a | a4d12b5a71481445a6b2b90052324248bde30540 | /base/image.h | 78101cc11e2a5951c3e1fe72a8f0622746a7cf8c | [] | no_license | zhuzhonghua/icongenerator | 1ea284a93efff3793e9c8a7f5e2567a983d50517 | 28bc5b1bc5c8ec06f57cfa8b15f79179c79a9157 | refs/heads/master | 2020-06-03T10:39:28.213793 | 2019-08-06T12:23:19 | 2019-08-06T12:23:19 | 191,538,036 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 274 | h | image.h | #pragma once
#include "visual.h"
class Image : public Visual{
public:
Image(const std::string& path);
Image(int width, int height, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
~Image();
virtual void draw();
Texture* getTex() { return _tex; }
protected:
Texture* _tex;
};
|
2361c45c32458f008ccfe6c354727e6e790aa177 | 032dc2929098cc2cd175e66b7424e9adf714d4dd | /Factory/SimplestCode/staticfactory.h | dd7181e23581b7666d7919a2a1440c98d420fdcc | [] | no_license | Ming-Hao/Notes_DP | 991769f2cc8c572b1e1ad37ea1d25164040fe3c6 | f7c2ebc833d15b1bb2199e20e09d95ce1127b3dc | refs/heads/master | 2021-06-21T02:24:16.137230 | 2020-12-11T13:25:46 | 2020-12-11T13:25:46 | 138,601,203 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 782 | h | staticfactory.h | #ifndef STATICFACTORY_H
#define STATICFACTORY_H
#include <QString>
enum class ProductType
{
ProductTypeA,
ProductTypeB,
ProductTypeC
};
class Product
{
public:
Product(ProductType type, const QString &name);
QString printInfo() const;
QString getName() const;
ProductType getType() const;
... |
8f2ae21ccad7de908620857d5d74650d351b6df4 | ba334859e4d28ee5a35680abec4233ea8296366f | /UVA/1220 Party at Hali-Bula.cpp | a8b8745286a3944014e5ba909447a49d8e561714 | [] | no_license | Luodian/Code-contest | c44783d002001f3fbc1580a10dcab83041535442 | b9c0aa643be9670f5129f4e93e54dd96114d22b8 | refs/heads/master | 2021-01-02T22:48:23.118877 | 2018-01-29T04:46:40 | 2018-01-29T04:46:40 | 99,394,741 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,790 | cpp | 1220 Party at Hali-Bula.cpp | #include <iostream>
#include <cstdio>
#include <iomanip>
#include <string>
#include <cstring>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <bitset>
#include <numeric>
#include <set>
#include <list>
#include <map>
using namespace std;
typedef long... |
75f2b3cfc5e3ad17e8166351b1c2fe5ef802baea | cfbbeff5af88c2d8004f2030d7f500742e0f13c1 | /src/qt/coinuint_treeitem.cpp | 3b0a3aa34a29b6010e50f0a413107329daabba74 | [
"MIT"
] | permissive | jeanstony/asset_bitcoin | 5a2f2ab0456b4fd574d7995258a42c7bd7313cb3 | ff4e497da2fa64ac9efa7e806047d0eb44fdfd64 | refs/heads/master | 2020-09-21T23:13:00.968760 | 2019-12-02T01:14:48 | 2019-12-02T01:14:48 | 224,965,826 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 3,256 | cpp | coinuint_treeitem.cpp | #include "coinuint_treeitem.h"
#include <QStringList>
//! [0]
CoinUintTreeItem::CoinUintTreeItem(const QVector<QVariant> &data, const int ANo, const int CNo, CoinUintTreeItem *parent)
:AssetNo(ANo), CoinNo(CNo)
{
parentItem = parent;
itemData = data;
}
//! [0]
//! [1]
CoinUintTreeItem::~CoinUintTreeItem(... |
1b514af3f2f1a6d5ae5985dd3fff4fbfab747a06 | ea3ac0bff775342663899b2219805f5766173d9e | /connectors/dds4ccm/tests/non_changeable/component/non_changeable_component_exec.cpp | 0f60896338b473bc773eb71ed675b1852989aa3c | [
"MIT"
] | permissive | RemedyIT/ciaox11 | 42552fad243aa0a89b184a2ccfa37887d44ad124 | c2b79003141311938a93343755a541f86164f97a | refs/heads/master | 2023-08-04T01:06:36.062238 | 2023-08-03T07:16:16 | 2023-08-03T07:16:16 | 208,991,925 | 9 | 3 | MIT | 2023-09-04T17:42:23 | 2019-09-17T07:50:28 | C++ | UTF-8 | C++ | false | false | 13,277 | cpp | non_changeable_component_exec.cpp | // -*- C++ -*-
/**
* @file non_changeable_component_exec.cpp
* @author Marcel Smit
*
* @copyright Copyright (c) Remedy IT Expertise BV
*/
//@@{__RIDL_REGEN_MARKER__} - HEADER_END : non_changeable_component_impl.cpp[Header]
#include "non_changeable_component_exec.h"
//@@{__RIDL_REGEN_MARKER__} - BEGIN : NonCh... |
8dfc62c1c57fa583b3ef3e597c834ae78454bb11 | 0cefa0f7b11e6dcab7982e7b09af8c0dc5f4128e | /trunk/source/Server/Common/BO/SURBLServer.cpp | 0621ee30689f8317d5d12c7ee6969941b4a9dc1d | [] | no_license | nberardi/hMailServer | d14dc7070326c231c235ce9ee847d364bcf7c163 | ddf827f765f0e8c1d30d4a7eb1cac2c2f7c4fc88 | refs/heads/master | 2021-01-23T08:56:10.446270 | 2012-01-17T16:44:19 | 2012-01-17T16:44:19 | 2,921,656 | 6 | 5 | null | null | null | null | UTF-8 | C++ | false | false | 1,197 | cpp | SURBLServer.cpp | // Copyright (c) 2010 Martin Knafve / hMailServer.com.
// http://www.hmailserver.com
#include "StdAfx.h"
#include "SURBLServer.h"
#ifdef _DEBUG
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
#define new DEBUG_NEW
#endif
namespace HM
{
SURBLServer::SURBLServer(void) :
m_iScore(0),
... |
ee7c6ba0d647d348baad8684ea72636ddfe43b8b | eae115c3ece03f94f296a4ef4745d0093f740282 | /jni/BlockSource.h | a64b5ea85bb3c64d060a78e820055caa16da5eff | [] | no_license | Kratos21yt/BoneMealNetherWart | 3051f5ff01972db484c6bbb5e120ac015f7d9fac | 138231ea70bb04b0963fed9db9953f9fbbb9eff8 | refs/heads/master | 2020-06-17T18:15:18.660792 | 2017-06-13T02:53:15 | 2017-06-13T02:53:15 | 94,160,228 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 249 | h | BlockSource.h | #pragma once
class BlockPos;
class FullBlock;
class Block;
class BlockSource {
public:
void setBlockAndData(int, int, int, FullBlock, int);
Block* getBlock(BlockPos const&);
void removeBlock(BlockPos const&);
int getData(BlockPos const&);
};
|
f08a3c727a24ac310651cecc1db8bcfca6c040bc | cf8eb21e977891c713a604a67dc2df68087e9447 | /acmp.ru/106.cpp | 11d9c2ad21cf6859f8b6e2b7c521b10a764b0744 | [] | no_license | exvayn/CPP-Coding | 66afcd49f3ac6f42da0e32c24a5c28186c27e5a3 | dc6ac3b6ed68f791795f07130c5951cf1a92a447 | refs/heads/master | 2021-01-01T20:06:21.442046 | 2015-12-24T12:10:50 | 2015-12-24T12:10:50 | 25,425,907 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 281 | cpp | 106.cpp | #include <stdio.h>
#include <math.h>
FILE *f;
void main(){
int x,n,a=0,b=0;
f=fopen("input.txt","r");
fscanf(f,"%d",&n);
for (int i=1;i<=n;i++){
fscanf(f,"%d",&x);
if (x==1) b++; else a++;
}
fclose(f);
f=fopen("output.txt","w");
fprintf(f,"%d",(a>b)?b:a);
fclose(f);
} |
e42af71d73b90f9b70da92297b304066f587b03c | 277bb949ac41ff3fd80bc6a96e8abe6c719ef587 | /ikChain/src/Util3d.h | f8724ae8789e6fd0ad1b68e1b4530d3873c4ebc4 | [] | no_license | damian0815/damian_public_of_apps | 6b6b259ad2dbfafc118c2014c44e4f95b92d02b3 | 018d559817ffbdf2bfda3fdd5b085c62359970bc | refs/heads/master | 2021-05-26T23:04:09.618239 | 2011-09-17T14:52:25 | 2011-09-17T14:52:25 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,024 | h | Util3d.h | /*
* Util3d.h
* ikChain
*
* Created by damian on 01/07/10.
* Copyright 2010 frey damian@frey.co.nz. All rights reserved.
*
*/
#include "ofxVec3f.h"
class Util3d
{
public:
void setup( ofxVec3f eye_pos=ofxVec3f(0,0,0), float heading=0, float pitch=0 );
/// replace the current viewport and view matrix w... |
5b987f6bef68cec5167f9be04cd99c5bcd6b250c | 9be573b87220a3f9c02f17b987b16dc90ac6b048 | /keshe/train/changetrain.cpp | 987bcf90b5b126cff25fa3f77dbb9f426f376224 | [] | no_license | shuai1126/keshe | c72aeae176aa947f49a2a3fe8778acabbe10a365 | fab075306412c645a5746b8812db26608b055a54 | refs/heads/master | 2020-03-22T10:42:50.991682 | 2018-07-13T01:30:18 | 2018-07-13T01:30:18 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,480 | cpp | changetrain.cpp | #include "changetrain.h"
#include "ui_changetrain.h"
#include "changetraininfo1.h"
#include <QMessageBox>
QString TrainNumber21;
QString TrainDate21;
ChangeTrain::ChangeTrain(QWidget *parent) :
QWidget(parent),
ui(new Ui::ChangeTrain)
{
ui->setupUi(this);
ui->lineEdit->setPlaceholderText("以G/D/Y/Z/K/T... |
e628ffea2015e80727e2589370c60035ad3a15df | 578e69203c6259ba2081728e64fff923042b52b2 | /OpenGLT6/systems/world.h | 7c4b06e5e85c7b04638daaacb584ba792be6896b | [
"Apache-2.0"
] | permissive | linwe2012/nabla | b0db3ae8ed3bc3c167813b7c6604033db7b4184d | 739f9f72d821113084b97241c6593acbbc612465 | refs/heads/master | 2020-05-23T20:40:53.683476 | 2019-06-26T03:39:59 | 2019-06-26T03:39:59 | 186,931,773 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 453 | h | world.h | #ifndef _NABLA_SYSTEM_WORLD_H_
#define _NABLA_SYSTEM_WORLD_H_
#include "isystem.h"
#include "containers/vector.h"
#include "containers/map.h"
namespace nabla {
class World {
public:
void Initialize();
void Accept(ISystem* isys);
void NextFrame() {
}
void OnGui() {
}
void Update() {
... |
667ed09980976c5419f6b195632b5b8e898fa87b | c5aa158f3c742da4c13d13e83e27ec7f61f2eb91 | /c++/12virtual/Test/TestVirtual/English.h | fb708db4987567cb4196a553859440e6591c1094 | [] | no_license | yeahlife/CR32 | 69547b022799e5fa004d7febcca72d9c91df2c44 | 4d258a50187d6b59c521ae5c2987bfcc9ea52e1c | refs/heads/master | 2020-04-07T12:34:00.478033 | 2019-03-23T15:01:51 | 2019-03-23T15:01:51 | 158,372,421 | 1 | 0 | null | 2019-03-23T15:01:51 | 2018-11-20T10:36:38 | HTML | UTF-8 | C++ | false | false | 116 | h | English.h | #pragma once
#include "Person.h"
class CEnglish :
public CPerson
{
public:
CEnglish();
~CEnglish();
};
|
fa93b80d930f537144670cc8264464b1fa3daaff | c837c4f497d6d2541738087c8b6de366d60b1545 | /lib/.svn/text-base/LatLonBound.h.svn-base | f92f72c64fc801fb47dd38a8dab29df2a018b0f5 | [] | no_license | LeeCi11/MapView | c83135086e7c638109a9394e5376c7f3bb8fc2ed | 4d42a0ef7705d8f67f8b6bdb3e068bfeb2f883ee | refs/heads/master | 2020-04-13T22:34:47.440282 | 2013-02-22T06:47:18 | 2013-02-22T06:47:18 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 584 | LatLonBound.h.svn-base | /*
* LatLonBound.h
*
* Created on: 2012. 1. 19.
* Author: HIST002
*/
#ifndef LATLONBOUND_H_
#define LATLONBOUND_H_
#include <QPoint>
#include <QRect>
class LatLonBound {
public:
LatLonBound();
void initialize();
void setPosition(const QPoint &p);
void setRect(const QRect& rect);
bo... | |
583947e1855da35676efb652622db127822a911c | d233a441d7845e6d4c0228ae1e2c26d8123f9a41 | /GLFW Start/main.cpp | e89d0bbce6778f557795adabceb753c07f071560 | [] | no_license | GregJo/Own-Graphics-Framework- | 0c396708307f3c3777623b5593669f3174d64846 | 7840d9650f19ad8e400ff765db128562b6c5cbdf | refs/heads/master | 2021-01-15T19:45:00.402022 | 2015-07-03T17:42:31 | 2015-07-03T17:42:31 | 20,888,045 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 10,179 | cpp | main.cpp | #pragma once
#define _USE_MATH_DEFINES
#include "../dependencies/gl/include/glew.h"
#include "../dependencies/GLFW/include/GLFW/glfw3.h"
#include <stdio.h>
#include <fstream>
#include <string>
#include <time.h>
#include "Model.h"
#include "GLSLShader.h"
#include "GraphicsWindow.h"
#include "FreeCamera.h"
#include "T... |
4e3a6f974aa991bc89f5762d907ab4509f5f2ce0 | 2f782e4763813851d2d937ac5f2458d9ccd4dbdd | /spudd-3.6.2/Spudd/src/MVPSpudd/policyQuery.cpp | 24dde298b54d0629bd68793c3ff379206dc5dc0d | [] | no_license | saidalfaraby/DTP4TC | a77620186125ebd5ccbb16da5ce156d4884343b8 | 5b81301e3632d13be6d0f66f283159ed712678a9 | refs/heads/master | 2020-12-11T02:06:58.209224 | 2014-03-30T16:49:55 | 2014-03-30T16:49:55 | 16,556,738 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,442 | cpp | policyQuery.cpp | #include "pspudd.hh"
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Output.H>
#include <FL/Fl_Choice.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Menu_Item.H>
#include <FL/Fl_Menu_Bar.H>
#include <FL/Fl_Menu.H>
#include <FL/Fl_File_Chooser.H>
#include <FL/Fl_Text_Display.H>
#include <FL/Fl_Text_Buffer.H>
... |
5307add15bab06732f17514d9311f4083525e739 | ffb0029d8f2ea360a6813eba77fbf32866255f6d | /code/music.cpp | d0128934e32bbce8d3e607ce1e886b1d39052c5c | [
"MIT"
] | permissive | Phaskal/GitMusic | 48d89e1c411f4181796a63e3515a60e6a12e5b72 | 01016cf035df41855a249a6b541a6470e7054d68 | refs/heads/main | 2022-12-28T11:15:50.182047 | 2020-10-10T07:53:26 | 2020-10-10T07:53:26 | 301,529,419 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,045 | cpp | music.cpp | #include "music.h"
#include <iostream>
#include <windows.h>
#include <irrKlang.h>
#include <vector>
#include <stdlib.h>
#include <ctime>
#include <thread>
using namespace irrklang;
using namespace std;
#pragma comment(lib, "irrKlang.lib")
Music::Music(int nesting, double bpm, bool option1) {
music = cr... |
462ac17825c7863cf7ba6b7680583f87c1d6710a | bfa8f782347495cbc9fd4465f49ef79bd9e17994 | /main.cpp | 85ce21bc8a9cb519153e854eb4e9665f5cf8b58f | [] | no_license | voltento/LockFreeSingleton | 1ef3e0732fb19c70cc5e62cff13a1cff7591da35 | 4db02cd87f9729d522beddf4c29878a8372c9817 | refs/heads/master | 2020-03-22T11:43:34.443275 | 2018-09-18T08:39:00 | 2018-09-18T08:39:00 | 139,991,812 | 1 | 1 | null | 2018-07-12T12:00:26 | 2018-07-06T13:57:14 | C++ | UTF-8 | C++ | false | false | 831 | cpp | main.cpp | #include <iostream>
#include "LockFreeSingleton.h"
class Foo final : public LockFreeSingleton<Foo> {
friend class LockFreeSingleton<Foo>;
public:
void setFile(std::string file) { m_file = std::move(file); }
private:
Foo() = default;
Foo(std::string file): m_file(std::move(file)){}
bool doReload() override {... |
14e962d5e84b89f05ad545a32844f3660d1ae7df | 444421ff992d4cb220d289d9c211145961c640f1 | /cppMarProg/SubsetFrequencies/main.cpp | 86dff98b787a07d1db287374ee5aff319a80186d | [] | no_license | nerzhul250/Marathons | c93e4fb8be7e73e0e4c5b0a534442c0f0b07e900 | 6074d5b1ac48e1199f619e8be43d89387db30a41 | refs/heads/master | 2021-07-03T22:58:27.113693 | 2020-09-07T16:23:40 | 2020-09-07T16:23:40 | 168,785,501 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,159 | cpp | main.cpp | #include <iostream>
#include <unordered_set>
#include <algorithm>
#include <vector>
using namespace std;
typedef int64_t ll;
int k,n;
ll S[105],A[1000005],cuenta[105];
bool Aset[200000005];
bool myfunction (pair<ll,ll> i,pair<ll,ll> j) {
if(i.second<j.second){
return false;
}
if(i.second>j.sec... |
cb4a5a2a0cf0e7da339647ab69fd5d3402166252 | 7b1a765bab39e4cf1b51730cf88c2a15eafca200 | /MultiTDCLinkDef.hh | 54e64162176efe4cb53ca96993f8df3d39704516 | [] | no_license | KUNPL/TDC64M | e749f4d803d867cda7b38c36459f8cecbe9d5af4 | 9a19a5ca99d2fc7eb35d16a3e240f0031472292b | refs/heads/master | 2020-05-17T16:37:01.170982 | 2013-11-11T05:50:39 | 2013-11-11T05:50:39 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 172 | hh | MultiTDCLinkDef.hh | #ifdef __CINT__
#pragma link C++ class MultiTDC;
#pragma link C++ class MultiTDCMask;
#pragma link C++ class MultiTDCPlot;
#pragma link C++ class MultiTDCProcess;
#endif
|
5e8b5b76f03b6e29e923df0660e092ebb9dbfaec | 3770f504b8f8392f44a3ca54fec9091f6d1a018f | /Lista4/Complexo.h | 31f40b72d576582173d9fb316809c92a5281efad | [] | no_license | DiegoGarzaro/POO | 5e050ec04f84e69ad8380a86551c91b599b9f0b3 | 8c4442af9892041234f3796c9949fcc86e30b2bd | refs/heads/main | 2023-02-28T07:34:16.462713 | 2021-02-04T14:28:10 | 2021-02-04T14:28:10 | 311,359,333 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 615 | h | Complexo.h | #include <iostream>
#include <stdlib.h>
#include <math.h>
using namespace std;
typedef struct Complex_Number{
float x;
float y;
} Complex_Number;
class ComplexCalculator{
private:
Complex_Number *c_num;
ComplexCalculator();
public:
ComplexCalculator(char num[2][100]);
~... |
322bf4f0f7fcea04583a04d1ee829e0084d3f3b6 | 2bf5dda3869b8faca2b0a3b2ad229500891b6879 | /WhiteGL/Src/Data/LaunchTrigger/LaunchTrigger.cpp | d8c4b17228eecc8163949c0d6b63daf64ab1c09e | [] | no_license | metalS10/WhiteGL | 9347519b415779e44487972d1730364a3aa6e637 | 0194fadfd336a7e5a94de8531941c240e776abd7 | refs/heads/master | 2021-07-15T01:33:42.647101 | 2018-10-31T01:18:58 | 2018-10-31T01:18:58 | 106,292,629 | 0 | 0 | null | null | null | null | SHIFT_JIS | C++ | false | false | 7,141 | cpp | LaunchTrigger.cpp | #include "LaunchTrigger.h"
#include "../../Character/Character.h"
#include "../../Factory/EnemyFactory/EnemyFactory.h"
#include "../../Factory/GimmickFactory/GimmickFactory.h"
//===================================================================
//
//敵出撃トリガー
// 敵出撃データをトリガーにして敵出撃というイベントを実行させる
//
//====================... |
0d130fb10978304ca04dfaf10b15c0bb65b81961 | 03220a7e03aff025b4b56fe0917877a7b6ceca69 | /daily/may/week2/0511/l - find the town judge.cpp | 6cea9610c87c216b3fa743531935230d1edf767d | [] | no_license | kaestro/algorithms_v2 | 8cce9f29b6a7d965e3dfd8a43616875168dff07f | 0659c00d087456b5c46092d14e1ff6982855cb73 | refs/heads/master | 2021-03-28T10:08:37.160829 | 2021-03-18T04:50:05 | 2021-03-18T04:50:05 | 247,856,011 | 0 | 0 | null | 2020-04-26T10:32:22 | 2020-03-17T01:54:42 | Python | UTF-8 | C++ | false | false | 945 | cpp | l - find the town judge.cpp | #include <vector>
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
class Solution {
public:
int findJudge(int N, vector<vector<int>>& trust) {
vector<int> people(N);
for (auto temp : trust) {
int &trusting_person = people[temp[0] - 1];
int &trusted_perso... |
a8bba6a1af14ee90a879daf81e65baa129083ec9 | 60aa54a3969a506a275ac033471f3d15b8c4ae68 | /response/client/RespMessage.cpp | 9a85c9018b5d1a0ba2dbf21c2447f0d278bb6ebd | [] | no_license | IRETD/TestSystemServer | 5e9cf9bb7a3d6825523dfe52d435fca3d8876cdb | 78ec19579c363d99dae9ecd36f01483d05335fcc | refs/heads/master | 2021-09-10T02:36:31.703918 | 2018-03-20T18:47:24 | 2018-03-20T18:47:24 | 126,066,409 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 728 | cpp | RespMessage.cpp | #include "RespMessage.h"
RespMessage::RespMessage( ResponseReciever responseReciever ) : ResponseClient( responseReciever ) {
}
void RespMessage::writeInStreamBuffer() {
m_StreamBuffer << quint32( 0 ) << static_cast <int> ( ResponseClientType::MESSAGE ) << m_Message;
m_StreamBuffer.device() -> seek( 0 );
... |
85fc0ae2ac47f0b7bd551eae97d806074b9fa1bc | 9609182d152a4b06338b8ada02624fcd9dba8bc7 | /ietl/interface/mtl.h | 43f1dfb483a05dfeb480cb968e47eb40f3b626b7 | [] | no_license | garrison/ietl | 689dc64465b77dfde52915748478a7f12690f385 | 7d7c853c1c65ef2919c65fa8b12e0ba3479ecc8d | refs/heads/master | 2021-01-20T08:48:51.562623 | 2013-07-27T09:59:57 | 2013-07-27T09:59:57 | 11,700,192 | 3 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,129 | h | mtl.h | /***************************************************************************
* $Id: mtl.h,v 1.10 2004/02/11 08:10:09 troyer Exp $
*
* Copyright (C) 2001-2004 by Prakash Dayal <prakash@comp-phys.org>
* Matthias Troyer <troyer@comp-phys.org>
*
* This program is free software; you can redi... |
e121f5ab1b2b3a0de8ab008fb68aa5712a4b87de | e91b16ab1799a614282fb0260ca696ddb6143b16 | /LeetCode/q0474_OnesAndZeroes.cpp | 39faab6cb35052b4d2b60fbd259bc5a3ef8f5871 | [] | no_license | bluesquanium/Algorithm | cde3b561aa05413fcd61fe5ce013fe3e8c122a9c | 9d87cbc4efc5a3382376fc74b82915832659e97b | refs/heads/master | 2022-06-24T10:55:58.011128 | 2022-05-29T09:50:58 | 2022-05-29T09:50:58 | 174,677,803 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,666 | cpp | q0474_OnesAndZeroes.cpp | class Solution {
public:
#define ll long long
#define pll pair<ll,ll>
#define max(A, B) ((A) > (B) ? (A) : (B))
ll mem[101][101];
int findMaxForm(vector<string>& strs, int CNT0, int CNT1) {
for(ll i = 0; i < CNT0; i++) {
for(ll j = 0; j < CNT1; j++) {
me... |
954bb2552c25c21bcc17f5d3f2e846d3eee9ea75 | cb80a8562d90eb969272a7ff2cf52c1fa7aeb084 | /inletTest3/0.004/U | d39514aaa8e32b983a04846afeab25ba3d3dfd48 | [] | no_license | mahoep/inletCFD | eb516145fad17408f018f51e32aa0604871eaa95 | 0df91e3fbfa60d5db9d52739e212ca6d3f0a28b2 | refs/heads/main | 2023-08-30T22:07:41.314690 | 2021-10-14T19:23:51 | 2021-10-14T19:23:51 | 314,657,843 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 404,194 | U | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2006 |
... | |
4a658ce719c104ae8c450de3d3a7383e8320769e | d527478e958f2b2d07028187a755151c19735649 | /arduino workspace/0 Tilt rotor plane/thurst_calculation/thurst_calculation.ino | a1734001c72c6bf73e70347befb1ea1670e8b215 | [] | no_license | kvngvikram/workspace | 99105ecbdcc7c80a877f8af4a05c8258eaade7b7 | 033d1e55b5911784ff93b28ef53abfe9cb5a6e56 | refs/heads/master | 2021-07-10T16:54:22.832461 | 2020-07-01T15:28:45 | 2020-07-01T15:28:45 | 154,186,729 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,008 | ino | thurst_calculation.ino | #include <SoftwareSerial.h>
SoftwareSerial BT ( 4 , 5 );
int y = 30 ;
char x ;
void setup() {
BT.begin(9600);
Serial.begin(9600);
BT.write("SEnd sOmEThinG");
while(Serial.available()<0){
}
while(BT.available()<0){
}
x=BT.read();
BT.println("Start");
Serial.println("Start");
delay(1000)... |
da29a164fbd7de458c9340a0306523a0bf5ce2f0 | 0d1ff77ab5d58f808ac3009449096a9e38b00d7c | /Source/GolfGame/MyUserWidget.h | 106e1bdca5d5ff83911d02bb9955d289b4829eed | [] | no_license | weplaygame1/golfgame | 2634d13617f77d0c81756590708da740742d89d2 | 204c9b90faf1ef395407438a2a02d17a49503f3c | refs/heads/master | 2023-08-16T00:26:23.601823 | 2021-09-15T05:02:58 | 2021-09-15T05:02:58 | 382,969,752 | 1 | 0 | null | null | null | null | UHC | C++ | false | false | 5,769 | h | MyUserWidget.h | // Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "GolfGame.h"
#include "Blueprint/UserWidget.h"
#include "MyUserWidget.generated.h"
/**
*
*/
UCLASS()
class GOLFGAME_API UMyUserWidget : public UUserWidget
{
GENERATED_BODY()
public:
virtual boo... |
41f7a4664d47c439d0f35270a1fa5f1fa4892d58 | 50392f73921b6f44a9d26debc37de3d0f04f14fb | /输出螺旋队列中的某个元素.h | 6a9add9be6b961c4cce3a3f6b0b0943a6242e2e2 | [] | no_license | shihaokiss/Practice | b600fcfb3106f07f9ed6bfe8eb68ed3ed4ee78bc | 523510ac8881477d0cb522c4774287e1495d8714 | refs/heads/master | 2020-05-21T18:09:44.407877 | 2016-09-18T16:37:41 | 2016-09-18T16:37:41 | 62,553,424 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 1,687 | h | 输出螺旋队列中的某个元素.h | #include"Configer.h"
namespace spiralMatrix
{
/*内螺旋:(从内圈往外圈依次增大)*/
int printfSpiralMatrix(int x,int y)
{
int Max = abs(x) > abs(y) ? abs(x) : abs(y);
int Result;
if (Max == x) // x 正半轴
{
if (Max == -y) //会突变
Result = pow((Max * 2 + 1), 2);
else
Result = pow((Max * 2 - 1), 2) + Max... |
603702df9cabac8e225358fc8079c0978f3c047e | ccba1a06f16932644be97d95d72869b0f0fc39b4 | /Kalkulator Kalorii/formBMR.h | 1bb40f5411a423ea518ebc89bc01925c34f2ddb9 | [] | no_license | Patryk-Jastrzebski/Kalkulator-Kalorii | 08117312b95d9e882f4d174dd11d8b52ca18d4fc | 9b6d8e1f7f6692f0de067ef4d79dbbf1249d56ae | refs/heads/master | 2022-11-06T09:16:13.443944 | 2020-06-12T10:15:11 | 2020-06-12T10:15:11 | null | 0 | 0 | null | null | null | null | WINDOWS-1250 | C++ | false | false | 11,083 | h | formBMR.h | #pragma once
namespace KalkulatorKalorii {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Podsumowanie informacji o formBMR
/// </sum... |
27476efc4f5f42cd37419d5d6ff1ffaa96e46582 | 6c50901f8f3b321aa1256847181edac2b0c94347 | /Crossplatform/c++next/src/ConstExpr.cpp | 26e771071b76a7fcbabe8c2591a3f931ad3266a6 | [] | no_license | dyver/Feature_Tests | 1a0f7496e6e77d5be6a297ac28aa8851093f41e5 | f4573c0fc6ec3315f62b58439bf9078613fa934f | refs/heads/master | 2021-01-23T22:43:07.304196 | 2019-11-25T14:37:18 | 2019-11-25T14:37:18 | 10,626,407 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 648 | cpp | ConstExpr.cpp | #include <++c.h>
// constexpr - generalized and guaranteed constant expressions
constexpr int getConstValue() { return 42; }
class ConstExpression {
public:
constexpr ConstExpression() : value(getConstValue()) {};
constexpr int getValue() { return value; }
private:
int value;
};
void... |
d2f16b71b3fb82d56768d3a43c7ede849b331e94 | 53789b79bfc889c8284e0c42639affa1909f9a23 | /algorithms.h | d36fb3ef892cb4481ddd64de8edc093cda832c09 | [] | no_license | jamarFraction/HW4_CPTS223 | 7226646764fc264a37243219e9f6acdab98fbda2 | 42dfeeb121e437066c0fc3d7e530fca507f477a3 | refs/heads/master | 2021-04-29T17:18:28.633924 | 2018-02-16T21:01:11 | 2018-02-16T21:01:11 | 121,666,945 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 327 | h | algorithms.h | #include <iostream>
#include <vector>
using namespace std;
int maxSubSum1(const vector<int> &a);
int maxSubSum2(const vector<int> &a);
int maxSumRec(const vector<int> &a, int left, int right);
int maxSubSum3(const vector<int> &a);
int max3(int leftSum, int rightSum, int borderSums);
int maxSubSum4(const vector<in... |
4fe9519da470c0b8c94830fbe6270f1429a67a77 | 624464de973e6d812497f9d64eb6961cc325c707 | /周赛/5398.统计二叉树中好节点的数目.cpp | b36f91c26414b81ab4c03d7e1fc0ec8858809a70 | [] | no_license | tamlovincy/leetcode | 4c631b5b5d4d493b67134709a152764d316e15fa | 6fb4e40b09cb2b161b9024299feb3be9b7c5d848 | refs/heads/master | 2021-10-27T09:39:47.609170 | 2021-10-10T02:03:38 | 2021-10-10T02:03:38 | 248,775,005 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,761 | cpp | 5398.统计二叉树中好节点的数目.cpp | /*
* @Author: Lingtan
* @Date: 2020-05-17 14:50:40
* @Last Modified by: Lingtan
* @Last Modified time: 2020-05-17 14:53:01
*/
/*
给你一棵根为 root 的二叉树,请你返回二叉树中好节点的数目。
「好节点」X 定义为:从根到该节点 X 所经过的节点中,没有任何节点的值大于 X 的值。
示例 1:
输入:root = [3,1,4,3,null,1,5]
输出:4
解释:图中蓝色节点为好节点。
根节点 (3) 永远是个好节点。
节点 4 -> (3,4) 是路径中的最大值。
节点 5 ->... |
24f5dca6e77c761bc332450abe9a5647d1c2d74d | f9b41ddff42ff87aea0e4811a3b177ad5fb63de0 | /Avl.cpp | d2cd211c0b2d84e3b5b670cb6793e0bd67d7ce16 | [
"MIT"
] | permissive | Surajgaire0/Avl-Tree-Visualization | c161e9f8ce39eabc7fceda7e3379bf3e3352bc5a | 8c9a0fdff1ff1edc31102684c8d249d4ab12cdbb | refs/heads/master | 2023-02-10T00:30:10.783534 | 2020-12-31T08:20:11 | 2020-12-31T08:20:11 | 200,468,893 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,730 | cpp | Avl.cpp |
#include <iostream>
#include "Avl.hpp"
using namespace std;
Avl::Avl()
{
root=NULL;
}
Avl::~Avl()
{
}
int Avl::NodeHeight(Node *q)
{
if (q==NULL)
return 0;
int Hlchild=q&&q->lchild?q->lchild->height:0;
int Hrchild=q&&q->rchild?q->rchild->height:0;
return (Hrchild>Hlchild?Hrchild+1:Hlch... |
24d9f1bcd0066546fce7b4b1b6a3e19653952df7 | dabdaddf32562f0e1cbfd704667360fd4a85ab24 | /valkopat/src/Exceptions/OutOfRangeException.h | 012b33bafa0beea84433db6f92fc5c5fb2024ab9 | [
"MIT"
] | permissive | PatrikValkovic/NibblesSemestralWork | 539505b1fd515a6c34c63ac8dbb10c4f50e37a0e | b50800b30fed969e7b2063274201d5af5dfa7a8c | refs/heads/master | 2020-07-15T08:13:46.282835 | 2016-06-07T15:23:34 | 2016-06-07T15:23:34 | 55,541,925 | 0 | 1 | null | 2016-06-08T11:25:26 | 2016-04-05T20:08:45 | C++ | UTF-8 | C++ | false | false | 2,485 | h | OutOfRangeException.h | #ifndef CERVISEMESTRALKA_OUTOFRANGEEXCEPTION_H
#define CERVISEMESTRALKA_OUTOFRANGEEXCEPTION_H
#include "Exception.h"
namespace Exceptions
{
/**
* OutOfRangeException indicating that input is out of range
*/
class OutOfRangeException : public Exception
{
public:
/**
* Create ... |
8403159d55d6beb0ff722a46cfa024d9c796acad | 8c238cd3fe8f1f11e365af025f46d92b96ec48d3 | /FirstProject/Source/FirstProject/FloatingPlatform.h | 3a42f40713c9481e2d74e96bef18b8aaff89bcbe | [] | no_license | JanSoLul/FirstUnrealProject | cf37a4269606a79ad5fadfe7706a5351440fa213 | ac17e9bb37793a31ca419f380b16fa05381085b5 | refs/heads/main | 2023-09-05T04:55:03.772366 | 2021-11-02T20:37:58 | 2021-11-02T20:37:58 | 419,869,207 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,250 | h | FloatingPlatform.h | // Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "FloatingPlatform.generated.h"
UCLASS()
class FIRSTPROJECT_API AFloatingPlatform : public AActor
{
GENERATED_BODY()
public:
// Sets default... |
4253eb315ea1d72ba7ad71120fd168a4cba276de | e544ea11b684bc3d7a821af9cfc9fc356c98356d | /Templates/solution.cpp | 67eac9fabebfbe061e5e771514585d07a9846df1 | [] | no_license | PupoSDC/cpptutorial | e29946d29d7f89acb14f12913ecb72b18beabd29 | ccec4a4ae6ff03a9f07201964e111a15b4afe329 | refs/heads/master | 2020-03-21T20:05:32.059974 | 2018-07-02T08:00:54 | 2018-07-02T08:00:54 | 138,986,430 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,679 | cpp | solution.cpp | #include <iostream>
#include <string>
// Create Methods to make Cars, Trains, Cats and Dogs make noises.
// TIP: Polymorphism! :D
//
// run with g++ solution.cpp -Dpart1
#ifdef part1
#include "Classes.h"
void makeNoise( const Animal & animal ){
std::cout << animal.makeNoise() << std::endl;
}
void makeNois... |
821d1e3107cdd2c912fa29522f7f15b372724c03 | bda0e2f8a0e65172475787aaab661d71a90f37ac | /Program.h | 0b656a234a0db195304dc47f3ead020aa0a05b81 | [] | no_license | D1m0000n/MiniJavaCompiler | 1d309cfc4c7fccd01b6080eb1eadb6fedf2fccda | f4f3ebe6fac0eee030baafcffcc49d8fbec4f720 | refs/heads/master | 2023-02-12T03:12:53.960152 | 2020-12-30T16:39:57 | 2020-12-30T16:39:57 | 262,766,362 | 0 | 0 | null | 2020-12-30T16:39:58 | 2020-05-10T10:52:55 | C++ | UTF-8 | C++ | false | false | 264 | h | Program.h | #pragma once
#include <MainClass.h>
#include <DeclarationList.h>
class Program {
public:
Program(MainClass* main_class, DeclarationList* declaration_list);
MainClass* main_class_;
DeclarationList* class_declarations_;
void Accept(Visitor* visitor);
}; |
422cc7edfc5735335f266bbbc0a7608377175725 | b99079feb3b46e0bded4e0bdc0e1deaaad277822 | /测试new和delete/测试new和delete/源.cpp | a61d6254f6e0fcb466b8848b7d18e72b6a8050d2 | [] | no_license | 1214wuai/NiuKe | 6099df8207f69be52dc054a2c6e619152817025d | 9a4b72cbca677e7a80ddf4fcc10fd03815a4e3be | refs/heads/master | 2021-06-19T17:33:44.518386 | 2021-06-10T02:33:36 | 2021-06-10T02:33:36 | 177,748,655 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 3,429 | cpp | 源.cpp | #include<iostream>
#include<vector>
#include<string>
#include<map>
#include<mutex>
#include<thread>
#include"源1.hpp"
using namespace std;
class My_String {
private:
char * _p;
size_t _sz;
void copy(const char* p)
{
_p = new char[_sz + 1];
memcpy(_p, p, _sz);
_p[_sz] = '\0';
}
public:
My_String()
{
_p = ... |
f4a58ab3dfd6b29136fecf1be2c1b05e4426dffc | 805fb697a151db0da2c84990972377eb1ea8fbc3 | /Ulam_Week_1/.gen/src/Ue_102125SwapX10.cpp | 0371939f721a182a111ef3e70148096700998d86 | [] | no_license | bmatthews1/Ulam_Development | fc3a6e0ae7fdce3b1eb8338e323dc2dd005837ef | 3b22496159fc55075cfc7ef147bd801bf863a4fc | refs/heads/master | 2021-01-20T09:45:11.906552 | 2017-10-02T02:39:11 | 2017-10-02T02:39:11 | 101,605,409 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 55 | cpp | Ue_102125SwapX10.cpp | #include "Ue_102125SwapX10.h"
namespace MFM{
} //MFM
|
8b0ed90b6e9a3bd48519dc85a780f38bb6f6980c | 0961ab84bd22fb3298ff313fe40be75474c88b11 | /src/BurrowsWheelerMain.cpp | 04e484975a73ef47ebd02b6901cd9592357a5a0f | [] | no_license | dnbaker/Stream-Data-Compactor | eb1038380e32a3fc0dcbc7f217ac526533d6acf5 | 9fae947e42844a81eec856a77765cc4a3f778fcc | refs/heads/master | 2021-05-08T03:22:50.300925 | 2018-09-09T14:28:18 | 2018-09-09T14:28:18 | 108,199,515 | 1 | 0 | null | 2017-10-25T00:34:39 | 2017-10-25T00:34:39 | null | UTF-8 | C++ | false | false | 2,245 | cpp | BurrowsWheelerMain.cpp | #include <iostream>
#include <iomanip>
#include <string>
#include <getopt.h>
#include "shared.h"
#include "BurrowsWheeler.h"
namespace
{
const size_t ERROR_IN_COMMAND_LINE = 1;
const size_t SUCCESS = 0;
const size_t ERROR_UNHANDLED_EXCEPTION = 2;
} // namespace
void usage() {
std::fprintf(stderr, "-... |
06c4927622358043eb5897ae1e575ce11de06484 | 09584f52e5562ecdbe91716e978708e4f561b9c5 | /src/montecarlo/mrg32k3a/Matrix3x3.h | ab6d4e1c153657d0a0b9ff32de9500d04cd62648 | [] | no_license | gradyschofield/numerical-quantum | 1157983b8c285c9fb973160a9354d534f876b167 | 3fc37e19324696cefcc7558fc6db782814d7f861 | refs/heads/master | 2023-08-19T00:10:50.873797 | 2021-10-03T15:44:17 | 2021-10-03T15:44:17 | 283,229,390 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,058 | h | Matrix3x3.h | //
// Created by Grady Schofield on 5/13/21.
//
#ifndef ATOM_MATRIX3X3_H
#define ATOM_MATRIX3X3_H
#include<vector>
using namespace std;
class Matrix3x3 {
vector<int64_t> elements;
public:
Matrix3x3()
: elements(9)
{
}
Matrix3x3(
int64_t m11, int64_t m21, int64_t m31,
... |
05038440104b3929dbdcca8a750f60470b0acf4f | e33902d1eb5f900dc9c727bb62a2a5bdd81a6abf | /include/debug.h | 011d472a77af885133fcedc120956ac20743cef1 | [] | no_license | nganhkhoa/CTDL-GT | 0d6f8c8ee2162b11c119829847aa4d531349127f | 1896b563ba5dafd5d7c67a6b61612f35bc85b5a0 | refs/heads/master | 2021-05-08T07:07:52.386994 | 2017-12-13T18:01:15 | 2017-12-13T18:01:15 | 106,708,024 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 171 | h | debug.h | #ifndef NDEBUG
// run this file only on debug
#ifndef DEBUG_H
#define DEBUG_H
#include <spdlog/spdlog.h>
extern std::shared_ptr<spdlog::logger> console;
#endif
#endif |
c117a01521ce14ada8d84c5072f2fc68324f230d | 0f2f361a70f336246f6d129b5af04c41591820d6 | /executable-operator/executable-basic-cpp/thriftGen/notifyservice/NotifyService.h | 9021e329a0bd22802894ab4e016dfe648b54a8bf | [] | no_license | uestcljx/CLIC | 6b6b98c12e37940e43c32d6ff0dae676ae6e915d | 9bfa7cc2970895194a091f82af9a16d8d7334ffe | refs/heads/master | 2023-08-29T23:13:24.425648 | 2021-11-05T08:28:30 | 2021-11-05T08:28:30 | 421,344,627 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | true | 9,866 | h | NotifyService.h | /**
* Autogenerated by Thrift Compiler (0.13.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
#ifndef NotifyService_H
#define NotifyService_H
#include <thrift/TDispatchProcessor.h>
#include <thrift/async/TConcurrentClientSyncInfo.h>
#include <memory>
#include "notify-servic... |
0a719aad07c43789992abeeb8e53a46b7d0b9a27 | ccc688d274897565dc995a153168d9a56b37ee7f | /Users/vlad1/Desktop/ivs/assignment/tdd_code.cpp | 0fd2bdc41a9c8779d186970391911854ed2b6eb0 | [] | no_license | VladislavPastushenko/IVS-project1 | cb6efda8c970938ef226e0403a3410ba28a3a90c | 39830301a4a6189027a53cefe83330f08bf4d62d | refs/heads/master | 2022-11-04T22:18:57.585815 | 2020-06-25T13:50:27 | 2020-06-25T13:50:27 | 274,925,226 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,844 | cpp | tdd_code.cpp | //======== Copyright (c) 2017, FIT VUT Brno, All rights reserved. ============//
//
// Purpose: Test Driven Development - priority queue code
//
// $NoKeywords: $ivs_project_1 $tdd_code.cpp
// $Author: VLADISLAV PASTUSHENKO <xpastu04@stud.fit.vutbr.cz>
// $Date: $2017-01-04
//=============================... |
f8a6539aa7979d0862ea0f2eed288b84dda1bf1d | 9c5788cb30fdf1a03428a7d250281282af6efde2 | /c++11.singleton/tamplatesingleton.h | 09e82dce16bde5483419b8b61f8a784b2b6dc291 | [] | no_license | jinhang87/Cfree | b7cac9c0e8003f685dd0f050bf32fa5e2d6889ad | d529af32ef73a3f51244c82b51af3e19b1878094 | refs/heads/master | 2021-01-19T09:02:33.623112 | 2017-08-24T08:16:15 | 2017-08-24T08:16:15 | 87,714,358 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 232 | h | tamplatesingleton.h | #include <iostream>
template <typename T> class Singleton {
protected:
static T& getInstance() {
static T instance;
return instance;
}
protected:
Singleton(){std::cout<<"Singleton ctor"<<std::endl;}
};
|
d53e9c5b95da6dfc77dbad0d18a13b744c96c574 | ea89955e343ced5e705b4a338039e658a4ba67cb | /Source/State.h | 0e8cf66c8136813c2e7b921d41ee9273e7e014a2 | [] | no_license | kennethdmiller3/videoventure | 775ce24ee4aebe3dfc65876a3fc9abb93f29b51d | 7182b78fde61421c48abc679ef6f2992e740d678 | refs/heads/master | 2021-06-03T19:26:26.704306 | 2020-07-25T05:37:02 | 2020-07-25T05:37:02 | 32,195,803 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,159 | h | State.h | #pragma once
#include "Updatable.h"
namespace Expression
{
struct Context;
}
class StateTemplate
{
public:
unsigned int mSubId;
unsigned int mStateId;
std::vector<unsigned int> mEnter;
std::vector<unsigned int> mExit;
public:
StateTemplate(void);
~StateTemplate(void);
bool Configure(co... |
fbd3f46d8e559e8a90636eb0d3ab44ec106126f5 | f60896cbf22c59168bd2eb7afbf3740caf7def97 | /Shelf.h | bee793bc3ec6c00e7b2ed64dfd0abe0d6a84d9f9 | [
"MIT"
] | permissive | frkey/shelf-organizer | 00f80a99e45b38c0f768727900dfa5e31a020176 | 3219a4e1abc5ee073b4e62ce283b98311f56e29d | refs/heads/master | 2020-03-10T19:28:12.794945 | 2018-04-14T19:58:19 | 2018-04-14T19:58:19 | 129,548,288 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,227 | h | Shelf.h | #include "lib/SimpleFIFO.h"
#include "Product.h"
#include "Motor.h"
#define LINES_PER_SHELF 2
#define COLUMNS_PER_SHELF 3
#define SIZE_OF_FIFO 6
class Shelf {
private:
String color;
boolean shelf[LINES_PER_SHELF][COLUMNS_PER_SHELF];
SimpleFIFO<Product*, SIZE_OF_FIFO> fifo;
public:
Shelf(String ... |
113f97ebd2fa315c32c18d8f037a0a24f51565e6 | 5b0042e6d7eeed6471f2017b6648818bc05bbc6e | /SpaceColonization/include/Branch.h | 866df425397c01413eec47dd552ff3a9842d5c40 | [] | no_license | thorleiftizcp/cinder | 011613440514618231df47550fba9173bbc7aa95 | 1c8aa99a03c819f5c834c9a6227c3fc3f66d659b | refs/heads/master | 2022-08-24T15:06:57.566165 | 2020-05-28T11:37:42 | 2020-05-28T11:37:42 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 653 | h | Branch.h | #pragma once
#include "cinder/gl/gl.h"
#include "cinder/Path2d.h"
#include "cinder/cairo/Cairo.h"
extern float length_g;
class Branch : public std::enable_shared_from_this<Branch>
{
public:
Branch(ci::vec2 position, ci::vec2 direction,std::shared_ptr<Branch> parent);
~Branch();
ci::vec2 getPosition();... |
ba9eb2825603e1cc2b8c8c6e78bbfa7a1d5790ac | 167b3fe19bcb755ba8b7859d1469ddbc222219a3 | /GbaGameEngine/src/engine/io/filestream/CppFileReader.h | 60af9701965328d37436a64cd42932eff8ca0565 | [] | no_license | FireFox2000000/GbaGameEngine | f7afdb996bfe4060ac3ffd2389ad721ac9a84975 | efd50b6cf65663701bd0f451a1ab4565716e686e | refs/heads/master | 2022-12-12T02:48:53.152746 | 2022-04-10T08:51:14 | 2022-04-10T08:51:14 | 127,282,000 | 6 | 1 | null | 2022-12-08T14:54:22 | 2018-03-29T11:28:24 | C++ | UTF-8 | C++ | false | false | 665 | h | CppFileReader.h | #pragma once
#include "engine/base/Typedefs.h"
#include "engine/io/File.h"
class CppFileReader
{
struct StreamPos
{
int charIndex = 0;
};
StreamPos m_streamPos;
const u8* fileData = nullptr;
void AdvanceToAlignment(int alignmentSize);
public:
CppFileReader(FilePtr file);
template<typename T>
T Read()
{... |
554e726ebd5dd6ab2de123c18510490788bb644a | 19b016952946bfc56d6ed54b2f6a86774c5405dd | /logdevice/common/RequestPump.cpp | f3b4eb95ce8125a57a2a67c66147923377bb37bc | [
"BSD-3-Clause"
] | permissive | msdgwzhy6/LogDevice | de46d8c327585073df1c18fc94f4cc7b81b173d1 | bc2491b7dfcd129e25490c7d5321d3d701f53ac4 | refs/heads/master | 2020-04-01T17:00:39.187506 | 2018-10-17T06:29:11 | 2018-10-17T06:32:21 | 153,408,883 | 1 | 0 | NOASSERTION | 2018-10-17T06:49:01 | 2018-10-17T06:49:01 | null | UTF-8 | C++ | false | false | 8,197 | cpp | RequestPump.cpp | /**
* Copyright (c) 2017-present, Facebook, Inc. and its affiliates.
* 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.
*/
#include "RequestPump.h"
#include <fcntl.h>
#include <unistd.h>
#include <utility>
#... |
9db7c56abb7847157963c312ad2011a31963da86 | afe7eea8ebbe083052da3f35d319c00849d7d506 | /src/ProgressIndicatorsStrategy/ProgressIndicatorsStrategy.cpp | bc5a7698bca63be253f89d7809eb014dbdbf690f | [
"MIT"
] | permissive | mark-kimmerman/geographic-lockbox | 0d938cfff2b758a6a462b620f13c590567b328c3 | 089341753744b2246502194062891db96f00a9f5 | refs/heads/master | 2022-07-03T23:02:14.745314 | 2020-05-04T22:34:07 | 2020-05-04T22:34:07 | 244,930,224 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 132 | cpp | ProgressIndicatorsStrategy.cpp | #include "ProgressIndicatorsStrategy.h"
void ProgressIndicatorsStrategy::set_number_of_zones_visited(int new_number_of_zones) {
}
|
0bcf896432cee5b068ebb6965dcafcb854458b01 | 67e17d140cd439e75a07cfb9f09c7bc73dcafc94 | /Tests/Codes-Test/POSE/orientation_1/myVector.h | 4c64afa3632c4f15c45a357f246431e180c91bd8 | [] | no_license | ClockWorkKid/WiFi-Nano-Quadcopter | 4f9419c0cd98348654cdbb7ff8f8d8c752f69ee7 | d588c165e88de9661d2df484df7f02110dc36614 | refs/heads/master | 2022-12-27T13:01:43.943644 | 2020-10-12T07:09:38 | 2020-10-12T07:09:38 | 266,081,215 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 500 | h | myVector.h | #ifndef MYVECTOR_H
#define MYVECTOR_H
class myVector {
public:
double x, y, z;
myVector();
myVector operator + (myVector const &obj);
myVector operator + (double a);
myVector operator - (myVector const &obj);
myVector operator - (double a);
myVector operator * (myVector con... |
95fc123b265e90ff5ac362b630da3ad929f08cb3 | 1b420621bceca23eb375f78d0568a5dc76549a75 | /CHEFAPR.cpp | e426d4c44e0f1ac6edcd450d9ab136d82dc1b384 | [] | no_license | GireeshGalande/Codechef | 6b7652b00428a510fba81f2ab662f26f95a3640e | ee68927606d497fbd5cf360939b459847e45fa7f | refs/heads/master | 2022-07-09T12:51:07.919130 | 2020-05-13T07:05:54 | 2020-05-13T07:05:54 | 263,547,535 | 0 | 0 | null | 2020-05-13T06:54:33 | 2020-05-13T06:44:05 | null | UTF-8 | C++ | false | false | 348 | cpp | CHEFAPR.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin>>t;
for(int i=0;i<t;i++)
{int n,y=0,zero=0;
cin>>n;
int a[n],x=n;
for(int j=0;j<n;j++)
{cin>>a[j];
if(a[j]==0)
{ if(y==0)
{x=j;y=1;}
zero++;
}}
cout<<zero*1000+(n-x)*100... |
ed87a46d59e6add5beea4644188a477e6e55584a | d30537985a7060a669f0ac0f480e571c26daf70d | /Codeforces/C++/0004/4_C.cpp | 3c4783998e06c1931fec68bf9145314ed3e9df11 | [] | no_license | Navidulhaque/competitive-programming-solutions | ab8e58d15bed071fdb6da1f5eccab1b5500383c9 | b6d204ac2b87c091709fdd52c7ff695e4b973156 | refs/heads/main | 2023-08-21T03:25:08.766083 | 2021-10-29T15:41:00 | 2021-10-29T15:41:00 | 419,967,083 | 0 | 0 | null | 2021-10-22T04:37:10 | 2021-10-22T04:37:10 | null | UTF-8 | C++ | false | false | 2,563 | cpp | 4_C.cpp | // https://codeforces.com/problemset/problem/4/C
#include <bits/stdc++.h>
using namespace std;
const int ALPHABET_SIZE = 26 ;
struct TrieNode
{
struct TrieNode *children[ALPHABET_SIZE];
bool isEndOfWord;
};
struct TrieNode *getNode(void)
{
struct TrieNode *pNode = new TrieNode;
pNode->isEndOfWord = false;
f... |
98d547d8bfe0dfa1628f0b9d49623db6e9adc67f | 520ece9e54fad8a5da4af7f4911b5b8ddde77a59 | /HDU/HDU 1160 FatMouse's Speed(最长递增子序列+路径输出).cpp | c710d1e660759ad5036bbbfbd396d1a6488fb928 | [] | no_license | yyyeader/ACM | cde945fab00d2842ed663f711d9432522fca5836 | de976cbfc2f9d68c5e8dc208cfc5756cc4b0f589 | refs/heads/master | 2020-05-27T07:02:14.125658 | 2019-05-26T11:20:25 | 2019-05-26T11:20:25 | 188,526,628 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 838 | cpp | HDU 1160 FatMouse's Speed(最长递增子序列+路径输出).cpp | #include<cstdio>
#include<algorithm>
using namespace std;
const int N=1e3+5;
struct node{
int weight,speed,num;
}a[N];
struct node2{
int len,pre,now;
}dp[N];
bool cmp(node a,node b){
return a.weight==b.weight?a.speed<b.speed:a.weight<b.weight;
}
void print(int x){
if(x==-1)
return;
print(dp[x].pre);
printf(... |
84d7ab8bde276e639080d8ed8b8365db4dfb3ea9 | e91828f8e87a17b942cc26da4bf061f65e3a04c8 | /searchcorespi/src/vespa/searchcorespi/plugin/factoryloader.h | 3eda6557fa0d1456255bec68106b4e2f6f29afcb | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | NolanJos/vespa | 69dbe95b1a9e8cba2879d7b39d882501dc92bebc | fdc4350398029fbffbed3c0498380589a73571d7 | refs/heads/master | 2022-08-02T10:29:40.065863 | 2020-06-02T12:47:31 | 2020-06-02T12:47:31 | 268,804,702 | 1 | 0 | Apache-2.0 | 2020-06-02T13:12:47 | 2020-06-02T13:12:46 | null | UTF-8 | C++ | false | false | 757 | h | factoryloader.h | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/searchcorespi/plugin/iindexmanagerfactory.h>
#include <vespa/vespalib/util/librarypool.h>
namespace searchcorespi {
class FactoryLoader
{
public:
FactoryLoader();
... |
da38ba950ee0cd124b7d74b2ba121ada7a12bde7 | eb74ab9a162c903f30358423bf266427c40f7ca5 | /1344/1344.cpp | ce66f095a815977a8985f7319703770f32a8ff77 | [] | no_license | BUAAZYF/POJ | 45fd1cd7c4926391427e35380b07949a561ff818 | fdc23931fbc8fdc2b772796b5afe406247908f21 | refs/heads/master | 2023-06-19T14:04:05.513962 | 2021-07-09T11:00:26 | 2021-07-09T11:00:26 | 267,861,208 | 2 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,607 | cpp | 1344.cpp | #include <cstdio>
#include <cstring>
using namespace std;
const int MAX = 205;
int n, mat[MAX][MAX];
bool visited[MAX];
bool check(int a, int b, int &sa) {
bool flag = true;
for (int i = 0; i < n; ++i) {
if (!visited[i] && i != a && i != b) {
if (flag) {
sa = mat[a][i] - ... |
fbded309dc2014c56a9d1df60019b8d21fe58b1d | 9d7b4fd1a2aa8f6e0071ebe31920208498d6c0cd | /MYH player/CMediaPlayerEvents.h | f266913cfddfde858026c0f12f6c7b7bfea201be | [] | no_license | MayoHa/MFC-MYH-PLayer | 3d5d007d4a27864a4a0dc9ba399be45e1176b6b6 | fa012db4f77ceaf0798b3f684f4a4fbe997e44dd | refs/heads/master | 2022-06-16T07:05:10.578100 | 2020-05-08T14:11:37 | 2020-05-08T14:11:37 | 260,828,555 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 4,120 | h | CMediaPlayerEvents.h | // 从类型库向导中用“添加类”创建的计算机生成的 IDispatch 包装器类
#import "C:\\Windows\\System32\\msdxm.tlb" no_namespace
// CMediaPlayerEvents 包装器类
class CMediaPlayerEvents : public COleDispatchDriver
{
public:
CMediaPlayerEvents() {} // 调用 COleDispatchDriver 默认构造函数
CMediaPlayerEvents(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) ... |
76089cbab0e0ed29d63351a56f987b40beb01d60 | 131b5f4936f501c58b38c169ee4aeb8880c0029d | /BIB_20Nov2020_Projet_SMA/Exemples/ExempleImageAgents/progX.cpp | 69ff4f54ff31ab44e939baec0f29069701ebfe70 | [] | no_license | IliasMAOUDJ/Agent-Based-Edge-Detection | d25ea5c888656169763c080703f31ca28ac5a5e5 | d11c08c3e27175f02635761ade1605ee64607c2b | refs/heads/main | 2023-02-27T19:48:46.813340 | 2021-02-06T15:44:12 | 2021-02-06T15:44:12 | 319,971,399 | 1 | 0 | null | 2021-01-05T22:35:23 | 2020-12-09T13:52:21 | C++ | UTF-8 | C++ | false | false | 6,442 | cpp | progX.cpp | #include <iostream>
#include <vector>
#define NBAGENTS 1000
using namespace std;
#include "LibImages.h"
#include "MAS.h"
#include "Edge_detection.h"
#include "EdgeFollowingAgent.h"
#include "NodeAgent.h"
#include "system.h"
#include <cstring>
#include <stdio.h>
#include <algorithm>
int main(int argc, char *argv[])... |
2cba2b38dc1d5d1d7a0eb4ad54e25bb4bfec310c | ad1908082f883fd12b2987d5e0f51679b2c1c475 | /userloginwindow.cpp | 7d6710a6add95910f579a56e3b0224d99ce352aa | [] | no_license | skywind2002/CashBook | 5625f25534cf1493261614857f1538fa5f8859f6 | d37565d45ab127f572d634a3f860d9e735b8c8ee | refs/heads/master | 2022-01-25T00:52:15.163613 | 2019-07-20T14:10:23 | 2019-07-20T14:10:23 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,896 | cpp | userloginwindow.cpp | #include "userloginwindow.h"
#include "ui_userloginwindow.h"
#include<QFile>
#include<QString>
#include<QDialog>
#include<QFileDialog>
#include<QDebug>
#include<QSqlQuery>
#include<QSqlQueryModel>
#include<iostream>
#include<QMessageBox>
using namespace std;
userLoginWindow::userLoginWindow(QWidget *parent) :
QW... |
2d293ced8a5931c3b0e809daaaa95a3ba24fc693 | cdc6d97bb1860f285738ec0598ed40cecd5a307a | /Client/Client/SelectionState.cpp | d814a8a183d2570cb341bfde416bd9e3b4f20e72 | [
"MIT"
] | permissive | MegaMalin/rtype | d7663e315ffed2a3124e6f173be7ffb4df21f129 | 12692efb3a577c9737c3fb41bf0ca082f82cb7a5 | refs/heads/master | 2020-06-30T13:30:33.315643 | 2017-01-11T15:22:05 | 2017-01-11T15:22:05 | 74,367,914 | 0 | 1 | null | 2017-01-11T15:22:06 | 2016-11-21T13:47:40 | C++ | UTF-8 | C++ | false | false | 2,411 | cpp | SelectionState.cpp | #include <iostream>
#include "SelectionState.hpp"
#include "CreationState.hpp"
#include "LobbyState.hpp"
#include "UITools.hpp"
SelectionState::SelectionState(App & a, const ScrollingBack &bk, const ScrollingBack &up) :
AState(a), back(bk), upper(up), first(nullptr), second(nullptr), third(nullptr), fourth(nullptr)
{... |
4fb24845e2fb098cbcebe2163b4cb06e68ae308d | 7cb6a5d364cf33551f7a6f355696db7f1e5c2ab0 | /AOJ_ITP2/itp2_10b.cpp | e5288593882937f108a3d86957dca64e6dd7a40f | [] | no_license | BEN2suzuka/proconlib | 375e96577006c0751cce730cbf4c666ad282202d | 559c13e4d17bb471468bdb1d0ef1c8a9f007c367 | refs/heads/master | 2020-12-13T02:49:06.786079 | 2020-03-02T03:41:52 | 2020-03-02T03:41:52 | 233,748,864 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 245 | cpp | itp2_10b.cpp | // ITP2 10_B
// C++14
#include <bits/stdc++.h>
using namespace std;
int main() {
long long a, b; cin >> a >> b;
bitset<32> A(a), B(b);
cout << (A & B) << endl; // AND
cout << (A | B) << endl; // OR
cout << (A ^ B) << endl; // XOR
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.