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
3f5327a44a37bf24cba9b32640813d96a99607b8
C++
finddit/unicorn-lib
/unicorn/core.hpp
UTF-8
2,436
2.546875
3
[ "MIT" ]
permissive
#pragma once #include "rs-core/common.hpp" #include "rs-core/string.hpp" #include <map> #include <memory> #include <stdexcept> #include <string> #include <type_traits> RS_LDLIB(unicorn pcre z); namespace RS::Unicorn { // Character types template <typename T> constexpr bool is_character_type = std::...
true
0ed024f1ce670df0037dcb2f3c322000d78b1449
C++
SpaceNerd2015/CppPrograms
/ParentingGame.cpp
UTF-8
19,308
3.015625
3
[]
no_license
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ParentingGame.cpp An adventurous day in the life of a parent Author: Hayley Andrews This program is entirely my own work. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ #include <iostream> #include <string> using namespace std; /*~~~~~~~~~~~~~~~~~~...
true
1811f24db36c548acad3fba506c55ba3bc731629
C++
dxcloud/project-c
/SaC2/src/sac2_math.cpp
UTF-8
1,191
2.875
3
[]
no_license
////////////////////////////////////////////////////////////////////////////// //! \file //! sac2_math.cpp //! \author //! Chengwu HUANG //! \version //! 0.1 (develpment version) //! \date //! 2013-07-01 //! \brief //! Math utilities. /////////////////////////////////////////////////////////////////...
true
c999bbf8666d12417e9fdb3cccd965116660d0dd
C++
dlfurse/midge
/data/_tf_data.hh
UTF-8
7,573
2.515625
3
[]
no_license
#ifndef _midge__tf_data_hh_ #define _midge__tf_data_hh_ #include "types.hh" #include "fourier.hh" #include "ascii.hh" #include "binary.hh" namespace midge { template< class x_type > class _tf_data { public: _tf_data(); virtual ~_tf_data(); public: x_ty...
true
af262ff5365b2b754f3ba5ea10214fcc0d760b52
C++
luffy9527/ProjectEuler
/Problem 19 Counting Sundays/Problem 19 Counting Sundays.cpp
UTF-8
2,633
3.546875
4
[]
no_license
// Problem 18 Maximum path sum I.cpp : Defines the entry point for the console application. // #include <iostream> #include <string> #include <cstdio> #include <cstdlib> #include <string> #include <vector> #include <list> #include <algorithm> #include <map> #include <set> #include <cmath> using namespace...
true
5757fbff3c56c18fec447136182cc36c470ec189
C++
boyima/Leetcode
/lc302-2.cpp
UTF-8
899
3.3125
3
[]
no_license
lc302-2.cpp //dfs class Solution { public: int minArea(vector<vector<char>>& image, int x, int y) { int lowX = x; int highX = x; int lowY = y; int highY = y; dfs(image, x, y, lowX, highX, lowY, highY); return (highX - lowX + 1) * (highY - lowY + 1); } vo...
true
9d4d5171a7805c9eedbab765dd3ab1faded65fef
C++
AnetaTexler/MI-PDP_Chessboard
/MI-PDP_Chessboard/mpi.cpp
UTF-8
18,274
2.875
3
[]
no_license
#include <iostream> #include <fstream> #include <sstream> #include <string> #include "dirent.h" #include <vector> #include <utility> #include <algorithm> #include "math.h" #include <chrono> #include <omp.h> #include "mpi.h" #define MPI_PAR #ifdef MPI_PAR using namespace std; class Task { public: int chessboardLen; ...
true
93cc1ff80eb82efaf9930dedd55047e3ad7f0ef6
C++
thnoh1212/Practice
/백준/1562. 계단수.cpp
UTF-8
711
2.515625
3
[]
no_license
#include <iostream> using namespace std; int main() { int N; cin >> N; int modNum = 1000000000; int answer = 0; if (N < 10) { cout << 0; return 0; } int dp[101][10][1 << 10] = { 0 }; for (int i = 1; i <= 9; i++) { dp[1][i][1 << i] = 1; } for (int i = 2; i <= N; i++) { for (int j = 0; j <= 9; j++) ...
true
b5c810ebe545c5c4301c5a57d83bddfcc6e3cb16
C++
rhaps0dy/UPF-SWERC
/UVa/12176_bring_your_own_horse.cpp
UTF-8
2,562
2.515625
3
[]
no_license
#include <iostream> #include <utility> #include <vector> #include <algorithm> #define X first #define Y second #define LI long long #define MP make_pair #define PB push_back #define SZ size() #define SQ(a) ((a)*(a)) #define MAX(a,b) ((a)>(b)?(a):(b)) #define MIN(a,b) ((a)<(b)?(a):(b)) #define FOR(i,x,y) for(int i=(int...
true
c103077698dbe0c0491eac761172a47d6395d345
C++
nikol4o0o/SDP-FMI-2020-2021
/Nchildren2.cpp
UTF-8
6,494
3.78125
4
[]
no_license
#include <iostream> #include <vector> #include <string> #include <queue> struct Node { int data; std::vector<Node*> children; }; int convertToInt(const char* &arr) { int elem = 0; while(isdigit(*arr)) { elem = (elem*10) + (*arr - '0'); arr++; } arr--; ...
true
5821c823e067931efadd1ed3a1b6ecd236d4caa3
C++
BorisVassilev1/CPP
/daskalo/24_3_2020_1.cpp
UTF-8
453
2.859375
3
[]
no_license
#include <iostream> #include <cmath> using namespace std; const int MAX_N = 1e4; int a[MAX_N]; int n; int main() { cin >> n; int sum = 0; for(int i = 0; i < n; ++ i) { cin >> a[i]; sum += a[i]; } int x = sum / n; int ans = 0; for(int i = 0; i < n; ++ i) {...
true
a05c709cb7951665d90f8ef404cff005cc47dae6
C++
heffernanpaul/raytracer
/raytrace/raytracer/GeometricObjects/Box.cpp
UTF-8
4,828
2.75
3
[]
no_license
#include "Box.h" #include "Constants.h" Box::Box(void): GeometricObject (), x0(-1), x1(1), y0(-1), y1(1), z0(-1), z1(1) {} Box::Box (const float _x0, const float _y0, const float _z0, const float _x1, const float _y1, const float _z1) : GeometricObject (), x0(_x0), x1(_x1), y0(_y0), y1(_y1),...
true
7ce6dd765e188df224ed333fdddbcbac3f5374a5
C++
astarasikov/dsp_playground
/correlation.hh
UTF-8
727
2.828125
3
[]
no_license
#ifndef __CORRELATION_HH__ #define __CORRELATION_HH__ #include <vector> template <class T> static void correlate1D(std::vector<T> &f, std::vector <T> &g, std::vector<T> &ret) { size_t nf = f.size(); size_t ng = g.size(); for (size_t i = 0; i < nf; i++) { for (size_t j = 0; j < ng; j++) { size_t idx_sig = i +...
true
d5c8d48652d25ea71dea1bcc89622a6607150d96
C++
shreshtha-pankaj/Cruiser
/src/camera/src/depth.cpp
UTF-8
2,614
2.59375
3
[]
no_license
#include "ros/ros.h" #include "std_msgs/String.h" #include <sstream> #include <camera/Depth.h> #include <librealsense2/rs.hpp> int depth_width, depth_height, frame_rate; float getAverageDepth(rs2::depth_frame& depth, float width, float height, int x, int y) { float sum = 0; int ctr = 0; for(int i = y; i < y + h...
true
8d97dac14d6b14abed31fa364adf9d2b9bae11fb
C++
nermineslimane/School
/student.cpp
UTF-8
5,559
2.703125
3
[]
no_license
#include "student.h" #include "QDate" #include "qdebug.h" student::student() { cin=""; firstName=""; lastName=""; email=""; phone=""; dob=QDate(); doj=QDate().currentDate(); status="0"; } student::student(QString cin,QString firstname,QString lastname,QString email,QString phone,QDate d...
true
a5a2a3e889157faba69d157573305b32be813a40
C++
Anjalikamath/Programming_Solutions
/Codeforces/96A/Football.cpp
UTF-8
553
2.953125
3
[]
no_license
#include<iostream> using namespace std; bool check(string s){ int n=s.size(); int cnt=0; for(int i=0;i<n-1;i++){ if(s[i]==s[i+1]){ while(i<n && s[i]==s[i+1]){ cnt++; //cout<<i<<"-"<<cnt<<" "; i++; if(cnt>=6...
true
d098e0d9be7f1b7cb64631f86d588160bb2ddf19
C++
feveleK5563/Shooting
/NomalShooting/src/CharacterParameter.h
SHIFT_JIS
1,921
2.765625
3
[]
no_license
#pragma once #include "Math.h" #include "Move.h" #include "ImageDrawer.h" #include "System.h" #include "TimeCounter.h" //g enum struct CharacterID { Non = 0, //ݒ BackGround = 1 << 0, //wi Player = 1 << 1, //vC[ EnemyCreator = 1 << 2, //G Enemy = 1 << 3, //G PlayerBullet = 1 << 4, //vC[e EnemyBullet = ...
true
f05e0fe230da78ffcbc50fdcf320530d5a3bdb85
C++
tziporaziegler/arduino-projects
/MorseCode/MorseCode.ino
UTF-8
2,348
2.8125
3
[ "Apache-2.0" ]
permissive
int unit = 300; int dotLength = unit; int dashLength = unit * 3; int partSpaceLength = unit; int letterSpaceLength = unit * 3; int wordSpaceLength = unit * 7; void setup() { // initialize digital pin LED_BUILTIN as an output. pinMode(LED_BUILTIN, OUTPUT); } // the loop function runs over and over again forever vo...
true
ee9d8034e7adc78fc7cb8fcd1184a3df988f80a1
C++
1000happiness/CutSimulation
/src/material/Texture/Texture.cpp
UTF-8
2,272
3.03125
3
[]
no_license
#include "Texture.h" namespace MAT { Texture::Texture(const std::string &tex_type, const std::string &img_path) { glGenTextures(1, &this->texture_id); this->tex_type = tex_type; bindTexture(); setDefault(); loadImage(img_path); } Texture::Texture() { ...
true
ec267abcd71a85850970d65f11d7145ae4dd8c31
C++
qfu/LeetCode_1
/M_240_Search_a_2D_Matrix_II.cpp
UTF-8
1,735
3.390625
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> #include <priority_queue> using namespace std; class Solution { public: void sortMatrix(vector<vector<int>>& matrix, vector<int>& v) { auto comp = [&matrix](pair<int, int> p1, pair<int, int> p2){ return matrix[p1.first][p1.second] > matrix[p2...
true
1f82291cd9110a6e072bf8a79186f7552176945a
C++
jwvg0425/boj
/solutions/4435/4435.cpp14.cpp
UTF-8
789
2.8125
3
[]
no_license
#include<stdio.h> #include<vector> #include<iostream> #include<string> #include<algorithm> #include <set> #include <map> #include <stack> #include <queue> #include <tuple> #include <memory.h> #define MAX 987654321 int scores[2][7] = { {1,2,3,3,4,10}, {1,2,2,2,3,5,10} }; int main() { int t; scanf("%d", &t); for ...
true
8dd54a799b6e8fb82d1f251b09639e39c3160eb2
C++
DylanGuidry95/sfw-AIE-Framework
/Test/Collision.h
UTF-8
2,471
3.125
3
[]
no_license
// Dylan Guidry // 12 / 15 / 2015 #pragma once #include "ColliderShapes.h" #include <iostream> #include <list> namespace col { template<typename T> /* Name: AABBvsAABB Args: AABB, AABB Description: Checks the distance between the min and max points of two rectangles to see if the points lie with each other....
true
794081f5ad91cdd76ca1c07e6e981a5be15d5f0a
C++
Ninjavin/OOPS-Cheat-Sheet
/3.b.Inline-Function.cpp
UTF-8
200
2.90625
3
[ "MIT" ]
permissive
#include<bits/stdc++.h> using namespace std; inline int square(int x){ return x*x; } int main(){ int num, Snum; cin >> num; cout << "Square: "<< square(num) << endl; return 0; }
true
e2edf1894a47f992b3d31650230369f5accbeb58
C++
Talane97/TP2-michael
/Client.cpp
UTF-8
1,883
3.234375
3
[]
no_license
/******************************************** * Titre: Travail pratique #2 - Client.cpp * Date: 25 janvier 2018 * Auteur: Mohammed Esseddik BENYAHIA & Timothée CHAUVIN *******************************************/ #include "Client.h" Client::Client(const string& nom, const string& prenom, int identifiant, const strin...
true
7353890f90d57592b45df4acc0bdb562cbf0a624
C++
mireed/jianzhioffercode
/45-Poker sequence/45.cpp
UTF-8
3,045
3.453125
3
[]
no_license
//《剑指offer》45.扑克牌顺子 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 题目:LL今天心情特别好,因为他去买了一副扑克牌,发现里面居然有2个大王,2个小王(一副牌原本是54张😊)... 他随机从中抽出了5张牌,想测测自己的手气,看看能不能抽到顺子,如果抽到的话,他决定去买体育彩票,嘿嘿!! “红心A,黑桃3,小王,大王,方片5”,“Oh My God!”不是顺子.....LL不高兴了,他想了想,决定大\...
true
9fd1e3e9da0accfd49582ec0f1827ca2fa2cc3eb
C++
kujoukaren/CPP-ConnectK-AI
/src/MinMax.cpp
UTF-8
3,045
2.953125
3
[ "Apache-2.0" ]
permissive
#include "MinMax.h" MinMax::MinMax() { /*numRows = 0; numCols = 0; k = 0; isFirstPlayer = false; gravityOn = false;*/ } /*MinMax::MinMax(int numRows, int numCols, int k, bool isFirstPlayer, bool gravityOn) { this->numRows = numRows; this->numCols = numCols; this->k = k; this->isFirstPlayer = isFirstPlayer; ...
true
c45fc7b20729099ab4d84e164baaf1ed82a4812e
C++
orcchg/StudyProjects
/ACM.TIMUS.CONTEST/1 - 500 rate/1001 (╨Ю╨▒╤А╨░╤В╨╜╤Л╨╣ ╨║╨╛╤А╨╡╨╜╤М - ╤Б╤В╤А╨╛╨║╨╕ ╨╕ CIN - AC).cpp
UTF-8
363
2.59375
3
[]
no_license
#include <iostream> #include <conio.h> #include <iomanip> #include <math.h> using namespace std; double Array[128*1024]; int main() { double x = 0; int k = 0; while(cin >> x) { Array[k++] = sqrt(x); } for(int i = k - 1; i >= 0; --i) { cout << fixed << setprecision(4) << Array[i] <...
true
341a69868d9ceb0915543d16acbd116a0f7d4046
C++
Carterwwt/Mycode
/9494 删除单链性表中值相同的多余结点.cpp
UTF-8
1,338
3.15625
3
[]
no_license
#include<stdio.h> #include<malloc.h> #include<stdlib.h> #define ERROR 0 #define OK 1 #define ElemType int typedef struct LNode { int data; struct LNode *next; }LNode,*LinkList; int CreateLink_L(LinkList &L,int n) { LinkList p,q; int i; ElemType e; L = (LinkList)malloc(sizeof(LNode)); L->next = NULL; q = L; f...
true
28cb0b52c78d92895785bf1942813bea7832c180
C++
AbhishekBhamare/InterviewBit
/Hashing/First Repeating element.cpp
UTF-8
303
2.703125
3
[]
no_license
// https://www.interviewbit.com/problems/first-repeating-element/ int Solution::solve(vector<int> &A) { map<int,int>mp; for(int i=0; i<A.size(); i++){ mp[A[i]]++; } for(int i=0; i<A.size(); i++){ if(mp[A[i]]>1){ return A[i]; } } return -1; }
true
09b59bc085e99b2b4a14cebda2ca6dd94352cfca
C++
Tigerots/arduino_esp
/vs-esp32/vs-ino-esp32-tcp-client/src/my_wifi.cpp
UTF-8
2,547
2.578125
3
[]
no_license
/** * Demo: * 演示web Server功能 * 打开PC浏览器 输入IP地址。请求web server * @author Tigerots * @date 2020/01/29 */ #include <WiFi.h> #include <Arduino.h> #include <my_led.h> #include <my_serial.h> // Wifi 连接配置 const char* ssid = "Tigerots";//wifi账号 这里需要修改 const char* password = "9955995599";//wifi密码 这里需要修改 // TCP 目标地...
true
cfea9e4a41a299583917ca68d42caaf16e0e06f1
C++
Redwanuzzaman/Online-Judge-Problem-Solutions
/Codemarshal/all_about_base.cpp
UTF-8
643
2.8125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { char arr[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; int t, cs = 1, base, num, mod; scanf("%d", &t); while(t--) { string res = ""; scanf("%d %d", &base, &num); ...
true
629362c92ed5a357fd01fb469aba7620f79c2f75
C++
JamesTanakrit/lab-pro-fun
/lab7.cpp
UTF-8
2,912
2.78125
3
[]
no_license
#include<stdio.h> #include<windows.h> #include<conio.h> #include<time.h> int x = 38, y = 20, moveDi = 1, sc=0; void setcolor(int fg, int bg) { HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hConsole, bg * 16 + fg); } void gotoxy(int x, int y) { COORD c = { x, y }; SetC...
true
ac2c86e19ebe4a09407607c25d8c22347ddb4526
C++
jitendrakr54/Learning
/cpp/01_cpp_concepts/003_string/cstring001.cpp
UTF-8
3,067
4.03125
4
[]
no_license
#include <iostream> #include <cstring> // int main() { // Point 1: // you can initialize the string upon creation, but you can not assign values to it using the assignment operator after that! // char myString[]{"string"}; // myString = "hello"; // not allowed // char myString1[9] = "st...
true
1d3a5c40fec889584350f05a60713ed58627f94d
C++
MuhammadNurYanhaona/ITandPCubeS
/compiler-parts/StaticAnalysis/ast_library_fn.cc
UTF-8
6,005
2.84375
3
[]
no_license
#include "ast.h" #include "ast_expr.h" #include "ast_type.h" #include "ast_library_fn.h" #include "list.h" #include "scope.h" #include "errors.h" //-------------------------------------------------------- Static Constants -----------------------------------------------------/ const char *Root::Name = "root"; const ch...
true
f5fb0245caad3341d52d2ecd3d562fdd3fb75dad
C++
SonSang/Course-Project_Advanced-Animation
/HW3/scene/property_render_geometry.cpp
UTF-8
10,071
2.515625
3
[]
no_license
#include "property_render_geometry.hpp" #include "render_basic.hpp" #include "GL/freeglut.h" #define prg property_render_geometry // draw specialization for each geometries. template<> void prg<point>::render() const noexcept { glColor3d(config_.inner_color[0], config_.inner_color[1], config_.inner_color[2]); ...
true
78a66976d6b251dd3d3b9e3e1ca125b1dcd08676
C++
viniciusrcamargo/Exercises_College
/ExerSelec9.cpp
ISO-8859-1
616
3.0625
3
[]
no_license
#include<iostream> using namespace std; main(){ setlocale(LC_ALL, "Portuguese"); int n1, n2, tra1, tra2; double media = 0; cout<<"Informe nota 1"<<endl; cin>>n1; cout<<"\n Informe nota 2"<<endl; cin>>n2; cout<<"\n Informe trabalho 1"<<endl; cin>>tra1; cout<<"\n Informe trabalh...
true
0a544c5dfe033d7f7f63263fa14c8057f9eeffbc
C++
carlosvpmessi/Credito
/tarjetas credito.cpp
ISO-8859-10
1,566
2.546875
3
[]
no_license
#include<stdio.h> #include<stdlib.h> #include<conio.h> #include<iostream> using namespace std; int main() { int numtarjeta,a1,a,x=0; cout<<" ingresa los primer digito"<<endl; cin>>a1; cout<<" ingresa los siguientes 15 dijitos"<<endl; cin>>a; while (a>0){ a = a/10;...
true
8bafdbb7b1ba4ca2e9a557ff31f777bb33ebd116
C++
gmonacho/creative
/include/Camera.hpp
UTF-8
707
2.796875
3
[]
no_license
#ifndef CAMERA_HPP_ # define CAMERA_HPP_ #include <SFML/Graphics.hpp> class Camera { private: sf::Rect<int> m_rect; float m_zoom; public: Camera(int x = 0, int y = 0, sf::Vector2<int> defaultResolution = sf::Vector2<int>{1024, 768}); const int &getX() const; const int &getY() const; const int &getW() const; ...
true
97a0547e354dc196336de393dab830a36807fbfe
C++
oshannonlepper/GOAP
/IAction.h
UTF-8
1,533
2.84375
3
[]
no_license
#pragma once namespace GOAP { struct IWorldState; } namespace GOAP { /** * An action forms part of a plan for reaching a goal. */ struct IAction { virtual ~IAction() {} /** * Return true if the action is valid, allowing it to be selected for a plan. */ virtual bool IsValid(IWorldState* WorldState...
true
1cab6fccc32e48636aff23e8a9e46146dbc161bf
C++
Daniel092/taller-antes-del-parcial
/taller6/matriz.cpp
UTF-8
1,073
3.34375
3
[]
no_license
/* Programa que devuelve el mayor de los numeros ingresados Fecha: 07/09/2018 Elaborado por: Daniel Steven Agudelo Fernandez */ //******************************* //librerias //****************************** #include <stdlib.h> #include <conio.h> #include <string.h> #include <time.h> #include <stdio.h> //**********...
true
0d55ee94c5d29b861b7f12f2ae40dd0ce410babb
C++
shashank9aug/DSA_CB
/Linked_List/Basics/ReverseLL.cpp
UTF-8
1,231
3.75
4
[]
no_license
/* we can reverse a LinkedList By 2 methods : - Swapping the data of LL - Reversing the Links of LinkedList $ ./a.exe 1 2 3 4 5 -1 5->4->3->2->1-> 1->2->3->4->5-> */ #include<iostream> using namespace std; class node{ public: int data; node*next; node(int d){...
true
c36c68fbbd5d5006dd6a2c66b08839a093a0e26a
C++
davidchai21/new-journey
/811 Subdomain Visit Count/SubdomainVisitCount.cc
UTF-8
774
2.71875
3
[]
no_license
class Solution { public: vector<string> subdomainVisits(vector<string>& cpdomains) { if (cpdomains.empty()) return {}; unordered_map<string, int> m; for (int i=0;i<cpdomains.size();i++) { addDom(cpdomains[i], m); } vector<string> res; for (auto it = m.begi...
true
06ff8233872f649c53190caa64a316a59fb17933
C++
innocentboy/myrepository
/src/codee/codchef/MAANDI.cpp
UTF-8
879
2.828125
3
[]
no_license
/** http://www.codechef.com/problems/MAANDI */ /** NOTE: This prblem is all about finding the All divisers of any given Number. */ #include <cstdio> #include <iostream> #include <set> #include <vector> #include <algorithm> #include <cmath> #include <stack> #include <map> #include <cmath> #include <cstring> using names...
true
258f3037d7de7ac1f9694d4aa577f0d650b64ff6
C++
kwan3217/arduino
/libraries/mpu9150/src/mpu60x0.h
UTF-8
2,512
2.765625
3
[]
no_license
#ifndef MPU60X0_H #define MPU60X0_H #include "Arduino.h" #include "Wire.h" /** Driver for Motion Processor Unit 6000 series. This part contains an integrated 3-axis accelerometer and 3-axis gyroscope. Also handles the 6050 embedded in an 9150 part. "I'll call you... MPU!" "MPU... What's that?" "It's like CPU, only ...
true
82f3b2475423a3f5fa18a236227dcde1b4e0a36c
C++
sid11428/CSES-Problemset-Solutions
/04_increasing_array.cpp
UTF-8
667
3.21875
3
[]
no_license
#include <stdio.h> #include <iostream> #include <string.h> using namespace std; int main() { long long n, c = 0; cin >> n; long long a[n]; long long res = 0; for (long long i = 0; i < n; i++) { cin >> a[i]; } for (long long i = 0; i < n - 1; i++) { if (a[i + 1] < a[i]...
true
6a5a029b02932ec5613186df1207dbadc3510c4c
C++
mikolajkab/designPatterns
/decorator/app/source/Skoda.cpp
UTF-8
199
2.640625
3
[]
no_license
#include "Skoda.h" Skoda::Skoda(double p, double w) : price(p), weight(w){}; Skoda::~Skoda(){}; double Skoda::getPrice() { return price; } double Skoda::getWeight() { return weight; }
true
bf25ba8cce00dc71feabcb3c24d0a97a1e0fa8c7
C++
organicmaps/organicmaps
/drape/render_bucket.cpp
UTF-8
4,132
2.640625
3
[ "Apache-2.0" ]
permissive
#include "drape/render_bucket.hpp" #include "drape/attribute_buffer_mutator.hpp" #include "drape/debug_renderer.hpp" #include "drape/overlay_handle.hpp" #include "drape/overlay_tree.hpp" #include "drape/vertex_array_buffer.hpp" #include "base/stl_helpers.hpp" namespace dp { RenderBucket::RenderBucket(drape_ptr<Verte...
true
54c70b36efe1875b148c3644f3e64df58f703f0b
C++
victoriatome/TCC-EngenhariaDeComputacao
/MQTT/3Componentes/MQTTServer/MQTTServer.ino
UTF-8
3,465
2.71875
3
[]
no_license
#include <PubSubClient.h> #include <ESP8266WiFi.h> const char *SSID = "TCC"; // SSID da sua rede Wi-Fi const char *PASSWORD = "11041994"; // Senha da sua rede Wi-Fi const char *ID_MQTT = "nodemcuServer"; // Identificação para o dispositivo //Broker MQTT const char *BROKER_MQTT = "raspberrypi.local"; // Ende...
true
704d62569c82fc27b8ecd65b3f50261e0ae9c8c1
C++
tafulop/FFTImplementation
/FFTImplementation/DataGenerator.cpp
UTF-8
1,199
3.296875
3
[]
no_license
#include "stdafx.h" #include "DataGenerator.h" DataGenerator::DataGenerator() { } DataGenerator::~DataGenerator() { } void DataGenerator::generateSinus(vector<double>* target, double amplitude, double omega, bool additive) { // input argument check if (t...
true
1e0ea04bffc0e49477acbbb0566cc177c5678108
C++
tacallegari/COP2220
/Module6Activity2.cpp
UTF-8
3,473
3.9375
4
[]
no_license
// Tahlia Callegari // 2428774 //COP2220 Fall 2020 #include <iostream> #include <string> using namespace std; //Declare functions int getRandomNums(int array[], int SIZE); void displaySort(int count, int array[], int SIZE); void bubbleSort(int array[], int SIZE); void swap(int& a, int& b); void selection...
true
57b6dce00e9fee6e68f024dd40ba66150c3a2289
C++
TransientTetra/safe_sender
/include/model/encryption/encryption.hpp
UTF-8
786
2.765625
3
[]
no_license
#ifndef SAFE_SENDER_ENCRYPTION_HPP #define SAFE_SENDER_ENCRYPTION_HPP #include <string> #include "../raw_bytes.hpp" #include "encryption_key.hpp" enum CipherMode { CFB, CBC, ECB, OFB, }; //a virtual class that all encryption algorithms must inherit from class Encryption { private: protected: CipherMode cipherMode...
true
480ee05907c38809e58d63d13f7ddcf50cc2762f
C++
melancholymans/PocketCplusplus
/chapter5/278.cpp
SHIFT_JIS
336
2.8125
3
[]
no_license
#include <vector> //vector #include <fstream> //ofstream using namespace std; /* int main(void) { vector<char> data{ 'A', 'B', 'C', '\n' }; ofstream ofs("out.dat"); copy(data.cbegin(), data.cend(), ostreambuf_iterator<char>(ofs)); //out.datt@CABCƏo͂(sj getchar(); return 0; } */
true
670633e8bdf7ce2c46c14a529e924edad5e0c3ac
C++
thebravoman/software_engineering_2014
/vhodno_nivo/Kristina_Pironkova_11A/Kristina_Pironkova_Task2.cpp
UTF-8
372
3.296875
3
[]
no_license
#include <iostream> using namespace std; int main(){ int x; int y; int sum = 0; cout << "Enter x (x<y): "; cin >> x; do{ cout << "Enter y (x<y): "; cin >> y; }while(x>=y); for(int i=x;i<= y; i++){ if (i%17==0){ sum+=i; } } cout...
true
a81811adb3e9ecb1d2520052d10e7ca12355b7b8
C++
benbraide/windows
/windows/windows/common/scoped_index.h
UTF-8
3,273
3.109375
3
[]
no_license
#pragma once #ifndef WINPP_SCOPED_INDEX_H #define WINPP_SCOPED_INDEX_H #include <unordered_map> #include <memory> #include <any> #include "random_number.h" namespace winpp{ namespace common{ class scoped_index_base{ public: virtual ~scoped_index_base() = default; }; template <class scope_type, class ke...
true
7bdd372b06109897accc2f70652357f29a0e017a
C++
ablasco86/Real-time-RGB-D-data-processing-on-GPU-architecture
/mogconfig.cpp
UTF-8
2,265
2.71875
3
[]
no_license
#include <cassert> #include "mogconfig.h" MoGConfigFactory::MoGConfigFactory (void) : k_set(false), sigma_0_set(false), w_0_set(false), lambda_set(false), alpha_min_set(false), thresh_set(false), sigma_min_set(false) { this->c.blockHeight = 16; this->c.blockWidth = 16;...
true
3fe8f9d4d053d5ed32204abdbd84eb3fefa88a30
C++
rabkarun/UASsmt1
/praktikuas.cpp
UTF-8
495
3
3
[]
no_license
#include <iostream> using namespace std; void iden (int n){ for(int i=0; i<n; i++){ for(int j=0; j<n; j++){ if(i==j) cout<<"1 "; else cout<<"0 "; } cout<<endl; } } int main(){ int n; cout<<"Praktek UAS Semester 1"<<endl; cout<<"Mas...
true
2cc44aa9fe1d168ef772711f72f4c35c1e3be3c9
C++
Tframe/ELMS-1
/ELMS/base_station/connect_database.cpp
UTF-8
9,788
2.9375
3
[]
no_license
/* * ELMS - Trevor Frame, Andrew Freitas, Deborah Kretzschmar * Contains functions for conencting to MongoDB Atlas, * Create and add vehicle information, and update vehicle information. */ #include "connect_database.h" static int count = 0; //constructor for pool instance used for threading connections Data...
true
21dc55513bc9f49139bd1794ab9338bf86b3fef5
C++
rheno/C
/Standard-Class-C++/MainProgram.cpp
UTF-8
482
3.375
3
[]
no_license
#include"Class1.h" #include<iostream> using namespace std; int main(){ Class1 c1(2); cout<<"x = "<<c1.getValue()<<endl; //Copy Constructor Class1 c2 = c1; cout<<"x in Copy Constructor = "<<c2.getValue()<<endl; c2.setValue(20); //Operator Assignment Class1 c3(1); c3 = c2; cout<<"x in op...
true
6774eaece1f56a13adfffb8ba1c3ff7ea31b08f3
C++
dqyi11/TopologyPathPlanning
/src/homotopy/Region.cpp
UTF-8
2,419
2.609375
3
[]
no_license
#include "topologyPathPlanning/homotopy/Region.hpp" #include "topologyPathPlanning/homotopy/CgalUtil.hpp" namespace topologyPathPlanning { namespace homotopy { SubRegion::SubRegion( Polygon2D poly , SubRegionSet* p_parent ) { mPoints.clear(); mPolygon = Polygon2D(); mpParent = p_parent; for( Polygon2D::Ver...
true
6feb76d99280cdb9433be2ea79ed00ecc53a542d
C++
markmcc2950/CSE100
/4.2 Quicksort/mmccullough2.cpp
UTF-8
2,003
3.734375
4
[]
no_license
#include <iostream> #include <stdio.h> #include <time.h> using namespace std; int Partition(int A[], int p, int r) { int swap; // Variable to swap values int j; int rnd = p + (rand() % (r - p)); // Random pivot point int x = A[rnd]; // Pick position in list of pivot point s...
true
0fc5df82a4f73b0a89afd24f674b5980c4c69ced
C++
zetwhite/boj
/others/boj1629.cpp
UTF-8
659
2.515625
3
[]
no_license
#include <iostream> using namespace std; int main(){ long long a, b, c; cin >> a >> b >> c; long long power = b; bool bin[65]; int i = 0; while(power > 0){ if( power % 2 ){ bin[i] = 1; } else { bin[i] = 0; } i++; ...
true
fa956644193d99b10f88e5116aa98ae98082d42b
C++
zakrent/SDL-JUMP-GAME
/src/entity/Entity.cpp
UTF-8
1,622
2.765625
3
[ "BSD-3-Clause" ]
permissive
// // Created by zakrent on 2/20/18. // #include <cmath> #include "Entity.h" #include "../Game.h" void Entity::render() { Game::get()->renderer->renderCirlce(pos, radius); } void Entity::registerCollision(const CollisionData& data) { numberOfCollisions++; col += data.collisionVector; } void Entity::upda...
true
856300f73152724c7210553c720591c7ccfb79c2
C++
Ali-Fawzi-Lateef/C-PrimerPlus
/Chapter3/pe3-4.cpp
UTF-8
849
3.796875
4
[]
no_license
// pe3-4.cpp -- converts seconds to equivalent time in days, hours, minutes, and seconds. // This is exercise 4 of chapter 3 in C++ Primer Plus by Stephen Prata #include<iostream> int main(void) { using namespace std; const int Seconds_per_minute = 60; const int Seconds_per_hour = 60*60; const int Seconds_per_day...
true
80740afec64d0da47c47048296f7755b0d4c8d6b
C++
rishikaswarnkar/InfixPostfixEval
/Infixtopostfix/Infixtopostfix/stackClass.cpp
WINDOWS-1252
12,739
3.515625
4
[]
no_license
#include "stackClass.h" #include <iostream> #include <iomanip> #include <cstdlib> #include <string> #include <fstream> #include<stack> using namespace std; stackClass::stackClass() { //Receives - Nothing //Task - set private pointers to NULL pointer //Returns - Nothing TopPtr = NULL; rear = NULL; } /**************...
true
9ad74de6e322e58896814b9c89207caab594bee9
C++
nilold/qt-address-book
/addressbookentry.h
UTF-8
1,220
2.765625
3
[]
no_license
#ifndef ADDRESSBOOKENRY_H #define ADDRESSBOOKENRY_H #include <QObject> #include <QString> #include <QDate> #include <QStringList> class AddressBookEntry : public QObject { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) Q_PROPERTY(QString address READ...
true
d25e8657b73044879d540fb677db792364656b66
C++
Tnieddu/SciVL
/src/shape_functions.cpp
UTF-8
20,986
2.90625
3
[ "MIT" ]
permissive
/*-------------shape_functions.cpp--------------------------------------------// * * Purpose: To keep all the functions for drawing different shapes for SciVL * *-----------------------------------------------------------------------------*/ #include <shape_functions.h> #include <operations.h> #include <ctime> // Fun...
true
3e6904a105059abda22f026573b6e31f0f6f6ec9
C++
gallexis/PERI
/arduino/sketch_mar18a/sketch_mar18a.ino
UTF-8
1,154
2.65625
3
[]
no_license
#include <SPI.h> #include <RF24.h> #define MAXTIMER 16 long waitForTimer[MAXTIMER]; char buffer[32]; int on = 0; int reset=0; int sensorPin = 23; int waitFor(int timer, long period){ long newTime = micros() / period; int delta = newTime - waitForTimer[timer]; if ( delta ) { waitForTimer[timer] = newTime; ...
true
1bd0a6367f671a100d9bb070f1e3f57babd84719
C++
Chanderkan7/100lines
/2020/October/27/main.cpp
UTF-8
1,648
3.703125
4
[]
no_license
#include<iostream> using namespace std; enum direction { East, West, North, South }dir; int main() { dir = West; cout << dir; return 0; } /*#include<iostream> using namespace std; struct Student { char stuName[30]; int stuRollNo; int stuAge; }; void printStudentInfo(Student); int main(...
true
aff2e3c5d4c88d1a83c21919247c694775a1bc63
C++
BlurEffect/Planetoids
/source/ResultsScene.cpp
UTF-8
3,279
2.515625
3
[]
no_license
/* * (C) 2014 Search for a Star * */ #include "ResultsScene.h" #include "IwGx.h" #include "resources.h" #include "input.h" #include "AudioHandler.h" #include "HighscoresScene.h" using namespace SFAS2014; // // // ResultsScene class // // ResultsScene::ResultsScene( const char* name ) : Scene( name ), ...
true
88b674ae3241b6d26342f4465b7fee5aa576cf75
C++
meyejack/libohnet
/tests/ohstl/cset_check.cpp
UTF-8
7,510
2.75
3
[]
no_license
#include <oh.h> #include <stdio.h> #include <stdarg.h> #include <check.h> #include "fntest.h" #include <set> using namespace std; START_TEST(test_setcreate_cbuiltin) { int i; set_t *st0 = set_new(int); ck_assert_int_eq(set_size(st0), 0); ck_assert_int_eq(set_empty(st0), 1); int a...
true
a7258c63ccdc10b58296bcfbea53bddeb97a339c
C++
redrumrobot/unvanquished-engine
/src/Core/Console.h
UTF-8
2,864
3.265625
3
[]
no_license
//@@COPYRIGHT@@ // Console input field // Maximum length of a console line #define MAX_CONSOLE_INPUT 512 // Amount of characters the console view is scrolled horizontally each time #define CONSOLE_SCROLL 16 // Console prompt #define CONSOLE_PROMPT "^3-> ^7" class EXPORT ConsoleField { public: ConsoleField() { ...
true
a09b5c679141a350f038b787c2bf7ea420ea40e7
C++
HarisonP/OOP-exams-and-homeworks
/exam2/group2/71531_ViktorMarinov/NormalHuman.h
UTF-8
1,064
3.1875
3
[]
no_license
#ifndef NOMRALHUMAN_H #define NORMALHUMAN_H #include <iostream> #include "Human.h" class NormalHuman : public Human{ public: NormalHuman(const char* name = "", int loyalty = 0, int strenght = 0) :Human(name, loyalty, strenght){} NormalHuman(const NormalHuman& other) :Human(other){} NormalHuman& operator=(const Norm...
true
5e0efc15c89a375c32936f1291b975f8f8b73c57
C++
damianbeles/Store-Manager
/StoreManager/StoreManager/PerishableProduct.cpp
UTF-8
345
2.671875
3
[ "MIT" ]
permissive
#include "stdafx.h" #include "PerishableProduct.hpp" PerishableProduct::PerishableProduct(std::string barCode, int amount, double pricePerPiece, DateTime expiration, TypeOfProduct type) : Product(barCode, amount, pricePerPiece, type) , expiration_(expiration) {} DateTime PerishableProduct::getExpirationDate() const...
true
bdb5c51553a458032bfa97d56df723b680860dc9
C++
keckj/papers
/wavelets/src/wavelets/interval.hpp
UTF-8
1,228
3.328125
3
[]
no_license
#ifndef INTERVAL_H #define INTERVAL_H #include <cassert> #include <iostream> template <typename T> struct Interval { T inf; T sup; Interval(T inf, T sup) : inf(inf), sup(sup) { assert(inf < sup); } Interval(const Interval<T> &other) : inf(other.inf), sup(other.sup) {} ~Interval() {} ...
true
06178367e0155f8f1bf051926f75236d330b7c0a
C++
salceson/geometria
/lab1/main.cpp
UTF-8
4,284
3.125
3
[]
no_license
#include <iostream> #include <cstring> #include <fstream> #include <iomanip> extern "C" { #include "predicates.h" }; #include "utils.h" #include "generate_points.h" using namespace std; void usage() { cerr << "Usage: " << endl; cerr << "\t* to generate points in square: ./lab1 generate1 <n> <start> <end> <f...
true
71bd7828a3312688c4afc379f0f0ad0dea866ddc
C++
AgileTrossDev/codesignals
/c_plus_plus/core/quick_sort_3/main.cpp
UTF-8
1,324
3.609375
4
[]
no_license
#include<iostream> #include<vector> using std::vector; using std::cout; using std::endl; typedef vector<int> d_t; void swap(d_t& v, int l, int r){ cout << "SWAPING: " << v[l] << " and " << v[r] << endl; int tmp = v[l]; v[l] = v[r]; v[r] = tmp; } int partition(d_t &v, int l, int r) { int val =...
true
305edd309e7ccde931ae7edd8cc7ec92b5040223
C++
easyfordev/algorithm
/codility/Distinct.cpp
UTF-8
422
2.90625
3
[]
no_license
/* Codility - sort - Distinct */ #include <iostream> #include <string> #include <vector> #include <set> using namespace std; int solution(vector<int> &A) { // write your code in C++14 (g++ 6.2.0) set<int> s; int len = A.size(); for(int i=0;i<len;i++) { s.insert(A[i]); } return s.size(...
true
aab44f9848fe33e79fb7191254fc171e2d64e02b
C++
sihai90/networklib
/libnet/net/SendBuffer.hpp
UTF-8
754
2.546875
3
[]
no_license
// // Created by lianzeng on 18-1-6. // #ifndef MULTITHREAD_SENDBUFFER_HPP #define MULTITHREAD_SENDBUFFER_HPP #include "Buffer.hpp" #include "Callback.hpp" #include "EventLoop.hpp" namespace net { class SendBuffer : public Buffer { public: enum Status{Success = true, Failure = false}; using Result = std::p...
true
296f48df9e0fdfb0c0ae144127df346a37c919e5
C++
AlkaYadav/Geeks
/Array/src/BigArraySort.cpp
UTF-8
1,205
3.421875
3
[]
no_license
/* * BigArraySort.cpp * * Created on: Aug 18, 2015 * Author: user //How to sort a big array with many repetitions? #include <iostream> #include<stdlib.h> using namespace std; struct Node{ int data; int count; Node* left; Node* right; }; struct Node* newNode(int data){ struct Node* newnode=(struct N...
true
b18cf9b28eb241b4b215577437fd6fe8dec9f203
C++
ektagarg786/Coding-Ninjas-CP
/Dynamic_Programming_2/Smallest_super_subsequence.cpp
UTF-8
1,532
3.625
4
[]
no_license
/*Given two strings S and T, find and return the length of their smallest super-sequence. A shortest super sequence of two strings is defined as the shortest possible string containing both strings as subsequences. Note that if the two strings do not have any common characters, then return the sum of lengths of the two...
true
63265966f8c3edc1b056122f243c4b52914f198a
C++
dolwijit13/2110327_Algorithm_Design
/mid_gaa.cpp
UTF-8
510
2.640625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; vector<int>dp; bool f(int x) { if(x==1) return 1; if(x<=3) return 0; int k=lower_bound(dp.begin(),dp.end(),x)-dp.begin(); x-=dp[k-1]; if(x==1) return 1; if(x<=(k+3)) return 0; return f(x-(k+3)); } int main() { int n; scanf("%d",&n); ...
true
c104bb197ef6b821775b6f32fee23c03ab94c85e
C++
AndrewShkrob/Courses
/Coursera/Art of Development in Modern C++ Specialization/White Belt/Week2/training/map_values_set.cpp
UTF-8
179
2.5625
3
[]
no_license
set<string> BuildMapValuesSet(const map<int, string> &m) { set<string> values_set; for(auto &&it : m) values_set.insert(it.second); return values_set; }
true
5ea4f40ace6dec33b487f14e4b60a0ed6c4746cd
C++
dev-supreme/jeonghyeon_codingtest
/stack_pushpop.cpp
UTF-8
1,604
2.890625
3
[]
no_license
// ConsoleApplication28.cpp : 이 파일에는 'main' 함수가 포함됩니다. 거기서 프로그램 실행이 시작되고 종료됩니다. // #include "pch.h" #include <iostream> #include "pch.h" #include <iostream> #include <stdio.h> #include <stdlib.h> const int STACK_SIZE = 5; int stack[STACK_SIZE] = { 0 }; int top = -1; int push(int data) //overflow...
true
d3dfd84c7ed8cb7ea05c76daca934708e66ed1df
C++
minkyoe/Algorithm
/Baekjoon/2565_전깃줄.cpp
UTF-8
931
2.9375
3
[]
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; vector<pair<int,int>> vt; int N; // 전깃줄 개수 int lis[101]; int lower_bound(int start, int end, int target) { int mid; while (end - start > 0) { mid = (start + end) / 2; if (lis[mid] < target) start = mid + 1; ...
true
35a00ee0da6449feecbc772585e21a210b54c7aa
C++
Zixuan-QU/Leetcode
/Code/commonPrefix.cpp
UTF-8
1,084
3.03125
3
[]
no_license
/* * commonPrefix.cpp * * Created on: 2015Äê1ÔÂ31ÈÕ * Author: Claire */ //vertical class Solution { public: string longestCommonPrefix(vector<string> &strs) { int i =0; string result; if(!strs.size()) return result; while(1){ char c; if(i<strs[0].s...
true
9c1ae73df61b8236d877d97d0b5a5d5d564cf50d
C++
Valodim/eqbeats
/src/event.cpp
UTF-8
3,032
2.71875
3
[ "BSD-3-Clause" ]
permissive
#include "event.h" #include "db.h" #include "number.h" #include "session.h" #include "log.h" Event::Event(Type nType, User nSource, User nTarget, Track nTrack, std::string nMessage, std::string nDate, int nId){ _type = nType; _target = nTarget; _source = nSource; _track = nTrack; _message = nMessa...
true
47e7fbd63e97dd5522aa1921688072d38dd7551a
C++
igankevich/arma
/src/stats/qq_graph.hh
UTF-8
1,333
2.734375
3
[]
no_license
#ifndef STATS_QQ_GRAPH_HH #define STATS_QQ_GRAPH_HH #include <blitz/array.h> #include <algorithm> #include "statistics.hh" namespace arma { namespace stats { /// \brief Q-Q plot of a discretely given function. template <class T> struct QQ_graph { template <int N, class D> QQ_graph(D dist, blitz::Arra...
true
3052d325958576215ddc1a2e4b3513e629e159be
C++
damirgafic/Image_Manipulation
/mylabel.cpp
UTF-8
8,373
2.640625
3
[]
no_license
#include "mylabel.h" #include "dialog.h" #include "ui_dialog.h" #include <iostream> #include <tgmath.h> #include <fstream> #include <QMouseEvent> #include <string> using namespace std; // static int w =800; static int h = 600; QImage image(w, h, QImage::Format_RGB32); char typeOf; QRgb value; int count =...
true
b30bc8c7420311e2bff8ff0d3ec529742aca4aa3
C++
shahhimtest/Data-Structures-and-Algo
/Smallest positive missing number/Untitled2.cpp
UTF-8
500
2.625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; int positive(int n,int a[],int mx) { for(int i=1;i<mx;i++) { for(int j =1;j<=n;j++) { { if(i!=a[j]) { return i; } } } } } int main() { int n,mx,f; cin>>n; ...
true
9b1abd3c92206b18de7f39d70c61f84f8211e4ef
C++
GreatHorizon/ood
/lab1/Strategy/fp-strategy/FlyBehavior.cpp
UTF-8
343
3.328125
3
[]
no_license
#include <functional> #include <iostream> typedef std::function<void()> FlyBehavior; FlyBehavior FlyWithWings() { int flightCount = 0; return [flightCount]() mutable { ++flightCount; std::cout << "Im flying with wings!\n"; std::cout << "Flight count: " << flightCount << "\n"; }; } void FlyNoWay() { std::c...
true
ebea3ba53e1c72eeeae5f66f47e3c08be10d265a
C++
geke520/CCF
/201809_2.cpp
GB18030
2,395
3.328125
3
[]
no_license
// //СHСWһϣ˷ֿˣ˵Ĺ̿ΪȥһЩȻȥԱߵһ㳡Ѳװϳ // ˶ҪnֲˣҲҪװnγģСH˵nཻʱ[a1,b1],[a1,b1]...[an,bn]װ // СW˵nཻʱ[c1,d1],[c2,d2]...[cn,dn]װУһʱ[s, t]ʾǴʱsʱtʱ䣬ʱΪt-s //ǺѣǶڹ㳡װʱ죬֪ǿĶ೤ʱ䡣 //ʽ //ĵһаһnʾʱε //nÿaibiСHĸװʱΡ //nÿcidiСWĸװʱΡ //ʽ //һУһʾ˿Ķ೤ʱ䡣 // //4 //1 3 //5 6 //9 13 //14 15 //2 4 //5 7 //10 11 //13 14 // //3 //ݹģԼ //е1 n 2000, ai < bi < ai+1ci...
true
6e67604aebd396bf86df43694a8cc2fa3cbf58f5
C++
drewnoakes/bold-humanoid
/FieldMap/fieldmap.hh
UTF-8
3,654
2.671875
3
[ "Apache-2.0" ]
permissive
#pragma once #include <vector> #include <Eigen/Core> #include "../geometry/LineSegment/linesegment.hh" namespace bold { struct LineJunction; enum class FieldSide { Unknown, Ours, Theirs }; class FieldMap { public: static void initialise(); // TODO return vectors of const objects ...
true
54fd001352cfcaaaa5a62b9959e2439cef88328a
C++
Franki2210/oop
/lab4_2var/lab4_2var/Rectangle.h
UTF-8
553
2.90625
3
[]
no_license
#pragma once #include "ISolidShape.h" #include "Point.h" class CRectangle : public ISolidShape { public: CRectangle(Point const& leftTop, double width, double height, string const& outlineColor, string const& fillColor); virtual ~CRectangle() = default; double GetArea() const; double GetPerimeter() const; Point G...
true
885f687d16cae923f6fbbc2ee42d06eaf93c0f2e
C++
ZackaryCowled/C-Game-Engine
/Header Files/Engine/Managers/GUIManager.h
UTF-8
1,859
3.1875
3
[ "MIT" ]
permissive
//Pragma comments #pragma once //External incldues #include <vector> //Using directives using std::vector; //Forward declarations class GUIObject; class GUIString; //Singleton class for managing the applicaitions GUI objects class GUIManager { public: //Returns the position to use based of a reference resolution a...
true
3ec3364a46f20ba2ba6a69eba3aa8371e2f2ea63
C++
fozed44/MCDemo
/Src/Common/MCRouter/src/Core/MCMessageDispatchTarget.h
UTF-8
1,563
2.578125
3
[]
no_license
#pragma once #include "MCMessage.h" #include "assert.h" #include <memory> #include <vector> namespace MC { class MCMessageDispatchTarget { public: /* ctor */ MCMessageDispatchTarget() : _pParent{ nullptr } {} MCMessageDispatchTarget(MCMessageDispatchTarget* pParent, MC_MESSAGE_VISIBILITY visibility) { asser...
true
f1ac2d8c63d3083cbe70d91772d2f04674ea7b7f
C++
usman-kakakhel/HeapsAndHuffmanCode
/MinHeap.cpp
UTF-8
1,875
3.8125
4
[]
no_license
/* * * Title : Heaps and AVL Trees * Author : Mian Usman Naeem Kakakhel * Description : description of your code */ #include "MinHeap.h" MinHeap::MinHeap() { len = 0; } void MinHeap::insert(int value) { if (len >= MIN_HEAP) throw "heap is full"; else { items[len] = value; //...
true
8be0a3d793b3698fcc31ecaa222d237ce3f76b70
C++
Amulya310/Competitive-Programming
/LinkedList/insertinmiddle.cpp
UTF-8
784
3.734375
4
[]
no_license
/*Please note that it's Function problem i.e. you need to write your solution in the form of Function(s) only. Driver Code to call/invoke your function is mentioned above.*/ /* Structure of the Node of the linked list is as struct Node { int data; Node* next; }; */ // function should insert node at the middle // of...
true
a999c910098be0fa84d2066052dca6ca2553e41b
C++
stahta01/wxfreechart_cmake
/include/wx/symbol.h
UTF-8
2,539
2.71875
3
[]
no_license
///////////////////////////////////////////////////////////////////////////// // Name: symbol.h // Purpose: symbols declarations // Author: Moskvichev Andrey V. // Created: 2008/11/07 // Copyright: (c) 2008-2009 Moskvichev Andrey V. // Licence: wxWidgets licence /////////////////////////////////////////////////////////...
true
86cedcad232a89ae80bb9378638515f995d068d8
C++
Satish7897/leetcode
/path-in-zigzag-labelled-binary-tree/path-in-zigzag-labelled-binary-tree.cpp
UTF-8
652
3.03125
3
[]
no_license
class Solution { public: vector<int> pathInZigZagTree(int label) { int level=log2(label); vector<int>ans; for(int i=level;i>=0;i--) { ans.push_back(label); int en=pow(2,i)-1; int st=pow(2,i-1); int mid=(st+en)/2; // cout<<st<...
true
14c3b0ebae890dfe1de3892acae492a2c287715c
C++
IgorYunusov/Mega-collection-cpp-1
/Exploring C++ 11/chapter45/list4507.cpp
UTF-8
373
3.109375
3
[]
no_license
// Listing 45-7. Checking for a Zero Denominator in reduce() void rational::reduce() { if (denominator_ == 0) throw zero_denominator{"denominator is zero"}; if (denominator_ < 0) { denominator_ = -denominator_; numerator_ = -numerator_; } int div{gcd(numerator_, denominator_)}; numerator_ = nume...
true