blob_id
stringlengths
40
40
language
stringclasses
1 value
repo_name
stringlengths
5
117
path
stringlengths
3
268
src_encoding
stringclasses
34 values
length_bytes
int64
6
4.23M
score
float64
2.52
5.19
int_score
int64
3
5
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
text
stringlengths
13
4.23M
download_success
bool
1 class
3c694295e007135b653e8f8472fd8ede0acd0290
C++
yuhc/LeetCode
/src/lc140.cpp
UTF-8
2,316
3.078125
3
[]
no_license
/* LC ID : #140 * Type : String + DFS * Author: Hangchen Yu * Date : 09/14/2015 */ #include <iostream> #include <cstdio> #include <cstring> #include <cctype> #include <algorithm> #include <vector> #include <queue> #include <list> #include <map> #include <stack> #include <unordered_set> #includ...
true
ece52720e23449860ea91680123eabc6f8d2ea8f
C++
JoshChubi/Academic
/Spring2018/Adv Data Structure/Traversals/Graph.h
UTF-8
453
3.140625
3
[]
no_license
#include<list> #include"Edge.h" using namespace std; class Graph { public: Graph(int numVertices, bool directed, bool weighted); int getNumVertices() const; int getNumEdges() const; bool isDirected() const; bool isWeighted() const; void addEdge(Edge e); list<Edge> getAdjacentList(int v) const; Edge getEd...
true
32f33832759c269d7ae8883ca375fc332ca5f8f6
C++
kimgr/bandit
/specs/fakes/logging_fake.h
UTF-8
958
3.015625
3
[]
no_license
#ifndef BANDIT_SPECS_LOGGING_FAKE_H #define BANDIT_SPECS_LOGGING_FAKE_H #include <sstream> namespace bandit { namespace specs { struct logging_fake { template <typename T> void log(T val, bool add_newline = true) { logstm_ << val; if(add_newline) { logstm_ << "\n"; } ...
true
e54745f46ea3b94f3267acc45b13d2881ce41ba5
C++
ciwomuli/NOIP2017exercise
/2019-2-3/A.cpp
UTF-8
1,045
2.65625
3
[]
no_license
#include <algorithm> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <queue> #include <stack> #include <vector> #include <string> #define LL long long #define P pair<int,int> using namespace std; template <typename T> inline void read(T &t) { i...
true
a51983a3e18bcc78946a117fe364528cfa5fe5da
C++
pcasamiquela/IA_PracticaFinal
/source/HC_DecisionTreeBoid.cpp
UTF-8
2,582
2.53125
3
[]
no_license
/* ======================================================================== File: HC_DecisionTreeBoid.cpp Revision: 0.1 Creator: David Collado Ochoa Notice: (C) Copyright 2016 by David Collado Ochoa. All Rights Reserved. ======================================================================== */ #includ...
true
b728b0fbd988f48596db2bd0d1d0fdeaeb438416
C++
alvls/mp1-2021-1
/Yunin_DD/task6/MySnake.cpp
UTF-8
1,706
3.234375
3
[]
no_license
#include "MySnake.h" const char SNAKE_TAIL = 'o'; const char SNAKE_HEAD = 'O'; void MySnake::RestartSnake(MyCoordXY star_pos) { snake.clear(); snake.reserve(1000); for (int i = 0; i < 5; i++) { snake.push_back(star_pos); } for (int i = 1; i < 5; i++) { snake[i].x++; } } void MySnake::DrawSnake(MyDisplay...
true
ea8c0fe3925e663f3702cc6a7511d3b00eaa9f15
C++
luyanfei/algorithm016
/Week_04/55.jump-game.cpp
UTF-8
1,266
3.625
4
[]
no_license
/* * @lc app=leetcode.cn id=55 lang=cpp * * [55] 跳跃游戏 * * https://leetcode-cn.com/problems/jump-game/description/ * * algorithms * Medium (41.09%) * Total Accepted: 157.7K * Total Submissions: 383.6K * Testcase Example: '[2,3,1,1,4]' * * 给定一个非负整数数组,你最初位于数组的第一个位置。 * * 数组中的每个元素代表你在该位置可以跳跃的最大长度。 * *...
true
f32e54b90363def29fbf31fc036374090867d3ae
C++
ecsanchesjr/GPX2
/sources/main.cpp
UTF-8
4,926
2.84375
3
[ "MIT" ]
permissive
#include <algorithm> #include <cmath> #include <cstdlib> #include <ctime> #include <fstream> #include <iostream> #include <chrono> #include "Config.hpp" #include "Population.hpp" #include "Utils.hpp" #include "GAUtils.hpp" #include "Arg.hpp" using std::cout; using std::endl; using std::invalid_argument; using std::sr...
true
6aa2f3de1c6f38725c8a5f8221ed0bee38b2364c
C++
michivo/osd
/ue3/ConstConstConst/ConstConstConst/Dummy.cpp
UTF-8
567
3.03125
3
[ "MIT" ]
permissive
#include "stdafx.h" #include "Dummy.h" Dummy::Dummy() : od_{ 0 } { } Dummy::Dummy(OtherDummy od) : od_{ od } { } const OtherDummy & Dummy::get_other_ref() const { return od_; } OtherDummy Dummy::get_other_val() const { return od_; } OtherDummy& Dummy::get_other_nc_ref() { return od_; } void Dummy::set_other(co...
true
c0b98d0f93ca80515d561918ef8d499322672ff7
C++
Conglang/MyLeetCode
/src/Reverse_Nodes_in_k-Group.cpp
UTF-8
2,692
3.71875
4
[]
no_license
////////////////////////////////////////////////////// // Project: MyLeetCode // // Author: YanShicong // Date: 2014/11/17 ////////////////////////////////////////////////////// /*-------------------------------------------------------------------------------------------------------------- * Given a linked list...
true
6139e52b86ae8bf143009ccd7df41a34fe093dd6
C++
TaranSinghania/sherpa_41
/src/dom.cpp
UTF-8
4,743
2.84375
3
[ "MIT" ]
permissive
// sherpa_41's DOM module, licensed under MIT. (c) hafiz, 2018 #ifndef DOM_CPP #define DOM_CPP #include "dom.h" #include <iterator> #include <sstream> #include "visitor/visitor.h" /** * Inserts an attribute * @param attribute attribute to add * @param value value of attribute */ void DOM::AttributeMap::insert(...
true
60e6ecfa2f78ea53527ac088efc3bae059207f6f
C++
kurocha/buffers
/source/Buffers/Buffer.cpp
UTF-8
3,619
2.828125
3
[ "MIT" ]
permissive
// // Buffer.cpp // This file is part of the "Buffers" project and released under the MIT License. // // Created by Samuel Williams on 17/7/2016. // Copyright, 2016, by Samuel Williams. All rights reserved. // #include "Buffer.hpp" #include "File.hpp" #include <stdexcept> #include <system_error> #include <casser...
true
27c0c5c6f891520069dad426e0f84171fd5104fc
C++
hnlylmlzh/cs
/array/char_array/main.cpp
UTF-8
880
3.453125
3
[]
no_license
#include <iostream> #include <string> // pointer array const char * p[] = { "wang zong", "sun zong", "china" }; const char * q[] = { "wang zong", "sun zong", "china" , 0 }; char * pp[] = { "wang zong", "sun zong", "china" }; char * qq[] = { "wang zong", "sun zong", "china" , 0 }; char * a = "hello world"; ...
true
32bc5f7ca30246d2ada0e16bd160ac99f780c39a
C++
RedwanNewaz/tase_exp
/include/TrajPlanner.h
UTF-8
1,901
2.703125
3
[]
no_license
// // Created by redwan on 5/3/19. // #ifndef TASE_EXP_TRAJPLANNER_H #define TASE_EXP_TRAJPLANNER_H #include <iostream> #include <QtCore> #include <QPointF> #include <QThread> #include <queue> #include "MotionPrimitives.h" #include "VizTraj.h" class TrajPlanner:public QThread{ public: TrajPlanner(MotionPrimitives...
true
9f94a95cd8c77f249bb7eb6aed8bd7e823c5c706
C++
guankang/NaviPackDebugTools
/commonSrc/tools/Matrix.h
UTF-8
3,667
2.75
3
[]
no_license
#pragma once #include <stdio.h> #include <stdlib.h> #include <math.h> #include "windowsdef.h" #include <iostream> using namespace std; #define USINGFLOAT //#define USINGDOUBLE #ifdef USINGFLOAT typedef float REAL; #define MATDATATYPE CV_32F #define READTYEP "%f" #endif #ifdef USINGDOUBLE typedef double REAL; #def...
true
36d5853d39475b8d4a832fcfc00a3e4c52101fa8
C++
Hooje/Introduction_to_algorithm
/997.cpp
UTF-8
967
2.75
3
[]
no_license
#include<iostream> #include<memory.h> #include<math.h> using namespace std; int n; int sum=0, middle; int A[1000]={0}; int value[1000]={0}; int solve(int k); int dp[10000000]; int main() { cin>>n; for (int i = 0; i < n; ++i) { int x; cin>>x; A[i]=x; value[x]++; sum+=x; } mi...
true
a1da0b02caa877cc7ddf29770b3553af8e2b9e92
C++
siliconx/cpp
/cpp_primer_plus/16/rangefor.cpp
UTF-8
404
2.625
3
[]
no_license
// @siliconx // 2017-08-27 10:59:31 #include <iostream> #include <vector> int test(int); int main() { std::vector<int> v; for (int i = 0; i < 10; ++i) { v.push_back(i); } for (auto& e : v) { ++e; } for (auto& e : v) { std::cout << e << std::endl; } std::cout ...
true
c4a2d7d6f9244da83e6e79901a3e665c4084765f
C++
KangyinYu/yuk3
/newhw4/new hw4.cpp
UTF-8
784
3.78125
4
[]
no_license
#include <iostream> using namespace std; int binarySearch(int array[], int size, int searchValue) { int low= 0; int high= size - 1; int mid; while(low<=high) { mid = (low+high)/2; if(searchValue==array[mid]) { return mid; } else if(searchValue>array[mid]) { low=mid+1;...
true
d49d3e40da424931c21c3114e6e61ea1e2a8eaa8
C++
Adinda18/sistemperlombaan2
/main.cpp
UTF-8
10,539
3.015625
3
[]
no_license
#include <iostream> #include <string> #include "list_lomba.h" #include "list_peserta.h" #include "relasi.h" #include <conio.h> using namespace std; int main() { List_peserta L1; List_lomba L2; List_relasi L3; createList(L1); createLomba(L2); createRelasi(L3); int pilih = 0...
true
14d2286dd7974d6261c26ce98ff95b9076fa3ba9
C++
grossora/ConeProject
/ConeProject/conicalprojection.cxx
UTF-8
4,264
2.53125
3
[]
no_license
#ifndef RECOTOOL_CONICALPROJECTION_CXX #define RECOTOOL_CONICALPROJECTION_CXX #include "conicalprojection.h" namespace larlite { //----------------------------------------------------------------------------------------------------------------- // This is the pxpoint for the vertex? std::vector<larutil:...
true
cbd8754d5203f7c3e866e743021e439dc2cc1cb1
C++
marvinschmitt/ipi2017
/loesungen/zettel4/roots.cc
UTF-8
2,443
3.796875
4
[]
no_license
// Aufgabe 4.4 (a): f(x) = x² - c hat die positive Nullstelle Wurzel(c). #include <iostream> #include <cmath> // Nils (Tutor) hat gesagt, wir dürfen in Aufgabenteil d) die sqrt-Funktion nutzen um die Genauigkeit zu bestimmen. using namespace std; const double accuracy = 1.0e-12; // Globale Variable mit gewünschte...
true
19bc1a20c69ade4da56b540613297da36b91ec0b
C++
kobe24o/LeetCode
/algorithm/leetcode844_backspace-string-compare.cpp
UTF-8
1,552
3.53125
4
[]
no_license
#include <iostream> #include<string> using namespace std; class Solution { public: bool backspaceCompare(string S, string T) { process(S); process(T); int i, j; for(i = 0,j = 0; i < S.size() && j < T.size(); i++,j++) { while(i < S.size() && S[i] == '#') i++...
true
bc733e31e94040a707ae987f7f62629a3d83f5a0
C++
TruVortex/Competitive-Programming
/ICPC/ecna16i.cpp
UTF-8
2,750
2.890625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; template <const int MAXN> struct Dinics { struct edge { int v, flow, cap, rev; }; int vis[MAXN], start[MAXN]; vector<edge> adj[MAXN]; bool BFS(int src, int fin) { memset(vis, -1, sizeof vis); vis[src] = 0; queue<...
true
9107958a952dfe0a21cceb966f6eb5f009ea15a2
C++
hammad97/pos_system_cplusplus
/PrePackedFood.cpp
UTF-8
661
2.640625
3
[]
no_license
#include "PrePackedFood.h" #include "Product.h" #pragma once PrePackedFood::PrePackedFood(char pname[50],int aoQuantity,int noQuantity, int sQuantity,double pcode,double cp,double sp,double discount,int Quan) :Product(pname,pcode,cp,sp,discount,aoQuantity,noQuantity,sQuantity) { QuantityInUnit=Quan; } double PrePacke...
true
675ca37a43c23819afc301065ad6e758a8eae88b
C++
SergeyBrian/derivative_calculator
/src/math/Log.h
UTF-8
611
2.671875
3
[]
no_license
// // Created by sergio on 22.03.2021. // #ifndef DERIVATIVE_CALCULATOR_LOG_H #define DERIVATIVE_CALCULATOR_LOG_H #include "UnaryOperation.h" #include "Division.h" class Log : public UnaryOperation{ public: explicit Log(Operation *o) : UnaryOperation(o) {}; string getString() override { return "\\\\l...
true
8f7ada4e72e0dbdbba6af5506b35a9570cc2a2d1
C++
geminoric/nativeRace
/src/sector.hpp
UTF-8
311
2.53125
3
[]
no_license
#ifndef SECTOR_HPP #define SECTOR_HPP #include "component.hpp" #include <vector> class sector : public component { public: int sectX, sectY; std::vector<gameObject *> objectsInSector; sector(int secX, int secY) : sectX(secX), sectY(secY) {} ~sector(); void addToSector(gameObject *obj); }; #endif
true
8f24e62c845670fa08d20ca079a8b71f1706b067
C++
vuslysty/piscineCPP
/rush00/Enemys/FireflyShip.cpp
UTF-8
598
2.6875
3
[]
no_license
// // Created by Vladyslav USLYSTYI on 2019-06-30. // #include <cstdlib> #include "FireflyShip.hpp" FireflyShip::FireflyShip() {} FireflyShip::FireflyShip(int x, int y) { _hp = 3; _damage = 1; _heading = -1; _speed = 2; _pos_y = y; _pos_x = x; _score = 30; pic[0] = 'K'; pic[1] = 'H'; pic[2] = '\0'; } Fir...
true
3b2941799b8eac2f83d430d39a08d72c5b33aeeb
C++
h4tr3d/IncludeOS
/mod/SQLite/sqlite.cpp
UTF-8
1,890
2.96875
3
[ "Apache-2.0" ]
permissive
#include <SQLite/sqlite.hpp> #include <stdio.h> namespace database { SQLite::SQLite() { this->status = sqlite3_open(":memory:", &this->database); printf("Database status: %d, db: %p\n", this->status, this->database); } SQLite::~SQLite() { if (this->database) sqlite3_close((sqlite3*) this->database); ...
true
1d95ca897d0aa0fbe5ae87627b8683cf329ad0b8
C++
joshua-evins/capstone
/Code/Phi/Phi/Circle.h
UTF-8
306
2.671875
3
[]
no_license
#pragma once #include <glm\glm.hpp> class Circle { public: static float diameters[11]; static float radii[11]; Circle* left; Circle* right; Circle* top; Circle* bottom; float diameter; glm::vec2 center; Circle(float x, float y, int diameterIndex); Circle(float x, float y, float diameter); };
true
282aee03c62b6e979bd829b497f0e525a17f79f4
C++
vishalkumarsingh999/CPP_Practice
/Coding_From_School/School_Practice/QWERTYUI.CPP
UTF-8
271
3
3
[]
no_license
#include<iostream.h> #include<process.h> void main() { int num,i; cout<<"\n enter the number:"; cin>>num; for(i=2;i<=num/2 ; ++i) if(num % i==0) { cout<<"\n not a prime number !!!"; exit(0) ; } cout <<"\n it is a prime number."; }
true
27778fafc20fcb2e6ee1c346a6aa4b3f80c74780
C++
frc3512/AutonSelector
/test/src/Main.cpp
UTF-8
1,227
2.703125
3
[ "BSD-3-Clause" ]
permissive
// Copyright (c) 2020 FRC Team 3512. All Rights Reserved. #include <chrono> #include <iostream> #include <thread> #include "autonselector/AutonSelector.hpp" using namespace std::chrono_literals; class Robot { public: void initFunc1() { std::cout << "Auto Init 1" << std::endl; } void initFunc2() { std::cout...
true
7d196d84e5e92e7d0b9356027c812c2ac6a36eeb
C++
newkid004/portfolio_01_maple_2
/winDirect/winAPI/sceneTest2.cpp
UTF-8
1,351
2.53125
3
[]
no_license
#include "stdafx.h" #include "sceneTest2.h" HRESULT sceneTest2::init() { pos.x = 100; pos.y = 100; x = y = 0; return S_OK; } void sceneTest2::release() { } void sceneTest2::update() { if (KEYMANAGER->press(VK_LEFT)) { pos.x -= 10; x--; } if (KEYMANAGER->press(VK_RIGHT)) { pos.x += 10; x++; } if...
true
8806ea0e31e3cf4cfbd89e2855a0a645f38f2190
C++
EthanJamesLew/DataBass_Project3
/include/songlist.h
UTF-8
1,966
3.28125
3
[]
no_license
#ifndef SongList_H #define SongList_H #include "evector.h" #include "estring.h" #include "song.h" /* Library is an abstract class that define storage and searching of a library type */ template <class T> class Library { public: void addItem(T item){ items.push_back(item); } template <class V> T* searchIndex(un...
true
cbb931b2f3e95c839516485d0f16df060e86ddcd
C++
shatorofusuki/CPP-STL-Huge-numbers-calculator
/src/CElement/COperator.cpp
UTF-8
993
3.875
4
[]
no_license
#include "COperator.h" COperator::COperator (const EOperation a) : m_Op(a) {} COperator::COperator (const char * op) { if (*op == '+') { m_Op = EOperation::addition; } else if ( *op == '*') { m_Op = EOperation::multiplication; } else if (*op == '-') { m_Op = EOperation::subtraction...
true
186d9e752a93048a087298ea9eb6ab3aca3bbba2
C++
descrip/competitive-programming
/uva/572.cpp
UTF-8
706
2.53125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int M, N, cnt; char A[101][101]; void recur(int x, int y) { if (!(0 <= y && y < N) || !(0 <= x && x < M) || A[y][x] != '@') return; A[y][x] = '*'; for (int cy = y-1; cy <= y+1; ++cy) for (int cx = x-1; cx <= x+1; ++cx) recur(cx, cy); } int main() { i...
true
6c0d015849870e7fe953b86dc53cbdd4b8ea1bdf
C++
zshanahmed/Communication-Assistant-for-Hearing-Impaired
/Code/Normal_Person.cpp
UTF-8
4,361
2.625
3
[]
no_license
#include<stdio.h> #include<winsock2.h> #include <iostream> #include <string> #include "opencv2/highgui/highgui.hpp" #include <assert.h> #pragma comment(lib,"ws2_32.lib") //Winsock Library using namespace cv; using namespace std; int main(int argc , char *argv[]) { WSADATA wsa; printf("--------...
true
281e76affeac8f92a9f05ff36ef2f4cf34e4ee99
C++
alicezywang/cognition
/src/micros/resource_management/cognition/cognition_manager/core/model_recommend/include/model_recommend/recommend.h
UTF-8
1,458
2.53125
3
[]
no_license
#ifndef RECOMMEND_H #define RECOMMEND_H #include <vector> #include <string> #include <map> #include <ros/package.h> namespace cognition { struct task_info { std::string task_id; std::string task_type; std::string battle_field; std::string task_period; std::string target_category; ...
true
0381838bc7095074641966265ce5828c5c25bb26
C++
delyex/depthai-core
/examples/bootloader/bootloader_config.cpp
UTF-8
2,012
2.734375
3
[ "MIT" ]
permissive
#include "depthai/depthai.hpp" int main(int argc, char** argv) { // Options bool usage = false, read = true, clear = false; std::string path = ""; if(argc >= 2) { std::string op = argv[1]; if(op == "read") { read = true; } else if(op == "flash") { read = ...
true
1e057caa4401cf861201d3289c153dce2799a0bf
C++
bayusamudra5502/PustakaCPP
/Pemrograman Kompetitif/Runtuh-Rev2.cpp
UTF-8
1,482
2.671875
3
[ "MIT" ]
permissive
#include <bits/stdc++.h> using namespace std; char matriks[25][10]; bool hapus(); int R,C; void runtuh(); void isi(); void cetak(); int maximum = -1; int main(){ for(int i = 0; i < 25; i++){ for(int j = 0; j < 10; j++){ matriks[i][j] = '0'; } } isi(); ru...
true
6a07f585b736ef1010b4be77f4d9967b0290604f
C++
BuffBuff/GE-Architecture
/GEN/ResourceCache/Source/ResourceCache.cpp
UTF-8
8,421
2.765625
3
[]
no_license
#include "ResourceCache.h" #include "DefaultResourceLoader.h" #include <algorithm> #include <iomanip> #include <iostream> namespace GENA { std::shared_ptr<ResourceHandle> ResourceCache::find(ResId res) { std::unique_lock<std::recursive_mutex> lLock(leastRecentlyUsedLock, std::defer_lock); std::unique_lock<std:...
true
ec1fe452bdc6ab6e9cd176ab2aed25382f6ad4a6
C++
alejandro-g/Funciona
/VSArrayList.h
UTF-8
596
2.71875
3
[]
no_license
#ifndef VSARRAYLIST_H #define VSARRAYLIST_H #include "ADTList.h" class VSArrayList : public ADTList{ private: int current_capacity; int delta; void resize(); Object** array; public: VSArrayList(int); VSArrayList(int,int); virtual ~VSArrayList(); virtual bool insert(Object*, int); virtual Object* rem...
true
4cc79030c2371af81e2ab72f915891aa6ec74f9d
C++
skvl/TermOx
/include/termox/painter/detail/screen.hpp
UTF-8
742
2.53125
3
[ "MIT" ]
permissive
#ifndef TERMOX_PAINTER_DETAIL_SCREEN_HPP #define TERMOX_PAINTER_DETAIL_SCREEN_HPP #include <termox/painter/detail/staged_changes.hpp> namespace ox::detail { /// Writes uncommitted changes to the underlying paint engine. /** Also enable the cursor on the widget in focus. Implements optimizations * if the tile alread...
true
22cf603b707a767b875403a22eeae95e52ab0629
C++
Huynh-Thanh-Tam/Lean
/B5.CPP
UTF-8
632
3.296875
3
[]
no_license
#include <iostream> #include <cmath> using namespace std; // Nhập va xuất mảng một chiều void input(int m[], int n) { for(int i = 0; i <= n; i++) { cout << "["<< i+1 << "] = "; cin >> m[i]; } } void output(int m[], int n) { for(int i = 0; i < n; i++) { cout << m[i] << " "; } } int main...
true
b8ae1b6e77ac25d3adf9dde1963125e1f480e587
C++
xiaoyongaz/jslintcode
/7binaryTree/removeNode.cpp
UTF-8
2,412
3.953125
4
[]
no_license
class TreeNode { public: int val; TreeNode *left, *right; TreeNode(int val) { this->val = val; this->left = this->right = nullptr; } } class Solution { public: int removeLeftMax(TreeNode* pre, TreeNode* node){ //if right is nullptr, then itself is...
true
e614458f4b9dbab0f7b6ce10623aff909f349bfa
C++
mohitsh/cpp
/binaryTree/generalTreeAlgo/tree.cpp
UTF-8
2,320
3.859375
4
[]
no_license
#include<iostream> using namespace std; struct node { int data; node* left; node* right; }; node *newNode(int key) { node *new_node = new node; new_node->data = key; new_node->left = nullptr; new_node->right = nullptr; return new_node; } void printInOrder(node *root) { if (root == nullptr) retur...
true
1865b1e0d064c998d74d6baab30f7a4cf795cc18
C++
LeeSangYun92/Algorithm
/백준 - 14502.연구소.cpp
UTF-8
1,835
2.765625
3
[]
no_license
//#include <iostream> //#include <vector> //#include <queue> // //using namespace std; // //int N, M; //int **board; //int Max = 0; // //vector<pair<int, int>> v; // //void BFS() //{ // queue<pair<int, int>> q; // bool **visit = new bool*[N]; // for (int i = 0; i < N; i++) // { // visit[i] = new bool[M]; // for (int ...
true
71159c42abfe86c3368802c8c5d2ec5d997eb5f6
C++
JanaSabuj/Leetcode-solutions
/797/797.cpp
UTF-8
645
3
3
[ "MIT" ]
permissive
class Solution { public: vector<vector<int>> dfs(vector<vector<int>>& adj, int x, int n) { // base if (x == n - 1) { return {{x}}; } // main vector<vector<int>> ans; for (auto v : adj[x]) { // x -> v vector<vector<int>> paths = dfs(adj, v, n); for (auto subpath : paths) { subpath.push_back...
true
278fb24323aa0e167b66ce5b290a0d7e49c46621
C++
ZhaCong2017/USACO
/1.4.2Mother'sMilk.cpp
UTF-8
3,039
2.6875
3
[]
no_license
/* ID:chac161 TASK:milk3 LANG:C++ */ #include<iostream> #include<stdio.h> #include<fstream> #include<queue> #include<vector> #include<algorithm> #include<set> using namespace std; inline int hashed(int a, int b, int c) { return a * 10000 + b * 100 + c; } int main() { ifstream fin("milk3.in"); ofstream fout("milk3...
true
d1af4f8ea7f745ab1c5705299306645883b25100
C++
bbqchickenrobot/RPG-1
/src/Sprite.cpp
UTF-8
1,477
2.765625
3
[]
no_license
#include "Sprite.hpp" CSprite::CSprite() { screen = g_pFramework->GetScreen(); renderer = g_pFramework->GetRenderer(); } CSprite::~CSprite() { SDL_FreeSurface(m_pImage); } void CSprite::Load(const string sFilename) { m_pImage = SDL_LoadBMP(sFilename.c_str()); if (m_pImage == NULL) { cout << "Error while load...
true
4cbcbc272526a90ab459753a2e862569d4b7105a
C++
jjzhang166/Geant4
/SimpleSimClean/include/CIScintiHit.h
UTF-8
3,145
2.796875
3
[]
no_license
/*************************************************************************** * Copyright (C) Minister of Natural Resources Canada 2008. * * hseywerd@nrcan.gc.ca * * * ********...
true
dab08395161fde9d7ce98c93c54c4f54b07652f7
C++
Guima01/trabalhoED2-parte2
/AVLtree.h
UTF-8
1,334
2.734375
3
[]
no_license
#include <fstream> #include "NoAVL.h" #include "HashTable.h" using namespace std; class AVLtree { public: AVLtree(HashTable *tabela); // CONSTRUTOR ~AVLtree(); // DESTRUTOR bool vazia(); // VERIFICA SE A ÁRVORE ESTÁ VAZIA void busca(string code,int &totalCasos, int &comparacoes); // BUSCA ...
true
21e84d6e9f5ba9924d0d8f7a3a4b885a779c635e
C++
bolvarak/GeneticAlgorithm
/C++/main.cpp
UTF-8
1,266
2.90625
3
[]
no_license
// Application Headers #include <stdlib.h> #include <time.h> #include "GeneticAlgorithm.h" #include "Definitions.h" // Namespace definition using namespace std; // global definitions GeneticAlgorithm* cGeneticAlgorithm; // Main() int main () { // Setup our stop boolean bool bDone = false; // Instantiate...
true
c5e8f973de2e0293ac38af81d6b86153c0b2a77d
C++
LectureswithAkhil/Implementation-of-stack-using-Array
/Stack.cpp
UTF-8
1,195
3.75
4
[]
no_license
#include<iostream> using namespace std; int top=-1; int a[5]; bool isempty() { if (top==-1) return true; else return false; } void push(int value) { if (top==4) { cout<<"stack is full \n"; } else{ top++; a[top]=value; } } void pop() { if(isempty()) cout<<"The stack is emp...
true
789e50e19bd0cccd673f7a180504225281d96f2e
C++
brucechin/Leetcode
/141-Linked List Cycle.cpp
UTF-8
683
3.65625
4
[]
no_license
/* Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? */ /* 一个每次前进两格,一个每次前进一格,如果有环,迟早会重合。不能一个移动,一个停着等相遇,可能停着的那个不在环里 */ class Solution { public: bool hasCycle(ListNode *head) { if(head==NULL) return false; ListNode* walker = head; ...
true
cec9f8e01c7c226180fb5b87e212c8971f4246eb
C++
henrybear327/Sandbox
/LeetCode/old/PrepForGoogleInterview2018/C++/first/10_recursive.cpp
UTF-8
4,240
2.84375
3
[]
no_license
#ifdef LOCAL #include <bits/stdc++.h> using namespace std; // tree node stuff here... #endif static int __initialSetup = []() { std::ios::sync_with_stdio(false); cin.tie(NULL); return 0; } (); // code using look-ahead logic -> life is a lot more easier class Solution { private: string conv(int a, int...
true
5507eaecd3cb981988569229d93391b2d28674d9
C++
alexandraback/datacollection
/solutions_1485490_0/C++/dstabosz/toys.cpp
UTF-8
2,590
2.6875
3
[]
no_license
#include <stdio.h> #include <assert.h> #include <cstring> #include <vector> #include <set> #include <list> #include <algorithm> using namespace std; int debug = 0; int N, M; int toyType[100]; long long toyCount[100]; int boxType[100]; long long boxCount[100]; long long Solve(int toyIdx, int boxIdx, int tType, long...
true
5d51c234a86fc9416d0b6e73711935a8bafc0a0b
C++
vchahalBMS/CCP
/Lab 1/Count positive,negative,zeros.CPP
UTF-8
531
3.421875
3
[]
no_license
#include<stdio.h> int main() { int limit,num,positive=0,negative=0,zero=0; printf("Enter the limit\n"); scanf("%d",&limit); printf("Enter %d numbers\n",limit); while(limit) { scanf("%d",&num); if(num>0) { positive++; } else if(num<0) { negative++; } e...
true
0ef29f191cef6e6e9f1d7f34f7c996173cd283c7
C++
DieterJoubert/CSE100
/pa4-rcaldero-djoubert/boggleutil.cpp
UTF-8
1,057
3.09375
3
[]
no_license
#include "boggleutil.h" //see whether dice has been used in forming word bool BoardNode::getVisited() { return visited; } //sets whether dice has been visited, used by finding word path void BoardNode::setVisited(bool newState) { visited = newState; } //returns the string representing the face of this dice const...
true
a13dd7d1601a2f6fcad3fa100b2254f1d769d065
C++
user160244980349/course-work-footballstars
/sources/Physics.cpp
UTF-8
8,777
2.6875
3
[]
no_license
#include "../include/Physics.h" Physics::Physics (Model* objectPtr, Collider* collider, Vector s, Vector a, Vector g, double bouncy, Collider** otherColliders, int collidresNum, Col...
true
f9c217fd176f85c830dc1b9a619a581acff6e50e
C++
astronautas/tanks
/Messenger/messenger_client.cpp
UTF-8
2,984
2.65625
3
[]
no_license
#include "Messenger_Client.h" // Explain each #ifdef _WIN32 #include <WinSock2.h> #include <WS2tcpip.h> #include <Windows.h> #else #include <sys/socket.h> #include <sys/types.h> #include <netinet/in.h> #include <arpa/inet.h> #endif using namespace std; Messenger_Client::Messenger_Client() ...
true
274a256a4ba10985fe3afdc84f02bc166b954305
C++
nathaniel-mohr/undergrad_coursework
/CS162/labs/lab7/rectangle.h
UTF-8
307
2.796875
3
[]
no_license
#ifndef RECTANGLE_H #define RECTANGLE_H #include "shape.h" class Rectangle:public Shape{ private: float base; float height; public: float get_base() const; float get_height() const; void set_base(float); void set_height(float); virtual float calculate_area(); Rectangle(); }; #endif
true
b55f5e39718433e56ae12f3d7c697564adc21546
C++
DrSHW/syh-LuoGu
/P5736.cpp
UTF-8
479
2.703125
3
[]
no_license
#include<bits/stdc++.h> #define N 100000 using namespace std; int prime[N] = {0}; int main() { int i, j; prime[0] = 1; prime[1] = 1; for(i = 2; i < N; i++) { if(!prime[i]) { for(j = 2; i * j < N; j++) prime[i * j] = 1; } } // for(i = 2; i < N; i++) // { // cout << i << ' ' << ...
true
60ea97ba5c2dcc57b42f6eb257d957e7515aeb67
C++
Treyhowell/csci325
/Vector_program/Vector.cpp
UTF-8
997
3.59375
4
[]
no_license
#include "Vector.h" #include <iostream> using namespace std; Vector::Vector(){ vec_ptr = NULL; vec_size = 0; vec_capacity = 0; } Vector::Vector(const Vector &other){ vec_ptr = other.vec_ptr; vec_size = other.vec_size; vec_capacity = other.vec_capacity; } Vector::~Vector(){ delete [] vec_ptr; vec_size...
true
975c3448478e091f48f07e4722547aebecff915a
C++
xtozero/Study
/SIMD/src/Ch.04/01_overview.cpp
UTF-8
2,828
2.640625
3
[]
no_license
/*-------------- SIMD 명령어를 이용한 구현은 어셈블리 언어 구조이므로 루프 문에 대한 구현, 레지스터 개수 제한, 디버깅의 어려움 등의 단점이 있다. 인텔에서는 이런 점을 보안하기 위해 intrinsic 함수를 제공한다. intrinsic 함수를 사용하면 C/C++환경에 익숙한 루프와, 조건문, 코드의 가독성, 보다 나은 디버깅 환경을 얻을 수 있다. 명명법 _mm_<intrin_op>_<suffix> _mm_ : SIMD의 intrinsic 함수를 의미한다. <intrin_op> : 실제로 동작할 연산자를 의미한다. <suffix> : 사용...
true
9240578e67edb062be5f03883a82ca11869bcb26
C++
TheiaRT/libpnmpp
/pixel.h
UTF-8
1,675
3.078125
3
[]
no_license
#ifndef PIXEL_H #define PIXEL_H #include <iostream> #include "dist/jsoncpp/json/json.h" #include "json_util.h" struct pixel_t { long r, g, b; pixel_t() { r = g = b = 0; } pixel_t(long r, long g, long b) : r(r), g(g), b(b) { } pixel_t operator+(const pixel_t &other) { retur...
true
2d99e55ac65a1c72bda8eb3f64b72887e5149dc9
C++
the-bad-cop/memmgmt_cpp
/raii/raii.cpp
UTF-8
702
3.765625
4
[]
no_license
#include <iostream> class raiClass { int *_ptr; public: raiClass(int *p = NULL) : _ptr(p) {} ~raiClass() { std::cout << "resource: " << *_ptr << " deallocated\n"; delete _ptr; } int &operator*() { return *_ptr; } }; int main() { int a[] = {1, 2, 3, 4, 5}; for (size_t i...
true
0ccc0c0e626e22f874759bdd333c663d098979a7
C++
dut-info/Gare-OpenGL
/BezierCurve.cpp
UTF-8
823
3.15625
3
[ "MIT" ]
permissive
#include "BezierCurve.h" #include "Point.h" #include <vector> #include <stdexcept> BezierCurve::BezierCurve(std::vector<Point> points) { this->points = std::vector<Point>(points); } Point BezierCurve::getTan(double t) { Point p = points[0] * (1 - t)*(1 - t) * (-3) + points[1]*(3*(1 - t)*(1 - t) - 6*(1 - t)*t) + p...
true
3591be0cd777912a16704549d6203504927c79c6
C++
iamsile/ACM
/Palindrome-2.cpp
UTF-8
1,008
3.546875
4
[]
no_license
#include <iostream> using namespace::std; int main() { char s[1001]; int i,j,m; cin >> m; while(m) { cin >> s; i=strlen(s); for(j=0;j<i/2;j++) { if(s[j]!=s[i-j-1]&&(char)(s[j]+32)!=s[i-j-1]&&s[j]!=(char)(s[i-j-1]+32) &&(char)(s[j]-32)!=s[i-j-1]&&s[j]!=(char)(s[i-j-1]-32)) { cout << "NO" <<...
true
69fbb358a13ad4c78875baaecd75d627152e3f4f
C++
jubinsoni/100daysofcode
/day49/day_fourty_nine.cpp
UTF-8
564
3.328125
3
[]
no_license
# include <iostream> # include <queue> using namespace std; void almostSorted(int arr[],int n,int k) { // minheap priority_queue<int,vector<int>,greater<int> > pq; for(int i=0;i<k;i++) { pq.push(arr[i]); } for(int i=0;i<k-1;i++) { cout << "_" << " "; } cout << pq.top() << " "; pq.pop(); for(int i=k...
true
997c48e34a09839ad1ce84c2597c57739d218178
C++
barrmelissa/CS161
/library/book.cpp
UTF-8
1,756
3.140625
3
[]
no_license
/********************************************************************* ** Author: Melissa Barr ** Date: August 8th, 2016 ** Description: Assignment 10 This program uses 6 seperate files and a main file to run a library simulator. It uses the Book files to get the books information, the Patron files to get the Pat...
true
25dc1c7be12f7d4a6aac595a30fb1d26b7a3d183
C++
ruanbo/Robert
/test_files/data/ThreadClass.cpp
UTF-8
1,398
2.875
3
[]
no_license
/* * ThreadClass.cpp * * Created on: Dec 27, 2013 * Author: root */ #include "ThreadClass.h" #include <pthread.h> ThreadClass::ThreadClass() { _is_running = false; _t_pid = 0; _thread_name = ""; } ThreadClass::ThreadClass(const string & class_name) { _is_running = false; _t_pid = 0; _thread_name = c...
true
1586776005d35683937477243d604015cf9a7821
C++
IntelLabs/SLIDE_opt_ia
/SLIDE/DensifiedWtaHash.h
UTF-8
760
2.59375
3
[ "MIT" ]
permissive
#pragma once #include <stdio.h> #include <stdlib.h> #include <chrono> #include <climits> #include <iostream> #include <random> #include <vector> #include <string.h> #include "MurmurHash.h" /* * Algorithm from the paper Densified Winner Take All (WTA) Hashing for Sparse Datasets. Beidi Chen, Anshumali Shrivastava */ us...
true
0671054ca87ece3cbe30ebf5d6cd36a177ee6f76
C++
lccl7/My-leetcode
/ReverseNodesink-Group.cpp
UTF-8
1,639
3.234375
3
[]
no_license
ListNode* reverseKGroup(ListNode* head, int k) { if(k <= 1 || !head || !head->next) return head; ListNode Dummy(-1); Dummy.next = head; ListNode *beginK = &Dummy, *endK = &Dummy; while(true) { for(int i = 0; i < k && endK; i++) endK = endK->next; if(!endK) break; ...
true
691b1b10bb5386becfb6c18e6a248d72ac90e35e
C++
tyadav4268/problem_solving
/dequeue.cpp
UTF-8
1,007
2.625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int t; cin>>t; while(t--){ long long int m, n; cin>>n>>m; vector<long long int> q; for(long long int j = 0; j <...
true
c8d4dd7d14d11da4c6ef4d77754e2f0ab32fee62
C++
Kewth/OJStudy
/cf1444b.cpp
UTF-8
1,822
2.921875
3
[]
no_license
/* * Author: Kewth * Date: 2020.11.01 * Solution: * 贡献系数的还原 把序列排个序,容易想到每个数的贡献就是一个系数乘上该数,而该系数只与其所在的位置有关。 那么问题就是求出这个贡献系数,求出所有 01 序列的答案,就可以还原系数数组。 * Digression: * CopyRight: __ __ __ __ | |/ |.-----.--.--.--.| |_| |--. | < | -__| | | || _| | |__|\__||_____|__...
true
42332ebb06570280f00e0b88b48557aa3188946b
C++
rmrychecky/CSCI1300
/Practice Practicum IV/q10.cpp
UTF-8
1,146
3.609375
4
[]
no_license
#include <iostream> using namespace std; class Probability { private: float prob_values[50]; string event[50]; public: //set each function with their perspective input types Probability(); void ReadFile(string filename); string getMostLikelyEvent(float value); }; Probability :: Probability() {...
true
2eee1d30d70c298b289fd345e018dc1b9d4c7684
C++
vsdaniela/Daniela
/laboratorio 5/main_chrono.cpp
UTF-8
442
2.90625
3
[]
no_license
#include <iostream> #include "code_chono.h" using namespace std; int main(){ try{ Chrono::Date holiday(1978, Chrono::Date::jul,4); Chrono::Date d2=Chrono::day_next_sunday(holiday); Chrono::Date d = day_of_week(d2); cout<<"Feriado es "<<holiday<<" d2 es "<<d2<<endl; return holiday != d2;...
true
d9acb3dbca2c0d0845e287643aa13299c131a028
C++
Darui99/ITMO-Algorithms-And-Data-Structures
/Laboratory work 5 - Search trees/Sum again.cpp
UTF-8
1,960
2.6875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll mod = (ll)1e+9; struct Node { Node* left; Node* right; ll key, pr, sum; }; Node* Empty = new Node{ NULL, NULL, 0ll, 0ll, 0ll }; Node* root = Empty; void update(Node* v) { if (v == Empty) return; v->sum = v->left->sum + v->right->sum ...
true
1515d9b5f64bae92f957421086cdf2d6319c7171
C++
jshou/cpp_exercises
/farm.cpp
UTF-8
821
3.765625
4
[]
no_license
#include <iostream> using namespace std; float sum(int horse, int pig, int rabbit); void print_answer(int horse, int pig, int rabbit); int main() { int horse = 100; while (horse > 0) { for (int i = 0; i < (100 - horse); i++) { int pig = i; int rabbit = 100 - horse - pig; ...
true
ee987bc702917b8ce2e604ecad4d09d67fd46d1b
C++
MarshalBrain/C-projects
/KPoint(Ingeritance)/KPoint(Ingeritance)/KShape.cpp
WINDOWS-1251
1,669
3.171875
3
[]
no_license
#include "stdafx.h" #include "KShape.h" const double rad = 3.14159265358979323846 / 180; void KShape::Explode(double a) { if (a > 0) { high *= a; width *= a; Count(); } else if (a < 0) { high /= -a; width /= -a; Count(); } } //void KShape::Shift(double dx, double dy) //{ ...
true
2cbe9b32a8e893c3511164efe4ccb7ee70766777
C++
summerHearts/AlgorithmPro
/算法时空/图论/Graph-Representation/Component.h
UTF-8
1,244
2.859375
3
[ "Apache-2.0" ]
permissive
// // Created by 佐毅 on 2018/3/18. // Copyright © 2018年 dfjr. All rights reserved. // #include <iostream> #include <cassert> using namespace std; template <typename Graph> class Component{ private: Graph &G; bool* visited; int ccount = 0; int *id; void dfs( int v ){ visited[v] = true;...
true
c5abf3686104d455b9cfbd6397980d9e77c8f908
C++
irisu-inwl/programming_contest
/POJ/poj_1979.cpp
UTF-8
1,213
2.5625
3
[]
no_license
#include <iostream> #include <cstdio> #include <string> #include <algorithm> #include <string.h> using namespace std; #define MAX_N 20 int W; int H; char field[MAX_N][MAX_N]; int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; int res; void dfs(int x, int y){ field[y][x] = '#'; res++; ...
true
3d9d0c9368ae7ce5b5c0b55341371c9be92c275f
C++
alexandraback/datacollection
/solutions_5708921029263360_0/C++/angel8878/2-c.cpp
UTF-8
1,937
2.890625
3
[]
no_license
#include<string> #include<iostream> #include<fstream> #include<math.h> #include<stdlib.h> using namespace std; int main(void) { ifstream file; file.open("C-small-attempt2.in"); ofstream output; output.open("result.out"); int caseNo; file >> caseNo; for (int c = 1; c <= caseNo; c++) { int...
true
50fe4a5e67f2da6c8e389b0ac6ef0c1f8811a34b
C++
csalvaggio/rit
/imgs/apps/key_encrypt/key_encrypt.cpp
UTF-8
847
3
3
[]
no_license
#include <iostream> #include <string> #include "imgs/ipcv/key_encryption/KeyEncryption.h" using namespace std; int main() { string key = "buffalo"; string str = "This is a test of the key encryption system"; // string key = "imgs"; // string str = "Hello World!!!"; // string key = "Salvaggio"; // string ...
true
d3da2a13c3938df38e5ad90df76da38903285162
C++
angstyloop/MyProjects
/CSCI382/c++/Random.cpp
UTF-8
1,730
4.09375
4
[]
no_license
/* Some practice with generating random numbers in c++ */ /* I added a function Shuffle() that randomizes a list by swapping each element an element at a random index. */ #include <iostream> #include <random> using namespace std; // we'll need a Swap() function template <class T> void Swap(vector<T> &A, int i, int j)...
true
e9286871a62a60189ba3424c05f3a9c27ec423a3
C++
kyun1016/2019.04.30-
/Even Digits(string add, stirng min, string min).cpp
UHC
3,607
3.359375
3
[]
no_license
//////https://code.google.com/codejam/contest/9234486/dashboard(ڵ ó) // // // //#include<iostream> //#include<string> //#include<algorithm> // //using namespace std; // //string Min(string a, string b) { // if (a.size() < b.size()) // return a; // else if (b.size() < a.size()) // return b; // else // for (int i = 0;...
true
832e4321158e2f7c59bb07f8419622e37f971851
C++
huangk4/web-security
/WebProtect/C_virus.cpp
GB18030
2,836
2.65625
3
[]
no_license
#include "stdafx.h" //洢ļ· vector<string> filepath; extern char g_virus_check_ip[MAX_PATH];//ƼIP extern int g_virus_check_port;//Ƽ˿ /*---------------------------- * : ݹļУҵаļ *---------------------------- * : find * : public * * : lpPath [in] ļĿ¼ * : fileList [in] ļƵʽ洢ļ */ void find(char* lpPath, std::v...
true
00a9da9064f81f8c1968a934a66ab2093f9b3b42
C++
denis9570/tsi_tasks
/fifth_task/countTriplets.cpp
UTF-8
786
3.34375
3
[]
no_license
#include <iostream> using namespace std; // this code is distributed under the GNU GPL license int main() { /* Вводится натуральное число. Определить количество цифр 3 в нем. Эта программа написана для Рижского института транспорта и связи студентом Денисом Орловом(А.К)*/ int a; cout << "Please ...
true
dfdde48d776b9054d62466d81ef19b995a3e097f
C++
MuhammadNajat/Sorting-Algorithms
/1727_SELECTION_SORT.cpp
UTF-8
613
2.53125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int a[1000000]; int main() { int i, j, n; //Read until the end of file reached while(scanf("%d", &n) != EOF) { for(i=0; i<n; i++) { scanf("%d", &a[i]); } for(i=0; i<n; i++) { int minInd = i; for(j=...
true
5a6c10b84d17f4eeddff3fa0efb1332664c67b68
C++
SweetySnail/Project_TREE
/Project_TREE/project2/AVLTree.cpp
UTF-8
5,985
3.28125
3
[]
no_license
#include "AVLTree.h" bool AVLTree::Insert(Gamedata* pGame) { // make new Node to insert and insert data AVLNode* New_Node = new AVLNode; New_Node->setGD(pGame); if (root == NULL) // if root has nothing { root = New_Node; // set New_Node to root return true; } else // if root has anything { ...
true
f0fd8cfbfc8f9851ca3b69b6fbb1c17267d88713
C++
alexandraback/datacollection
/solutions_5766201229705216_0/C++/kokocrunch/tree.cpp
UTF-8
1,425
2.515625
3
[]
no_license
#include<iostream> #include<algorithm> #include<vector> #include<utility> using namespace std; typedef pair<int,int> ii; #define INF 1000000000 int p[1010]; vector<int> raw[1010]; vector<int> children[1010]; int ch[1010]; int states[1010]; int T,N; void root(int u){ for(int i = 0; i < raw[u].size(); i++){ int v...
true
361dee3427adcaa6d2a2ad7460fd56fc416c148e
C++
nickbiffis/test
/Test.cpp
UTF-8
15,322
3.03125
3
[]
no_license
#include <iostream> #include <cstring> #include <fstream> #include "InstructionMemory.h" #include "ProgramCounter.h" #include <string> #include <sstream> #include <map> #include "DataMemory.h" #include "ControlUnit.h" #include "ALU.h" #include "Multiplexor.h" #include "Instruction.h" using namespace std; class Tester{...
true
ab7c3a3b01103156fa79e33a17c30eaf2764bfd8
C++
diptadas/acm-resources
/uva-solutions/191.cpp
UTF-8
2,439
2.734375
3
[]
no_license
//Dipta Das CUET CSE-11 #include <cstdio> #include <cstring> #include <cmath> #include <iostream> #include <algorithm> #include <sstream> #include <string> #include <vector> #include <stack> #include <queue> #include <map> #define LL long long #define Pi acos(-1.0) #define EPS 1e-7 #define Mod 100000007 #define Inf 1...
true
4757a57d429575d285258ba59294068db5f76c50
C++
gabsn/competitive-programming
/td5/test.cpp
UTF-8
222
2.5625
3
[]
no_license
include <algorithm> #include <iostream> #include <string> int main() { std::string hw( "Hello World" ); std::cout << hw << std::endl; std::reverse( hw.begin(), hw.end() ); std::cout << hw << std::endl; }
true
f51940f806cf04d9bacdcc8943cc878041e41fb2
C++
trongthanht3/baitapkithuatlaptrinhMTA
/b4.cpp
UTF-8
432
3.21875
3
[]
no_license
#include <iostream> #include <conio.h> using namespace std; void find_USCLN(int a, int b) { char t; while (a != b) { if (a > b) a = a - b; else if (a < b) b = b - a; } cout << "uscln: " << a << endl; cout << "Press any key to continue. Esc to escape\n"; } int main() { int a, b; ...
true
619698c0e798df04a06bb054a181a8e4dad4586a
C++
HaoYang0123/LeetCode
/Check_If_It_Is_A_Straight_Line.cpp
UTF-8
526
2.953125
3
[]
no_license
//Leetcode 1232 class Solution { public: bool checkStraightLine(vector<vector<int>>& coordinates) { if(coordinates.size()<3) return true; for(int i=2;i<coordinates.size();i++) { int dy1=coordinates[i][1]-coordinates[i-1][1]; int dy0=coordinates[i-1][1]-coordinates[i-2][1]; ...
true
e4de36ab5a8373804fd71718f7ad86109ad1974e
C++
kr-MATAGI/ELGO_Client_QT
/elgo_control/JSON/Schema/ContentServerSchema.h
UTF-8
1,922
2.546875
3
[]
no_license
#ifndef CONTENTSERVERSCHEMA_H #define CONTENTSERVERSCHEMA_H // QT #include <QString> #include <QDateTime> namespace ContentSchema { /** @brief Server -> elgo_control */ enum Event { NONE_EVENT = 0, READY = 1, ACCESS = 2, RENAME = 3, // payload type : once, request ...
true
623fa22915286f1d99b076e06350f93172bcb92e
C++
jtristao/Project-Euler
/e_084.cpp
UTF-8
3,188
2.71875
3
[]
no_license
#include <bits/stdc++.h> // MArkov chain using namespace std; typedef struct{ long prob_board[40] = {0}; void print(int n){ for(int i = 0; i < 40; i++){ if(i %10 == 0) printf("\n"); printf("%ld ", prob_board[i]); } printf("\n"); } } Board; typedef struct { unordered_set<int> places = {7, 22, ...
true
871cd7ccb74d2b2e4250a5c3db0a137e73f27e5e
C++
jingsia/three1
/C++Save/Tmp/ProjectA/Core/GObject/GLocalObjectManager.h
UTF-8
1,162
3.078125
3
[]
no_license
#ifndef _GLOCALOBJECTMANAGER_H_ #define _GLOCALOBJECTMANAGER_H_ #include "GObjectBase.h" #include "Common/Mutex.h" #include <list> #include <vector> namespace GObject { template<typename _V > class GLocalObjectManagerT { public: bool add(_V* val) { UInt32 slot = val->getSlot(); if(slot != static_cast<UInt32>(-...
true
e48ca2363bbf8e264190862744143547e3075ff8
C++
UlianaKov-hab/IncreaseArr
/Project2/Source.cpp
UTF-8
1,057
3.40625
3
[]
no_license
#include<iostream> #include<time.h> using namespace std; void FillArr(int* arr, int size) { for (int i = 0; i < size; i++) { arr[i] = rand() % 20; } } void PrintArr(int* arr, int size) { for (int i = 0; i < size; i++) { cout << arr[i] << "\t"; } cout << endl; } void IncreaseArr(int*& arr, int &size) { //in...
true