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
5bd532a50f7c75328b69b24ec3b8116ccfd9d624
C++
neurohazardous/hyperSynch
/hM_blackBox/hM_blackBox.ino
UTF-8
1,588
3.234375
3
[]
no_license
//This will send 3 TTL pulses to the selected outputsof the Arduino // https://www.arduino.cc/en/Tutorial/Switch const int switchPin = 4; //Switch Connected to PIN 4 const int TTLpinP1 = 8; //Output parallel 1 const int TTLpinP2 = 7; //Output parallel 2 const int TTLpinJ1 = 6; //Output jack 1 int switchState = 0; //V...
true
c8baefbd9ae76bbac48185c8b0500fb6e6e9a254
C++
morell5/HSE-Course
/seminars/seminar13/variadic/array.cpp
UTF-8
1,805
3.828125
4
[]
no_license
#include <algorithm> #include <iostream> template<typename T, std::size_t Size> class array { public: typedef T value_type; typedef T* pointer; typedef T& reference; template<typename... U> array(U... elem) : arr{elem...} { } class iterator; reference operator[](int index) { ...
true
04a14757bb1de62f68cfbafd2dd2c4f8ba965ece
C++
dmitri-mcguckin/Weather-Log
/tools.cpp
UTF-8
1,882
3.25
3
[ "MIT" ]
permissive
#include "tools.h" /*void menu() // DEPRECATED { cout << "What would you like to do?" << endl; cout << "[A]dd song" << endl; cout << "[L]ist songs" << endl; cout << "[E]dit song" << endl; cout << "[R]emove song" << endl; cout << "[S]earch songs" << endl; cout << "[C]hange library" << endl; ...
true
b52b145437285a1cb6b9199483d3d7173d72f58c
C++
autyinjing/OJ
/nowcoder/PAT/1001_A+B和C.cc
UTF-8
419
2.875
3
[]
no_license
#include <iostream> int main() { uint32_t cnt = 0; int64_t a = 0, b = 0, c = 0; std::cin >> cnt; for (uint32_t i = 0; i < cnt; ++i) { std::cin >> a >> b >> c; std::cout << "Case #"; if (a + b > c) std::cout << i+1 << ": true" << std::endl; ...
true
496a0f0f910ee309cbb5a073034a982df843c1ce
C++
chang-s/astro
/ant.cpp
UTF-8
3,130
3.4375
3
[]
no_license
/******************************************************************* * Program Name: CS 162 - Group Project - Predator-Prey Sim * Author: Group 8 (Astro) * Date: November 4, 2018 * Description: Source file for Ant class, which models the * prey in the predator-prey simulation...
true
ded6ca1dfe9b9750a9e39a79225ea5ffe8aec685
C++
hasnainclub/school
/18 spring NIU/csci241 intermediate c++/Assign2/old/BookStore.h
UTF-8
1,665
3.125
3
[]
no_license
#ifndef BOOKSTORE_H #define BOOKSTORE_H #include "Book.h" #include <iostream> #include <string> #include <cstring> //***************************************************************** // FILE: BookStore.h // AUTHOR: Hasnain Attarwala // LOGON ID: z1697740 // DUE DATE: Feb 13 2018 // /...
true
27e373c049cdc80e3061a57457e0f7e0640e54bd
C++
MLXXXp/StarHonor
/Vector2d.cpp
UTF-8
1,646
3.25
3
[ "MIT" ]
permissive
#include "Vector2d.h" #include <Arduboy2.h> //#define Deg2Rad( Deg ) { Deg * PI / 180 }; Vector2d::Vector2d() { x = 0; y = 0; } Vector2d::Vector2d( int PosX, int PosY ) { x = PosX; y = PosY; } Vector2d::~Vector2d() { } float Vector2d::Magnitude() { return sqrt( MagnitudeSquared() ); } float Vector2d::Ma...
true
06afa9be6d7a5170f6d8d07f0176fe3b76e6ef22
C++
cms-externals/tkonlinesw
/TrackerOnline/Fed9U/Fed9USoftware/Fed9UDevice/include/Fed9UMoFO.hh
UTF-8
3,708
2.625
3
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
#ifndef Fed9UMoFO_HH_ #define Fed9UMoFO_HH_ #include "Fed9UUtils.hh" // // class Fed9UMoFO // Author: Matt Noy // Date: June 2004 // Purpose: Provides a configurable monitoring // handle that enables monitoring of the Fed. // // namespace Fed9U { class Fed9UDevice; class Fed9UMoFO { pu...
true
68ec1dfc6140cbc75d0062698f2f2455623cad71
C++
sidsrivastavasks/CP-Programs
/PRACTICE/anand.cpp
UTF-8
1,206
3.140625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> void print_matrix(int arr[100][100],int n,int m); int main(){ int n ,m, k=0 ; int i,j; int arr[100][100]; printf("\nEnter number of rows and columns : "); scanf ("%d%d",&n,&m); int matrix[n][m]; for (i=0;i<n;i++)...
true
bd25a046c59bf139e6e666d1ba75db844b330ead
C++
chenghu17/Algorithm
/Leetcode/c_202_Happy_Number.cpp
UTF-8
1,938
3.78125
4
[]
no_license
// // Created by Mr.Hu on 2018/5/12. // // leetcode 202 happy number // 题目要求对于给定的数字,计算数字上每一位的平方和,对结果继续上述操作,如果存在平方和等于1,则该数为happy number。 // // 根据题目要求可以发现,这是一个多次迭代的过程,如果当前平方和为1,则return true, // 如果不等于1,则继续结果各个位数的平方和。在这个过程中,可能会出现平方和不等于1,且在之前出现过, // 则说明出现了"死循环",这个数是一定不可能称为happy number,此时就要结束迭代,return false。 // 根据这个思路,则需要把之前...
true
91fd482c3500cfca0765a55aa48e20c377a84a77
C++
LittleD3092/bottle_and_cap_problem
/main.cpp
UTF-8
431
3.046875
3
[]
no_license
#include <stdio.h> #include <stdlib.h> int main(int argc, char const *argv[]) { //input int x; scanf("%d", &x); //change money to bottle and cap int bottle = x; int cap = x; //process while(cap >= 3) { if(cap == 3) { cap = 0; bottle ++; break; } int new_bottle = cap/4; bottle += new_bot...
true
892340b5fef014da573179b01d564c0e4ccfb6b3
C++
DJJ547/Sudoku-Solver
/main.cpp
UTF-8
3,293
3.40625
3
[]
no_license
#include <iostream> #include<vector> using namespace std; void printSudoku(int arr[9][9]){ cout << "-----------------------" << endl; for(int r = 0; r < 9; r++){ if(r != 0 && r % 3 == 0){ cout << "-----------------------" << endl; } for(int c = 0; c < 9; c++){ ...
true
a821fe12cdaa5f5e47c2f49242a39945a12363b7
C++
hazamayuji/170813_lit_add_hmw
/src/ofApp.cpp
UTF-8
3,032
2.671875
3
[]
no_license
#include "ofApp.h" //動的配列でscreeenを追加 vector <BaseScreen *> screens; using namespace std; void ofApp::changeScreen(AppScreen screen){ switch (screen) { case AppScreen::showScreen1: currentScreen = 0; break; case AppScreen::showScreen2: currentS...
true
1a19ca3f830ab78bb46c3e19f56bfd422b73052d
C++
okanogutlu/Numerical-Analysis
/lagrange(1306170013).cpp
ISO-8859-9
993
2.859375
3
[]
no_license
//1306170013 Talha Agez #include<iostream> #include<fstream> #include<vector> using namespace std; int main() { ifstream inClientFile("veri.txt", ios::in); if (!inClientFile) { cerr << "File could not be opened" << endl; exit(EXIT_FAILURE); } double a, b; vector<double> x_i; vector<double> fx_i; int i = 0; ...
true
1bd70e4a6956d5f3f8b7feeca38dae3be9179d8a
C++
pthom/BabylonCpp
/src/Extensions/src/extensions/navigationmesh/channel.cpp
UTF-8
2,964
2.828125
3
[ "Apache-2.0", "LicenseRef-scancode-free-unknown" ]
permissive
#include <babylon/extensions/navigationmesh/channel.h> namespace BABYLON { namespace Extensions { Channel::Channel() { } Channel::~Channel() { } void Channel::push(const Vector3& p) { portals.emplace_back(Portal{p, p}); } void Channel::push(const Vector3& p1, const Vector3& p2) { portals.emplace_back(Portal{p1...
true
785f3cdc5af763c0938bf490b6f3b2cda24b5545
C++
harshil93/Competitive-Programming
/codechef/bytecode/savemum.cpp
UTF-8
1,141
2.703125
3
[]
no_license
#include <iostream> #include <string> #include <cstdio> #include <cstdlib> #include <cmath> #include <vector> #include <algorithm> #include <utility> #include <queue> #include <stack> #include <map> #include <set> using namespace std; #define PR(x) cout << #x " = " << x << "\n"; int main(){ int64_t t;cin>>t; ...
true
a8f968ff15ab5ee76d40229723c3de99c07f5e41
C++
pavel-zeman/CodeChef
/CodeChef/src/y2015/m09/challenge/CrackingTheCode.cpp
UTF-8
3,058
2.984375
3
[]
no_license
// The key idea is that the square of the multiplication matrix is 16 (2^4). Then it's enough to calculate the first element and its exponent of 2. // https://www.codechef.com/SEPT15/problems/CODECRCK #include <bits/stdc++.h> using namespace std; #define FOR(c, m) for(int c=0;c<(int)(m);c++) #define FORE(c, f, t) for(...
true
b799cf6f105e4a47647e2024076e35a84d828bb6
C++
pjsaksa/swd
/src/utils/path.cc
UTF-8
1,333
2.671875
3
[ "MIT" ]
permissive
/* swd - Scripts with Dependencies * Copyright (C) 2020 Pauli Saksa * * Licensed under The MIT License, see file LICENSE.txt in this source tree. */ #include "path.hh" #include <cstring> #include <stdexcept> #include <sys/stat.h> #include <sys/types.h> using namespace std; // utils::OpenDir::OpenDir(const str...
true
0d22f6754c88b0244afb67a6a78a306ec9e623d9
C++
Furgl/CS-368-A6
/ConsoleApplication1/main.cpp
UTF-8
636
3.3125
3
[]
no_license
#include "Vector.hpp" #include <iostream> using namespace std; void printVector(const Vector<int> &v) { for (int i = 0; i < v.size(); i++) { cout << v[i] << ", "; } cout << endl; } int main() { Vector<int> v1; v1.pushBack(1); v1.pushBack(2); v1.pushBack(3); printVector(v1); cout << "SELF ASSIGNMENT ...
true
dfc4b906b20bae1ffe7ee84c472332545e5469e8
C++
leag37/BuffaloEngine
/BuffaloEngine/Include/Rendering/BuffMaterialReader.h
UTF-8
3,361
2.84375
3
[]
no_license
// Filename: BuffMaterialReader.h // Author: Gael Huber #ifndef __BUFFMATERIALREADER_H__ #define __BUFFMATERIALREADER_H__ #include "Core\BuffPrerequisites.h" #include "Rendering\BuffConstantBuffer.h" #include "Rendering\BuffMaterial.h" #include <fstream> #include <vector> namespace BuffaloEngine { /**...
true
b638f5d8ce52aa89c763f2534b4d2aa1eb8bb1cb
C++
taylor-jones/Fly-Away-Home
/Slider.hpp
UTF-8
864
2.90625
3
[]
no_license
/********************************************************** ** Program Name: final project ** Author: Taylor Jones ** Date: 3/6/2018 ** Description: Slider.hpp is the Slider class ** specification file. This file contains declarations ** for the member variables and member functions of ** the Slider class. *********...
true
7dad9dbe10d30131ae901cb25b4c0fcc652336d9
C++
MannyOsorio/legendary-enigma
/Allele.cpp
UTF-8
502
2.890625
3
[ "Apache-2.0" ]
permissive
#include <iostream> #include "Allele.h" #include <string> using namespace std; Allele::Allele() { this->nucleotideSequence = ""; this->variantName = ""; this->variantType = ""; } Allele::Allele(string nucleotideSquence, string variantName, string variantType) { this->nucleotideSequence = nucleotideSquence; this...
true
803b5959c292125a2fb05ab8084fad96744e01c6
C++
dotnet/dotnet-api-docs
/snippets/cpp/VS_Snippets_CLR/MethodBody/cpp/source.cpp
UTF-8
4,887
3.4375
3
[ "MIT", "CC-BY-4.0" ]
permissive
// 1 - (entire sample) MethodBody class // 2 - (everything through GetMethodBody and displaying InitLocals & MaxStackSize) // 3 - (displaying locals) // 4 - (displaying exception clauses) // 5 - (end of Main, example method, beginning of output through output for snippet 2) // 6 - (output for snippet 3 (locals)) // 7 -...
true
805a7bf5d5f1f566fb38f4012c1f48922a330414
C++
rlorigro/pytorch
/aten/src/ATen/core/op_registration/infer_schema.h
UTF-8
3,223
2.96875
3
[ "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "Apache-2.0", "BSD-2-Clause" ]
permissive
#pragma once /** * This file contains functionality to take a C++ function and infer its * c10::FunctionSchema. */ #include <ATen/core/function_schema.h> #include <c10/util/C++17.h> #include <c10/util/Metaprogramming.h> namespace c10 { namespace detail { /// Checks the static C++ type `T` for correctness to catc...
true
d4117c4827b4b791e2f68dac5e33bcd41daa953d
C++
anandaditya444/LEETCODE
/MaximumXorOfTwoNumbersInAnArray.cpp
UTF-8
983
3.140625
3
[]
no_license
//Q.421 class Solution { public: //http://www.ritambhara.in/maximum-xor-value-of-two-elements/ typedef struct data { data* bit[2]; int cnt = 0; }trie; trie* head; void insert(int x) { trie* cur = head; for(int i=30;i>=0;i--) { int b = (x>>i) & 1; if(!cur->bit[b]) cur->bit[b] = new trie(); cur = cur...
true
e6f22d1ca2300041509cae58f08f48de5e1f2617
C++
Ivanova475/cplusplus-tasks
/Hash_Table/Hash_Table/hash_table.h
UTF-8
422
2.796875
3
[]
no_license
#pragma once #include <vector> #include <string> class HashTable { public: HashTable(); void Add(const std::string& new_string); bool Has(const std::string& new_string) const; void Remove(const std::string& new_string); int GetHash(const std::string& new_string) const; const std::vector<std::...
true
307a374cb7548779a84ecff57cd15bcf61126528
C++
jhwang7628/aero_cfd
/src/sourcefunction.cpp
UTF-8
2,153
2.890625
3
[]
no_license
#include "sourcefunction.h" #include "parameters.h" #include <stdio.h> SourceFunction::SourceFunction(const double bs, const SHAPE s, const Eigen::MatrixXd * g, const int textureIndex) : _baseSpeed(bs), _shape(s), _g(postProcessG(g)), _textureIndex(textureIndex), maxT...
true
eb2b5f20381c312b1661b3befa66c87a564b2f2c
C++
dvtrunggg/OOP
/Seminar/Nhom10/Sourcecode_Adapter/adapter_plug.cpp
UTF-8
1,056
3.34375
3
[]
no_license
#include <iostream> #include <string> using namespace std; class Plug_2 { public: virtual int numPin() { return 0; } virtual string namePlug() { return ""; } }; class twoPin : public Plug_2 { public: int numPin() { return 2; } string namePlug() { ...
true
6e35ad201572c4f4ff79b9a14546875daf11d76f
C++
magallonphil/Experiment-2
/Problem-4.cpp
UTF-8
674
4.125
4
[]
no_license
//Create a program that will accept three numbers as input and display the LARGEST number //of the three. #include <iostream> #include <conio.h> using namespace std; int main() { float n1, n2, n3; cout << "Enter three numbers: "; cin >> n1 >> n2 >> n3; if (n1 >= n2) { if ...
true
0e885d8877bcd96466459ac47a12011586c02e9d
C++
a-kashirin-official/spbspu-labs-2018
/vasekha.irina/A1/rectangle.hpp
UTF-8
561
2.9375
3
[]
no_license
#ifndef RECTANGLE_HPP #define RECTANGLE_HPP #include <cmath> #include <iostream> #include "shape.hpp" class Rectangle: public Shape { public: Rectangle(const point_t & pos, const double width, const double height); virtual double getArea() const override; virtual rectangle_t getFrameRect() const override; vir...
true
155a73e6ab15e826a80f390064c30d80e46011d4
C++
Subhammodi/coding
/Sorting/practice/insersort.cpp
UTF-8
472
3.3125
3
[]
no_license
#include<stdio.h> using namespace std; void swapp(int *p, int *q) { int temp = *p; *p = *q; *q = temp; } void insersort(int *arr, int n) { int j; for(int i=0; i<n; i++) { j=i; while(j>0) { if(arr[j] < arr[j-1]) swapp(&arr[j], &arr[j-1]); j--; } } } int main() { int n; scanf("%d", &n); int *...
true
0f13196fb086ea197b1408fe1b0e2eb3d23b8633
C++
SachinGunjal001/Data-Structures-And-Algorithms
/LinkedList/LinkedList_Deletion.cpp
UTF-8
2,548
4.09375
4
[]
no_license
#include<stdio.h> #include<stdlib.h> struct Node{ int data; struct Node * next; }; void linkedListTraversal(struct Node *ptr) { while (ptr != NULL) { printf("Element: %d\n", ptr->data); ptr = ptr->next; } } // Case 1 : delete the first element struct Node * deleteFirst(struct Node...
true
300a52f0ab4e2d542e13274d0c8f62f6c4b55b21
C++
hamzasclone2/EECS-560
/Lab08/maxMin.h
UTF-8
577
2.9375
3
[]
no_license
#ifndef MAXMIN_H #define MAXMIN_H class maxMin{ public: maxMin(); //constructor ~maxMin(); //destructor void buildHeap(); //takes in data file to populate array void insert(int val); //inserts value at last+1 void deleteMin(); //deletes min value, replaces with last int findMin(); //retur...
true
72694fb80efd5f79305c2b0d2ce7e1d7ddcc678a
C++
Andrewnetwork/CS170
/Work/textBasedRpg/textBasedRpg/playerClass.h
UTF-8
816
3.328125
3
[]
no_license
/* The player class must have the following features: 1.)[]An array to hold invintory information. 2.)[]Health variable and functions that can change the health such as: -[]Dammage function -[]Healing function 3.)[]A way to determine if the player is dead. 4.)[]An array to hold information about player attacks. 5....
true
6c8bdadfdd8ec738a71a7d29072774017cda36ad
C++
cowtony/ACM
/C++ Fundamental/09 OOP - Polymorphim/Dog.h
UTF-8
333
3.125
3
[]
no_license
#pragma once #include <iostream> #include "Animal.h" class Dog : public Animal { public: void animalSound() const override { std::cout << "The dog says: bow wow \n"; } }; class Teddy : public Dog { public: void animalSound() const override { std::cout << "The Teddy says: I'm a teddy dog \...
true
dd3eb542cc30cd771951a7cb24e4a7098a436666
C++
emakryo/cmpro
/src/tenkei90/d025.cpp
UTF-8
1,438
2.53125
3
[]
no_license
#include<bits/stdc++.h> using namespace std; typedef long long ll; template<typename T> ostream& operator<<(ostream &os, vector<T> &v){ string sep = " "; if(v.size()) os << v[0]; for(int i=1; i<v.size(); i++) os << sep << v[i]; return os; } template<typename T> istream& operator>>(istream &is, vector<...
true
290fc81f9ac36ad59b5589e2350e8959022818d5
C++
XiangqianMa/Aim-At-Offer
/35_clone_complex_list/clone_complex_list.cpp
UTF-8
1,909
3.25
3
[]
no_license
// // Created by mxq on 2020/2/18. // #include "clone_complex_list.h" /** * @brief 复制复杂链表 * @param list_head * @return */ ComplexListNode* CloneComplexList(ComplexListNode* list_head){ if (list_head == nullptr) return nullptr; CloneNodes(list_head); ConnectSiblingNodes(list_head); return ...
true
ea5804b9214a3d59a28091734d30f3c29c371202
C++
ahmedkrmn/Competitive-Programming
/Codeforces/313A.cpp
UTF-8
569
2.75
3
[]
no_license
#include <iostream> #include <cmath> using namespace std; int main() { long long int n; cin >>n; int last,beforelast; if (n>=0) { cout << n << endl; } else { n=abs(n); last = n%10; beforelast=(n/10)%10; if (last>beforelast) { n/=10; cout << "-"<<n; } else { if...
true
34141a9212a9e9c2f329f83cd0657b09f86814e9
C++
srisaipasupuleti/interviewbit
/arrays/largest_number_s.cpp
UTF-8
484
3.078125
3
[]
no_license
int compare(string a,string b){ string pre=a.append(b); string suc=b.append(a); return pre.compare(suc)>0?1:0; } string Solution::largestNumber(const vector<int> &A) { vector<string> B; for(auto x:A){ B.push_back(to_string(x)); } sort(B.begin(),B.end(),compare); string result...
true
9f55303adbc20feb6bfbc6a85abb6745179f7945
C++
georgidimov/FileSystem
/FileSystem/directory.cpp
UTF-8
6,743
3.3125
3
[]
no_license
#include "directory.h" Directory :: Directory(Value newName, size_t size, Directory * newParent) : File(newName, size){ parent = newParent; } Directory :: Directory(Value newName, size_t position, size_t newSize, size_t newSizeInFS, Directory *nParent) : File(newName, position, newSize, newSizeInFS) { par...
true
36765b4c11f98f55a86c073ec6b25b07ac658d7c
C++
Ameyyy4/Problem-Solving
/Array/Count Inversion/Brute.cpp
UTF-8
647
3.3125
3
[]
no_license
// TC : O(n*n) SC : O(n) - For a single Test Case // SC is due to the input size #include <iostream> #include <vector> using namespace std; int count_inv(vector<int> &vec, int n) { int count = 0; for(int i=0;i<n;i++) { for(int j=i+1;j<n;j++) { if(vec[i]>vec[j]) co...
true
afd838a72747bf786c517012b7de548602cadb08
C++
Graphics-Physics-Libraries/Tiny3D
/Win32Project1/mesh/sphere.cpp
UTF-8
3,701
2.609375
3
[]
no_license
#include "sphere.h" #include "../constants/constants.h" #include <stdlib.h> #include <string.h> Sphere::Sphere(int m,int n):Mesh() { longitude=m; latitude=n; vertexCount = (m - 1) * n + 2; vertices=new VECTOR4D[vertexCount]; normals=new VECTOR3D[vertexCount]; texcoords=new VECTOR2D[vertexCount]; ind...
true
bdc76be272f82cd97d36d7423143802d25ae0d1a
C++
HeenaRajput/DS-A-Assignments
/week1/Day4/heightchecker.cpp
UTF-8
562
2.875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int heightChecker(vector<int>& heights) { vector<int> v=heights; sort(v.begin(),v.end()); int i,count=0; int n=heights.size(); for(i=0;i<n;i++){ if(heights[i]!=v[i]) count++; } ...
true
d94faeaed0d1c1a25d48c943a9a483a4c5d4e296
C++
RoberttyFreitas/Grupo-OBI-2020
/Exercícios Aula/Aula 2/PremiodoMilhao.cpp
UTF-8
228
2.703125
3
[]
no_license
#include <iostream> using namespace std; int main(){ int N, A, soma = 0, dia = 1; cin >> N; while(N--){ cin >> A; soma += A; if(soma >= 1000000){ break; } dia++; } cout << dia << endl; return 0; }
true
c29d0e8a5b66da8aeec784f08c51611f51cc18a9
C++
sergey-pashaev/practice
/cpp/dbg/include/dbg/breakpoint.h
UTF-8
613
2.78125
3
[]
no_license
#ifndef BREAKPOINT_H #define BREAKPOINT_H #include <cstdint> #include <sys/types.h> class Breakpoint { public: Breakpoint() = default; Breakpoint(pid_t pid, std::intptr_t addr); void Enable(); void Disable(); bool IsEnabled() const; std::intptr_t GetAddress() const; private: pid_t pid_...
true
8c4d162397adce698de73e58a1270369e557081d
C++
xSofter/workflow_annotation
/demos/12_counter/counter_intro.cc
UTF-8
1,400
2.890625
3
[ "MIT" ]
permissive
// 计数器是我们框架中一种非常重要的基础任务,计数器本质上是一个不占线程的信号量。 // 计数器主要用于工作流的控制,包括匿名计数器和命名计数器两种,可以实现非常复杂的业务逻辑。 // 每个计数器都包含一个target_value,当计数器的计数到达target_value,callback被调用。 // 匿名计数器直接通过WFCounterTask的count方法来增加计数 // 命名计数器,可以通过count, count_by_name函数来增加计数 #include <spdlog/spdlog.h> #include <workflow/WFTaskFactory.h> #include <workflow/WFH...
true
f4dd5c5a9f30b8b4692c6a2c5d4ec2cf26863297
C++
gourav13/c-_code
/mpp/main.cpp
UTF-8
490
3.015625
3
[]
no_license
#include <iostream> #include <map> using namespace std; map<long long,long long > m; int main() { map<long long,long long>::iterator it; m[2]=1; m[8]=1; m[4]=1; m[10]=1; m[12]=1; m[15]=1; long long k=1; for(it=m.begin();it!=m.end();++it) { it->second=k++; cout<<it->first<<" "; ...
true
a2a40c42f40aa468783b378d35e26c9476456dc5
C++
andreibratu/bachelor
/sem5/pdp/lab5/Polynomial.cpp
UTF-8
1,668
3.328125
3
[]
no_license
// // Created by bratu on 11/14/2020. // #include <iostream> #include "Polynomial.h" std::ostream &operator<<(std::ostream &os, const Polynomial &dt) { std::vector<int> number = dt.coefficients; for(int i = number.size() - 1; i >= 0; i--){ // NOLINT(cppcoreguidelines-narrowing-conversions) if(i == nu...
true
22c7b22d787978bba88d8e5e1fe86fbd240c3032
C++
flylofty/coding_test_study
/210304_BOJ_16398 - 02.cpp
UTF-8
1,070
2.859375
3
[]
no_license
#include <iostream> #include <vector> #include <queue> using namespace std; typedef pair<int, int> pii; int N; vector<pii> v[1001]; vector<bool> visit(1001, false); void input() { cin >> N; for (int i = 0; i < N; ++i) { for (int j = 0; j < N; ++j) { int c; cin >> c; if (c == 0) continue; v[i].pu...
true
94a5cfea663a589c1a459e17ddc7fb27e87310f9
C++
adityanjr/code-DS-ALGO
/CCDSAP/STACKS AND QUEUES/HISTO/main.cpp
UTF-8
1,068
2.625
3
[ "MIT" ]
permissive
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ll a; while(cin>>a && a!=0){ vector<ll>vec(a); for(int i=0;i<a;i++){ cin>>vec[i]; } ll max_area = LLONG_MIN; ll i = 0; stack<ll>ss; while(i<a){ ...
true
dbc7116631e83d687dd7ed7ca99da0c6669d9f12
C++
npazderov/OOP_2017
/Battleship_2inter/Ship.cpp
UTF-8
4,662
3.078125
3
[]
no_license
#include "Ship.h" Ship::Ship() { hp = 0; ID = '.'; positionX = 0; positionY = 0; } Ship::Ship( int newHp, char newID, int newPositionX, int newPositionY) { hp = newHp; ID = newID; positionX = newPositionX; positionY = newPositionY; } Ship::Ship(const Ship& other) { ...
true
558e2214b44d7fb9a58a90d69158d4947049f5d0
C++
geova-25/Vector-Processor-Simulation
/src/alu.h
UTF-8
658
2.65625
3
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <stdio.h> class Alu { public: Alu(); char result; unsigned char sum (unsigned char op1, unsigned char op2); unsigned char sub (unsigned char op1, unsigned char op2); unsigned char xxor(unsigned char op1, unsigned char op2); unsigned char shfl(unsigned char o...
true
8e7f3fc2a0fc03618cb378511fddb46ef7660932
C++
rahulnusiss/ImageMatrixOptimize
/source/TestSearch.cpp
UTF-8
2,727
2.796875
3
[]
no_license
#include "TestSearch.h" #include "ISearch.h" #include "Sequence.h" #include "Unordered.h" #include "BestMatch.h" #include <iostream> #include <chrono> #include <vector> #include <random> #include <functional> using namespace std; TestSearch::TestSearch() { m_search_type_map["searchSequence"] = new Sequence(); ...
true
495be596b4bc35c20ce47ebc61ac67c9926cd923
C++
porvaznikmichal/ETH-ACM-Lab
/Week 5 - Graphs 2/wild wild west train network/www_train_network.cpp
UTF-8
1,769
3.375
3
[]
no_license
#include <iostream> #include <vector> #include <set> #include <limits> #include <map> #include <queue> using namespace std; const int MAX_INT = numeric_limits<int>::max(); struct edge { int to, length; }; int dijkstra(vector< vector<edge> > &graph, int source, int target) { int n = graph.size(); // initialize ...
true
54af1bf7a9238134e27563af16613eb7d58cdfce
C++
ankitsaini84/DS-Algos
/Uncategorized/Implement_Trie.cpp
UTF-8
2,208
4.09375
4
[]
no_license
/** * Implement a trie with insert, search, and startsWith methods. */ #include <iostream> #include <string> #include <vector> class Trie { struct Node { Node* val[26] {nullptr, }; bool eow {false}; }; Node* db {nullptr}; int getVal(char c) { return c - 'a'; } publi...
true
fa346f3dcf77c6ebccb04ccfb790b77d924cf720
C++
erwanmarchand/LOG4705-Labs
/TP3/Program/main.cpp
UTF-8
3,219
2.765625
3
[]
no_license
#include "parc.h" // Fonction pour lire un fichier void readFile(string path, vector<pointDInteret*>& listPI){ int numberPointsDinteret = 0; string delimiter = " "; string token1; string token2; string line; string line2; ifstream myfile(path); if (myfile.is_open()) { getline(myfile, line); numberPoint...
true
6240c292d71cf1c3b9280bbc2d4f65664bc91327
C++
Hui-hsiang/Information_Security_Class
/hw1/Information_Security_Class/Information_Security_Class/Encrypt.cpp
UTF-8
6,852
2.796875
3
[]
no_license
#include <stdio.h> #include <iostream> #include <string> #include <vector> using namespace std; string caesar(string key, string plaintext); string playfair(string key, string plaintext); string vernam(string key, string plaintext); string row(string key, string plaintext); string rail_fence(string key, string plainte...
true
6d80708a10ff039feda0b773a43d73546e2fac7b
C++
Isanti2016/QtLearning
/NotePad/ReplaceDialog.cpp
UTF-8
1,835
2.578125
3
[]
no_license
#include "ReplaceDialog.h" ReplaceDialog::ReplaceDialog(QWidget *parent, QPlainTextEdit* pText) : FindDialog(parent, pText) { InitControl(); ConnectSlot(); setWindowTitle("Replace"); } void ReplaceDialog::InitControl() { m_replaceLbl.setText("Replace To:"); m_replaceBtn.setText("R...
true
0dbff4fafae3a73aba8c89443df297fa4ecbe55a
C++
blinker-iot/blinker-library
/src/modules/base64/Base64.cpp
UTF-8
2,671
2.828125
3
[ "MIT" ]
permissive
#include "Base64.h" #if (defined(__AVR__)) #include <avr/pgmspace.h> #elif defined(ESP8266) || defined(ESP32) #include <pgmspace.h> #endif const char PROGMEM b64_alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789+/"; /* 'Private' declarations */ inline void a3_to_a4(unsigned...
true
787f99072a58993fc96ac0da79b788155250f5ab
C++
royks07/plankesorteringsanlegg-simulator-styringssystem
/PlankesorteringsAnlegg/Plankesorteringsanlegg/Conveyor.h
UTF-8
3,787
3.078125
3
[ "Zlib" ]
permissive
/** \file Conveyor.h * \brief Contains the Conveyor-class and the classes needed to build it. * * \author Roy Kollen Svendsen */ #ifndef CONVEYOR_H_ #define CONVEYOR_H_ #include <vector> #include "Sensors.h" typedef enum{ingen,knott,krok} t_medbringerType; /** \brief The conveyors wheels. */ class Wheel{ publi...
true
74624341af919e7f063a7f2fa5cb1f35b6da2fac
C++
rohit9123/mycodes
/combination.cpp
UTF-8
2,365
2.734375
3
[]
no_license
#include<iostream> #include<vector> #include<map> using namespace std; vector<vector<int> > combination; vector<vector<int> > combinationSum(vector<int>& candidates, int target) { map<int,int> find; map<int,int> check; sort(candidates.begin(),candidates.end()); if(targe...
true
44587fa83ea51d2fa110daef81ce3320a4618ae5
C++
Ju5tK1ng/codes
/leetcode/leetcode474.cpp
UTF-8
866
2.859375
3
[]
no_license
#include <bits/stdc++.h> using namespace std; class Solution { public: pair<int, int> count(string& str) { int c0 = 0, c1 = 0; for (char c : str) { if (c == '0') { c0++; } else { c1++; ...
true
2976aae9b6efe727aed1e1f414296731a3d73360
C++
keyclicker/labs
/Term2/Lab3/С/main.cpp
UTF-8
2,794
3.109375
3
[]
no_license
#include "sorting.hpp" #include <algorithm> #include <iostream> #include <iomanip> #include <vector> #include <random> #include <thread> #include <future> using namespace std; int main() { random_device rd; default_random_engine re(rd()); uniform_real_distribution<double> drand(-100, 100); uniform_int_distrib...
true
cbe6da21db90a65f7c061dfd4f79d3a5af5e64ab
C++
SOSpacebar/DATA-ASSIGNEMNT-1
/Assignment01_164108J_NgJingJie/Assignment01_164108J_NgJingJie/Weapon.h
UTF-8
266
2.609375
3
[]
no_license
#ifndef WEAPON_H #define WEAPON_H #include "Item.h" class Weapon : public Item { public: Weapon(const string&, const int&, const int&); virtual ~Weapon(); const int getAttackDmg(); void receiveDamage(const int&); protected: const int kAttackDmg; }; #endif
true
16172a72e924efd80eba33a902bac86363696b93
C++
imulan/procon
/codeforces/gym/2015ICLFinals_Div1/g.cpp
UTF-8
1,098
2.515625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i,n) for(int i=0; i<(int)n; ++i) #define all(x) (x).begin(),(x).end() #define pb push_back #define fi first #define se second ll cv(ll h, ll m, ll s) { return 1000000000000LL*h + 1000000LL*m + s; } void p(ll t) { ll a[3]; a[0]...
true
b490abf68864314c4901d5d70030d84cc2328b34
C++
victor-armegioiu/Algo-stuff
/1213.cpp
UTF-8
947
2.640625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; const int N = 2000; const int K = 15; vector<int> primes; int n, k; int pos; int dp[N][K][N]; inline void sieve() { vector<bool> is_prime(N, true); int lim = sqrt(N); for (int i = 2; i <= lim; i++) { if (is_prime[i]) { for (int j = i * i; j <= N; j += i) ...
true
5d24461cd9090cb69b9dff52208a037d76e331a8
C++
lavinrp/NNComs
/Code/src/GameDataReader.cpp
UTF-8
13,170
2.515625
3
[]
no_license
#include <sstream> #include "ts3_functions.h" #include "teamspeak/public_errors.h" #include "plugin_definitions.h" #include "GameDataReader.h" #pragma region Constructors / destructor /* initializes GameDataReader values.TS functions must be passed to allow for initialization of user @param ts3Functions: pointer f...
true
43107b95e224e8554cb14eebe68530e315aae46e
C++
dorOren/ElectionsProcess-CollegeProject-CPP
/Provinces.h
UTF-8
2,286
3.328125
3
[]
no_license
#pragma once #include "dynamicArrTemplate.h" namespace elections { class provinces { private: string name; //The name of the represented province int provNum = 0; //holds the number of the represented province float perec...
true
c1c08dba6aa9f8a89aa07e4a0e455cd7ca73e415
C++
cedricplouvier/Highway-Racer
/CarGame2/SDLfact.cpp
UTF-8
1,458
2.796875
3
[]
no_license
// // Created by Cedric Plouvier on 2019-03-04. // #include <iostream> #include "SDLfact.h" using namespace std; // Contructor that initialises the window and renderer for all our object to be visualized on SDLfact::SDLfact() { SDL_Init(SDL_INIT_VIDEO); SDL_SetHint( SDL_HINT_RENDER_SCALE_QUALITY, "1" ); ...
true
25c44a337bad83fd178a2804e627918f0e154360
C++
dandycheung/dandy-twl
/TWL/include/util/findwnd.h
UTF-8
4,180
2.515625
3
[]
no_license
#ifndef __FINDWINDOW_H__ #define __FINDWINDOW_H__ #define WFF_CLASSNAME 0x00000001 #define WFF_WINDOWNAME 0x00000002 #define WFF_MATCHMASK (WFF_CLASSNAME | WFF_WINDOWNAME) #define WFF_SKIPCHILDREN 0x00000004 #define WFF_SKIPHIDDEN 0x00000008 #define WFF_SKIPDISABLED 0x00000010 #define WFF_FIRSTONLY ...
true
844dd0756a21d20f60a65391504fd1b0ea77ee6a
C++
mmalenta/bitsnbobs
/paf/pafftw.cpp
UTF-8
2,057
2.6875
3
[]
no_license
#include <chrono> #include <fftw3.h> #include <iostream> #include <random> #include <time.h> using std::cout; using std::endl; #define UINS 1000000 #define NINS 1000 #define RUNS 50 void poweradd(fftw_complex *in, float* out, unsigned int size) { for (int ii = 0; ii < size / 2; ii++) { out[ii] = (in[ii][0] * i...
true
ee4ab93ac3ec4759e1e2cc7d1eb7b15201f42d6e
C++
dovotori/Murmurations
/src/Camera.h
UTF-8
1,508
3.03125
3
[]
no_license
#ifndef CAMERA_H #define CAMERA_H #include "ofMain.h" class Camera { public: Camera(); virtual ~Camera(); void setup(); void updateView(); void updateProjection(); void updateRotation(); inline void setPosition(float x, float y, float z){ this->position.set...
true
08c4f0d8ceed1e0c742dcfed00af89c068222102
C++
BorisVelichkov/fmi-se-oop-2021
/01 Introduction to OOP and Classes/Solutions/Timestamp/Timestamp.cpp
UTF-8
2,049
3.90625
4
[ "MIT" ]
permissive
#include <iostream> #include "Timestamp.hpp" Timestamp::Timestamp(const unsigned seconds) : SECONDS_IN_HOUR(3600) , SECONDS_IN_MINUTE(60) //, hours(seconds / SECONDS_IN_HOUR) { this->hours = seconds / SECONDS_IN_HOUR; unsigned remainingSeconds = seconds % SECONDS_IN_HOUR; this->minutes = remain...
true
46efae7de4d8dc00c52e7b68f27ec25b8d67e844
C++
Brinews/jacky
/C/C-MAP/minesweep/minesweeper/bonus.h
UTF-8
1,913
2.796875
3
[]
no_license
#include <string> #include "minesweeper.h" #ifndef bonus_H #define bonus_H class bonus : public minesweeper { public: bonus(); bonus(int col, int row, int numOfMines); int saveGame(std::string path); //Save minesweeper object state to file int loadGame(std::string path); //Lo...
true
5837112d60cfecdd4e2eee72e0d0709d6bdc4ee7
C++
JohnataDavi/uri-online-judge
/solutions/1217.cpp
UTF-8
938
2.796875
3
[ "MIT" ]
permissive
#include <iostream> #include <string> #include <vector> #include <sstream> #include <iomanip> #include <vector> using namespace std; int main() { int n; float v, avg = 0, kg = 0; string str; char split_char = ' '; vector<int> vI; vector<float> vV; cin >> n; for (int i = 0; i < n; i++)...
true
b4f89f6f3d2a2a52413fc2caa9e4759fcbd69f3c
C++
ThimotheeV/GSpace
/tests/random_generator_test.cpp
UTF-8
2,627
3.0625
3
[]
no_license
#define CATCH_CONFIG_MAIN #include "catch.hpp" #include <array> #include "random_generator.hpp" TEST_CASE("random_generator_test") { SECTION("construct_rand_gen_c") { rand_gen_c rand_gen; rand_gen.put_seed(3); REQUIRE(rand_gen.rand_bool() == 1); REQUIRE(rand_gen.int_0_PRECISION...
true
df43102140046dec72a3367cb59e08cc92350c4a
C++
sudoHub/Snake-Game-with-console-input-output
/main.cpp
UTF-8
3,541
3.265625
3
[ "Unlicense" ]
permissive
/* * File: main.cpp * Author: Brandon West * * Created on November 26, 2017, 1:59 PM * Purpose: Snake game. Player must eat the 'Z' or '8' without eating * themselves. */ #include "Game.h" #include "Snake.h" #include "SaveScr.h" #include <cstdlib> #include <iostream> #include <iomanip> #inclu...
true
265939b5f5003ca2b2e77908550513fb1d1b2e79
C++
ThomasKeil/Uhr
/src/handleinput.cpp
UTF-8
3,307
2.765625
3
[]
no_license
#include <Arduino.h> #include "Time.h" #include "handleinput.h" #include "displayinfos.h" extern struct datum hochzeitstag; extern unsigned int next_update; void printCurrentTime() { char current_time[40]; sprintf(current_time, "Bekannte Zeit: %02i.%02i.%04i %02i:%02i:%02i", day(), month(), year(), hour(), minu...
true
05cf2b2738c00f8020b046ff71071ffef3cad150
C++
SashiRin/protrode
/atcoder/abc102/B.cpp
UTF-8
371
2.859375
3
[ "MIT" ]
permissive
#include <iostream> #include <climits> #include <algorithm> using namespace std; int main() { int n; cin >> n; int num_min = INT_MAX; int num_max = INT_MIN; int x; for (int i = 0; i < n; ++i) { cin >> x; num_min = min(num_min, x); num_max = max(num_max, x); } ...
true
631f36b7da0682234aa0a8f777213d2da423ddbd
C++
hacchacc42/Platformer
/S2DPlatformer/S2DPlatformer/S2DPlatformer/Animation.cpp
UTF-8
686
3.0625
3
[]
no_license
#include "Animation.h" Animation::Animation(Texture2D* texture, float frameTime, bool isLooping) : _texture(texture), _frameTime(frameTime), _isLooping(isLooping) { } Animation::~Animation(void) { delete _texture; } const Texture2D* Animation::GetTexture() const { return _texture; } const float Animation::GetF...
true
3cce703f3032ef457ecabab8f582701e5d746335
C++
CJHMPower/Fetch_Leetcode
/data/Submission/145 Binary Tree Postorder Traversal/Binary Tree Postorder Traversal_1.cpp
UTF-8
1,219
3.140625
3
[]
no_license
//-*- coding:utf-8 -*- // Generated by the Fetch-Leetcode project on the Github // https://github.com/CJHMPower/Fetch-Leetcode/ // 145 Binary Tree Postorder Traversal // https://leetcode.com//problems/binary-tree-postorder-traversal/description/ // Fetched at 2018-07-24 // Submitted 2 years ago // Runtime: 0 ms // Thi...
true
2c2c02ce32b07cb28262e8065eac984cd170af51
C++
liuslevis/leetcode
/Minimum Path Sum.cpp
UTF-8
1,244
2.890625
3
[ "MIT" ]
permissive
// Redo! // 30 min // Recursive method TLE (but python okay) // Iterative method 1WA 1AC // Notice: DP speed up. #include <iostream> #include <vector> #include <unordered_map> #include <deque> #include <assert.h> #include <algorithm> #include <locale> using namespace std; class Solution { private: int f(vector<vec...
true
d444bef0790a3e6e610222a705c11c7c6de723f4
C++
alexandru-dinu/competitive-programming
/leetcode/maximum_sum_circular_subarray.cpp
UTF-8
549
3.546875
4
[ "MIT" ]
permissive
// https://leetcode.com/problems/maximum-sum-circular-subarray class Solution { public: int maxSubarraySumCircular(vector<int> &A) { int max_eh = 0, max_sf = INT_MIN; int min_eh = 0, min_sf = INT_MAX; int sum = 0; for (int x : A) { max_eh = max(x, max_eh + x); ...
true
77446fa3b3955f361119d782667a4e7766ee13b4
C++
skn123/jgt-code
/Volume_10/Number_3/Singh2005/IBar/Rn_Point3_i.H
UTF-8
2,409
3.171875
3
[ "MIT" ]
permissive
// ========================================================= // // Methods for R3PointTC template class // // ========================================================= // ------------------------------------- // constructors // ------------------------------------- template<class Coord> inline R3PointTC<Coord>::R3Po...
true
b2cf49813e4727310ae5bd292a003042cd251843
C++
ShabnamMRad/DataStructure
/cpp/LinkedList/src/LinkedList/LinkedList.cpp
UTF-8
2,071
3.59375
4
[]
no_license
#include <stdio.h> #include <stdlib.h> #include <iostream> #include "LinkedList.hpp" using namespace std; LinkedList::LinkedList() { head = NULL; tail = NULL; size = 0; }; int LinkedList::getSize() { return size; }; void LinkedList::append(int data) { Node *n = new Node(data); if ( head == NULL) { head ...
true
74e508392598517cc4cdc49f52724d9308543e52
C++
goby/150-problems
/04_01.cpp
UTF-8
410
3.125
3
[]
no_license
#include <vector> typedef struct _Node Node; struct _Node{ int data; std::vector<Node*> children; }; int length = 0; bool is_balance(Node * tree, int high) { if(tree->children.size() > 0) { for(int i = 0; i <tree->children.size(); i++) { if(!is_balance(tree->children.at(i), high+1)) return f...
true
67bcab4f85d6cdd9cff37e400d1e900e00b21b15
C++
janfas/Techniki-programowania
/Lista 3/Zadanie 1/main.cpp
UTF-8
662
3.625
4
[]
no_license
#include <iostream> #include <vector> bool match(const std::string& pattern, const std::string& s) { if(pattern == s) return true; else return false; } int main() { std::cout << "Program sprawdzajacy, czy lancuch znakow pasuje do wzorca:" << std::endl; std::string wzorzec, lancuch; std::cout << "Podaj w...
true
5412af914726b8f29c10cceafa99827d64e33365
C++
ibrahimovshamil/AVL-Tree
/AVLTree.cpp
UTF-8
3,260
3.109375
3
[]
no_license
#include "AVLTree.h" #include<iostream> #include<cstdio> #include<sstream> #include<algorithm> #include <ctime> #define pow2(n) (1 << (n)) using namespace std; AVLTree::AVLTree() { } AVLTree::~AVLTree() { } AVLTree::AVLTree(const AVLTree & tree) { copyTree(tree.root, root); } void AVLTr...
true
17a07190439c78f254d4998f1535bea7dae7ebeb
C++
260058433/libnet
/src/EventLoop.cc
UTF-8
755
2.578125
3
[]
no_license
#include "EventLoop.h" #include "Channel.h" #include "Poller.h" #include "EpollPoller.h" namespace libnet { EventLoop::EventLoop() : quit_(false), activeChannels_(), poller_(new EpollPoller(this)) { } EventLoop::~EventLoop() { } const int kPollTimeMs = 1000; void EventLoop::loop() { while (!quit_) ...
true
f288a34a9e3c9bd18aeaad3b195e24a31a0fcc79
C++
JosephCHS/Arcade
/src/games/lib_arcade_solarfox/src/Game.cpp
UTF-8
15,113
2.59375
3
[ "MIT" ]
permissive
/* ** EPITECH PROJECT, 2018 ** Game.cpp ** File description: ** Game Class */ #include <fstream> #include <iostream> #include <sstream> #include "Game.hpp" Game::~Game() { clear_all(); } void Game::fill_vector() { int nbr = -1; _pos_block.push_back({160, 120}); _pos_block.push_back({160, 160}); ...
true
6e130b0e89d575635f69a0cef7102134118adde6
C++
DeadNight/robotics
/hw4/MapSearchable.h
UTF-8
1,696
2.90625
3
[]
no_license
/* * MapSearchable.h * * Created on: May 4, 2016 * Author: Nir Leibovitch 200315232 * Author: Ron Naor 021615356 * Author: Shay Kremer 201588126 */ #ifndef MAPSEARCHABLE_H_ #define MAPSEARCHABLE_H_ #include <vector> #include "Map.h" #include "Position.h" #include "Location.h" #include "State.h"...
true
9542c4ca165c9941e32676a8d4365bc118cb4027
C++
alexandraback/datacollection
/solutions_2749486_0/C++/syash/b1c.cpp
UTF-8
687
2.765625
3
[]
no_license
#include <stdlib.h> #include <iostream> #include <fstream> #include <sstream> #include <vector> #include <string> using namespace std; void main() { ifstream in; ofstream out; out.open("out.txt"); in.open("input.txt"); int T; int x,y; int j; in >> T; for (int i=0; i<T; i++) ...
true
1c1d54939a7c3c7409f240a988ee31fa696e2490
C++
anflorea/mondlyQuiz
/src/actions/ActionCreator.cpp
UTF-8
4,161
2.71875
3
[]
no_license
#include "ActionCreator.h" #include <QQmlContext> #include "ServiceProvider.h" #include "Response.h" #include "RequestService.h" ActionCreator::ActionCreator(IDispatcher *dispatcher, IServiceProvider *serviceProvider, QObject *parent) : QObject(parent) { ...
true
4660e0d48872519cf6e06ecca7e29f36c7ca8a1b
C++
winkadd/Jottings_C-C-
/Project3.15/Project3.15/game.cpp
GB18030
2,417
3.421875
3
[]
no_license
#define _CRT_SECURE_NO_WARNINGS #include "game.h" void InitBoard(char board[ROW][COL], int row, int col) { int i = 0; int j = 0; for ( i = 0; i < row; i++) { for (j = 0; j < row; j++) { board[i][j] = ' '; } } } void DisplayBoart(char board[ROW][COL], int row, int col) { int i = 0; for ( i = 0; i < row...
true
333a1f794687cf6eeec03b3f04f86068d7bbc33a
C++
AdamPI314/Algorithm
/src/82_longest_common_prefix/solution.cpp
UTF-8
1,531
3
3
[]
no_license
#include <iostream> #include <utility> #include <vector> #include <list> #include <set> #include <unordered_set> #include <unordered_map> #include <map> #include <queue> #include <stack> #include <forward_list> #include <algorithm> #include <climits> #include <string> #include <cstring> #include <cstdlib> #include <num...
true
5df301100f1859d2e18e0d51480015d9aa53fcba
C++
BarryChenZ/Leetcode1
/P197_RisingTemperature.cpp
UTF-8
174
2.625
3
[]
no_license
# Write your MySQL query statement below select w1.Id as Id from Weather as w1,Weather as w2 where w1.RecordDate=AddDate(w2.RecordDate,1) and w1.Temperature>w2.Temperature
true
50bc99dd2d27ada2276331a911b698bce387ea8b
C++
ajstacher/CST136SRS02
/CST136SRS02/Waka/paddle.h
UTF-8
389
2.65625
3
[]
no_license
#pragma once #include "propulsion.h" class Paddle final : public Propulsion { public: Paddle(); //using Propulsion::getSpeed; <-- do I need this? void setSpeed(const int current); //overload from base class void setStrength(int n); private: int do_getSpeed() const override; void do_setSpeed(int n) noexcept...
true
8722522d2c7a6b18afad2ffaf753ad90b5f8922a
C++
splucs/Competitive-Programming
/Codeforces/Gym/101072 Brazilian Open Cup 2016, UFBA/G.cpp
UTF-8
760
2.65625
3
[]
no_license
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; #define MAXN (1<<19) double dp[MAXN]; int vet[20], N; double DP(int mask){ if (dp[mask] >= 0.0) return dp[mask]; double ans = 0, aux; int n = 0, nleft, nright; for(int i=0; i<N; i++){ if ((mask & (1<<i)) > 0) continue; n++; nleft...
true
6df35694337c0fad245f5ba0134a6680c588d8f5
C++
codgician/Competitive-Programming
/Codeforces-Gym/101908F/dp.cpp
UTF-8
2,919
2.53125
3
[ "MIT" ]
permissive
#include <iostream> #include <cstdio> #include <algorithm> #include <cmath> #include <string> #include <cstring> #include <iomanip> #include <climits> #include <stack> #include <queue> #include <vector> #include <set> #include <map> #include <functional> #include <iterator> using namespace std; #define TIME_SIZE 2010 ...
true
65f767620d4ad3fc75a174ad7ab13bf47bf77454
C++
carlschiller/highway
/highway/cppfiles/car.cpp
UTF-8
18,919
2.90625
3
[ "MIT" ]
permissive
// // Created by Carl Schiller on 2019-03-04. // #include "../headers/car.h" #include <map> #include <cmath> #include <list> #include <iostream> #include "../headers/util.h" //////////////////////////////////////////////////////////////////////////////// /// Constructor. Car::Car() : m_speed(0), m_ag...
true