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
7f3b646c3bba74434afb0a85e0ac24a44a9226fb
C++
jobtalle/File
/utils/stringUtils.h
UTF-8
337
2.703125
3
[ "MIT" ]
permissive
#pragma once #include <string> namespace Utils { class String final { public: static std::string ltrim(const std::string &string); static std::string rtrim(const std::string &string); static std::string trim(const std::string &string); protected: String() = default; private: static const std::string W...
true
78146b5e83f9a31f42da423df6638e9c53399054
C++
prabhashrai02/practicing
/coockoff3.cpp
UTF-8
809
2.546875
3
[]
no_license
#include<iostream> #include<algorithm> #include<cmath> #include<climits> #include<string> #include<queue> #include<vector> #include<set> #include<map> #define lli long long int using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int test; cin>>test; ...
true
fc36f368727bca365db3443e5cf035b1ed0d0fd0
C++
cxFreeze/TP_Prog
/C++TP_2/liste.hh
UTF-8
8,898
3.609375
4
[]
no_license
/*OUBAH ROCHE TP2*/ #ifndef LISTE_HH_ #define LISTE_HH_ #include <iostream> #include <cassert> #include "cyclicNode.h" template <class T> class Liste { protected: typedef DataStructure::cyclicNode<T> Chainon; private: Chainon * sentinelle; int m_size; public: //Constructeur : initialise sentinelle Liste() : m_si...
true
5a04fdcb72220a6e606f03e1bf0c0bf5d825156f
C++
JoshLmao/5CS025-OctoSpork
/Octo-Spork/Octo-Spork/Room.h
UTF-8
1,787
3.578125
4
[]
no_license
#pragma once #include <string> #include <vector> #include "Item.h" #include "NPC.h" struct Room { public: std::string Name; Room(); Room(std::string name, std::string desc, std::vector<std::string> exits); Room(std::string name, std::string desc, std::vector<std::string> exits, std::vector<Item*> items); ~Room(...
true
aefa58ea5d353eacd9fe0bf528e3970f1c90a44e
C++
sahcaks/C_PLusPLus
/2Лабораторная 20/Лабораторная 20.3/Лабораторная 20.3/Лабораторная 20.3.cpp
UTF-8
3,993
3.203125
3
[]
no_license
#include <iostream> using namespace std; void input(int size); void output(); void finds(char lastName[]); void findh(int h, int m); typedef struct Train { char city[16]; char num[16]; int dateh; int datem; } STUD; int number, adateh = 0, adatem = 0; FILE *f; errno_t err; int main() { system("color 02"); setlo...
true
157d39af7de19ec415e337c760c8569de6086e73
C++
StephenGuanqi/leetcode
/cpp/stack&string/CheckWordAbbreviation.cpp
UTF-8
903
3.21875
3
[]
no_license
// // Created by Guanqi Yu on 1/10/18. // #include <iostream> #include <algorithm> #include <queue> #include <vector> #include <cmath> #include <string> using namespace std; class Solution { public: /* * @param word: a non-empty string * @param abbr: an abbreviation * @return: true if string matches with the ...
true
87f619a540abc1b1a3252627b53cf6c316b5bfd4
C++
akhilchoudhary2k/Solutions-CSES-Problem-Set
/traffic_lights.cpp
UTF-8
1,471
3.125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; set<int> position; // will save the positions of lights added till now map<int,int> heap; // will save the max length till now int getmax(){ if(heap.empty()) return 0; auto it = heap.rbegin(); return it->first; } int main(){ int x,n; cin >> x >> n; position.inser...
true
e66673028f329b65c92886399c81953316b240e0
C++
Kertic/classes-backup
/Data structures labs/Project2_BrennanRodriguez/Project2_BrennanRodriguez/Inventory.h
UTF-8
1,393
3.40625
3
[]
no_license
#pragma once #include "SLList.h" #include <iostream> #include "Item.h" using namespace std; class Player { private: SLList<Item> inventory; unsigned int gold, weight, maxWeight; public: Player() { gold = 5000; weight = 0; maxWeight = 50; } unsigned int getGold() { return gold; } void setGold(in...
true
06fd1ed74de658f78521734f1afd6240cbf17e5d
C++
DimitarKolevSI/University
/OOP_Shop_19-20_fn62295_g4_d1/Store.h
UTF-8
548
2.90625
3
[]
no_license
#pragma once class Store { private: char* Name = nullptr; void setName(const char* Name); //Variables to be added: //List of users, //List of products public: Store(); Store(const char* Name); Store(const Store& copyStore); Store& operator=(const Store& copyStore); const char* getName() const; //Functio...
true
55d3c74384ed230853f067831e3828eca4cd6a53
C++
JaechanAn/algorithm-study
/Jinaria/three problem per day/2020.1/2020.1.6/10942.cpp
UTF-8
1,868
2.65625
3
[]
no_license
#include <cstdio> #include <vector> #include <algorithm> #include <utility> #include <cstring> using namespace std; typedef pair<int, int> P; // d[가운데위치][길이] int d[2001][2001]; int main() { int N; scanf("%d", &N); vector<int> numbers(N + 1); for (int i = 1; i <= N; ++i) scanf("%d", &numbers[...
true
4cd11f40866709bb51f76f0e0379f2e24e8218df
C++
007kevin/Accelerated_CPP
/Chapter04/4-2.cpp
UTF-8
932
3.796875
4
[]
no_license
/* Exercise 4-2 * Write a program to calculate the squares of int values up to * 100. The program should write two columns: The first lists the value; the * second contains the square of the value. Use setw to manage the output so * that the values line up in columns */ #include <iostream> #include <ios> #includ...
true
725c01b7aeedf9a97ee679f3fb6a35c9619a1547
C++
IsaacDG/Interpreter
/Test.cpp
UTF-8
478
3.34375
3
[]
no_license
#include <iostream> #include <iomanip> int main(int arc, char** argv){ int size = 0; // std::cout << "Enter a size for the array: "; // std::cin >> size; int array[4] = {0}; std::cout << "&array = " << &array << std::endl; int* ptr = array; std::cout << "&array++ = " << ++ptr << std::endl; // for(int i = 0; i...
true
8e5bcbe23390ea47cffa0b1003595ff90a4dee45
C++
yucelalbar/cpp-kursu-kodlar
/sorted_range_algorithms/lower_bound_02.cpp
UTF-8
763
3.484375
3
[]
no_license
#include <vector> #include <algorithm> #include <iterator> #include <iostream> int main() { using namespace std; vector<int> ivec{ 2, 5, 5, 7, 9, 9, 9, 9, 12, 12, 16, 35 }; copy(begin(ivec), end(ivec), ostream_iterator<int>(cout, " ")); int ival; cout << "\nbir deger girin: "; cin >> ival; auto iter_lower =...
true
57f37c3fd79b34b68af011fb1a7ccada52100c1d
C++
icyflame/rsa-implementation
/rsa.cpp
UTF-8
20,989
2.65625
3
[]
no_license
#include <iostream> #include <fstream> #include <cstdlib> #include <ctime> #include <stdio.h> #include <libgen.h> #include <sys/stat.h> #include <string.h> #include "gmp/gmp.h" #define OPTION_HELP_1 "--help" #define OPTION_HELP_2 "help" #define OPTION_GENERATE_1 "generate" #define OPTION_GENERATE_2 "keygen" #define OP...
true
4da978355edb6494509a6ea11ab83011177ae55e
C++
itstepP12814/ChehovHW
/C++/ClassWorks/CW27/WordFilter/src/List.cpp
UTF-8
3,145
3.609375
4
[]
no_license
#include "List.h" List::List() { begin=nullptr; end=nullptr; //ctor } List::List(string str) { begin=nullptr; end=nullptr; s=str; } void List::push_front(string str) { if (begin == nullptr) { // for the 1st element begin = new word; end=begin; begin->next = nullptr;...
true
fd945b8c285e7942b222b4914700788102dd4c39
C++
AhJo53589/leetcode-cn
/problems/smallest-common-region/SOLUTION.cpp
UTF-8
1,066
2.890625
3
[]
no_license
////////////////////////////////////////////////////////////////////////// string findSmallestRegion(vector<vector<string>>& regions, string region1, string region2) { unordered_map<string, string> rr; for (auto vs : regions) { for (size_t i = 1; i < vs.size(); i++) { rr[vs[i]] = vs[0]; } } unordered...
true
3a01d54487efc922642845198674f5cea41b8f18
C++
zhouxinzx/niuniu
/树的高度.cpp
UTF-8
780
3.125
3
[]
no_license
#include<iostream> using namespace std; int max(int x,int y) { if(x>y) return x; else return y; } int getheight(int x,int **p,int num) { int flag=0; int sig[2]={-1,-1}; for(int i=0;i<num-1;i++) { if(p[i][0]==x) { sig[flag]=i; flag++; } if(flag==2) break; } if(flag...
true
14cfaecb1e9f64fe39a144833f91534b1aa114f9
C++
Zycon42/Heightmap
/src/engine/Terrain.h
WINDOWS-1250
729
3.03125
3
[ "MIT" ]
permissive
/** * @file Terrain.h * * @author Jan Duek <xdusek17@stud.fit.vutbr.cz> * @date 2013 */ #ifndef TERRAIN_H #define TERRAIN_H #include "Mesh.h" #include "Material.h" #include <glm/glm.hpp> struct HeightMap { size_t width, height; std::vector<float> heights; }; class Terrain { public: explicit Terrain(const Height...
true
986ff116634f7d97570c11390debb5cf042b7545
C++
thnoh1212/Practice
/프로그래머스/2 x n 타일링.cpp
UTF-8
281
2.578125
3
[]
no_license
#include <string> #include <vector> using namespace std; int solution(int n) { long long answer[60001] = { 0 }; answer[1] = 1; answer[2] = 2; for (int i = 3; i <= n; i++){ answer[i] = answer[i - 1] + answer[i - 2]; answer[i] %= 1000000007; } return answer[n]; }
true
3d2d2ce817f284575028ccd3c7b9b1d72ae489e8
C++
JTensai/HiveEngine
/HiveEngine/HiveEngine/IGameWorld.h
UTF-8
1,100
2.5625
3
[]
no_license
#pragma once #include <vector> #include <GL\glew.h> #include <glm\glm.hpp> #include "XMLInterface.h" #include "Graph.h" #include "Data.h" namespace Hive { /** * Assumes 0,0,0 is the bottomleft corner of the map * Y is the up axis * If the world scale is 1: * Y of 1 is walkable terrain for now * 1,1,1 is ...
true
d5c91e27f2804bec9c3d208937afd1dc4e678f5f
C++
lyMeiSEU/Data-Structures-Homework
/P119-9.CPP
GB18030
810
3.109375
3
[]
no_license
/*Pat: a b c a b c a c a b -1 -1 -1 0 1 2 3 -1 0 1*/ #include<iostream> using namespace std; void FailureFunction(string pat,int *f) { int lengthP=pat.length(); f[0]=-1; for(int i=0;i<lengthP;i++)//f[i] { int nj=-1; for(int j=0;j<i;j++) //ȡk { if(j==0&&pat[0]==pat[i]) {...
true
24728d3bfd5ab888f95004576682db4e5cdf7d6b
C++
godgnidoc/alioth-dev
/inc/imm.hpp
UTF-8
4,836
2.734375
3
[ "MIT" ]
permissive
#ifndef __imm__ #define __imm__ #include <llvm/IR/Value.h> #include <llvm/IR/IRBuilder.h> #include "operatordef.hpp" #include "methoddef.hpp" #include "eproto.hpp" namespace alioth { using namespace llvm; /** * @struct imm : 立即单元 * @desc : * 立即单元是表达式的计算产物 * 它可能是立即对象,也可能是立即寻址 * 比如一个元素本身,就是一个立即寻址 * 一个基础数据类型的...
true
79a4644528174504d42cc40e2f0827b198bc5d47
C++
oO777Oo/LeetCode
/Number Theory/Add two fractionsProblem146/main.cpp
UTF-8
818
3.78125
4
[]
no_license
#include <iostream> #include <utility> #include <vector> std::pair<int,int> solve(int x, int y , int z, int w); int noodOfTwoNumbers(int x, int y); int main() { int firstTop = 0; int firstBot = 0; int secondTop = 0; int secondBot = 0; std::cin >> firstTop >> firstBot >> secondTop >> secondBot; std::pair<int,int...
true
4be1e99a3f578af19b79a7d49d6f7b950003c28d
C++
zhanglingfeng911/zlf_leetcode
/OJ_Exe/2.cpp
UTF-8
676
2.75
3
[]
no_license
// // Created by zlf on 2021/3/26. // // // Created by zlf on 2021/3/26. // #include<iostream> #include<string> #include<vector> #include<algorithm> #include <sstream> using namespace std; int main02() { string s; while (getline(cin,s)) { istringstream sss(s);//将输入的一行字符串用空格分开分割成一个字符串数组 vec...
true
f3b1628e2087c7bd17b66ccb7f3f273f615ea996
C++
Neverous/xivlo08-11
/OBOZY/2010 - Październik/perm2.cpp
UTF-8
1,177
2.875
3
[]
no_license
/* 2010 * Maciej Szeptuch * XIV LO Wrocław */ #include<cstdio> //#define DEBUG(args...) fprintf(stderr, args) #define DEBUG(args...) int tests, size, speedup[51][51]; inline static int gimmeh(int parts, int left); inline static int permutations(int num); inline static int NWD(int a, int b); inline static int MAX...
true
4070e7d4fe070f5d8f2e9beab264a4d187ae3d53
C++
skkyal/DSA
/CSES problems/flight_routes.cpp
UTF-8
930
2.53125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; typedef long long ll; void kthShotestPath(vector<pair<ll,ll>>adj[],ll n,ll k){ ll INF=9e15; vector<vector<ll>>dist(n+1,vector<ll>(k,INF)); dist[1][0]=0; priority_queue<pair<ll,ll>>q; q.push({0,1}); while(!q.empty()){ ll d=-1*q.top().first,u=q.top().second; q.pop...
true
645b3cb2e179beae245fe8b785365cdfd4891ab8
C++
refractionpcsx2/RefNES
/RefNES/Mappers/MapperAxROM.h
UTF-8
921
2.5625
3
[]
no_license
#pragma once #ifndef MAPPERAXROM_H #define MAPPERAXROM_H #include "../mappers.h" class AXROM : public Mapper { public: AXROM(unsigned int SRAMTotalSize, unsigned int PRGRAMTotalSize, unsigned int CHRRAMTotalSize); ~AXROM(); void Reset(); void CPUWrite(unsigned short address, unsigned char value); u...
true
a261e8f851708e00e5222c08b5ca2716596bc281
C++
KanColleTool/kct-viewer
/test/test_KVTranslator.cpp
UTF-8
1,004
2.921875
3
[]
no_license
#include <catch.hpp> #include <KVTranslator.h> SCENARIO("Strings can be translated") { KVTranslator tl; GIVEN("Data for Naka, none for Maruyu") { tl.translation.insert(QString("124853853"), "Naka"); // 那珂 (Naka) tl.translation.insert(QString("3440185848"), QVariant()); // まるゆ (Maruyu) tl.state = KVTranslat...
true
35d29bdd274181dedf5b29956fc9e3fa601af937
C++
moxcodes/classical_cryptanalysis
/rksolve.cpp
UTF-8
9,282
2.703125
3
[]
no_license
#include <string> #include <iostream> #include <stdlib.h> #include <math.h> #include "dicttree.h" #include <fstream> #include <stdio.h> using namespace dicttree; std::string CleanString(std::string generalString); std::vector<std::string>* ImportWordList(std::string filename); void runningKeySolve(std::string puzzle,...
true
fb2807487e27e4e1031fdbbb5eee2404efdce617
C++
leofravega51/Arduino
/TP2/Ej9.ino
UTF-8
835
2.890625
3
[]
no_license
#define redPin 6 #define bluePin 5 #define greenPin 3 #define puls 2 long redRandom, blueRandom, greenRandom; void setup() { Serial.begin (9600); //Define inputs and outputs pinMode(redPin, OUTPUT); pinMode(bluePin, OUTPUT); pinMode(greenPin, OUTPUT); pinMode(puls, INPUT); } void loop() { Serial.pri...
true
e9171b69ec8f372925dbd5eb604c8c7322528372
C++
japdhaes/cpproject1
/atomwavefunction.cpp
UTF-8
4,378
2.71875
3
[]
no_license
#include "atomwavefunction.h" AtomWavefunction::AtomWavefunction(int _nParticles, double _alpha, double _beta): slater(_alpha, _nParticles, 0), jastrow(_beta, _nParticles), charge(_nParticles), nParticles(_nParticles), nDimensions(3), h(5e-3), h2(1.0/h/h) { } void AtomWavefunction::setAlph...
true
a34a832e72f8116c8d8caa970053335857d50e10
C++
graywzc/leetcode2
/Combination_Sum_III/csi.cc
UTF-8
1,030
3.046875
3
[]
no_license
class Solution { public: combinationSum3(vector<vector<int>>& res, vector<int>& tmp, int n, int i, int k) { if(k>0 && i<=9) { int count = 0; while(n>=0 && (k-count)>=0) { if(n==0) { res.push_back(...
true
b3008070c38b12f9dff30e46fa1678e6cab2c5cc
C++
HannahTin/Leetcode
/剑指offer/31.cpp
UTF-8
1,233
3.703125
4
[]
no_license
/** 栈的压入、弹出序列 题目描述: 输入两个整数序列,第一个序列表示栈的压入顺序,请判断第二个序列是否为该栈的弹出顺序。假设压入栈的所有数字均不相等。例如,序列 {1,2,3,4,5} 是某栈的压栈序列,序列 {4,5,3,2,1} 是该压栈序列对应的一个弹出序列,但 {4,3,5,1,2} 就不可能是该压栈序列的弹出序列。 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/zhan-de-ya-ru-dan-chu-xu-lie-lcof 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 **/ #include <vector> #include ...
true
bddf6116717634a0c49f47e669ff5bddbc7b6da9
C++
papicheng/offer-boom
/.vscode/min cnt for arr sort.cpp
WINDOWS-1252
637
2.953125
3
[]
no_license
/*ܣ*/ #include<bits/stdc++.h> using namespace std; int main() { int num = 1, max = 1; int n; cin>> n; vector<int> vec(n); vector<int> vec2(n); int tmp; for(int i = 0; i < n; ++i){ cin>> tmp; vec[i] = tmp; } for(int i = 0 ; i < n; ++i){ vec2[i] = vec[i]; ...
true
1872db9b47d19515fa67f28f3bac4d0ff751807a
C++
AranyaSamaiyar/Data-Structures-and-Algorithms
/Geeks/Ugly Prime.cpp
UTF-8
456
2.96875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; bool isUglyPrime(int m) { int n =m; int ugly_prime[] = {2,3,5}; for(int i=0;i<3;i++) { while((n%ugly_prime[i])==0) { n=n/ugly_prime[i]; } if(n<2) return true; } if(n>2) return false; return true; } int main() { int n; ci...
true
242d46a2c151d9cbcd7a9d0fac5421d31e3b5938
C++
n4rus/pi
/nrsdirectory/CGPsys/PI/PI 4.0/coding_0/coding/qe2.cpp
UTF-8
797
3
3
[]
no_license
#include <iostream> #include <cmath> using namespace std; #define g 10 double y, v, x, t, j, w, i, q, c; main () { cout << "Formula: y = y0 + v0yt + 1/2gt², x = x0 + v0xt"; cout << "Valores em order y0, v0, x0, t: "; cin >> y >> v >> x >> t; cout << "y0 = " << y << ", v0 = " << v << ", x0 = " << x << ", t =...
true
f6c6b33aabab3b07eef1c3f0dcec79202c47c865
C++
valentin-mille/CCP_plazza_2019
/src/IPC/InterProcessCom.cpp
UTF-8
3,009
3.015625
3
[]
no_license
/* ** EPITECH PROJECT, 2019 ** InterProcessCom ** File description: ** interProcessCom implementation */ #include <algorithm> #include <cstdio> #include <iostream> #include <mutex> #include <stdio.h> #include <string> #include <unistd.h> #include "InterProcessCom.hpp" std::mutex mutex; std::mutex debug_mutex; Inter...
true
42a503a400eb0d9b867349ceff4b963726cc34f3
C++
maxymkuz/cs_first_semester
/algo_club/lection2/string.cpp
UTF-8
295
3.25
3
[]
no_license
#include <iostream> #include <algorithm> using namespace std; int main(){ string mine; string second = "to swap"; if (mine.empty()){ mine += "was empty"; mine.push_back('A'); mine.swap(second); mine.erase(0, 1); } cout<<mine; return 0; }
true
620530d2b0cc3782bad492cf5f7c3ca869096ac5
C++
hchc32/linux-hc
/c++pp/c++pratice/mytime0.cpp
UTF-8
299
2.703125
3
[]
no_license
#include <iostream> #include"mytime0.h" using namespace std; Time::Time() { hours = minutes = 0; } Time::Time(int h , int m) { hours = h; minutes = m; } void Time::AddMin(int m) { minutes += m; hours += minutes / 60; minutes %= 60; } int main() { return 0; }
true
11345c5876d88540fc3d0f6aa8e3d2147b1af872
C++
articainstruments/Example_Tutorials
/03_MUX_ANALOG/03_MUX_ANALOG.ino
UTF-8
1,447
3.265625
3
[]
no_license
/** * This example demonstrates how to read analog signals * It assumes there are potentiometers connected * to the 16 channels of the 74HC4067 mux/demux * * For more about the interface of the library go to * https://github.com/pAIgn10/MUX74HC4067 */ #include "MUX74HC4067.h" // Creates a MUX74HC4067 instance...
true
e11b55057d48747c2a979002c803fdde5999d3c3
C++
mhmdgad97/UGV_Localization_Maping_Matlab
/arduino codes/serial_send_test/serial_send_test.ino
UTF-8
1,316
2.84375
3
[]
no_license
/* Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ // Pin 13 has an LED connected on most Arduino boards. // give it a name: // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an outp...
true
ac7690d407dc4983cdadc3f4ac5815f5525a2427
C++
solo1d/c-Network
/内存池/main.cpp
UTF-8
1,003
3.03125
3
[]
no_license
/* * 内存池测试 * 2020.4.4 21:47 */ #include "Alloctor.h" #include <iostream> #include <thread> #include <mutex> //互斥锁 #include "CELLTimestamp.hpp" /* * 线程部分 */ std::mutex m; const int tCount = 8; const int mCount = 100000; //所有线程申请内存次数的最大值 const int nCount = mCount/tCount; //每个线程申请的次数 void workFun(int i...
true
d920cbde108410d8a6b2e8bde007e4af5e65de22
C++
cashinqmar/DSALGO
/pepcoding/IP/ImageMultiplication.cpp
UTF-8
1,352
2.796875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; #define mod 1000000007 class TreeNode { public: TreeNode* left=NULL; TreeNode* right=NULL; int val; TreeNode(int val){ this->val=val; } }; void helper(TreeNode *root1,TreeNode* root2,long long int &ans){ if(root1==NULL||root2==NULL)return...
true
d931140614509596353cf0206b8c1e01f0765369
C++
Jay-Nindu/OnTheRoad
/OnTheRoad.cpp
UTF-8
2,016
2.875
3
[]
no_license
#include <bits/stdc++.h> #define MAX_N INT_MAX/2 using namespace std; int main(){ int nodeAmount, edgeAmount, stallAmount, start, end; cin >> nodeAmount >> edgeAmount >> stallAmount >> start >> end; vector < vector< pair <int, int> > >adjacencyList; vector < pair <int, int> > emptyVector; for(int i = 0; i <...
true
7e2e2fa9b5913a1652d7850e68f6a9e30d3c1516
C++
TheOctan/Labs-in-cpp
/Basics of programming/Laba №8/Task 7/Task1-7.cpp
UTF-8
194
2.921875
3
[]
no_license
#include<iostream> #include<cmath> using namespace std; double mix(double n) { return sqrt(n) + n; } int main() { cout << mix(6) / 2 + mix(13) / 2 + mix(21) / 2; system("pause"); return 0; }
true
5e82a619a9923ec2fcf14c6888db93e21459ecda
C++
NguyenThanh55/C-
/Danh sách đặc-Bài 2.cpp
UTF-8
3,079
3.09375
3
[]
no_license
//Bai 3 //Them pt cuoi ds co van de #include <iostream> #include <conio.h> using namespace std; struct Node { int info; Node* link; }; Node* first; void init() { first = NULL; } void process_list() { Node* p; p = first; while (p != NULL) { cout << p->info << endl; p = p->link; } }...
true
733bf84a131cadcf621bc26b8324157ad42f5f60
C++
skyqnaqna/MyCode
/Algorithm/Algorithm/BOJ_1197.cpp
UTF-8
1,117
2.953125
3
[]
no_license
#include <iostream> #include <algorithm> #include <vector> using namespace std; int n,m,u,v,cost,result(0); int parent[10001]; vector <pair<int, pair<int,int> > > edge; int getParent(int); bool cmpSameParent(int,int); void unionEdge(int,int); void kruskal(); int main() { scanf("%d %d", &n, &m); for (int i = 1...
true
0ea9990c1652f8b19a70d8ba391d17a5e3648d47
C++
Tignite/ALMA
/Abgabe4/Student.h
UTF-8
763
2.96875
3
[]
no_license
#ifndef STUDENT_H_ #define STUDENT_H_ #include <string> /* string */ #include <iostream> /* cin, cout */ #include <stdlib.h> /* srand, rand */ typedef struct Student { public: Student(); Student(long matnr, short* geb, short studienfach, short fachsemester); virtual ~Student(); void print(); bool setMatnr...
true
386053250c0570089f7ad51a3c23cced44c6fdf5
C++
tiankonguse/ACM
/tmpleate-2020/code/Graph/弦图判断.cpp
UTF-8
1,859
2.890625
3
[]
no_license
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #include <vector> #include <set> using namespace std; const int N=1005; /* 弦图定义:不存在环满足(长度大于3)&&(环上任意非相邻点间无边) 的一个图。 完美消除序列的性质是: 对于序列中第i个点Vi。 令S={Vj | (j>i) && ((Vi,Vj) in E)},那么S+Vi成一个团。 一个图是弦图当且仅当存在完美消除序列. 另有求弦图色数的经典性质: { 色数(用最少种颜色涂满图中的点,使...
true
fdf2166b3f6685f19eaa0cd7a90f5b672164a695
C++
Facenapalm/interpreter
/source/values.h
UTF-8
2,086
3.34375
3
[ "MIT" ]
permissive
#ifndef VALUES_H #define VALUES_H #include <string> enum ValueType { vtNone, vtInteger, vtString, vtBoolean, vtReal }; typedef long long Integer; typedef std::string String; typedef bool Boolean; typedef double Real; class Value { public: virtual Value *clone() const = 0; virtual ValueTy...
true
b4bc7f936379ac4143e9f2d0c83405a3f5a6754e
C++
nguyenlamlll/directx-game
/Game/Game/ClimbArea.cpp
UTF-8
960
2.796875
3
[ "MIT" ]
permissive
#include "stdafx.h" #include "ClimbArea.h" ClimbArea::ClimbArea(float x, float y, float width, float height, bool isDebug) : GameObject(x, y, width, height, Tag::ClimbAreaTag) { this->setPosition(D3DXVECTOR2(x, y)); m_isDebugVisible = isDebug; if (isDebug) { m_debugSprite = new Sprite(L"Resources/climb-area.pn...
true
e71c0221675effef2432f09d231b340dec15f47c
C++
matyle/DesignPatternCPP
/03Observer/Observer.cc
UTF-8
782
2.78125
3
[]
no_license
//观察者和观察目标 //使用weak_ptr和shared_ptr实现,解决线程安全,以及循环引用问题 //一个观察目标中(被观察)可能有多个观察者 //而每个观察者对应一个观察目标 //观察目标会notify观察者,同时观察者会根据通知做出响应 //观察者类会添加目标,移除目标。由于移除目标(这时不知道目标对象的生死) #include<iostream> #include<memory> #include<vector> using namespace std; //公众号订阅者 class Observer { private: /* data */ public: Observer(/* args */);...
true
1773b53b9adcac28d4c75854ea4a194486a97a0b
C++
Shouraya/OOPs-Lab-Assignment
/Lab Assignment 8/5.cpp
UTF-8
626
3.21875
3
[]
no_license
#include<iostream> #include<stdio.h> #include<fstream> #include<string> using namespace std; int main() { string str; cout<<"Enter a String: "<<endl; getline(cin, str); cout<<"Length of the string is: "<<sizeof(str)/sizeof(str[0])<<endl; ofstream ofile("StringFile.txt", ios::out); int i=0; c...
true
a52b46037d10f0cbbe9a6b961e751586e27bb7e5
C++
SamuelFlo/Extra_Lab5SamuelFlores
/platos.h
UTF-8
724
2.609375
3
[ "MIT" ]
permissive
#ifndef PLATOS_H #define PLATOS_H #include <iostream> #include <string> #include <vector> #include "ingredientes.h" using namespace std; class Platos{ public: vector<Ingredientes*>cantidad; string origen; int cantidadsabor; int registrococinado; int precio; int valoracionpromedio; Platos(); Platos(st...
true
d3cf1eed8627503e3c6a4e31526bb4907f448fbf
C++
esteve/gpt
/src/theseus/theSetBelief.h
UTF-8
6,430
2.578125
3
[]
no_license
// Theseus // theSetBelief.h -- Set Belief Implementation // // Blai Bonet, Hector Geffner // Universidad Simon Bolivar, 1998, 1999, 2000, 2001, 2002 #ifndef _theSetBelief_INCLUDE_ #define _theSetBelief_INCLUDE_ #include <iostream> #include <set> #include <map> #include <theseus/theBelief.h> #include <theseus/th...
true
97e21cf2d7c89e9620e79a7bb072030994fb0693
C++
renanleonellocastro/cplusplus_header_generator
/src/gerador.cpp
UTF-8
2,803
3.25
3
[ "MIT" ]
permissive
#include "gerador.hpp" #include <sstream> namespace GeradorCpp { Gerador::Gerador() : m_classeErro("erro", false) { } void Gerador::adicionarClasse(std::string nome, bool classeBase) { Classe c(nome, classeBase); m_classes.push_back(c); } std::string Gerador::gerarCodigo() { unsigned int i; unsigne...
true
5bf1b77d3b80489b7962cbc07eca85ee3550fc24
C++
VladSach/ITG-Quoridor
/include/Player.h
UTF-8
1,688
3.28125
3
[ "MIT" ]
permissive
#ifndef PLAYER_H #define PLAYER_H #include <vector> #include <utility> #include "utility.h" class IPlayer { private: int m_X; int m_Y; int m_EndY; const char* m_Name; public: virtual ~IPlayer() {}; virtual const char *getName() const = 0; virtual int getWallsCounter() const = 0; vir...
true
c1d47ffc33bbd2f0f74f6f6c30a56eec9b9033ba
C++
fashaikh/Workshops
/IoT Code FINAL/GetMacAddress/GetMacAddress.ino
UTF-8
426
2.5625
3
[]
no_license
/* * this code retrieves the MAC Address of your ESP board and * publishes it to the Serial Monitor * Load this sketch and open the Serial Monitor */ #include <ESP8266WiFi.h> void setup(){ Serial.begin(115200); delay(500); } void loop(){ Serial.println(); Serial.print("MAC: "); Serial.println(W...
true
2f1e3f17ed3e783675eebf973f72891d3e219959
C++
DanNixon/CSC8501_AdvancedProgrammingForGames
/Coursework/CourseworkLib/Decoder.cpp
UTF-8
3,994
3.109375
3
[]
no_license
/** @file */ #include "Decoder.h" #include <algorithm> #include <sstream> using namespace CircuitSimulator; namespace Coursework { /** * @brief Measures the hamming distance between two strings. * @param a First string * @param b Second string * @return Hamming distance */ const size_t Decoder::HammingDist(con...
true
8caa318aff85e20565e0c04397038053856bb75f
C++
InfiBeyond/CCC
/WATERLOO/2015/2015S3/main.cpp
UTF-8
1,548
3.359375
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; //we nee to keep track of the original sequence even after we sorted it. bool compare(vector<int> a, vector<int> b) { int lena = a.size(); int lenb = b.size(); if(lena < lenb) { return true; } else if(lena ==...
true
133e44c04a9ab4ad0801be76c01855c1a766575f
C++
0xl2oot/notes
/面向对象/AB.cpp
UTF-8
640
3.546875
4
[]
no_license
#include <iostream> using namespace std; class AB { public: AB(int i, int j) { a = i; b = j; } AB(int i) { a = i; b = i*i; } int Add(int x, int y) { a = x; b = y; return a + b; } int Add(int x) { a = b = x; return a + b; } int Add() { return a + b; } int aout() {...
true
cf7625d6003b0508f71edcf3b240864a8c1e8014
C++
mlupa29/TestLiczbZespolonych
/src/LZespolona.cpp
UTF-8
2,978
3.1875
3
[ "MIT" ]
permissive
#include "LZespolona.hh" //funkcja wyswietlajaca liczbe zespolona void Wyswietl(LZespolona Skl1) { cout << "(" << Skl1.re << showpos << Skl1.im << noshowpos << "i)"; } //funkcja wczytujaca liczbe zespolona void Wczytaj(LZespolona& Skl1) { char tab[3]; cin >> tab[0]; cin >> Skl1.re; cin >> Skl1....
true
d7d45056a37fc3ee7ecfa681f68f574d91d34830
C++
joe-zxh/OJ
/程序员代码面试指南/第7章 位运算/2. 不用做任何比较判断运算符找出两个整数中的较大的值.cpp
UTF-8
336
3.21875
3
[]
no_license
#include<iostream> using namespace std; int big(int a, int b) { int signa = (a >> 31 & 1); int signb = (b >> 31 & 1); if (signa - signb) { // 符号不同 return signa == 1 ? b : a; } else { return a - b > 0 ? a : b; } } int main() { int a, b; cin >> a >> b; cout << big(a, b) << endl; return...
true
c16735a11a5819e1da927014bf8e32cfc58264d6
C++
markynich/schoolAssignments
/Desktop/school/Spring2017/CS116/Lab4_ver2/printMeFirst.cpp
UTF-8
681
3.609375
4
[]
no_license
#include <iostream> #include <ctime> #include <string> #include <iomanip> using namespace std; /** Purpose: Print out the programmer’s information such as name, class information and date/time the program is run @author Ron Sha @version 1.0 1/27/2017 @param name - the name of the programmer @param courseInfo - the nam...
true
902274b5a3805714c4cbbf1903c6b609031f22c9
C++
MonkeyThumbs/Box2D-DebugDraw-SFML
/DebugDraw.h
UTF-8
1,050
2.546875
3
[ "MIT" ]
permissive
#pragma once #include <Box2D.h> #include <SFML/System.hpp> #include <SFML/Graphics.hpp> class DebugDraw : public b2Draw { public: DebugDraw(sf::RenderWindow &window); virtual ~DebugDraw(); void DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color) override; void DrawSolidPolygon(const b2Ve...
true
03a72b03425c8afc05eb0b0676a0c413426208c7
C++
Emma926/LLFI
/llvm_passes/FICustomSelectorManager.cpp
UTF-8
2,042
2.609375
3
[ "LicenseRef-scancode-unknown-license-reference", "NCSA" ]
permissive
#include "llvm/Support/raw_ostream.h" #include "FIInstSelector.h" #include "FIRegSelector.h" #include "FICustomSelectorManager.h" namespace llfi { // fault injection instruction selector manager FICustomInstSelectorManager *FICustomInstSelectorManager::getCustomInstSelectorManager() { static FICustomInstSelect...
true
242f13b7476338f8a823290e13927019498f256c
C++
Fructokinase/dungeon-game
/vampire.cc
UTF-8
3,349
2.890625
3
[]
no_license
#include "vampire.h" #include "enemy.h" #include <cmath> #include "human.h" #include "dwarf.h" #include "halfling.h" #include "elf.h" #include "orcs.h" #include "merchant.h" #include "dragon.h" #include <iostream> using namespace std; Vampire::Vampire(Cell* spawnedIn, int x, int y):Player(spawnedIn, x, y), perHeal(5)...
true
7aa7c31899c97aa1110d719a25800b6ade620cf5
C++
finrocmirror/make_builder
/enum_strings_builder/enum_strings.h
UTF-8
5,956
2.59375
3
[]
no_license
/** * You received this file as part of an experimental * build tool ('makebuilder') - originally developed for MCA2. * * Copyright (C) 2011 Max Reichardt, * Robotics Research Lab, University of Kaiserslautern * * This program is free software; you can redistribute it and/or * modify it under the terms of the...
true
b9080aac7a0c199a42ce3cc628a8d40c072b0d73
C++
mlu1109/advent_of_code
/2016/c++/day14.cpp
UTF-8
2,081
3.421875
3
[]
no_license
#include "md5.hpp" #include <string> #include <vector> #include <iostream> #include <sstream> #include <algorithm> #include <unordered_map> const std::string INPUT = "yjdafjpo"; const int MD5_DIGEST_STR_LENGTH = 32; bool five_in_a_row(char c, const std::string &md5) { int count = 0; for (int i = 0; i < MD5_DIGEST_S...
true
35a40b5f5c5f9bb04e55f90baa64472823c80ad4
C++
Studio509/freshman
/任文娟/C++程序/019两个数的简单计算器/源代码.cpp
UTF-8
491
3.25
3
[]
no_license
#include <iostream> using namespace std; #include <cmath> int main() { int x,y; char ch; cin>>x>>ch>>y; switch(ch) { case '+':cout<<x+y<<endl;break; case '-':cout<<x-y<<endl;break; case '*':cout<<x*y<<endl;break; case '/': { if(y!=0) cout<<x/y<<...
true
446a1e3c41c66c8ca236f899878f080ffd41e8e0
C++
xaviSalazar/IHMstage
/saveloadfile.h
UTF-8
2,367
2.734375
3
[]
no_license
#ifndef SAVELOADFILE_H #define SAVELOADFILE_H #include <QFile> #include <QTextStream> #include <QObject> #include <QVector> #include <QString> #include <QDebug> /*! \class saveLoadFile * \brief this class allows to save, load and load from a file all data */ class saveLoadFile: public QObject { Q_OBJECT public:...
true
08a32a9aa3ac398420a138ef190cfdeb42b5bbe5
C++
S920105123/codebook
/added/computational_geometry.cpp
UTF-8
4,375
3.21875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; const double PI=acos(-1); struct Point { // Also a vector double x,y; Point operator+(const Point &p) const { return {x+p.x,y+p.y}; } Point operator-(const Point &p) const { return {x-p.x,y-p.y}; } Point operator*(double mul) const { return {x*mul,y*mul}; } ...
true
c69a2a53efeee992da7bb1ee51df35480e8c4343
C++
stdunn/DominionCardGame
/CPP_Files/ActionCard_Festival.cpp
UTF-8
424
2.78125
3
[]
no_license
#include "ActionCard_Festival.h ActionCard_Festival::ActionCard_Festival(std::string cardName) : Card(cardName) { cost = 5; type = CardType::Action; } /* Description: * + 2 Actions * + 1 Buy * + $2 */ void ActionCard_Festival::play() { Player* currentPlayer = GameState::currentPlayer(); ...
true
75a7ae14203754e7317c04e49f31f1a16c1c52e1
C++
lmaruvada/Trees
/palindrome.cpp
UTF-8
432
3.515625
4
[]
no_license
#include <iostream> #include<string.h> #include<stdio.h> using namespace std; bool palindrome(char * st, int len){ int i = 0; int j = len-1; while(i<=j){ if(st[i] != st[j]) return false; i++; j--; } }; int main(){ char str[200]; cout << "Enter a string: " << endl; gets (str); if(pa...
true
b3471d724b4f9d976066ab922945c6ef01eacdff
C++
JoshuaMasci/USG
/src/Common/Physics/SingleRigidBody.hpp
UTF-8
461
2.625
3
[]
no_license
#ifndef SINGLE_RIGIDBODY_HPP #define SINGLE_RIGIDBODY_HPP #include "Common/Physics/RigidBody.hpp" class SingleRigidBody : public RigidBody { public: SingleRigidBody(Entity* entity); ~SingleRigidBody(); void setShape(CollisionShape* shape); CollisionShape* getShape(); virtual RigidBodyType getType() { return Ri...
true
8bdfd3cf4d7f371cfb22053dd4ac9750ec3dd93f
C++
erikajob91/drake
/geometry/test/meshcat_manual_test.cc
UTF-8
1,050
2.71875
3
[ "BSD-3-Clause" ]
permissive
#include <future> #include "drake/geometry/meshcat.h" /** To test, you must manually run `bazel run //geometry:meshcat_manual_test`. It will print two URLs to console. Navigating your browser to the first, you should see that the normally blue meshcat background is not visible (the background will look white). In ...
true
af7285fdf29da1eb3288aca76b6b6491d76d0f62
C++
kartikeya72001/ArraysCpp
/KthRoot.cpp
UTF-8
1,018
3.078125
3
[]
no_license
// You are given two integers n and k. Find the greatest integer x, such that, x^k <= n. // // Input Format // First line contains number of test cases, T. Next T lines contains integers, n and k. // // Constraints // 1<=T<=10 1<=N<=10^15 1<=K<=10^4 // // Output Format // Output the integer x // // Sample Input // 2 //...
true
0a4b77b2d2a862d6e64a76c87a031ed8f0a22ab8
C++
sjkelleyjr/codeforces
/724/C/C.cc
UTF-8
2,003
2.90625
3
[]
no_license
// Create your own template by modifying this file! #include <bits/stdc++.h> using namespace std; #ifdef DEBUG #define debug(args...) {dbg,args; cerr<<endl;} #else #define debug(args...) // Just strip off all debug tokens #endif struct debugger { template<typename T> debugger& ope...
true
1cd5f54767a017b7c78203c431974af17fbd6fbd
C++
Szelethus/cpp_courses
/2018-19-2/friday8-10/02_ex/return_value.cpp
UTF-8
170
2.90625
3
[]
no_license
#include <iostream> int* f(int p) { p++; return &p; } int main() { int a = 3; int *return_val = f(a); int t[0]; std::cout << *return_val << std::endl; }
true
93566af0c3b9490483ca33a4ca99f36543438ce7
C++
sibashish99/Algo-in-C-Cpp
/interview prep/sum pairs.cpp
UTF-8
455
3.28125
3
[]
no_license
#include<iostream> using namespace std; void getPair(int a[],int n,int sum){ for(int i=0;i<n;i++){ for(int j=i+1;j<n;j++){ if(a[i]+a[j]==sum){ printf("%d %d\n",a[i],a[j]); } } } } int main(){ int n; cout<<"How many nos:\n"; cin>>n; int a[100]; cout<<"Enter value:\n"; for(int i=...
true
5e8a5471fc1d87e88f9529885178c3aae9f1e133
C++
missio-cpp/missio
/src/json/src/object.cpp
UTF-8
3,418
2.90625
3
[ "LicenseRef-scancode-unknown-license-reference", "BSL-1.0" ]
permissive
//--------------------------------------------------------------------------- // // This file is part of Missio.JSON library // Copyright (C) 2011, 2012, 2014 Ilya Golovenko // //--------------------------------------------------------------------------- // Application headers #include <missio/json/object.hpp> #...
true
0995b2b5eccd32f1042591653610986e73d6b22b
C++
MatteoNasci/engineECS
/EngineECS/MeshManager.cpp
UTF-8
3,649
2.640625
3
[ "MIT" ]
permissive
#include "MeshManager.h" engineECS::Mesh& engineECS::MeshManager::getMesh(const int index) { return meshes[index]; } engineECS::SkeletalMesh& engineECS::MeshManager::getSkeletalMesh(const int index) { return skeletalMeshes[index]; } int engineECS::MeshManager::getMaxMeshesCount() const { return engineECS::MaxUnique...
true
5543fe78967bf205f9cbc497ccced3a8add530bc
C++
duaboola/hacktoberfest2020-1
/Areaofpolygons.cpp
UTF-8
1,325
3.921875
4
[]
no_license
#include<iostream.h> #include<conio.h> #include<stdio.h> //Area of rectangle void area(int l,int b) { int area=l*b; cout<<area; } //Area of triangle void area(int base,float h) { int area; area=(0.5*base*h); cout<<area; } //Area of circle void area(float r) { int area; area=(3.14*r*r); c...
true
a8e9254a43641343cce185c2dd2975c8f5e92691
C++
Guy-Pelc/ex2os
/thread.h
UTF-8
792
2.859375
3
[]
no_license
#ifndef THREAD_H #define THREAD_H #include <setjmp.h> #define STACK_SIZE 4096 enum Status {READY,BLOCKED,RUNNING}; class Thread { private: char stack[STACK_SIZE] = {0}; bool is_blocked = false; bool is_sleeping = false; public: bool get_is_blocked() {return is_blocked;} bool get_is_sleeping() {return is_sleep...
true
b62934ce62a0870fba7bc565ad238200ba4d8571
C++
BarbaraPriwitzerGitHubRT/neuro-stat
/neurocorr/arch/v1/neuron.hpp
UTF-8
778
2.703125
3
[]
no_license
#ifndef NC_NEURON_INCLUDED #define NC_NEURON_INCLUDED 1 #include "record.hpp" //! forward declaration class NeuroData; //! Neuron : each Record is a Trial. class Neuron : public Records { public: explicit Neuron(size_t nTrials); virtual ~Neuron() throw(); const size_t &trials; //!< alias Records::size ...
true
24420e3b2b85c0baf7a41926c4172c041bab89c2
C++
dpnguyen94/VNOI
/diamond/diamond.cpp
UTF-8
1,820
2.6875
3
[]
no_license
#include <stdio.h> #include <math.h> #include <memory.h> #include <algorithm> using namespace std; #define FOR(i,a,b) for (int i=(a),_b=(b);i<=_b;i++) #define DOW(i,a,b) for (int i=(a),_b=(b);i>=_b;i--) const int LM = 505; int m, n, h[LM], f1[LM][LM], f2[LM][LM], f3[LM][LM], f4[LM][LM]; char a[LM][LM]; void in...
true
95ac5b303d949ed6b1afb08e02bc60c4755a6360
C++
Wprofessor/Leetcode_Practice
/DFS_algorithms/二叉树的层次遍历.cpp
UTF-8
650
2.78125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; }; vector<vector<int>> saveCount; void assistDFS(TreeNode *root, int level) { if (saveCount.size() == level) { vector<int> temp; saveCount.push_back(temp); } if(root) ...
true
121f0cc890a7900734adb56ea702fda34d6ddb98
C++
pranayspeed/Arduino-Projects
/demomotor/demomotor.ino
UTF-8
3,681
2.515625
3
[]
no_license
#include <Servo.h> #define MOTORLATCH D12 #define MOTORCLK D4 #define MOTORENABLE D7 #define MOTORDATA D8 #define MOTOR1_A D2 #define MOTOR1_B D3 #define MOTOR2_A D1 #define MOTOR2_B D4 #define MOTOR3_A D5 #define MOTOR3_B D7 #define MOTOR4_A D0 #define MOTOR4_B D6 #define MOTOR1_PWM D11 #define MOTOR2_PW...
true
321ba3decf1c5b033e80aead54e1708e1ef3f4d9
C++
15831944/objectzrxDomeCode
/ZWCAD二次开发DemoCode/6第六章:扩展数据、扩展记录和对象字典/ZrxTemplate1/LineUtil.h
GB18030
953
2.53125
3
[]
no_license
#pragma once class CLineUtil { public: CLineUtil(); ~CLineUtil(); static AcDbObjectId Add(const AcGePoint3d &startPoint, const AcGePoint3d &endPoint); // Ƿ static bool ThreePointIsCollinear(const AcGePoint2d &pt1, const AcGePoint2d &pt2, const AcGePoint2d &pt3); // жϵǷֱߵֱࣨߵ㵽յΪ۲췽 // tol: ʸƽıεڷֵΪ0ԵرȽ // ֵ1ʾֱߵ࣬...
true
07dabd81f0177a6c8350f200434f35295fbe60c9
C++
wensespl/AED
/ArbolBinario.cpp
UTF-8
1,428
3.59375
4
[]
no_license
#include<iostream> using namespace std; typedef string Tipo; class Nodo{ private: Tipo dato; Nodo *izq, *der; public: Nodo(Tipo x){ dato = x; izq = der = NULL; } Nodo(Nodo* nodoIzq, Tipo x, Nodo* nodoDer){ dato = x; izq = nodoIzq; der ...
true
57120158ae4578f3d4f81d8cd0d559690bf73d77
C++
shengLin-alex/leetcode-exercise
/0113. Path Sum II/path_sum_ii.cpp
UTF-8
1,222
3.875
4
[]
no_license
// Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. // Note: A leaf is a node with no children. // Example: // Given the below binary tree and sum = 22, // 5 // / \ // 4 8 // / / \ // 11 13 4 // / \ / \ // 7 2 5 1 // Return: ...
true
3b0918120d5c9ac2e7c62ffd96edfd2169ead040
C++
ssynn/PAT_advanced
/1111. Online Map.cpp
GB18030
2,537
2.8125
3
[]
no_license
#include<iostream> #include<queue> #include<vector> #include<algorithm> #include<limits.h> using namespace std; int n, m, start, dest; const int INF = 10000000; int min_time = 10000000; int min_len = 10000000; vector<int>ans, ans1,temp; vector<bool>v; //¼Ѿҵ·Ľ vector<vector<int>>len, t; int Dijkstr...
true
25ed427cd24803a08d515eb3508fa49b5edc185b
C++
privorotskii/Scanner
/Scanner/Scanner.cpp
WINDOWS-1251
5,969
3.09375
3
[]
no_license
#include "stdafx.h" #include "string.h" #include "defs.h" #include "Scanner.h" TScaner::TScaner(char * FileName) { GetData(FileName); SetUK(0); line = 1; } TypeLex Keyword[MAX_KEYW] = { "long", "short", "int", "if", "main", "const", "void", "return", "else"}; int IndexKeyword[MAX_KEYW] = { Tlong, Tshort, Tint, Ti...
true
c42c1a337610a5c822310166d3ed47dcf342f89e
C++
mattmw/charsim
/framework/MorphMesh.cpp
UTF-8
1,579
3.03125
3
[ "MIT" ]
permissive
/* * MorphMesh.cpp * * Author: MMW */ #include "MorphMesh.h" MorphMesh::MorphMesh(String meshId) : Mesh(meshId), _vertexOffset{0} { } MorphMesh::~MorphMesh() { } void MorphMesh::setMorphVertices(const Vec3Array vertices) { _morphVertices = vertices; } Vec3Array MorphMesh::getMorphVert...
true
6b46a40a7a1f25e51b43cf24c035705a769f13c1
C++
GuiHeinrichs/GerenciadorDePessoas_POO-C-
/Empregado.hpp
UTF-8
962
3.1875
3
[]
no_license
#ifndef Empregado_hpp #define Empregado_hpp #include "Pessoa.hpp" #include <iomanip> /* Desenvolva, como subclasse da classe Pessoa, a classe Empregado. Considere que: a. Cada instância da classe Empregado tem, para além dos atributos que caracterizam a classe Pessoa, os atributos: i. CodigoSetor (inteiro) ii. Salari...
true
73bce85b54d17de1cda1a0d6291409638f0b4804
C++
afdsilva/trabalho-ippd
/src/gui/FPS.cpp
UTF-8
659
2.65625
3
[]
no_license
/* * FPS.cpp * * Created on: 23/06/2014 * Author: andref */ #include "FPS.h" FPS FPS::FPSControl; FPS::FPS() { this->maxFrame = 60; this->oldTime = 0; this->lastTime = 0; this->speedFactor = 0; frames = 0; numFrames = 0; } void FPS::OnLoop() { sf::Time elapsed = clock.getElapsedTime(); if (oldT...
true
b3744068baf654a0a32f9c4b3de1f22ff846f9d9
C++
saxena11ashish/CPP
/Leetcode/11. Container With Most Water.cpp
UTF-8
983
3.5625
4
[]
no_license
// Runs in 28ms, beats 93% solutions class Solution { public: int maxArea(vector<int>& a) { int water = 0,temp=0; for(int i=0,j=a.size()-1; i<j ; ){ temp = (j-i)*min(a[i],a[j]); water = max(water,temp); a[i] < a[j] ? i++ : j--; } return water; ...
true
2ad68aaa69aa15e220bb2d1eea8ec178f62bff07
C++
cholovirus/123
/codigos ccomp I 2019/ultimos trabajos 14-16-19/point template.cpp
UTF-8
1,075
3.625
4
[]
no_license
#include <iostream> using namespace std; template <typename T> class Point { private: T x, y; public: Point(const T u, const T v) : x(u), y(v) {} T getX() { return x; } T getY() { return y; } Point<T> operator+(const Point<T> o) { Point<T> tmp...
true
d771ff1a01c2111af798ab4c95e026c9bc48acb8
C++
Ruki185/cpp
/assignment08/main.cpp
UTF-8
841
3.21875
3
[]
no_license
#include "forwardlist.hpp" #include <iostream> using namespace a08; int main() { ForwardList<int> list; ForwardList<int> other; other.push_front(7); // int test = 5; std::cout << "Size: " << list.size() << std::endl; list.push_front(1); std::cout << "Size: " << list.size() << std::endl; ...
true
a2338bb72eb4896c2814669e068dd8622c53dac8
C++
aadarshkumar-singh/Network_Gateway_Application
/myCode/CPort.h
UTF-8
3,216
3.203125
3
[]
no_license
/*************************************************************************** *============= Copyright by Darmstadt University of Applied Sciences ======= **************************************************************************** * Filename : CPORT.H * Author : Aadarsh Kumar Singh * Description ...
true