Dataset Viewer
Auto-converted to Parquet Duplicate
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
1e46d26eb7e4cf83cb11d677e1f51f8e7cc61edc
C++
Sntai20/CPSC-5910-Data-Structures
/Week1/Lab/Solution/date.h
UTF-8
436
2.984375
3
[]
no_license
#ifndef DATE_H #define DATE_H #include <string> class Date { public: Date(int month, int day, int year); // constructor std::string GetMonthName() const; int GetDay() const; int GetYear() const; int GetDayInYear() const; // between 1 and 365/366 std::string GetDisplayForm...
true
57576b01f6801da887caf09681bc457c4359f222
C++
GENTLEMAN009/Codeforce-Problem-Solve
/691A.cpp
UTF-8
491
2.8125
3
[]
no_license
#include <iostream> using namespace std; int main() { int n, a[10000], i; while(cin>>n) { int cnt = 0; for(i=0; i<n; i++) { cin>>a[i]; if(a[i] == 0) { cnt++; } } if(n == 1 && a[0] == 1) { cout<<"YES"<<endl; } else if(n == 1 && a[0] ...
true
37efe76c6368a82b621a6f006b879f099dec6ab4
C++
diasYuri/Data_Structures-01
/Matriz/main.cpp
UTF-8
1,635
3.234375
3
[]
no_license
#include <iostream> #include "matrix2d.h" #include "matrixtritop.h" #include "matrixsimetrica.h" #include "matrixantisimetrica.h" #include "matrixtridiag.h" using namespace std; int main() { /*int n = 5; MatrixTriDiag m(n); for(int l=0; l<n; l++) { for(int j=0; j<n; j++) ...
true
dcf5cd7bd777672e2631c038141e1c05f3c9c656
C++
BaldrLector/PAT
/Advanced/1057. Stack (30).cpp
UTF-8
2,791
3.484375
3
[]
no_license
/*1057. Stack (30) 时间限制 150 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Stack is one of the most fundamental data structures, which is based on the principle of Last In First Out (LIFO). The basic operations include Push (inserting an element onto the top position) and Pop (deleting the top element). Now...
true
c04764ba045bc6fea8a618b220342c3812f81bec
C++
RitchieLab/pMDR
/src/pMDR/pBioComboGenerator.cpp
UTF-8
1,758
2.6875
3
[]
no_license
//pBioComboGenerator.cpp #include "pBioComboGenerator.h" namespace mdr{ /// /// For sending combo parameters. For the biofilter reading, only need /// the current index to get the next set from. /// @param node /// @param srParameters /// void pBioComboGenerator::SendParameters(int node, int srParameters){ unsi...
true
02dc35f15709ffe2b96ddd44afc10de2499f9dc1
C++
sergarb1/Competitive-Programming-Solved-Problems
/ACM-UVA/10142/10142.cpp
UTF-8
2,102
2.546875
3
[]
no_license
#include<iostream> #include<sstream> #include<string.h> #include<stdio.h> using namespace std; int main() { int votos[25]; int eliminado[25]; char nombre[25][90]; int papeletas[1500][25]; int i,j; int ntest; int ncand; char temp; char linea[2000]; cin >> ntest; for(int x=0;x<ntest;x++) { cin >> ncand...
true
70c61bc69da85bb2121e18ef50ae61f3ea1530b9
C++
MKGAURAB/30-Day-LeetCoding-Challenge
/day-7-count-elements.cpp
UTF-8
724
3.046875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; class Solution { int arr[1500]; public: int countElements(vector<int> &inp) { memset(arr, 0, sizeof arr); for (auto a : inp) arr[a] = 1; return count_if(begin(inp), end(inp), [&](int const &num) { return arr[num + 1]; }); ...
true
4dd0a15c5e3a34eb8a066226bddc1d31e7fccffa
C++
zhaoxiaohui/LeetCode
/Find the Duplicate Number.cpp
UTF-8
1,175
3.265625
3
[]
no_license
/** * Description: https://leetcode.com/problems/find-the-duplicate-number/ * Author: zhaoxiaohui * Site: zhaoxiaohui.sinaapp.com * Date: 2015-12-23 * * O(N): http://keithschwarz.com/interesting/code/?dir=find-duplicate (Excellent) */ class Solution { public: int findDuplicateB...
true
cd47fda01aac37e59363295d265d7e0fe1071d1b
C++
connormai/CanCom
/myhelper.h
GB18030
2,103
2.84375
3
[]
no_license
#ifndef MYHELPER_H #define MYHELPER_H #include <QTime> #include <QProcess> #include <QDebug> #include <QByteArray> #include <QString> class myHelper:public QObject { public: static void Sleep(int sec) { QTime dieTime = QTime::currentTime().addMSecs(sec); while( QTime::currentTime() < dieTime ) ...
true
37887cef8a02f2d9c707e49b1485ce42b37e0795
C++
vgelinski/EngineCalc
/src/math/function/polynomial/polynomial.cc
UTF-8
4,724
2.8125
3
[]
no_license
#include "polynomial.h" #include <numeric> using namespace std; using namespace engc::math; size_t Polynomial::Hash::operator()(const unordered_map<string, uint_fast8_t>& key) const { return std::accumulate( key.begin(), key.end(), 0, [](size_t acc, const pair<stri...
true
459d89a291b17a097f6244fbcdd4e23ac3da16fb
C++
seleneal1996/AED
/ARBOL-B/arbolB.cpp
UTF-8
8,319
3.015625
3
[]
no_license
//ARBOL B /*REGLAS */ #include<iostream> #include<stdlib.h> #include<stdio.h> #include <string> #include<fstream> #include<windows.h> #include <sstream> using namespace std; class Pagina { int *claves; int t; //grdo minimo de la pagina Pagina **C; //arreglo de punteros a...
true
d7698e4e962798ff4c723f5aa1325f6f3fbb8e7b
C++
rbp28668/SuperTX
/StringEntryForm.h
UTF-8
1,657
2.53125
3
[]
no_license
// StringEntryForm.h: interface for the CStringEntryForm class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_STRINGENTRYFORM_H__C18284E1_7350_11D2_BB29_F5D419D58836__INCLUDED_) #define AFX_STRINGENTRYFORM_H__C18284E1_7350_11D2_BB29_F5D419D58836__INCLUDED_ #if _MSC_...
true
6a419cb66d0523c0754bfdc367c197581385c76b
C++
bestknighter/IDJ-Tuto-Game
/src/Camera.cpp
UTF-8
1,525
2.953125
3
[]
no_license
#include "Camera.hpp" #include "Game.hpp" #include "InputManager.hpp" Vec2 Camera::pos { 0, 0 }; Vec2 Camera::speed { 0, 0 }; bool Camera::following = true; GameObject* Camera::focus = nullptr; void Camera::Follow( GameObject* newFocus ) { focus = newFocus; } void Camera::Unfollow() { focus = nullptr; } vo...
true
af0676c281cdc369e09ad2a00fa1f56a5bdd4f7a
C++
isakson98/CMPS2_final
/FinalCMPS2q5.cpp
UTF-8
778
3.5625
4
[]
no_license
#include <iostream> #include <string> #include <vector> using namespace std; template <typename T> void removeDuplicate(vector <T> & v) { vector<T> smaller; for (int i = 0; i < v.size(); i++) { int counter = 0; for (int j = 1; j < v.size(); j++) { if (v[i] == v[j]) { counter++; } } ...
true
16cc54e04f839a15d7c393ebe1c8e1372a5dcafa
C++
GPUOpen-LibrariesAndSDKs/Cauldron
/libs/vectormath/vec2d.hpp
UTF-8
16,024
3.328125
3
[ "MIT" ]
permissive
// ================================================================================================ // -*- C++ -*- // File: vectormath/vec2d.hpp // Author: Guilherme R. Lampert // Created on: 30/12/16 // Brief: 2D vector and point extensions to the original Vectormath library. // ======================================...
true
8159fc9c63112835480a16a7246e34cfd85b5870
C++
smithje/HalloweenBot
/HalloweenBot.ino
UTF-8
11,565
2.984375
3
[ "MIT" ]
permissive
/* HalloweenBot AUTHOR: Jeremy Smith (jeremy@musicsmith.net) https://github.com/smithje/HalloweenBot This is a sketch for an Adafruit Trinket, used in a robot halloween costume. There are several things which should be attached: - 2 neopixel rings. The data input of one of them should connect to the GOGGLES_PIN ...
true
a5af7176aff27aaa116319caa06c013194d12ca1
C++
Noymul-Islam/problems
/Problem A - f91.cpp
UTF-8
482
2.75
3
[]
no_license
#include<cstdio> #include<cmath> #include<cstring> using namespace std; int compute(int n) { int j; if(n<=100) j=compute(n+11); else return n; } int main() { int n,m,k; while(scanf("%d",&n)==1) { if(n==0) break; if(n>100) printf("f91(%d) = %d...
true
4283cc44056b273fd7f4787e15ea5dc255f35dbc
C++
huangjianjun/data_structure_vs2012
/字符串移位.cpp
GB18030
999
3.328125
3
[]
no_license
#include <iostream> using namespace std; #include<stdlib.h> char* shifting(char *a, int n) { int m = strlen(a); int d = m - n; char *b = (char *)malloc(m*sizeof(char)+1);//һλô洢'\0' *(b+m) = '\0';//ַռһλΪ־'\0' char *temp = (char *)malloc((n+1)*sizeof(char)); char *p = temp; for(int j = d; j < m; j++)/...
true
6d9e3058d133df2a18759e63140699c5627225d5
C++
gumeniukcom/just-cpp
/cpp/2/2.cpp
UTF-8
2,545
3.1875
3
[]
no_license
#include <iostream> using namespace std; static int nod(int a, int b){ if (b == 0) return a; return nod(b,a%b); } static int nok(int a, int b){ return a*b/nod(a,b); } class rational{ private: int q,r; public: void balans(){ int thisnod = nod(q,r); if (thisnod>1){ q =...
true
7c89ff1b2dec9cb39e77be6034a2d6d277ccc241
C++
Devansh0112/cplusplus-practice
/sparse_table_linked.cpp
UTF-8
1,365
3.828125
4
[]
no_license
// linked list representation #include <iostream> using namespace std; class Node { public: int row; int col; int val; Node *next; }; class Sll { private: Node *head; public: Sll() { head = NULL; } void insert(int row1, int column, int value) { Node *item = n...
true
cef96d4dcc047b64738cd021904aa0a475cc0856
C++
maximdervis/CameraArranger
/dbcameraaddition.cpp
UTF-8
4,990
3.015625
3
[]
no_license
#include "dbcameraaddition.h" #include "ui_dbcameraaddition.h" #include <QMessageBox> #include <QtXml> #include <QKeyEvent> DBCameraAddition::DBCameraAddition(QWidget *parent) : QDialog(parent), ui(new Ui::DBCameraAddition) { ui->setupUi(this); this->additionConfirmed = false; } DBCameraAddition::~D...
true
911f9122df43cfba3c33d627cff40948277c8d62
C++
nathinal/SwiftMPI
/src/utils/random.h
UTF-8
1,206
2.78125
3
[ "Apache-2.0" ]
permissive
#pragma once #include <random> namespace swift_snails { /* inline std::default_random_engine& local_random_engine() { struct engine_wrapper_t { std::default_random_engine engine; engine_wrapper_t() { static std::atomic<unsigned long> x(0); std::seed_seq sseq = {x++, x++, x++...
true
009eb78a89d1e088e0600d2de481ab495747c3d0
C++
lmashraf/code-eval
/FibonacciSeries.cpp
UTF-8
388
3.40625
3
[]
no_license
#include <iostream> #include <fstream> using namespace std; unsigned int Fib(int n) { if (n == 0) return 0; if (n == 1) return 1; return Fib(n - 1) + Fib(n - 2); } int main(int argc, char *argv[]) { ifstream stream(argv[1]); string line; while (getline(stream, line)) { unsigned int n = ato...
true
8acbfdeeb64ef5abd47f58c08739de950f4f18ca
C++
allan-cedric/codeforces
/easy/yearofuniversityentrance.cpp
UTF-8
412
2.578125
3
[ "MIT" ]
permissive
#pragma GCC optimize("O3") #include <bits/stdc++.h> #include <vector> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n; cin >> n; vector<int> years(n); for (int i = 0; i < n; i++) cin >> years[i]; cout << (*max_element(years.beg...
true
8161c52049acf26d43d16d8f3b7720c9e5bcfc11
C++
jguyet/Bomberman
/client/includes/utils/Properties.hpp
UTF-8
682
2.765625
3
[]
no_license
#ifndef PROPERTIES_HPP # define PROPERTIES_HPP # include "Bomberman.hpp" class Properties { public: Properties( std::string const &file_path ); Properties( Properties const & src ); virtual ~Properties( void ); Properties & operator=( Properties const & rhs ); friend std::ostream & operator<<(std...
true
1a36b2f1fd46d0bc880be8dce2af81a76bc04fc5
C++
SaySOwha/Numerical-Computation-Assignment
/Programming/ProgrammingAssignment5/CompositeNumericalIntegration.cpp
UTF-8
3,054
3.578125
4
[]
no_license
#include <cmath> #include <cstdio> #include <float.h> #include <functional> #include <iostream> #include <vector> using namespace std; // 使用复化 Simpson 积分公式计算在区间 [a, b] 上函数 f 的积分,区间等距分为 n 份 double SimpsonsRule(function<double(double)> f, double a, double b, int n) { int m = n / 2; double h = (b - ...
true
c2b7efbeb27589360f0aad7ce0101550f00adb54
C++
wz125/course
/coursera/dsalgo-001/11-spell-checker.cpp
UTF-8
2,935
2.6875
3
[]
no_license
/*============================================================================= # FileName: spell.cpp # Desc: poj 1035 # Author: zhuting # Email: cnjs.zhuting@gmail.com # HomePage: my.oschina.net/locusxt # Version: 0.0.1 # CreatTime: 2013-12-04 15:44:51 # LastChange: 2013-12-04 19...
true
1a5e57def509e2a09f0cd7a440cc9c4813dd974b
C++
arnabs542/CP
/gray_to_decimal.cpp
UTF-8
286
2.671875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; //sample case gray - 15 (1111) // decimal- 10 (1010) int main() { int gray, decimal = 0; cin >> gray; while(gray) { decimal = decimal ^ gray; gray = gray / 2; } cout << decimal << endl; }
true
af15ed7fcccbe171a26d5a456c96c8526b36336d
C++
CobraDevTeam/gameDevClient
/sources/gui/label.cpp
UTF-8
725
2.75
3
[ "Apache-2.0" ]
permissive
#include "headers/gui/label.hpp" #include "headers/utility.hpp" #include <iostream> namespace GUI { Label::Label(const std::string& text, const Resources::FontHolder& fonts, sf::Vector2f position) :mText(text, fonts.get(Resources::FontsID::Base), 16) { setPosition(position); Utility::centerOrigin(mText); ...
true
bf09efe2b2f5258e00c10153850f6eaf20200566
C++
StadnickiK/Tanks
/ColliderComponent.h
IBM852
2,270
2.859375
3
[]
no_license
#pragma once #include <string> #include <SDL.h> #include "TransformComponent.h" #include "Collision.h" #include "textureManager.h" class ColliderComponent : public Component { private: std::map<std::string, SDL_Rect*> colliders; public: SDL_Rect collider; const char* tag; const char* ownerTag = NULL...
true
27b199e23bc3faf769a385df74adb00f634a302f
C++
niuxu18/logTracker-old
/second/download/httpd/gumtree/httpd_old_hunk_5183.cpp
UTF-8
495
3.203125
3
[]
no_license
/* first try to attach to existing slotmem */ if (next) { for (;;) { if (strcmp(next->name, fname) == 0) { /* we already have it */ *new = next; return APR_SUCCESS; } if (!next->next) ...
true
081015dd27c10a3b4688cf241cbb1fc2797abb34
C++
ivigns/CompilerCourse2019
/irt/IrTreeNode.h
UTF-8
1,061
2.71875
3
[]
no_license
#pragma once #include <IrtVisitor.h> #include <memory> #include <vector> namespace IrTree { class IIrTreeNode { public: virtual ~IIrTreeNode() = default; virtual void AcceptVisitor(IIrtVisitor* visitor) const = 0; }; class IIrtExpression : public IIrTreeNode { }; class IIrt...
true
6e6e5b8dc92c8dd82fd4c467617b3b1d3397587f
C++
mantofer02/CI-0122-2021-S1
/SocketC/HTTP/server.cpp
UTF-8
1,321
2.984375
3
[]
no_license
#include <string.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/socket.h> #include <netinet/in.h> #include <sys/types.h> int main(void) { FILE *html_data; html_data = fopen("index.html", "r"); char response_data[1024]; fgets(response_data, 1024, html_data); char http_header[204...
true
b5d00543006d322656b061c9b6299afc911e3596
C++
dotnet/dotnet-api-docs
/snippets/cpp/VS_Snippets_Remoting/NetworkCredential_GetCredential/CPP/networkcredential_getcredential.cpp
UTF-8
2,495
3.453125
3
[ "MIT", "CC-BY-4.0" ]
permissive
// System::Net::NetworkCredential::GetCredential /*This program demontrates the 'GetCredential' of 'NetworkCredential' class. It accepts an URL, username and password from console. Creates a 'NetworkCredential' Object* using these parameters. A 'WebRequest' Object* is created to access the Uri S"http://www.microsoft....
true
db3e13c28f3dbce7eaa02f3347dd4acbe493442b
C++
Mikeziegler123/Linked_List-Cpp
/MAIN.cpp
UTF-8
7,073
3.265625
3
[]
no_license
// olaDLL BY Michael Ziegler, CSCI2170-002, Due: 04/10/18 // PROGRAM ID: SortedListTester.cpp / Illustration of using the SortedList // AUTHOR: Michael Ziegler // REMARKS: Simple-minded driver for exercising the SortedList methods. // Original concept based on a variation of Carrano (5th Ed.), Chapter 3, // pp. 13...
true
b216355ef15c1f11984a3d0a4ab327b0c7878ebc
C++
rapman1986/Programming_Principles_and_Practice_using_Cpp
/Chapter_09/Exercises/Book.h
UTF-8
1,034
3.359375
3
[]
no_license
#pragma once #include "std_lib_facilities.h" namespace Book_Library { enum class Genre { fiction, nonfiction, periodical, biography, children }; // Genre class Book { public: // Cinstructor Book(string authot, string title, Genre genre, string isbn, string copyright); // Get`s string ISBN() const { r...
true
3ae0cee1e8889b19143885451bcf764fa030fdb1
C++
gtier/VoxwellEngine
/VoxwellEngine/ShaderProgram.h
UTF-8
1,172
2.625
3
[]
no_license
// // Created by Griffin Dunaif on 3/10/21. // #ifndef FINAL_PROJECT_SHADERPROGRAM_H #define FINAL_PROJECT_SHADERPROGRAM_H #include "ves.h" #include "Shader.h" class ShaderProgram { private: const char * _vertex_contents; const char * _fragment_contents; unsigned int _id; bool _built = false; public...
true
0aab8d58549372af73fa170c8b087850881859b1
C++
ftena/cplusplus-snippets
/src/delete_vectors_and_lists/main.cpp
UTF-8
824
3.46875
3
[ "Apache-2.0" ]
permissive
#include <iostream> #include <list> #include <vector> #include <algorithm> class foo_class { public: foo_class(int i): i(i) {}; ~foo_class() { std::cout << "deleting " << i << std::endl; } private: int i; }; static bool delete_all ( foo_class * element ) { delete element; return true; } int ...
true
b918ba0ee6ef2edbdfcfc65bc4c4e72e31707385
C++
Luiz1996/Fundamentos_de_Algoritmos
/listas 1ª prova/lista 2/exe12_lista2.cpp
UTF-8
381
3.234375
3
[]
no_license
#include <stdio.h> int main(void){ float salario, novo_salario; printf("Insira o salario do funcionario: "); scanf("%f", &salario); if(salario < 2000.00){ novo_salario = ((salario/100)*30)+salario; printf("\nO salario passara de R$%.2f para o valor de R$%.2f .", salario, novo_salario); }else { printf(...
true
f5b87f4db9ccb58ab3f88af1a533321f9fd6a6cc
C++
MillerRidgeway/StreamDecoder
/main.cpp
UTF-8
2,123
2.921875
3
[]
no_license
#include "pkt_decoder.h" #include <stdio.h> #include <vector> static void pkt_printer(void *ctx, size_t len, const uint8_t *data) { (void) ctx; printf("pkt (%zd bytes) -", len); for (size_t i = 0; i < len; i++) { printf(" %02x", data[i]); } printf("\n"); } int main() { //Testing vector...
true
3b5e0e42c9733aee1dbea050b9adac761fb6f35f
C++
grammarhoard/2014-rosu-inference-cpp
/CFG/MAT/ContextFreeGrammar.h
UTF-8
3,999
3.046875
3
[]
no_license
/* * Objective Context Free Grammar (CFG) * A CFG is a tuple <Sigma, V, P, I> where: * Sigma - set of terminal symbols * V - finite non-empty set of non-terminals * I - non-empty subset of V, the set of initial symbols * P - finite set of productions of the form V x (V U Sigma)* in Chomsky N...
true
ed594ccc9638171907ecc2594ba2afd08ba25df0
C++
ysemenovkrop/cpp_course
/11/02_pointers_to_class.cp
UTF-8
801
3.796875
4
[]
no_license
#include<iostream> using namespace std; class Base{ public: void test_method(){cout << "Base!" << endl;} }; class Derived: public Base{ public: void test_method(){cout << "Derived!" << endl;} }; int main(){ Base* pointer_base; Derived* pointer_derived; pointer_base = new Base(); ...
true
49930790022963df4440bf8bbd2f51396e3fa21a
C++
kongyi123/Algorithms
/Visual Studio 2017/Projects/baekjun/baekjun/1912_nlogn.cpp
UHC
1,027
3.171875
3
[]
no_license
// nlogn // ҿ . , . ߿ѱ̴. // ߰, ,  // ִ뿬 κ̱ ߰ ϴ  #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #define MIN -2000000000 int data[110000]; int n; int max(int a, int b) { if (a > b) return a; return b; } int fastMaxSum(int s, int e) { if (s <= e) { if (s == e) return data[s]; int mid = (s + e)...
true
4c12e7b59f896c04585020b8712fcdcf60a6c32c
C++
deskmel/online-judge-for-sjtu
/1211.cpp
UTF-8
602
3.09375
3
[]
no_license
#include <iostream> class binaryTree { private: struct node { int val; node *l; node *r; node():l(NULL),r(NULL){} node(int item,node* left=NULL,node* right=NULL):val(item),l(left),r(right){} }; binaryTree():root(NULL){} void createTree(int N) { node **li=new node *[N]; for (int i=1;i<=N;i++) li[i...
true
73af5e437641c0b5a747d8f42f870df19baa5c1a
C++
mihaiburlaciuc/AppMonteCarlo
/openmp_implementation/integral_openmp.cpp
UTF-8
1,677
3.03125
3
[]
no_license
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <limits.h> #include <omp.h> #include <time.h> #define NUM_THREADS 6 #define NUM_REPS 200000000 unsigned int count; long double total, inBox; int x_min, x_max, y_min, y_max; //The function that the integral should be calculated for ...
true
7f4a0d9e6ec3b050bd97932766020eb49d6f4762
C++
Prashant1099/Cpp-Program
/PRAC16.CPP
UTF-8
551
3.796875
4
[]
no_license
/* A program which takes any year as i/p and prints input year is either Leap year or not with switch case*/ #include<conio.h> #include<stdio.h> #include<iostream.h> void main() { int y; clrscr(); cout<<"\n Enter any Year = "; cin>>y; switch(y%4) { case 0: cout<<"\n "<<y<<" is Leap Ye...
true
c1a4be1ff5a358e4c098bea870c8fae4d067bd63
C++
HandsomeBoy2/LanQiao
/算法训练/ALGO-79删除数组零元素.cpp
UTF-8
495
3.40625
3
[]
no_license
#include <iostream> #include <vector> using namespace std; int CompactIntegers(int *p, int n) { int cnt = n; for (int i = 0; i < cnt; i++) { if (*(p+i) == 0) { for (int j = i; j < cnt; j++) { *(p+j) = *(p+j+1); } i--; cnt--; } } return cnt; } int main() { int n; cin >> n; vector <int> a(n...
true
9f4a97e16c3f33b6bdb30e8dcd6e3848452b98ba
C++
mahesh15230/fpga-booleanring-bfs
/dense-frontier/driver/HardwareBFSManager.cpp
UTF-8
11,256
2.75
3
[ "CC-BY-4.0" ]
permissive
#include "HardwareBFSManager.h" #include <string.h> #include <iostream> using namespace std; HardwareBFSManager::HardwareBFSManager(unsigned int * inputRegs, unsigned int * outputRegs) { m_graphMan = 0; m_bfsDistance = 0; m_distanceVector = 0; m_inputVector = 0; m_inputVectorWordCount = 0; m_deallocateBitmap ...
true
f5570d4efab64357b9ddb0af895edba685b8aded
C++
PacktPublishing/IoT-Building-Arduino-based-Projects
/Module 2/Chapter02/Chapter2-Code/chapter2-2/B04844_02_02.ino
UTF-8
546
2.640625
3
[ "MIT" ]
permissive
#include <SPI.h> #include <WiFi.h> char ssid[] = "Dialog 4G Open"; int status = WL_IDLE_STATUS; void setup() { Serial.begin(9600); while (!Serial) { ; } if (WiFi.status() == WL_NO_SHIELD) { Serial.println("No WiFi shield found"); while(true); } while ( status != WL_CONNECTED) ...
true
ab741cc704c7fd9a972466df764d219e6c4233fa
C++
garciajciro/Student-Records-Library
/p03.cpp
UTF-8
3,977
3.21875
3
[]
no_license
#include "p03.h" #include <fstream> using std::ifstream; //***************************************************************** // FUNDAMENTALS //***************************************************************** Node* loadList(string filename) { int stand; Node* head = nullptr; Nod...
true
80dd343fbae8c61f3b87eb6b785a0c06aba869c9
C++
HanSong3233/Baruch-Cplusplus-programming-for-FE-Certificate
/Level 9/Group A&B/EuropeanOption.hpp
UTF-8
2,835
3.3125
3
[]
no_license
#ifndef EUROPEAN_OPTION_HPP #define EUROPEAN_OPTION_HPP #include <vector> // include vector, used as a container #include "Option.hpp" // Header file for base class VanillaOption #include <iostream> // C++ style I/O using namespace std; class EuropeanOption : public Option { private: //add new member d1 ...
true
5aa0e1253caf4cc9a49cfc1847d6ca5f76024ee4
C++
1003613248/VForce
/src/robot/Pose.hpp
UTF-8
861
2.921875
3
[ "MIT" ]
permissive
// // Created by yongqi on 17-12-4. // #ifndef VFORCE_POSE_HPP #define VFORCE_POSE_HPP #include <ostream> #include "utils/MathUtils.hpp" namespace VForce { struct Pose { float x_, y_, z_; // in meter float roll_, pitch_, yaw_; // in radian Pose() = default; Pose(float x, float y, float z, float roll, floa...
true
53036b5c43a23a920b00f2f36f7e4163188107b7
C++
lyubakrupina/Pacman
/Pacman/Bullet.cpp
WINDOWS-1251
1,942
3.015625
3
[]
no_license
#include <SFML/Graphics.hpp> #include <iostream> #include "Bullet.h" #include "Entity.h" using namespace sf; using namespace std; Bullet::Bullet(Image &image, float X, float Y, int W, int H, std::string Name, int dir) :Entity(image, X, Y, W, H, Name) { x = X; y = Y; direction = dir; speed = 0.8; ...
true
ef661fe1db3f6719771950b7061ade3662dd450e
C++
AtomicOrbital/SPOJ_PTIT
/TONGBINHPHUONG.cpp
UTF-8
531
2.5625
3
[]
no_license
#include<iomanip> #include<iostream> #include<stdio.h> using namespace std; #define D 1000000000 int main() { unsigned long long x,z,a,b,c,d,A,B,C; cin>>x; z=2*x+1; x=x*(x+1)/2; if(x%3==0) x=x/3; else z=z/3; a=x/D; b=x%D; c=z/D; d=z%D; A=a*c; B=b*c+a*d; C=b*d; ...
true
2fdbc7d1e74c0d942d6f39f5ad4dcc2a1cacf6f9
C++
WeilerWebServices/textmagic
/textmagic-rest-cpp-v2/model/GetSurveyNodesResponse.cpp
UTF-8
3,278
2.5625
3
[ "MIT" ]
permissive
/** * TextMagic API * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: 2 * * * NOTE: This class is auto generated by the swagger code generator 2.4.8. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class man...
true
35bca8a04aef4cc9dfcae64fd91609dfd2271a9e
C++
jingdongHe/my-code
/c/算法/p78-uva11039.cpp
UTF-8
549
2.734375
3
[]
no_license
#include<stdio.h> #include<math.h> #include<algorithm> using namespace std; typedef struct node { int data; int sig; }node; bool comp(node x,node y) { return x.data<y.data; } int main() { int n,i,s,k,t,j; node A[500000]; scanf("%d",&t); for(j=0;j<t;j++) { scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d",&...
true
c0b1dbc2dbfc2bdf69e0e2add53cf0117a1d5be8
C++
NicoKNL/coding-problems
/problems/kattis/2048/sol.cpp
UTF-8
3,742
3.21875
3
[]
no_license
#include <bits/stdc++.h> using namespace std; ostream &operator<<(ostream &os, const vector<vector<int>> &G) { for (int r = 0; r < 4; ++r) { for (int c = 0; c < 4; ++c) { if (c > 0) os << " "; os << G[r][c]; } os << endl; } retur...
true
0b46bf7790421eb0745f245480751062b6849227
C++
annisele/9-tiles-game
/Mwindow.cpp
UTF-8
5,746
2.671875
3
[]
no_license
#include "Mwindow.h" #include "Gwindow.h" #include "board.h" #include <QPushButton> #include <QLabel> #include <QString> #include <QApplication> #include<vector> #include <QRadioButton> #include <QMessageBox> #include "puzzle_heur.h" #include "puzzle_solver.h" #include "puzzle_move.h" /** construtor for main window. ...
true
8956876da6a4217c937ce90ec1af813661ca5f5c
C++
permanentbelief/programmer_road
/ACwing/差数组.cpp
UTF-8
1,691
2.734375
3
[]
no_license
#define _CRT_SECURE_NO_WARNINGS 1 #include <iostream> #include <algorithm> #include <string> #include <vector> #include <stack> #include <queue> using namespace std; #include <iostream> using namespace std; // //const int N = 100004; //int a[N]; //int b[N]; // //int main() //{ // int n = 0; // int m = 0; // cin >...
true
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
9