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
d091a3e06147a79bd4b20a6bb2e20e12dfd36212
C++
jpbirdy/poj
/模拟题/poj1107/main.cpp
UTF-8
2,017
3.0625
3
[]
no_license
/* 给定一串字符和k1,k2,k3 将这串字符分组a~i为1,j~r为2,s~z包括_为3 将原串分解为S1,S2,S3 将s1中的字符都改为其坐标向右移动k1个距离的字符,s2s3类似 得到的为加密的串 已知加密的串,求原串 如 the_quick_brown_fox 分组后 S1: i c b f h e S2: o n o q k r S3: _ u _ w _ x t k1=2 右移2位得到的串为 S1: heicbf S2: qkrono S3: t_u_w_x 得到的加密串为 _icuo_bfnwhoq_kxert 反着做一遍即可 注意下标会越界 */ #inc...
true
a636953b84654f0709c10b63bec3ac41766f9296
C++
orklann/switch-emu-pub
/switch-emu/src/hle/kernel/handleManager.cpp
UTF-8
1,663
2.609375
3
[]
no_license
#include <vector> #include <optional> #include <map> #include "handleManager.h" #include "log.h" namespace kernel::handleman { // TODO should use table in KProcess std::vector<KHandleEntry> gHandleTable; std::map<uint32_t, ObjectPtr<KAutoObject>> gCompressedPointerMap; // TODO not this handle_t gHandleCounter = 1; ...
true
a55f43dec3d194fc324772fc29a2125a2cc1274d
C++
landiinii/C-Based
/BinarySearchTree/NodeInterface.h
UTF-8
753
2.921875
3
[ "MIT" ]
permissive
//YOU MAY NOT MODIFY THIS DOCUMENT #ifndef NODE_INTERFACE_H #define NODE_INTERFACE_H #include <iostream> class NodeInterface { public: NodeInterface() {} virtual ~NodeInterface() {} /* * Returns the data that is stored in this node * * @return the data that is stored in this node. */ virtual int getData() c...
true
dc2aae750c566a748f4a80ccf6f3075171c057e4
C++
rainliu/leetcode
/src/734SentenceSimilarity/734SentenceSimilarity.cpp
UTF-8
737
2.84375
3
[]
no_license
class Solution { public: bool areSentencesSimilar(vector<string>& words1, vector<string>& words2, vector<vector<string>>& pairs) { if (words1.size() != words2.size()) return false; unordered_map<string, unordered_set<string>> m; for(const auto& pair: pairs) { m[pair[0]].insert(pa...
true
0d673c10f2c909103d1229e85fb5c4f4f798d28b
C++
RedTarantula-Unisinos/GrauA-Physics
/_GrauA/exFisica19/Spaceship.h
UTF-8
1,999
3
3
[]
no_license
#include <Box2D/Box2D.h> #include <iostream> #include <cmath> #include <string> #pragma once class Spaceship { public: Spaceship(); ~Spaceship(); void SpawnShip(b2World* world, double _x, double _y); // Creates the spaceship void DrainFuel(int amount); // Drains fuel int GetShipFuel() { return fuel; }; // Retur...
true
779319b320ef3527e1815ee3925e4cbd731d3607
C++
shvnick/OpenGL
/OpenGL/ExampleWindow.cc
WINDOWS-1251
4,616
2.59375
3
[]
no_license
/* * ExampleWindow.cc * * Created on: 22 . 2021 . * Author: */ #include "ExampleWindow.h" #include <cmath> static constexpr double Pi = acos(-1.); //Snowman coordinates double x1=4.5, x2=4, x3=3.5, x4=3, x5=-0.2; double y1=1, y2=0, y3=-1, y4=-2, y5=2.7; double z1=0, z2=0, z3=0, z4=0, z5=...
true
06082a7a03a69284fb22bddc3ceadf89f456d61d
C++
noeltrivedi/parse_tree
/opNode.h
UTF-8
306
2.859375
3
[]
no_license
#ifndef OPNODE_H #define OPNODE_H #include "node.h" #include "visitor.h" class opNode : public Node { public: opNode(char op) { this->op = op; } opNode() { op = 'R'; } virtual void accept(visitor* v) { v->visit(this); } char returnOp() { return op; } private: char op; }; #endif
true
0f96b29f11bcc35118989484a45caf5b15e3a964
C++
tanishq1306/Leetcode-Monthy-Challenges
/June/4_Open The Lock.cpp
UTF-8
1,426
2.90625
3
[]
no_license
class Solution { public: int openLock(vector<string>& deadends, string target) { set<string> dead; for (const auto &it: deadends) { dead.insert(it); } int level = 0; queue<string> q; if (dead.find("0000") == dead.end()) { q.push("0000"); ...
true
32de1cb1c4779270e98a36b7fdb164cb057ef29e
C++
LeftySolara/todo
/src/Command.h
UTF-8
765
2.65625
3
[]
no_license
#ifndef COMMAND_H #define COMMAND_H #include "Database.h" #include <string> #include <vector> #include <utility> class Command { public: enum Action {SHOW, ADD, DONE, MODIFY, DEL, REPORT, CLEAR}; enum Property {ID, STATUS, DESC, DUE, PRIORITY, TAG}; typedef std::pair<Property, std::string> Arg; Comm...
true
ebf491c405c9476aec066bba24de688ef15de20c
C++
CallMeMajorTom/csci499-test
/merge_sort/src/main.cpp
UTF-8
643
3
3
[]
no_license
#include "merge_sort.h" #include <gflags/gflags.h> #include <glog/logging.h> int main(int argc, char** argv) { FLAGS_logtostderr = 1; // Initialize Google's logging library. google::InitGoogleLogging(argv[0]); int arr[] = {5,3,4,1,2}; int size = sizeof(arr) / sizeof(arr[0]); std::string str_array ...
true
b717cc4b3fa297cf34cecced79bc5188e6f2c431
C++
uwstudent123/LeetCode-Solutions
/XOR Queries of a Subarray.cpp
UTF-8
551
2.65625
3
[]
no_license
class Solution { public: vector<int> xorQueries(vector<int>& arr, vector<vector<int>>& queries) { vector<int> ans; if (arr.empty() || queries.empty()) return ans; vector<int> pref; pref.reserve(arr.size() + 1); pref[0] = arr[0]; for (int i=1; i<arr.size(); i++) { ...
true
6b916d9185aabe8150b2cc4d4c09cccf7a7640b2
C++
lwhay/hashcomp
/stream/src/utils/QuantileStatistics.h
UTF-8
1,522
2.890625
3
[]
no_license
// // Created by Michael on 10/26/2019. // #ifndef HASHCOMP_QUANTILESTATISTICS_H #define HASHCOMP_QUANTILESTATISTICS_H #include <vector> template<typename freqtype, typename counttype> class FCQuantile { private: std::vector<std::pair<freqtype, counttype>> freqCounts; uint64_t accCount = 0; uint64_t keyC...
true
da6a5c52ba84408505f1450c129ef2e384521d09
C++
jetaehyun/SW_Doge
/include/data_packet.h
UTF-8
1,096
2.625
3
[]
no_license
#ifndef DATA_PACKET_H #define DATA_PACKET_H #include <iostream> #include <cstdint> #include <string> #include "../include/data_manipulation.h" #define NO_USER_SPECIFIED 0 #define PAYLOAD_SIZE 28 #define DATA_PACKET_SIZE 37 #define PAYLOAD_OFFSET 8 using std::cout; using std::endl; using namespace Data_Manipulation;...
true
9b166d275832ec997bb4fe855c6421b3160b85b7
C++
alexseppar/RISC-V-fsim
/sim/options.h
UTF-8
2,633
3.046875
3
[ "MIT" ]
permissive
#ifndef OPTIONS_H #define OPTIONS_H #include <cstdio> #include <cstring> #include <stdexcept> #include <string> #include <type_traits> namespace options { template<typename T> T ParseArg(int &cur_arg, int num_arg, char *argv[]) { if constexpr (std::is_same_v<T, bool>) return true; if (cur_arg >= num_a...
true
10ca9e8feb88bbca80cac33eb34ee6ca0b85e8ac
C++
matthewrdev/Neural-Network
/Neural Network Source Code/Game/include/Clarity/Math/LineSegment3.h
UTF-8
6,433
2.671875
3
[]
no_license
#ifndef CLARITY_LINESEGMENT3_H #define CLARITY_LINESEGMENT3_H /** @file LineSegment3.h * * This file contains the LineSegment3 class definition. * * This source file is part of Clarity. * Clarity is a game engine designed for teaching. * For the latest info, see http://members.optusnet.com.au/dfreya * * C...
true
7bb059835ac0f91df22e778e021f612f36836f71
C++
mycicle/cpp_datastructures
/solar_system/solar_system.cc
UTF-8
6,649
3.015625
3
[ "MIT" ]
permissive
#include <string> #include <iostream> #include <fstream> #include <sstream> #include <vector> #include <random> using namespace std; default_random_engine gen(0); uniform_int_distribution<int> distribution(0, 99); class Vec3d { public: long double x, y, z; Vec3d(): x(0), y(0), z(0) {} Vec3d...
true
5994fa9a1140695adfae863e21ee3894ff58d066
C++
Stagno/cuda-pt
/cuda_alloc.h
UTF-8
1,488
2.53125
3
[]
no_license
/* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABI...
true
bc9b3b3754946f1ab8a49a8cf7ba48c7b6021307
C++
voithos/quarkGL
/quarkgl/cubemap.h
UTF-8
1,990
2.875
3
[ "MIT" ]
permissive
#ifndef QUARKGL_CUBEMAP_H_ #define QUARKGL_CUBEMAP_H_ #include <qrk/framebuffer.h> #include <qrk/mesh_primitives.h> #include <qrk/shader.h> #include <qrk/shader_primitives.h> #include <qrk/texture_registry.h> namespace qrk { class CubemapException : public QuarkException { using QuarkException::QuarkException; }; ...
true
7ee7a2c9e878599429ccae667acb18a1d78ba651
C++
kolyvoshko/Isometric-game
/src/object/animal_genetic_code.cpp
UTF-8
1,227
2.734375
3
[ "MIT" ]
permissive
/** * @file animal_genetic_code.cpp */ #include "animal_genetic_code.h" AnimalGeneticCode::AnimalGeneticCode(): GeneticCode() { } AnimalGeneticCode AnimalGeneticCode::create_carnivorous_code(){ AnimalGeneticCode carnivorous_code; carnivorous_code.carnivorous = 1.0; carnivorous_code.herbivorous...
true
93fa56738cc689631717cf8c8605060af127e5c4
C++
ManishDV/Engineering-Assignments
/SE-SEM2-Assigns/DFSL Assignments/Assign5/Queue.cpp
UTF-8
1,040
3.359375
3
[]
no_license
/* * queue.cpp * * Created on: 05-Feb-2019 * Author: neo */ #include "Queue.h" #include <iostream> using namespace std; template<class T> Queue<T>::Queue() { // TODO Auto-generated constructor stub front = new struct queue; rear = new struct queue; front = NULL; rear = NULL; } template<class T> Queue...
true
4863fd791b88ca2516c418202a61c3e607118cca
C++
tstibro/chip8
/Chip8lib/core/cpu/registers/pcreg.cpp
UTF-8
691
2.53125
3
[ "MIT" ]
permissive
/* * gpr.cpp * * Created on: September 29, 2016 * Author: Tomas Stibrany */ #include "pcreg.hpp" using namespace chip8::core::cpu::registers; ProgramCounterRegister::ProgramCounterRegister(u16 resetAddress) { registerContents = resetAddress; Unlock(); } ProgramCounterRegister::~ProgramCounterRegister() { } v...
true
46c8e15f1787819d91f0f2238e899c3c68f35121
C++
SirMouthAlot/Blight-3D
/OpenGL Framework Test1/OpenGL Framework Test1/Model.h
UTF-8
911
2.5625
3
[]
no_license
#ifndef __MODEL_H__ #define __MODEL_H__ #include "Mesh.h" class Model { public: Model(); Model(const Model& copy); ~Model(); bool LoadFromFile(const std::string &_path, const std::string &_name); void Draw(Shader* shader); //Meshes std::vector<Mesh*> meshes; unsigned int meshIndex = 0; //Materials std...
true
8a4ff0ea712985fc8a8f9365ab4640f948d5f35a
C++
godori/Algorithm_basic
/01.C++/Pointer/call_by.cpp
UTF-8
575
3.328125
3
[]
no_license
#include <iostream> using namespace std; void call_by_val(int val){ val = 20; } void call_by_ref(int *ref){ *ref = 20; } int main(int argc, char const *argv[]) { int value = 10; int refer = 10; cout << "before : " << value << "," << refer << endl; call_by_val(value); // cout << "&refer : " << &re...
true
6614d9d821c8d46dc896cef29554175531834528
C++
crisdeodates/Robotics-control-toolbox
/ct_core/include/ct/core/integration/EventHandlers/KillIntegrationEventHandler.h
UTF-8
2,150
2.5625
3
[ "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
/********************************************************************************************************************** This file is part of the Control Toolbox (https://github.com/ethz-adrl/control-toolbox), copyright by ETH Zurich. Licensed under the BSD-2 license (see LICENSE file in main directory) ****************...
true
27b6b21e77ec496a0a65876ab9ca40554616d994
C++
jhseoeo/C_Algoritm_DataStructure
/C_Data_Structure/src/Sorting_Algorithm/Complicated_Sorting/HeapSort.cpp
UTF-8
549
3.8125
4
[]
no_license
#include "HeapSort.h" void HeapSort(int* arr, int s, int e) { for(int i = (s + e) / 2; i >= s; i--) // Make the array heap. ReHeapDown(arr, i, e); for(int i = e; i > s; i--) { // Sorting array. if(arr[s] > arr[i]) swap(arr[s], arr[i]); ReHeapDown(arr, s, i-1); } } void ReHeapDown(int* arr, int s, in...
true
e25bb159cfdad76a61c16bf1e52de7174db5183d
C++
jorgealemangonzalez/3DGames
/src/controller.h
UTF-8
860
2.5625
3
[]
no_license
#ifndef TJE_FRAMEWORK_2017_CONTROLLER_H #define TJE_FRAMEWORK_2017_CONTROLLER_H #include "constants.h" #include "includes.h" #include "entity.h" class CameraController{ /*TODO Meter todos los comportamientos de la camara aqui: - Que tenga un punto al que siempre ve a una distancia en concreto, ...
true
d845ba7e488df404fd1d5690aaf21c81e4d49114
C++
GameDevMike/Elementary-Fighter
/portrait_functions.cpp
UTF-8
3,056
2.734375
3
[]
no_license
#include "headers.hpp" Hero_Portrait::Hero_Portrait( HEROES name, SIDE looking ) { this->name = name; this->looking = looking; width = 140; height = 144; color_red = al_map_rgb( 255, 0, 0 ); color_blue = al_map_rgb( 0, 0, 255 ); border_red = false; border_blue = false; c...
true
bf1bc802609ea080306adce8cf411ec5e7ad66d5
C++
tanwi1234/Interview-Bit-coding-problems
/Two pointer/remove duplicates from aray.cpp
UTF-8
536
2.734375
3
[]
no_license
int Solution::removeDuplicates(vector<int> &A) { int i; vector<int>s; for(i=0;i<A.size();i++) { bool found=true; int j=A.size()-1; while(j>i) { if(A[j]==A[i]) { found=false; break; } ...
true
4211cc096069b53a7fe4e9076c5c893ed7ea7529
C++
heojoung2/Baekjoon
/숫자 카드.cpp
UTF-8
577
2.890625
3
[]
no_license
#include<iostream> #include<algorithm> #include<map> #include<cstdio> using namespace std; int main() { int card1_num, card2_num; map<int, int> map; scanf("%d", &card1_num); int *card1 = new int[card1_num]; for (int i = 0; i < card1_num; i++) { scanf("%d", &card1[i]); map.insert(pair<int, in...
true
7f0759314be8f12736174567e14a20894d06fc02
C++
embosfer/record-store
/Record.h
UTF-8
167
2.703125
3
[ "Apache-2.0" ]
permissive
#pragma once #include <string> using std::string; class Record { public: Record(string& name): _name(name) {} string name(); private: string _name; };
true
31515045175dbf0acbb88ee931055b323164a994
C++
jffifa/algo-solution
/ural/1792.cpp
UTF-8
550
2.921875
3
[ "MIT" ]
permissive
#include <cstdio> #include <cstring> int hmr[7]; bool ok() { if ((hmr[1]+hmr[2]+hmr[3])%2!=hmr[4]) return 0; if ((hmr[0]+hmr[2]+hmr[3])%2!=hmr[5]) return 0; if ((hmr[0]+hmr[1]+hmr[3])%2!=hmr[6]) return 0; return 1; } int main() { for (int i = 0; i < 7; ++i) scanf("%d", hmr+i); if (ok()) { for (int i = 0; ...
true
1996e8d9f29a61a6cea1ddd425b0f5afd65e593f
C++
tzik/wasm
/src/irt/memory.cc
UTF-8
826
2.578125
3
[]
no_license
#include <stdarg.h> #include <stdio.h> #include "memory.h" #include "env.h" namespace irt { constexpr unsigned long page_size = 0x10000; unsigned long current_memory() { volatile unsigned long ret = 0; __asm__ volatile("current_memory %0=" : "=r"(ret)); return ret; } unsigned long grow_memory(unsigned long ...
true
356dff4007633ca9c96378d169c72d8dca947f49
C++
strikeraryu/Competitive_Coding
/may_challenge_leetcode/Counting Bits.cpp
UTF-8
1,045
3.203125
3
[]
no_license
// Problem // Given a non negative integer number num. // For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as an array. // Example // Input: 2 // Output: [0,1,1] // Input: 5 // Output: [0,1,1,2,1,2] // Constraints: // It is very easy to co...
true
6ae6628891303d9a45fdac5cf5c2dc4fc0da76c0
C++
weihangxiao/Operating-System
/Labs/lab1/lab1.cpp
UTF-8
5,474
2.796875
3
[]
no_license
#include <iostream> #include <fstream> #include <string.h> #include <stdio.h> #include <vector> #include <queue> using namespace std; //unordered_map<string, int> symtable; struct Tokens { int linecount; int offset; string str; }; queue<Tokens> tokenlist; //store parsed tokenss //vector<pair<string, ...
true
0008ff979da734b6e415b32f1f014e4ed3417182
C++
MangeI89/Test
/TSBK03Project/TSBK03Project/Entity.cpp
UTF-8
3,482
2.671875
3
[]
no_license
#include "Entity.h" Entity::Entity() {} Entity::Entity(const Mesh& mesh) { //m_mesh = mesh; } Entity::Entity(const shared_ptr<Mesh>& mesh, const vec3& position, const vec3& velocity, const vec3& rotation, const vec3& scale) { this->mesh = mesh; this->currentPosition = position; this->initialPosition = position; ...
true
1a6a0039f5a0ca6e1c5b8cb2185abfbf627e9a8e
C++
alenthankz/Master_DSA
/CODE/Tree/11mirrorTreeCheck.cpp
UTF-8
505
3.3125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; class Node{ public: int data; Node * left,*right; Node(int val){ data=val; left=right=NULL; } }; bool isMirror(Node * root1, Node*root2 ){ if(!root1 && !root2)return true; if(!root1 || !root2)return false; return (root...
true
0ffa86333969ee0c29f0aaf8e37186faa7bff455
C++
SandorSu/DataStructure-Algorith
/Algo2017_0722_6.cpp
UTF-8
485
3.890625
4
[]
no_license
/*Horner Rule for Taylor Series*/ #include<iostream> using namespace std; double exp1(int x,int n) { static double s = 1; if ( n == 0) { double s1 = s; s = 1; return s1; } s = 1+s*x/n; return exp1(x,n-1); } double exp2(int x, int n) ...
true
45605bcea0f80e4a9bc1eb6d943633568a22bf78
C++
zhaoyujie199196/doubanspider
/DBS/DBS/core/DBSQueue.h
UTF-8
1,416
3.078125
3
[]
no_license
#pragma once #pragma once #include <list> #include <memory> #include <mutex> #include <condition_variable> #include "assert.h" template <class T> class DBSQueue { public: DBSQueue(int nMaxCount) { assert(nMaxCount > 0); m_nMaxCount = nMaxCount; } ~DBSQueue() {} T takeOne() { std::...
true
98e2f3f2d9dd4ab5909eee0a1a5ffd9a16a18020
C++
Jiinwoo/Algorithm
/10430 나머지.cpp
UTF-8
241
2.640625
3
[]
no_license
#include <iostream> using namespace std; int main(){ int a,b,c; scanf("%d %d %d", &a,&b,&c); int year =1; while(1){ if((year%15)+1==a && ((year%28)+1)==b && ((year%19)+1)==c){ printf("%d\n", year); break; } } return 0; }
true
cc96e5e53d822506906260a08425729cd06388f0
C++
tianjigezhu/Algorithm
/C++/test.cpp
UTF-8
546
2.953125
3
[]
no_license
#include "CSingleLinkList.hpp" #include <iostream> using Paradise::Algorithm::CSingleLinkList; using Paradise::Type::EBool; using std::cout; using std::endl; namespace a { template<class T> struct B { T c; }; } int main(int argc, char *argv[]) { Paradise::Algorithm::CSingleLinkList<int> singleLinkList; for (int...
true
5226eb101d1e8292a86f862b4f7d4baae5ff60d7
C++
burgerj123/stack-queue
/JQueue.cpp
UTF-8
2,439
3.84375
4
[]
no_license
/* * File: JQueue.cpp * Author: Jackson Burger * Purpose: JQueue implementation * Created on June 27, 2021, 11:05 AM */ #include "JQueue.h" template <typename J> JQueue<J>::JQueue() //Default constructor { count = 0; front = 0; back = -1; } template <typename J> JQueue<J>::JQueue(const JQueue& co...
true
e28364efec8980d2a55b3585be365457cb78ee9e
C++
i-tsvetkov/opencv
/detect.cpp
UTF-8
2,193
2.546875
3
[]
no_license
#include <opencv2/objdetect/objdetect.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include <vector> #include <string> #include <cstdio> #include <iostream> using namespace std; using namespace cv; int main(int argc, char **argv) { double factor = 1.0625; if (argc < 2) { ...
true
b43202eb24f87cac6cc7f74aad679df1f5812fdc
C++
zhujun98/A-Star-search
/test/test_map_search.cpp
UTF-8
3,367
3.421875
3
[ "Apache-2.0" ]
permissive
// // Test Map class and A* search. // #include <iostream> #include <assert.h> #include <algorithm> #include <vector> #include "../map.h" /** * Summarize the shorted path * * @param path: output from function shortestPath() * @param height: height of the map */ void display(std::pair<double, std::vector<bool>> ...
true
cae7c0b23e415f68110e25fd6ac66bd06dcc9a16
C++
ponxosio/bioblocksTranslationTest
/bioblocksTranslationTest/tests/auto/sequentialprotocol/stringactuatorsinterface.h
UTF-8
3,985
2.84375
3
[]
no_license
#ifndef STRINGACTUATORSINTERFACE_H #define STRINGACTUATORSINTERFACE_H #include <sstream> #include <vector> #include <utils/AutoEnumerate.h> #include <protocolGraph/execution_interface/actuatorsexecutioninterface.h> class StringActuatorsInterface : public ActuatorsExecutionInterface { public: StringActuatorsInter...
true
1416fff07b81de413807907903cdf58d1f8768b4
C++
Girl-Code-It/Leetcode-Challenge
/Vaishali Thakur/July/1. Arrange Coins.cpp
UTF-8
458
2.78125
3
[]
no_license
class Solution { public: int arrangeCoins(int n) { long start = 0, end = n; while(start <= end){ long mid = start + (end - start) / 2; long curr = (mid * (mid + 1)) / 2; if(curr == n) return mid; else if(curr > n){ ...
true
9479fbe5d2208d44029a697b8ee49628eb9e2eb1
C++
mfixman/PAP-BGLF
/TP4/src/ej1/ej1.cpp
UTF-8
1,992
3.109375
3
[]
no_license
#include <iostream> #include <map> #include <set> #include <cmath> #include <cassert> typedef long long tint; typedef long double ldouble; #define forn(i,n) for(tint i=0;i<(tint)(n); i++) #define debug(x) cout << #x << " = " << x << endl using namespace std; struct Punto { tint x,y; Punto (tint xx, tint yy) ...
true
7b8caf19bb471cbe595556a8c2e58ad9dce03b1e
C++
alantany/cpprep
/lambda4.cpp
UTF-8
444
2.953125
3
[]
no_license
#include<string> #include<iostream> #include<algorithm> #include<cctype> using namespace std; int change(char &); int main() { //cout << char('A'+32) << endl; string s = "alAntAnY"; for_each(s.begin(), s.end(), [](char &c) {if (isupper(c)) c = c + 32; else c = c - 32; return c; }); for_each(s.begin(), s.end(), chan...
true
f16eba60dc26c9e9c8c02d62405f265c536bb2e8
C++
bacahillsmu/benbot
/src/BehaviorTree/Node.cpp
UTF-8
1,169
2.828125
3
[ "MIT" ]
permissive
#include "Node.hpp" // ---------------------------------------------------------------------------- Node::~Node() { } // ---------------------------------------------------------------------------- Node::Status Node::Update() { if(m_status != Status::RUNNING) { Start(); } m_status = Run(); ...
true
93ccffc5404e993e7c9d1c27e4a384e7cc7254eb
C++
Vanilla-In-Jxust/cpp_2048
/Fuction/Check/Check.h
UTF-8
689
3.09375
3
[]
no_license
#include <vector> using namespace std; /** * check every moved whether is the last time. * @param vec is to be tested. * @param movedFlags used to remember special case. * @return true if done or false if need next move. */ bool checkUp(const vector<int> &vec, const vector<bool> &movedFlags); /** * check vector<i...
true
96b6cca1072f45eb6a100de9f25cd86e2a057305
C++
moevm/oop
/8304/Butko_Artem/lab7/SOURCE/GameLib/main.cpp
UTF-8
1,271
3
3
[]
no_license
#include "UserInteraction/Rules/RuleOne/RuleOne.h" #include "UserInteraction/Rules/RuleTwo/RuleTwo.h" #include "UserInteraction/GameClass/GameClass.h" void exec() { int choice, players; std::cout << "------- GAME SETTINGS -------" << std::endl; std::cout << "Input type of rule (1 or 2) : "; std::cin...
true
f47e61fa8a73ad566daaa23756aa3e7404a52e22
C++
wanderinghobo/SDL-basic-physics
/SDL Game Project/Hero.cpp
UTF-8
896
3.109375
3
[]
no_license
#include "Hero.h" Hero::Hero() { animation = NULL; faceRight = true; } Hero::~Hero() { } void Hero::update(float dt) { //use basic game object vector movement updateMovement(dt); //update facing directio based on velocity if (velocity.x > 0) faceRight = true; if (velocity.x < 0) faceRight = false; ...
true
31f85509ba27bfa439b6cbc5544d56c2da4f7b4b
C++
CodingTestStudy/everyday_ps
/1043_거짓말.cpp
UTF-8
1,036
2.59375
3
[]
no_license
#include <iostream> #include <string> #include <algorithm> #include <vector> using namespace std; int n, m; bool check[51]; vector < vector<int>>v; int parent[51]; int find(int x) { if (parent[x] == x)return x; return parent[x] = find(parent[x]); } void Union(int a, int b) { int x = find(a); int y = find(b); if ...
true
3e36271579a79bb8123c89147047e7c8759ab01e
C++
plocher/IRDetector
/Circuit.h
UTF-8
2,386
2.890625
3
[ "MIT" ]
permissive
#ifndef _CIRCUIT_ #define _CIRCUIT_ #include <elapsedMillis.h> // #define DEBUG #define HEADROOM 180 #define HYSTERESIS 2000 // in mS units, 2000 = 2.0 seconds #define OCCUPIED LOW #define EMPTY ~OCCUPIED #include <Arduino.h> class Circuit { public: Circuit(void) {}; void init(int number, int ir, int...
true
680423634b313c24f6a756c4dd653af8eecf0bef
C++
diulianguo/leetcode
/0927leetcode/0927leetcode/iqiyi01.cpp
UTF-8
1,418
2.890625
3
[]
no_license
#include<stdio.h> #include<iostream> #include<vector> #include<string> #include<map> #include<algorithm> using namespace std; #define MAX 2147481647 #define MIN -214748364 //int minTimes(string s1, string s2) //{ // for (int i = 0; i < s1.length(); i++){ // // } //} // //int main() //{ // string s1, ...
true
3ced8c60c7f05a320e0f73a37bf70108e4ca8b64
C++
JoshBramlett/RDGE
/include/rdge/physics/collision.hpp
UTF-8
7,552
2.6875
3
[]
no_license
//! \headerfile <rdge/physics/collision.hpp> //! \author Josh Bramlett //! \version 0.0.10 //! \date 03/30/2017 #pragma once #include <rdge/core.hpp> #include <rdge/physics/isometry.hpp> #include <rdge/physics/shapes/ishape.hpp> #include <rdge/math/intrinsics.hpp> #include <rdge/math/vec2.hpp> #include <SDL_assert.h...
true
fbf36a25e2ef1ca85c2957da182d71e077fab7f6
C++
Aladin-Saleh/Moteur-Graphique-Physique
/CapsEngine/CAPS/Source/Rendering/ImGui/BrancheUI.cpp
UTF-8
803
2.65625
3
[]
no_license
#include "BrancheUI.hpp" #include "Debug.hpp" namespace Ge { /*BrancheUI::BrancheUI(fs::path p) { m_path = p; for (const auto & entry : fs::directory_iterator(m_path)) { if (fs::is_directory(entry.path())) { std::cout << entry.path() << std::endl; m_BrancheUI.push_back(new BrancheUI(entry.path())...
true
f3d918c049be295f3e4035b6ce871cd16632396c
C++
JinGyuChoi/Data-Structure
/shopping.cpp
UTF-8
3,008
2.53125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { ifstream ipf("shopping.inp", ios::binary); ofstream opf("shopping.out", ios::binary); int N,k; ipf>>N>>k; int user,item; vector<int> time; vector<int> sorted_time; vector<int> times(k); vector<int> users; queue<int> cart...
true
2fb6cdd80b57fd6f1b9f677f3d8d4a7d94f6c0ba
C++
dylandevalia/CPP_Game
/src/Entity.cpp
UTF-8
2,690
3.09375
3
[]
no_license
#include "Entity.h" #include "Utility.h" Entity::Entity(GameEngine* pEngine, GameTileManager* pTile, bool tile, int xpos, int ypos, int width, int height, int maxHealth) : DisplayableObject(pEngine), m_pTile(pTile) { m_iCurHealth = m_iMaxHealth = maxHealth; if (tile) { m_iCurrentScreenX = m_iPreviousScreenX = (x...
true
6569203bbb16266db87a8c7ad348378455fc1024
C++
0123goodvegetable/GwentGame
/GwentGame/GwentGame/CP_PlayingLogic.h
GB18030
930
2.71875
3
[]
no_license
//ʵֿƲ߼ #pragma once #ifndef CP_PLAYINGLOGIC_H #define CP_PLAYINGLOGIC_H #include"CP_Card.h" #include"CP_AllCards.h" #include"CardsUI.h" class PlayingLogic { public: PlayingLogic(QList<CardsUI*> &aim_stack); ~PlayingLogic() {} //ڿƽвؼ //cardĿ //ֵƷ֮Ϣ QList<CardsUI*> operateCard(Card &card,int card_number); priv...
true
341d55c633f27e04d57787b49627ff99a5acab1f
C++
gitter-badger/coral-1
/src/core/expr.hh
UTF-8
7,335
2.703125
3
[ "MIT" ]
permissive
#pragma once #include <map> #include <memory> #include <vector> #include <cstdio> namespace coral { namespace type { class Type { public: std::string name; Type(std::string name) : name(name) { } }; } using Type = type::Type; namespace ast { using std::vector; using std::unique_ptr; using std::ma...
true
8bfc334fdeeb067f4dd28a9c2535fe79af5e647b
C++
idenx/Semestr2_TSD
/Лаба 4 - Стек/TSD-4-STACK/liststack.h
WINDOWS-1251
4,088
3.328125
3
[]
no_license
#ifndef LISTSTACK_H #define LISTSTACK_H #include "stack.h" #include "error.h" template<class T> struct TList { T data; TList* next; }; template<class T> class ListStack : public Stack<T> { public: inline ListStack(); T Pop(); T Top(); void Push(const T &data); bool isEmpty(); inline QS...
true
e4b1f6fe9b53f271b875713e541cf4c7fb93b67e
C++
Raj-588/CP_code
/robin karp.cpp
UTF-8
1,309
3
3
[]
no_license
#include <bits/stdc++.h> using namespace std; #define prime 119 #define ll long long ll Create_hash(string s, int n) { ll result = 0; for (int i = 0; i < n; i++) { result += s[i] * pow(prime, i); } return result; } ll recalculate_hash(string s, int oldIndex, int NewIndex, int OldHash, int patlength) { ll New...
true
61622d09b44332bd78c7a1ef0b03a9a0cd47610b
C++
KarthikNayak/VTU
/CSE/6thSem/cglab/5.cpp
UTF-8
4,561
3.078125
3
[ "MIT" ]
permissive
#include <stdio.h> #include <GL/glut.h> #define outcode int double xmin=50,ymin=50, xmax=100,ymax=100; // Window boundaries double xvmin=200,yvmin=200,xvmax=300,yvmax=300; // Viewport boundaries //bit codes for the right, left, top, & bottom const int RIGHT = 8; const int LEFT = 2; const int TOP = 4; const int BOTTOM ...
true
a9254bd41f1019ceba3a25bc444e51ead2f581c4
C++
wn1980/Lattice-Boltzmann
/include/core/Kernels.h
UTF-8
7,160
2.640625
3
[ "Apache-2.0" ]
permissive
#ifndef LATTICE_BOLTZMANN_KERNELS_H #define LATTICE_BOLTZMANN_KERNELS_H #include <SFML/Graphics.hpp> namespace boltzmann { namespace core { /* * Vectors' probabilities constants */ const double four9ths = 4.0 / 9.0; const double one9th = 1.0 / 9.0; const double on...
true
fe328e0008e6467067e36a5b2039fac842334725
C++
ascend2001/CS-31
/Project_5/MegaMillionsTicket.cpp
UTF-8
788
2.9375
3
[]
no_license
#include <iostream> #include <string> #include <cassert> #include "MegaMillionsTicket.h" using namespace std; MegaMillionsTicket::MegaMillionsTicket(int ball1, int ball2, int ball3, int ball4, int ball5, int megaball) { mBall1 = ball1; //initializing the constructor values if the arguments are written in mBall2 ...
true
eba41dac52c83e7e5bd57a29d8bab80684dd83f8
C++
Zylann/godot_voxel
/meshers/transvoxel/transvoxel.cpp
UTF-8
61,485
2.53125
3
[ "MIT" ]
permissive
#include "transvoxel.h" #include "../../constants/cube_tables.h" #include "../../util/godot/core/sort_array.h" #include "../../util/math/conv.h" #include "../../util/profiling.h" #include "transvoxel_tables.cpp" //#define VOXEL_TRANSVOXEL_REUSE_VERTEX_ON_COINCIDENT_CASES namespace zylann::voxel::transvoxel { static ...
true
79cca773eb80492f3b03c1ec975fc92b0058e28d
C++
jmoak3/HashTable
/HashTable/HashTable.cpp
UTF-8
1,137
3.671875
4
[]
no_license
#include <iostream> #include "Table.h" int main() { Table hashTable; std::cout << "storing 5 into 'hash'" << std::endl; hashTable.insert("hash", 5); hashTable.displayContents(); std::cout << std::endl << "storing 4 3 2 9 0 -1 -5 into 'hello' 'my' 'name' 'uh' 'borat' 'I like you' 'I like sex'" << std::endl; hash...
true
bd42ca659c8533c081477161737f5931fe635a2a
C++
AntonPiccardoSelg/SortMPI
/inc/sort.h
UTF-8
614
2.953125
3
[]
no_license
#ifndef SORT_SORT_MPI_H #define SORT_SORT_MPI_H #include <boost/mpi.hpp> #include <type_traits> #include <vector> namespace SortMPI { template <typename SORT> class Sort { public: Sort(const boost::mpi::communicator &world) : world(world) {} template <typename T> void sort(std::vector<T> &toSort) { static_as...
true
33bbe4b4ba197c144899e4de4d4d9764152683e1
C++
Ahmad45123/codeforces-submissions
/codeforces/1362/A.cpp
UTF-8
641
2.6875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; typedef long long ll; bool IsPowerOfTwo(ll x) { return (x != 0) && ((x & (x - 1)) == 0); } int main() { ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); int t; cin >> t; while(t--) { ll a, b; cin >> a >> b; if(b < a) swap(a, b);...
true
04f166d1304a473b7abb991f3ddae8d8b8f7485f
C++
FelipeFL96/SE202_Projet_Dragon_Tiger
/lab3/dragon-tiger/src/ast/escaper.cc
UTF-8
1,798
2.75
3
[]
no_license
#include "escaper.hh" namespace ast { namespace escaper { Escaper::Escaper() {} void Escaper::escape_decls(FunDecl *main) { main->accept(*this); } void Escaper::visit(IntegerLiteral &literal) { } void Escaper::visit(StringLiteral &literal) { } void Escaper::visit(BinaryOperator &op) { op.get_left().accept...
true
55bb56d03847f568652e73e2e3a4da10e4a6bf02
C++
w0dm4n/Thanadolos
/Thanadolos World/Config.cpp
UTF-8
1,452
3.109375
3
[]
no_license
#include "Globals.h" #include "Config.hpp" std::string Config::getCorrectValue(std::string value) { std::string newValue; char *str = (char*)value.c_str(); int len = strlen(str) - 1; int i = 1; while (i < (len - 1)) newValue += str[i++]; return newValue; } Config::Config(std::string file_name) { std::ifstre...
true
d99e47c94affdd56897fc2ef2db1cf93049d8aeb
C++
phoboz/dragonscurse
/src/dragonscurse/room.cpp
UTF-8
837
2.765625
3
[]
no_license
#include "room.h" Room::Room(const char *image, const char *font, MediaDB *media, const char *src, int sx, int sy, int tx, int ty) : m_media(media), m_src(src), m_sx(sx), m_sy(sy), m_tx(tx), m_ty(ty) { m_spr = m_media->get_sprite(image); if (m_spr) { m_loaded = true; ...
true
646fbf7bf59230e2b65b7bd6cd2435215f6fc6c3
C++
MSUNDGR1/CUDA-accelerated-Voxelization
/VoxelizationTesting/VoxelizationTesting.cpp
UTF-8
4,473
2.953125
3
[]
no_license
// VoxelizationTesting.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <vector> #include <fstream> #include <stdlib.h> #include "tri3D.h" #include "vector3D.h" #include "voxelMap.h" #include "gif.h" using namespace std; //reads in STL file and co...
true
6d50921d1f027f81a8f842122ff65c0e3db26ab0
C++
TigranTunyan/Test
/ClassWork1/Three Numbers.cpp
UTF-8
169
2.984375
3
[]
no_license
#include <iostream> int main() { int a,b,c; std::cin>>a>>b>>c; if((a <= b && b <= c) || (a >= b && b >= c)) std::cout<<"Sorted"; else std::cout<<"UnSorted"; }
true
84248c71dcdedb5c2785844ee4e34f77e6fa28a9
C++
JarateKing/Competitive-Programming-Textbook
/code/graph/floodfill_count.cpp
UTF-8
480
3.515625
4
[]
no_license
int countRegions(vector<string>& grid, int w, int h) { int count = 0; // iterate over every point for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { // if the point is a '.' we increment count and floodfill // so that anything else in the region is no longer a '...
true
5b7ca0c62e4f109c90d3833474f9c563d5e5fa1c
C++
ofgabriel/graph-theory
/include/UnweightedGraph.h
UTF-8
820
2.90625
3
[]
no_license
#pragma once #include "Graph.h" #include <vector> class UnweightedGraph: public Graph { public: UnweightedGraph(); bool loadGraphFromFilePath(string filePath) override; list<list<int> > getConnectedComponents(); int getDistance(int nodeId1, int nodeId2); float getGraphDiameter() override; voi...
true
40c88a858def5ebbaf74a2a9b879515cee7314e2
C++
wendazhou/reducers
/reducers/include/wenda/reducers/transformers/filter.h
UTF-8
6,201
3.03125
3
[ "MIT" ]
permissive
#ifndef WENDA_REDUCERS_TRANSFORMERS_FILTER_H_INCLUDED #define WENDA_REDUCERS_TRANSFORMERS_FILTER_H_INCLUDED /** * @file filter.h * This file implements the filter() reducible transformer. */ #include "../reducers_common.h" #include <utility> #include <type_traits> #include "../reduce.h" #include "../fold.h" WENDA_...
true
f996128cd1eca124b1834f39c6b82bc3f5de3c36
C++
SccsAtmtn/leetcode
/75.cpp
UTF-8
809
2.78125
3
[]
no_license
class Solution { public: void sortColors(vector<int>& nums) { int n = nums.size(); if (n==0) return; int start = 0, end = n-1, pre = -1; while (start<end) { while (start<end && nums[start]==0) pre = start++; while (start<end && nums[end]!=0) --end; ...
true
b8a658207e6d59c5f9803283e332512318385beb
C++
jvanns/oodles
/common/Exceptions.hpp
UTF-8
1,615
2.53125
3
[]
no_license
#ifndef OODLES_EXCEPTIONS_HPP #define OODLES_EXCEPTIONS_HPP // oodles #include "Exception.hpp" namespace oodles { // General oodles exceptions struct OpenError : public NonFatalException { OpenError(const std::string &from, int error, const char *format, ...); }; struct ReadError : public NonFatalException { ...
true
4fca988c84f3b8eb869a0f977f3c24225a8d5447
C++
raffimolero/towers_of_hanoi
/main.cpp
UTF-8
3,758
3.265625
3
[]
no_license
#include <stdio.h> #include <thread> using namespace std; const int STACK_SIZE = 8; const int SLEEP_DURATION = 20; int max; int stacks[3][STACK_SIZE]; void sleep() { this_thread::sleep_for(chrono::milliseconds(SLEEP_DURATION)); } void repeatChar(char* str, int &start, int length, char c) { for (int i = sta...
true
d7bd065e8ec8bd8e1ea4190046486a9391b80a1b
C++
jrsnail/u2project_logic
/u2/engine/include/core/U2MemoryStdAlloc.h
UTF-8
3,172
2.609375
3
[ "MIT" ]
permissive
#ifndef __U2MemoryStdAlloc_H__ #define __U2MemoryStdAlloc_H__ #include "U2Prerequisites.h" #include "U2AlignedAllocator.h" #include "U2MemoryTracker.h" #include "U2HeaderPrefix.h" U2EG_NAMESPACE_BEGIN #if U2_MEMORY_ALLOCATOR == U2_MEMORY_ALLOCATOR_STD /** \addtogroup Core * @{ */ /** \addtogroup Memory * @{ */...
true
18439be939b6375cd0646ce713ff815728d83872
C++
saturn1mc/puls4r
/C++/src/Triangle.cpp
UTF-8
1,284
2.578125
3
[]
no_license
/* * Triangle.cpp * puls4r * * Created by Camille on 27/01/08. * Copyright 2008 __MyCompanyName__. All rights reserved. * */ #include "Triangle.h" Intersection* Triangle::intersection(Ray* ray){ Intersection* intersection = plan->intersection(ray); if(intersection == 0){ return 0; } else{ Point...
true
6239b6c6f740f0d3dad826f2f41570bec2f5657c
C++
aradhanapradhan/lab-3
/lab3 question 10.cpp
UTF-8
226
3.3125
3
[]
no_license
#include<iostream> using namespace std; int main() { char c; cout<<"enter a character"; cin>>c; if(c>='a'&&c<='z') { cout<<"the character is small"<<c; } else { cout<<"the character is capital"<<c; } return 0; }
true
efb0e491730fb245b3dd12ea348c1bb05b173963
C++
jungchunkim/study_algorithm
/Bruteforce/bruteforce_14888.cpp
UHC
1,241
3.296875
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> #define MAX 1000000000 #define MIN -1000000000 using namespace std; int main() { int N; cin >> N; vector<int> arr(N); for (int i = 0; i < N; i++) { cin >> arr[i]; } vector <int> oper(4); // ʴ + - * / for (int i = 0; i < 4; i++) { cin >>...
true
288ea9fd1738a654a2c70db21731806e17ff7c3f
C++
zjc960118/algorithm
/leetcode/90.subsets-ii.cpp
UTF-8
800
2.828125
3
[ "MIT" ]
permissive
class Solution { private: void dfs(vector<int>& nums, int start, vector<int>& ans, vector<vector<int>>& results) { results.push_back(ans); for (auto i = start; i < nums.size(); ++i) { if (i != start && nums[i] == nums[i - 1]) { continue; ...
true
2f855e26c576062bdcba5e3f0aedb47f9727d106
C++
Podginator/Cattle
/transpiler/ExpressionGenerators/BasicExpressionGenerator.h
UTF-8
4,035
2.75
3
[]
no_license
#ifndef RATTLE_CPP_BASICEXPRESSIONCOMBINER_H #define RATTLE_CPP_BASICEXPRESSIONCOMBINER_H #include "DefaultStateExpressionGenerator.h" namespace RattleLang { // The expression combiner for simple statements like a = 2 + 4 class BasicExpressionGenerator : public DefaultStateExpressionGenerator { public: ...
true
b1bfd4516e5f3da3be1124960b142b52614be45c
C++
juxbo/QTSmartHome-EmbeddedHMI
/practice/TODOList/roomlist.h
UTF-8
624
2.65625
3
[ "MIT" ]
permissive
#ifndef ROOMLIST_H #define ROOMLIST_H #include <QObject> #include <QVector> struct RoomItem{ bool on; QString description; QString color; }; class RoomList : public QObject { Q_OBJECT public: explicit RoomList(QObject *parent = nullptr); QVector<RoomItem> items() const; bool setItemAt(i...
true
d208739c08084b1b61d1d2a8a4006e9e19299d36
C++
Frc2481/frc-2017
/r2017/src/Commands/SetModulesForSpinInPlaceCommand.h
UTF-8
1,189
2.59375
3
[]
no_license
#ifndef SetModulesForSpinInPlaceCommand_H #define SetModulesForSpinInPlaceCommand_H #include "../CommandBase.h" class SetModulesForSpinInPlaceCommand : public CommandBase { private: SwerveModule* m_flWheel; SwerveModule* m_frWheel; SwerveModule* m_blWheel; SwerveModule* m_brWheel; public: SetModulesForSpinInPlac...
true
e044999821d8331c1d259cd4f60aeb22a9a9e305
C++
Dr0gis/ProjectParallelProgrammingAndroid
/OpenMPTasks/OpenMPTasks/MultiplyMatrix.cpp
UTF-8
968
3.015625
3
[]
no_license
#include "stdafx.h" #include "MultiplyMatrix.h" #include <iostream> void multiply_matrix_consistent(size_t size, int* matrix1, int* matrix2, int* result) { memset(result, 0, size * size * sizeof(int)); for (size_t i = 0; i < size; ++i) { for (size_t j = 0; j < size; ++j) { for (size_t l = 0; l < size; ++l) ...
true
ba6a0c4c3a98129c422bd8ba88e7d90eb2297833
C++
qwembe/moevmOOP2018
/Vaigachev/2/battlefield.cpp
UTF-8
4,735
2.796875
3
[]
no_license
#include "battlefield.h" #include "list.cpp" #include <fstream> #include <iostream> #include <string> const struct ConsoleColor { const string black = "\033[22;30m"; const string red = "\033[22;31m"; const string green = "\033[22;32m"; const string brown = "\033[22;33m"; const string blue = "\033[22;...
true
8fbda6c613d16f37a35953ca22c63853cd6f6d52
C++
Jonsen-Brad/wincode
/马拦卒.cpp
UTF-8
672
3.078125
3
[]
no_license
#include<iostream> using namespace std; int chess[100][100] = {0}; int countpath(int m,int n){ int dp[100][100] = {0}; for(int i = 0;i<m;i++){ if(chess[i][0] == 1) break; dp[i][0] = 1; } for(int i = 0;i<n;i++){ if(chess[0][i] ==1) break; dp[0][i] = 1; } for(int i = 1;i <m;i++) for(int j = ...
true
9ada088f33fe7e561030561570a8972be9135a68
C++
ljktest/tmp-tests
/src/hysop++/src/utils/types.h
UTF-8
1,926
2.59375
3
[]
no_license
#ifndef HYSOP_TYPES_H #define HYSOP_TYPES_H #include <complex> #include <array> #include "utils/utils.h" #include "utils/default.h" namespace hysop { /* forward declare external types */ namespace data { template <typename T, std::size_t Dim, typename Allocator> class multi_array; ...
true
f3da032b3a5309d8b1ddd61373620b4ce19fcea2
C++
PranaV-Shimpi/Second-Year-Programs-Computer-Engineering-SPPU
/Computer Graphics/CG/A10/assign10.cpp
UTF-8
1,115
3.046875
3
[]
no_license
/* * Assignment No: 10 SE B Roll No:41 Problem Statement: Write C++ program to draw any object such as flower waves using any curve generation techniques. */ #include <iostream> #include <graphics.h> #include <math.h> using namespace std; void bezier(int x[4][4], int y[4][4]) { int i,j; double t; ...
true
f38509a77aab2d277232f947613d5da8b29e7855
C++
vikashkumarjha/missionpeace
/lc/lc/2021_target/companies/amazon/lc_759_employee_free_time.cpp
UTF-8
2,161
3.453125
3
[]
no_license
/* We are given a list schedule of employees, which represents the working time for each employee. Each employee has a list of non-overlapping Intervals, and these intervals are in sorted order. Return the list of finite intervals representing common, positive-length free time for all employees, also in sorted order....
true
03b6e7f53f972104d8c3174db82c9a09dca78724
C++
Kshitij1K/Orientation-19
/CODE/wahmodijiwah.cpp
UTF-8
1,033
3.0625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; void NumCombination(int& num_combinations,vector<int> denominations,int index,int sum){ if (sum == 0){ num_combinations++; return; } if (sum < 0) return; //if (sum > 0 && index==0) return; for (int i=index;i>=0;i--){ NumC...
true
d0ca8214666414739085a2f58e6693fb4ca2c042
C++
microqq/TwinkleGraphics
/Source/Common/twRenderTexture.cpp
UTF-8
3,118
2.65625
3
[ "MIT" ]
permissive
#include "twRenderTexture.h" #include "twConsoleLog.h" namespace TwinkleGraphics { RenderTexture::RenderTexture(int32 width, int32 height // , RTType type = RTType::COLOR , GLenum internalformat, GLenum format , bool usedepth, bool depthwithstencil , bool multisample, int32 samples ...
true
7fe870d68fb4c2e15b6cee63598a8980cb433a65
C++
lxdnz254/C_plus_plus_Experiments
/13.1/Pair1.h
UTF-8
408
3.015625
3
[]
no_license
// // Created by alex on 16/12/18. // #ifndef INC_13_1_PAIR1_H #define INC_13_1_PAIR1_H #include <iostream> template <class T> class Pair1 { private: T m_x; T m_y; public: Pair1(const T& x, const T& y): m_x(x), m_y(y){} T& first() {return m_x;} const T& first() const{return m_x;} T& second()...
true
7e402e36f1800124cd28f292022e956ca3fe365b
C++
jstark523/Comp220ADJ
/LinkedQueuePlaylist.h
UTF-8
1,272
3.171875
3
[]
no_license
// // Created by Jrsta on 12/14/2019. // #ifndef COMP220ADJ_LINKEDQUEUEPLAYLIST_H #define COMP220ADJ_LINKEDQUEUEPLAYLIST_H #include <string> #include "Playlist.h" #include "PlaylistNode.h" #include "SongStorage.h" /** * Represents a FIFO data structure (First In First Out). Picture a line * to wait for something (...
true
bc4f0c1b6b75127e5a53733bd727f4d4e115d6b9
C++
david-waterworth/catboost
/library/cpp/l1_distance/l1_distance_ut.cpp
UTF-8
7,389
2.640625
3
[ "Apache-2.0" ]
permissive
#include "l1_distance.h" #include <library/cpp/testing/unittest/registar.h> #include <util/generic/vector.h> #include <util/random/fast.h> Y_UNIT_TEST_SUITE(TL1DistanceTestSuite) { inline void RandomNumber(TReallyFastRng32 & rng, i8 & value) { value = rng.Uniform(~((ui8)0)); }; inline void Rando...
true
96de9966c108fb7d1e1c7c6a903dd221c910d008
C++
harukoya/AOJ
/ALDS_1_8_B/ALDS_1_8_B.cpp
UTF-8
1,544
3.78125
4
[]
no_license
#include <iostream> #include <string> using namespace std; struct Node { int key; Node *parent, *left, *right; }; Node *root, *NIL; void insert(int value) { Node *y = NIL; // zの親 Node *x = root; // 木の根 Node *z = new Node; z->key = value; z->left = NIL; z->right = NIL; while (x != NIL) { ...
true