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
0bd2a714387e80a1741ba5f9db4e411e77e434ed
C++
shuaizengMU/AlgorithmDesign
/Leetcode/695.cpp
UTF-8
1,724
2.890625
3
[]
no_license
/* template */ #include <bits/stdc++.h> #include <unordered_map> using namespace std; #define MAX(x, y) ((x)>(y)?(x):(y)) #define MIN(x, y) ((x)<(y)?(x):(y)) const double pi = acos(-1.0); const int INF = 0x3f3f3f3f; const long long INFL = 0x3f3f3f3f3f3f3f3fLL; int dfs(vector< vector<int> >& grid, int m, ...
true
54e136fd2325887251d34558f8689a2bde1dcf7d
C++
adolli/FruitString
/FruitString/FruitString.hpp
GB18030
4,890
3.453125
3
[]
no_license
#ifndef _ADOLLI_STRING_ #define _ADOLLI_STRING_ #include<ostream> namespace adolli { template< class _CharT, class _CharTraits, template <class> class StoragePolicy > class string : protected StoragePolicy<_CharT> { public: typedef _CharT CharT; typedef _CharTraits CharTraits; typedef typen...
true
83366a2a5848bf58fccba295f48880a308a20568
C++
green-fox-academy/zolnay
/week_6/greatest_value/myApp_tests/myAppTest.cpp
UTF-8
913
3.375
3
[]
no_license
#include <gtest/gtest.h> #include "matrix.h" #include <vector> TEST(greater_matrix, greater_matrix_2times2_test) { std::vector<std::vector<int>> matrix = { {2,1}, {0,1} }; std::vector<std::vector<int>> secondMatrix = { {0,3}, {-1,1} }; std::vector<st...
true
974040338027f52cfd307a2cbd9627ede0153505
C++
ChaKon/Software_Engineering_Robust_Principle_Axis_Detection
/Software_Engineering_Robust_Principle_Axis_Detection/Mesh/RPA.cpp
UTF-8
9,689
2.671875
3
[]
no_license
/////////////////////////// Student Work ///////////////////////////////// #include "math.h" #include <algorithm> #include <map> #include "RPA.h" void GenEigen::CopyEig(const Mesh &myMesh){ //Copy EigenVectors and Mean from a mesh eigenMean = myMesh.eigenMean; eigenVec1 = myMesh.eigenVec[0]; }...
true
fc8460a394bcf17c930aabfd4cbaadd3a0b50353
C++
1panpan1/leetcode
/src/problem_33.cpp
UTF-8
1,272
3.40625
3
[]
no_license
#include<iostream> #include<vector> using namespace std; class Solution{ public: int search(vector<int>& nums, int target){ int i = 0, j = nums.size() - 1; int found = -1; while(i <= j){ int mid = (i + j) / 2; if(target == nums[mid]){ found = mid; ...
true
6d75cc4356fc7b3014bb6aec2ab1829f1360bd1a
C++
narenknn/emuc
/tests/client_hw.cc
UTF-8
2,294
2.515625
3
[]
no_license
#include <queue> #include <iostream> #include <unordered_map> #include <boost/asio.hpp> #include <thread> #include "scCommon.hh" #include "client.hh" #include <cstring> #include "svbit.hh" #include "shash.hh" class SdpReqBus : public TransBase { public: std::uint32_t* const _dptr; svBitTp<64> addr{_dptr}; svBi...
true
27fd52ca32a4cd1542b11aaf0fd62bf1486a7d8a
C++
JayBeavers/RocketBot
/RocketBaseArduino/Animations.ino
UTF-8
5,242
2.703125
3
[]
no_license
unsigned long animationStart = 0; unsigned long animationTime = 0; int frequency = 0; typedef void (* AnimationFunction) (); AnimationFunction animation = IdleAnimation; void animationLoop() { animationTime = millis() - animationStart; animation(); } int AnimationCommandState() { if (animation == IdleAnimation...
true
9c22ad8d3c537ab4cbacf8e3df4741bba9dd8e95
C++
BigEvilCorporation/symmetry
/testgame/Inventory.cpp
UTF-8
2,109
3.203125
3
[]
no_license
#include "Inventory.h" CInventoryItemBase::CInventoryItemBase() { Size = 0; } CInventoryItemBase::~CInventoryItemBase() { } void CInventoryItemBase::SetName(std::string ItemName) { Name = ItemName; } std::string CInventoryItemBase::GetName() { return Name; } void CInventoryItemBase::SetSize(int ItemSize) { if(...
true
3d422ec7dd9587dea9e88b7102e094e007d39596
C++
BaconTimes/C_Learning
/cpplearning/cpplearning/ExerciseClass.cpp
UTF-8
1,926
3.46875
3
[]
no_license
// // ExerciseClass.cpp // cpplearning // // Created by iOSBacon on 2017/4/12. // Copyright © 2017年 iOSBacon. All rights reserved. // #include <iostream> using namespace std; class Adder { public: Adder(int i = 0){ total = i; } void addNum(int number){ total += number; } int getTotal() { return tot...
true
07b5d40d03ea81fed419bfaaf93ed13bd6c449dd
C++
VladimirP1/os-kidshell
/inc/Command.h
UTF-8
468
2.59375
3
[]
no_license
#pragma once #include <algorithm> #include <iostream> #include <memory> #include <vector> class Command { public: int parse(std::string line); std::vector<std::string> getArguments(); std::vector<std::string> getEnvironment(); friend std::ostream& operator<<(std::ostream& os, const Command& cmd);...
true
8de93e4ad6694ec2949a43130a879d8084903908
C++
SeanCST/USTC
/Semester1/Algorithm Introduction/实验/实验3_区间树上的重叠区间查找算法/main.cpp
UTF-8
1,155
3.03125
3
[]
no_license
// // main.cpp // RBTree // // Created by 肖恩伟 on 2018/11/7. // Copyright © 2018 肖恩伟. All rights reserved. // #include "RB_Tree.h" #include <vector> int main(int argc, const char * argv[]) { vector<Interval> intervals; intervals.push_back(Interval(16, 21)); intervals.push_back(Interval(8, 9)); ...
true
4ae29fdce284e4c8908d65715fab594a1b7aa2e1
C++
Girl-Code-It/Beginner-CPP-Submissions
/Shruti/Milestone 2/CD06.cpp
UTF-8
738
3.875
4
[]
no_license
#include <iostream> using namespace std; int main() { int n1, n2, n3; cout<<"\n Enter the age of first person: "; cin>>n1; cout<<"\n Enter the age of the second person: "; cin>>n2; cout<<"\n Enter the age of the third person: ";; cin>>n3; cout<<"\n\n The oldest person is: "; if( (...
true
4b7e43809457dc42bbe87076b8db971fe09f2d25
C++
yanqiheng/OJ_algorithms
/剑指offer/二叉搜索树/*二叉搜索树与双向链表.cpp
UTF-8
647
3.3125
3
[]
no_license
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) { } };*/ class Solution { public: TreeNode* pre=NULL; TreeNode* head=NULL; TreeNode* Convert(TreeNode* pRootOfTree) { if(!pRootOfTree) return NULL; if(pR...
true
1e743a3da4238c06a09709f565d89795b1912ec3
C++
C00192124/GamesEngineering
/FSM/FSM/src/Source.cpp
UTF-8
1,161
2.515625
3
[]
no_license
#include <SDL.h> #include <SDL_image.h> #include <iostream> #include "Input/InputHandler.h" #include "Animation/Animation.h" using namespace std; int main(int argc, char* argv[]) { SDL_Init(SDL_INIT_EVERYTHING); SDL_Window* window = SDL_CreateWindow("", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1000, 800, S...
true
17b384a06e5ff4cd706bb15f03a1b88b2d24b2cb
C++
Aslauw/PathTracer
/source/Camera.cpp
UTF-8
6,415
3.03125
3
[]
no_license
#include "Camera.hpp" #include "Matrix.hpp" #include "Sphere.hpp" #include "Plane.hpp" #include <cmath> #include <iostream> // Ctors Camera::Camera() { _position = Vec3<float>(0, 0, 0); _forward = Vec3<float>(0, 0, -1); _right = Vec3<float>(-1, 0, 0); _fov = (45.0 * M_PI / 180.0); } Camera::Camera(co...
true
e4c044b0fd209b37b315fa31f8073a668900663c
C++
hobinyoon/crawl-twitter
/tools/gen-1yr-data/tweet.cpp
UTF-8
1,876
2.59375
3
[]
no_license
#include <fstream> #include <set> #include <boost/format.hpp> #include <boost/algorithm/string.hpp> #include <boost/format.hpp> #include <boost/filesystem.hpp> #include "conf.h" #include "tweet.h" #include "util.h" using namespace std; Tweet::Tweet(ifstream& ifs) { ifs.read((char*)&id, sizeof(id)); ifs.read((char*...
true
ed81ef126d32b563412704bdf0712ed99185dba5
C++
peterfyj/umnets
/src/node/HHRtauNode.cc
UTF-8
6,274
2.546875
3
[]
no_license
#include "node/HHRtauNode.h" #include "driver/Driver.h" #include "packet/packet.h" #include "util/Math.h" #include "network/network.h" #include "logger/logger.h" #include <utility> #include <iterator> HHRtauNode* HHRtauNode::create(Driver& driver) { int tau = driver.get_option<int>("node.tau"); int beta = driver.g...
true
e45ba0e175e98a5e14afb7d77cb9450727969e90
C++
MajorMattxx1/CS301-Data-Structures-and-Algorithms--Prefix-Data-Struct
/b/MazeExample.cpp
UTF-8
3,020
2.671875
3
[]
no_license
// ConsoleApplication6.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include "pch.h" #include <iostream> #include <fstream> #include <string> #include <iostream> using namespace std; /* @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@S@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ ...
true
ea95cdea08b377b710a875b27c08f0c25d8d956d
C++
RationalSolutions/cs235
/W06/node.h
UTF-8
6,014
3.984375
4
[]
no_license
/*********************************************************************** * Header: * Node * Summary: * Node struct * * Author * Coby Jenkins * Michael Gibson ************************************************************************/ #ifndef CS235_NODE_H #define CS235_NODE_H /*********************...
true
554f85760aa913450e956eb533ad04b421b52664
C++
IllinoisSimulatorLab/szg
/src/graphics/arGUIWindowManager.h
UTF-8
24,955
2.640625
3
[ "LicenseRef-scancode-x11-opengl" ]
permissive
//******************************************************** // Syzygy is licensed under the BSD license v2 // see the file SZG_CREDITS for details //******************************************************** #ifndef _AR_GUI_WINDOW_MANAGER_H_ #define _AR_GUI_WINDOW_MANAGER_H_ #include <map> #include <vector> #include "a...
true
28a74b5a66d7183c811f0f1e186841cee753b569
C++
BlackFox101/OOP
/lw3/Calculator/Calculator/Calculator.cpp
UTF-8
7,962
3.25
3
[]
no_license
#include <iostream> #include "Calculator.h" #include <algorithm> #include <cmath> #include <regex> #include <map> #include <iomanip> using namespace std; Calculator::Calculator(istream& input, ostream& output) : m_input(input), m_output(output) { } optional<Command> Calculator::GetCommand() const { string str; m_i...
true
5f1fe2d10e6595e6e6d29b7e83aae3f2de7483af
C++
atharvapawar181/FDS-Codes-for-Second-year-Engineering
/E31.cpp
UTF-8
3,055
3.953125
4
[]
no_license
/*A double-ended queue (deque) is a linear list in which additions and deletions may be made at either end. Obtain a data representation mapping a deque into a one- dimensional array. Write C++ program to simulate deque with functions to add and delete elements from either end of the deque.*/ #include <iostream> ...
true
7f83e3ee6c55808b54a606cefc8c215db262d1b8
C++
zeal4u/leetcode
/FreqStack.h
UTF-8
703
2.890625
3
[]
no_license
// // Created by zeal4u on 2018/10/12. // #ifndef LEETCODE_FREQSTACK_H #define LEETCODE_FREQSTACK_H #include <unordered_map> #include <stack> using namespace std; class FreqStack { private: unordered_map<int, stack<int>> data; unordered_map<int, int> count; int max_freq; public: FreqStack():data(), ...
true
525c0e526ac61d2f801088e31429d7f50e8868cd
C++
rajattarade/Arduino_codes
/EEROM/EEROM.ino
UTF-8
430
2.65625
3
[]
no_license
#include <EEPROM.h> int a = 0; int value; void setup() { Serial.begin(9600); } void loop() { value = EEPROM.read(a); /* if(value>10) { printf("BLOCK FOREVER"); delay(100); while(1); } /* value = EEPROM.read(a); value = value+1; EEPROM.write(a, value); value = EEPROM.read(a); */EEPROM.wri...
true
cf3a896bd800828b3eab7eb935e5a700d71cc038
C++
burncode/The-C-Programming-Language
/ch3/3-2.cpp
UTF-8
1,837
3.40625
3
[]
no_license
// Author: jrjbear@gmail.com // Date: Fri Oct 4 19:10:37 2013 // // File: 3-2.cpp // Description: Conver escape characters into visable ones and visa versa #include <stdio.h> #include "utils/utils.h" int escape(char dst[], const char src[]); int unescape(char dst[], const char src[]); int main(int argc, char* argv...
true
0878c0ef83dace93654c8280ad388f9bee30a78a
C++
nightlark/GridDyn
/src/utilities/workQueue.h
UTF-8
11,449
3.046875
3
[ "BSD-3-Clause" ]
permissive
/* * LLNS Copyright Start * Copyright (c) 2014-2018, Lawrence Livermore National Security * This work was performed under the auspices of the U.S. Department * of Energy by Lawrence Livermore National Laboratory in part under * Contract W-7405-Eng-48 and in part under Contract DE-AC52-07NA27344. * Produced at the...
true
6336c19c4f96c86af1758e149bff3f02f8e56351
C++
triminh12042002/CS162_projects
/FinalProject/FinalProject/function.cpp
UTF-8
50,895
2.90625
3
[]
no_license
 #include "Header.h" using namespace std; // ctrl + m + o de thu nho code // ctrl + m + p de phong to code void SetColor(int backgound_color, int text_color) { HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE); int color_code = backgound_color * 16 + text_color; SetConsoleTextAttribute(hStdout, color_code); } voi...
true
ab02e9382af70154c1afc59dc2af0546b9b348de
C++
KFlaga/HearYaHearYa
/Core/Dba.hpp
UTF-8
3,699
2.984375
3
[]
no_license
#pragma once #include "Features.hpp" namespace eave { struct DtwAssociation { int sequence; int point; double cost; }; /* * Computes barycenter (vector mean) of all sequences elements given mapping "associations". * For each association finds corresponding element in "sequences" and accu...
true
830b1924e71d8b1eb9e559053734589f329aa51c
C++
eugenedeon/hitchhikersscatter
/code/flatland/halfSpace/AlbedoProblem/HalfspaceAlbedoProblemDelta.cpp
UTF-8
1,872
2.625
3
[ "BSD-3-Clause", "LicenseRef-scancode-generic-cla" ]
permissive
#include "../GENHalfSpaceFlatland.h" class IsotropicExponentialHalfspaceDeltaAlbedo : public GENHalfspace { public: double mu_t; double m_ui; IsotropicExponentialHalfspaceDeltaAlbedo(const double mu_t, const double ui) : mu_t( mu_t ), m_ui( ui ){} Vector2 initPos() { return Vector2( 0.0, 0.0); } V...
true
e04d4022b9ee63d9f9095f5038a882d6256db28c
C++
chosh95/STUDY
/BaekJoon/2019/토너먼트.cpp
UTF-8
263
2.578125
3
[]
no_license
#include <iostream> using namespace std; int main() { int N, a, b, res=1; cin >> N >> a >> b; while (true) { if ((b - a == 1 && b % 2 == 0) || (a - b == 1 && a % 2 == 0)) { cout << res; break; } res++; a = a / 2 + a % 2; b = b / 2 + b % 2; } }
true
29e4c3f3a0d40ab589ddfec05987c1279939dc25
C++
seyang/study
/PThreadLock/testpro2.cpp
UTF-8
1,670
2.640625
3
[]
no_license
#include "testpro.h" shm_struct_t *g_shm; PTLockS *sharedLock; int shm_init() { int fd; int ret = 0; int shm_size; if ((fd = shm_open("/testpro", O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR|S_IROTH)) == -1) { if (errno == EEXIST) { if ((fd = shm_open("/testpro", O_RDWR, 0)) == -1) { perror("shm_open"); ...
true
3fe80975ee67189763cd204d42da0d0462e53818
C++
rhazari/Design-Patterns
/Factory/HiringManager.h
UTF-8
585
2.65625
3
[]
no_license
#pragma once #include "Interviewer.h" #include <memory> class HiringManager { public: virtual ~HiringManager() {} virtual std::unique_ptr<Interviewer> createInterviewer() = 0; }; class DeveloperManager: public HiringManager { public: ~DeveloperManager() {} std::unique_ptr<Interviewer> createIntervie...
true
45dd673de8506f7164692b5d6b2ec71f79e82a2f
C++
GabeOchieng/ggnn.tensorflow
/program_data/PKU_raw/4/825.c
UTF-8
748
2.984375
3
[]
no_license
/* * Pointer1.5Through.cpp * ?????????? * Created on: 2012-12-18 * Author:??? * ??????array[0][0]????????????????????????? * */ int main(){ int array[101][101]; int row,col,i,j,k; int (*p)[101]=array;//p??array???? cin>>row>>col; for(i=0; i < row;i++)//??? for(j=0;j<col;j++)//??? ...
true
be9e14fc71baf94de47707333651e0130cabd3a0
C++
pidddgy/competitive-programming
/codeforces/1109B.cpp
UTF-8
1,646
2.65625
3
[]
no_license
#include <bits/stdc++.h> using namespace std; #define cerr if(false) cerr #define watch(x) cerr << (#x) << " is " << (x) << endl; #define endl '\n' #define ld long double #define int long long #define pii pair<int, int> #define fi first #define se second #define sz(a) (int)a.size() #define all(x) (x).begin(), (x).end()...
true
aaed2d799b6abc58005e91f27950df232b3df3bf
C++
yongjianmu/leetcode
/second/41_First_Missing_Positive/main.cpp
UTF-8
1,082
3.75
4
[]
no_license
#include "../include/header.h" /* Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. Your algorithm should run in O(n) time and uses constant space. */ class Solution { public: int firstMissingPositive(vector<int>& nums) { ...
true
ef3d172510b66ecc8bdcd3aeffeefeb5397b97b1
C++
ddolzhenko/traning_algos_2016_06
/Rzerra/search.cpp
UTF-8
6,348
2.90625
3
[]
no_license
//#include <iostream> //#include <iomanip> //#include <cassert> //#include <string> //#include <vector> // //using namespace std; // //int search1(int iArray[], int iSize, int iKey) //{ //// assert(iArray!=0); // assert(iSize>=0); // // for(int i=0; i<iSize; ++i) // { // if(iArray[i]==iKey) // return...
true
9ba5eb3cc43a65c25c58d63a214765d1caac7f3f
C++
eduardorasgado/CppZerotoAdvance2018
/intermediate/funciones/structsToFunctions.cpp
UTF-8
609
3.421875
3
[]
permissive
#include <iostream> using namespace std; // ESTRUCTURAS struct Persona { char nombre[60]; int edad; } // instancias de la esturctura persona1 ; // PROTOTIPOS DE FUNCION void dataRequest(); // enviandole datos tipo estructura al prototipo void showData(Persona); int main(int argc, char** argv) { dataRequest(); ...
true
802e03a7b94e3f1c0f803f63de9f202d734ff9bb
C++
li1867/Zork-Game
/Creature.hpp
UTF-8
1,263
2.6875
3
[]
no_license
#pragma once #include <iostream> #include <fstream> #include <vector> #include <cstdlib> #include <string> #include <string.h> #include <list> #include "rapidxml_utils.hpp" #include "rapidxml.hpp" #include "rapidxml_print.hpp" #include "Trigger.hpp" #include "Attack.hpp" using namespace std; using namespace rapidxml;...
true
038c80b628a345689a9eac17585a9dd50ba1c42f
C++
ExpLife0011/adblockplusie
/common/src/Registry.cpp
UTF-8
2,884
2.6875
3
[]
no_license
/* * This file is part of Adblock Plus <https://adblockplus.org/>, * Copyright (C) 2006-present eyeo GmbH * * Adblock Plus is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation. * * Adblock Plus is ...
true
72add1ecb502ed5478645837773506f295406ea1
C++
VizlabRutgers/TTPN
/nettable.cpp
UTF-8
2,539
2.578125
3
[]
no_license
#include <QtGui> #include <QApplication> #include <QTableWidget> #include <QHBoxLayout> #include "nettable.h" #include <QHeaderView> NetTable::NetTable(QWidget *parent) : QTableWidget(parent) { setWindowTitle("QTableWidget"); setRowCount(6); setColumnCount(2); //verticalHeader()->...
true
ccc10d0cd88112c74e6246f2cb03c87f328f4dbe
C++
ccpang96/leetcode
/leetcode/图/欧拉路径/1.重新安排行程-机场排序问题.cpp
GB18030
1,016
2.828125
3
[]
no_license
/************************************************************************/ /*@File Name : 1.°г-.cpp /*@Created Date : 2020/6/16 14:52 /*@Author : ccpang(ccpang96@163.com) /*@blog : www.cnblogs.com/ccpang /*@Description : ıͼŷ· Ͻ˵һͨͼ G ŷ·ָһ㣬ߵķ򣬿Բظرͼеıߡ*/ /***********************...
true
8655ee64b4e455b552f71afd8f4af043df9822e4
C++
jaredbebb/CS5101_PegJump
/testPegJump/PegView.cpp
UTF-8
972
2.75
3
[]
no_license
// // PegView.cpp // testPegJump // // Created by Jared Bebb on 3/10/17. // Copyright © 2017 Jared Bebb LLC. All rights reserved. // #include "PegView.hpp" #include <string> std::string PegView::viewMessage(std::string pickMessage) { std::string message; if (pickMessage == "home") { message = "Hom...
true
fb730fcc57f3be815020a1de8c58978c8521f32b
C++
DoctorLai/ACM
/leetcode/1171. Remove Zero Sum Consecutive Nodes from Linked List/1171.cpp
UTF-8
1,130
3.3125
3
[]
no_license
// https://helloacm.com/how-to-remove-zero-sum-consecutive-nodes-from-linked-list-using-prefix-sum/ // https://leetcode.com/problems/remove-zero-sum-consecutive-nodes-from-linked-list/ // MEDIUM, LINKED LIST, PREFIX SUM /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *nex...
true
48a6e53ec0dad7f96e57ed6193d52cf31eaba1f2
C++
alexbaboune/project
/main.cpp
ISO-8859-1
1,098
3
3
[]
no_license
#include <stdio.h> #include <iostream> #include <fstream> #include "sorting.h" #include <vector> using namespace std; int main() { //ifstream fichier("test.txt", ios::in); // on ouvre //if (fichier) //{ // int k; // notre variable o sera stock le caractre //fichier.get(k); // o...
true
81f6bf69cc5027ee0c83f46c884c8a70a15745ea
C++
IshidaTakuto/Works
/吉田学園情報ビジネス専門学校_石田琢人/ゲーム/04_3Dシューティング_個人/開発環境/scene3DBill.cpp
SHIFT_JIS
12,545
2.671875
3
[]
no_license
//============================================================================= // // 3Dr{[hIuWFNg [scene3DBill.h] // Author : Ishida Takuto // //============================================================================= #include "scene3DBill.h" #include "renderer.h" #include "manager.h" #include "input.h" #include ...
true
2391fa44a70e87d8f519cb192747fcaa71f8b8aa
C++
mave89/CPlusPlus_Random
/LeetCode/Recursion/fillMatrix.cpp
UTF-8
2,139
3.515625
4
[]
no_license
// https://leetcode.com/problems/flood-fill/ // Time complexity: O(n*m) where n and m are rows and cols // Space complexity: O(n*m) where n and m are rows and cols class Solution{ public: void floodFillHelper(vector<vector<int>> &image, int sr, int sc, int newColor, map<pair<int, int>, bool> &visited){ //...
true
e239d5dae8546fbcbd897d1f390505527f854472
C++
gerasimos1995/Hotel-Reservations-Manager
/src/RoomA.cpp
UTF-8
427
2.78125
3
[]
no_license
#include "RoomA.h" RoomA::RoomA():Room() { //ctor } RoomA::~RoomA() { //dtor } void RoomA::setPricePerDay(int price){ pricePerDay = price; } int RoomA::getPricePerDay(){ return pricePerDay; } double RoomA::pricing(){ int i; double price=0; for (i=0;i<30;i++){ if(availabi...
true
f49c3120ff225efae3c337ebdf3d68f22bea636a
C++
gabrisosa/ProgramacionGabriel
/Programacion-I/PracticasProgramacion-I/Practica1/Ejercicio1Cuadrado/main.cpp
UTF-8
1,278
3.875
4
[]
no_license
#include <iostream> using namespace std; class Square{ public: Square(int _side){ setSide(_side); } int getSide(){ return side; } void setSide(int _side){ if (_side <= 0){ cout << "There must be a mistake, side of your square be le...
true
1703fa949440c1001afd12849af7866d8fb7e387
C++
Wantod/GameMulti
/src/client/gui/Button.hpp
UTF-8
539
2.515625
3
[]
no_license
#ifndef BUTTON_HPP # define BUTTON_HPP #include <iostream> #include "../core/ResourceManager.hpp" #include "../core/Window.hpp" class Button { public: Button(std::string &str, glm::ivec2 position, glm::ivec2 boxsize); ~Button(); void setText(std::string &str); bool onClick(); void render(); void resize(int x,...
true
a9bfe49f332827933c0927d38d5a74dab1fc94b8
C++
dylandSteven/Ciclo-1-y-2
/Vol1/problemaBus/problemaBus/Clientes.h
UTF-8
793
2.859375
3
[]
no_license
#pragma once #include"Cliente.h" #include<iostream> #include<string> #include<vector> #include"Autoh.h" using namespace std; typedef unsigned long us; class Clientes { private: vector< Cliente*>arrcliente; vector<Auto*>nue; public: Clientes() {} void agregarCliente() { string nombreaux; us dniaux; Client...
true
aebd58eadb8d98f1c514666369fcc92b6112e247
C++
nanoo-linux/test
/cpp/field_calculation/src/Pgm.hpp
UTF-8
510
2.75
3
[]
no_license
#pragma once #include "Exception.hpp" #include "File.hpp" #include <vector> using std::vector; class PgmException: public Exception { public: PgmException(const char *s, int c=-1): Exception(s, c) {} }; class Pgm { public: Pgm(const int x, const int y, const int depth=0xffff); Pgm &setPixel(const int x, con...
true
5a6ad180b75744eb85f091d4ae4c74c42f6839b3
C++
hXl3s/magiclib
/include/core/DeviceCPU.hpp
UTF-8
993
2.671875
3
[]
no_license
#pragma once #include <boost/align/aligned_allocator.hpp> #include "core/Device.hpp" #include "memory/Storage.hpp" #include "ThreadPool.hpp" namespace hx { class DeviceCPU : public hx::Device { public: hx::DeviceType getType() const override { return hx::DeviceType::CPU; } hx::ThreadPool<> &getDefaultThreadP...
true
81030eff21c122674dec7c75981c28fb1cdf93fb
C++
dibery/UVa
/vol124/12485.cpp
UTF-8
341
2.546875
3
[]
no_license
#include<cstdio> int main() { for( int n, note[ 10000 ]; scanf( "%d", &n ) == 1; ) { int sum = 0; for( int i = 0; i < n; ++i ) scanf( "%d", note+i ), sum += note[ i ]; int ave = sum / n, diff = 0; for( int i = 0; i < n; ++i ) if( note[ i ] < ave ) diff += ave - note[ i ]; printf( "%d\n", sum % n?...
true
708f533c7620a53531316bba53be10deaabcdf47
C++
MartNotermans/cpse2
/03-08-array-of-actions/ball.hpp
UTF-8
611
2.78125
3
[]
no_license
#ifndef _BALL_HPP #define _BALL_HPP #include <SFML/Graphics.hpp> #include "drawable.hpp" #include "rectangle.hpp" class ball: public drawable { private: float size;//radius float diameter = size; sf::Vector2f speed = {1.0, 1.0}; public: ball( sf::Vector2f position, float size = 30.0 ); void draw( sf::RenderW...
true
e6f9c150c7dd1c1f56965c29cf8460529ac58b68
C++
stella-gao/CodeJam
/2014/qualification_round/C/0-kai-1/main.cc
UTF-8
5,748
3.015625
3
[]
no_license
#include <iostream> #include <iomanip> using namespace std; #define MAX_SIZE 52 int r_g, c_g, m_g; // '#' means block which is around the matrix // '*' means mine // 'N' means contains a number but not zero // '0' means there is no mine in current cell neighbours // 'c' is the last '0' at the bottom right corner ch...
true
8eb08042f7961bc3aebf6846087ea0f084bed2df
C++
Jimendaisuki/RideTheFlow
/RideTheFlow/RideTheFlow/src/UIactor/PlayerArrow.h
SHIFT_JIS
535
2.59375
3
[]
no_license
#pragma once #include "UIActor.h" #include "../actor/Player.h" class PlayerArrow : public UIActor { public: PlayerArrow(IWorld& world, Player* player); ~PlayerArrow(); virtual void Update() override; virtual void Draw() const override; private: // vC[|C^ Player* player; // `|WV Vector2 drawPos_; // ]px fl...
true
d7646249648b2eab1d9b64f16e327961f78c4257
C++
devendrakushwah/Algorithms
/QuickSort.cpp
UTF-8
781
3.71875
4
[]
no_license
/* Quick sort Algorithm Partition using Hoare's partition scheme*/ #include<stdio.h> int partition(int ar[], int l, int h) { int pivot=ar[l]; int i=l-1; int j=h+1; while(true){ do{ i++; }while(ar[i]<pivot); do{ j--; }while(ar[j]>pivot); i...
true
bde2b67c50b7677bc2a4a88dab0e0e17444011e6
C++
Jagadish-prasad-mohanty/codeforce-800
/amusingJoke.cpp
UTF-8
615
2.6875
3
[]
no_license
#include <bits/stdc++.h> #include <cstring> using namespace std; int main(){ string guest,host,name; cin>>guest; cin>>host; cin>>name; map<int,int> res; for(int i=0;i<guest.length();i++){ res[guest[i]]++; } for(int i=0;i<host.length();i++){ res[host[i]]++; } ...
true
5fb765e095886190ad225185ef9fec00cd7d72e5
C++
draftup/novastory
/webserver/jsonthrower.h
UTF-8
842
2.6875
3
[]
no_license
#ifndef JSONERRORTHROWER_H #define JSONERRORTHROWER_H #include <QString> #include <QDebug> #include <QJsonDocument> #include <QJsonObject> namespace novastory { class JsonThrower { public: JsonThrower(); bool isJsonError() const; QString jsonErrorDescription() const; void jsonReset(); int jsonErrorType(); QS...
true
f0a93b02644b6153f0ea5424aa15753f9942b97c
C++
yyx112358/For-Interview
/笔试用/笔试用/LargeInt.hpp
GB18030
8,914
3.296875
3
[]
no_license
#pragma once //ο https://www.cnblogs.com/rmthy/p/8644236.html #include <iostream> #include <vector> #include <string> #define MAX_VAL 1000000000 // 10 #define VAL_LEN 9 #define FORMAT_STR "%09d" //޷Ŵࡣ֧ⳤ޷ָ֧ class LargeInt { public: LargeInt::LargeInt() {} LargeInt::LargeInt(uint32_t val) { this->_data.push_back(...
true
8e548092daee5ad35f2478e64d2bc512d8306de6
C++
wgysarm/dipmain
/src/UartServer.cpp
UTF-8
2,271
2.515625
3
[]
no_license
#include "UartServer.h" #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <errno.h> #define SERIAL "/dev/ttyS0" UartServer::UartServer(QObject *parent) : QObject(parent) { // m_cmdList = new QList<QByteArray>(); // QByteArray baOpen ; // QByteA...
true
42761755d7c9b73c0932d006c3fa6b186a09cd18
C++
demolition18956/QT011-Networking
/Server/greetingserver.cpp
UTF-8
1,096
2.96875
3
[]
no_license
#include <QtNetwork> #include "greetingserver.h" GreetingServer::GreetingServer(QObject* parent) : QTcpServer(parent) { greetings[0] = "Hello"; greetings[1] = "Howdy"; greetings[2] = "Salutations"; greetings[3] = "Aloha"; // Initialize random number generator to number of seconds // between 00:00:00 and now q...
true
7a0494871732c5458173f7d90e03731607adb4bc
C++
friedy10/Stack
/StackLinkedList/StackLinkedList/Stack.h
UTF-8
954
3.8125
4
[]
no_license
#include<iostream> using namespace std; //Node struct StackNode { int data; struct StackNode* next; }; class Stack { public: Stack(); ~Stack(); StackNode* newNode(int data1); void push(int data); int isEmpty(); int peek(); int pop(); private: StackNode* root; }; Stack::Stack() { } Stack::~Stack() { } ...
true
9e12b787c2da5579b7f037259c246b9f295112c6
C++
AnneLivia/Competitive-Programming
/Online Judges/Neps Academy/QuadradoOBI2014.cpp
UTF-8
1,141
2.671875
3
[ "MIT" ]
permissive
#include <iostream> #include <vector> using namespace std; int main() { int n, m; cin >> n; vector<vector<int> > v(n, vector<int>(n, 0)); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { cin >> v[i][j]; } } int sumcol, sumlin, sumdiag, rightSum = -1, dif...
true
dbeeccd579f52a39b5dace6758cb5d31aacbe74d
C++
KrishnaHarishK/Compare_Records
/StringUtils.cc
UTF-8
5,248
2.796875
3
[]
no_license
#include"StringUtils.hh" #include<sstream> //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- StringUtils::StringSegmentVector StringUtils::BreakUpString(const std::string & aString, ...
true
a816fc5e98db93bc94f89ac13ed29033152b548c
C++
DrYaling/PCGForUnity
/cppLib/code/Generator/Terrain/Painter/SplatPainter.cpp
UTF-8
3,046
2.71875
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
#include "SplatPainter.h" #include "Logger/Logger.h" namespace generator { SplatPainter::SplatPainter() : m_pAlphaMap(nullptr), m_nAlphaCount(0), m_fBrushStrength(1.0f), m_nSize(0) { m_pBrush = new PainterBrush(); } SplatPainter::~SplatPainter() { safe_delete(m_pBrush); } void SplatPainter::Init(f...
true
580cbd5bb14a1afbb5d703adab26a189c642980f
C++
tleek135/university
/CS201/lab6/lab6ex5.cpp
UTF-8
651
3.53125
4
[]
no_license
//Program written by: Kyle Lee (005054981) //Lab 6, Exercise 5 #include <iostream> #include <cassert> #include <vector> using namespace std; int countOccurrences(const vector<int> & v, int k){ int occurrenceCount = 0; for (int index = 0; index < v.size(); index++){ if (v[index] == k) ++occurrenceCount; } r...
true
2dcf5a4d1a2c2e9ef268dee64a7f8dbb0e2180ea
C++
decifur/Algorithms
/String_Algorithm/Check_if_string_has_only_unique_characters.cpp
UTF-8
730
4
4
[]
no_license
// C++ program to illustrate string // with unique characters using // brute force technique #include <bits/stdc++.h> using namespace std; bool uniqueCharacters(string str) { // If at any time we encounter 2 // same characters, return false for (int i = 0; i < str.length() - 1; i++) { for (int j = i + 1; j < str...
true
8658ab864bef4f1d39a911eef80ab4739f930d8b
C++
dnsdudrla97/pwn
/dreamhack-io/Memory_Corruption_C++/Type_confusion/cpp_cast.cpp
UTF-8
404
3.234375
3
[]
no_license
// g++ -o cpp_cast cpp_cast.cpp #include <iostream> using namespace std; class A { public_colon virtual void f() { cout << "Class A::f()" << endl; } }; class B { public_colon void f() { cout << "Class B::f()" << endl; } }; int main() { A *class_a = new A; class_a-...
true
6e9fce9937fd9aad36bf572292327c502fb44316
C++
wilbo/C-plus-plus-examples
/NestedArray/NestedArray.cpp
UTF-8
1,020
3.59375
4
[]
no_license
// // Created by Wilbert Schepenaar on 08/02/2018. // #include "NestedArray.h" #include <iostream> using namespace std; int** nestedArray(int depth) { int** arrayP = new int*[depth]; // an array of pointers for (int i = 0; i < depth; i++) { int* array = new int[i+1]; ...
true
b66d09d59a58155016179824de22be93f6c2da35
C++
azizchigri/R-type-project
/Sources/GameEngine/Game/Core/Rtype/RtypeClient.cpp
UTF-8
6,752
2.5625
3
[]
no_license
// // EPITECH PROJECT, 2018 // CPP_rtype_2018 // File description: // RtypeClient class implementation // #include "GameEngine/Game/Core/Rtype/RtypeClient.hpp" Engine::Game::RtypeClient::RtypeClient(unsigned int framerate, boost::asio::io_service &io_service, const std::string &ip, const int port): AGameClient(framer...
true
28ce21cb5d8cee27a43804ebc2ea9099dc2187e6
C++
gatsbyd/ShinyVm
/src/main.cpp
UTF-8
1,901
2.96875
3
[]
no_license
#include <unistd.h> #include <getopt.h> #include <stdlib.h> #include <string> #include <vector> #include <iostream> struct cmd { bool helpFlag; bool versionFlag; std::string cp; std::string className; std::vector<std::string> args; cmd() :helpFlag(false), versionFlag(false) {} }; cmd parseCmd(int argc, char...
true
dee941b8a8016d5880d18c8c7deb3c094960c613
C++
dimagimburg/KMeansAlgorithmSequentialAndParallel
/clustering_points/Cluster.cpp
UTF-8
1,759
3.328125
3
[]
no_license
#include "Cluster.h" int Cluster::NEXT_ID = 0; Cluster::Cluster() : id(NEXT_ID++) { } Cluster::Cluster(Point* p) : id(NEXT_ID++) { center = new Point(*p); //this->addPoint(p); } Cluster::Cluster(const Point* p) : id(NEXT_ID++) { center = new Point(*p); //this->addPoint(p); } Cluster::~Cluster() { } void Clus...
true
90f0a45a77250c07806f9e85e40aa200ec452604
C++
manishhedau/Data-Structure-Algorithm
/Stack/5. infix_to_postfix_expression.cpp
UTF-8
1,798
3.75
4
[ "MIT" ]
permissive
// Code By - Manish Hedau #include<bits/stdc++.h> using namespace std; char my_stack[100]; int top = -1; // push item in stack void push(char x) { my_stack[++top] = x; } // pop item from stack char pop() { if (top == -1) return -1; else return my_stack[top--]; } // checking priority for ...
true
25b8bb4a0a5414f18a48652ebb5c81513e677dad
C++
TEJASWI-TEJASWI/Data-Structure-Codes
/AP.cpp
UTF-8
304
2.953125
3
[]
no_license
/* This program is for printing AP and it's sum of AP */ #include<iostream> using namespace std; int main() { int a ,n,d; cin>>a; cin>>n; cin>>d; for(int i=0;i<n;i++) { cout<<(a+i*d)<<endl; } cout<<"Sum of AP is " <<(n/2)*(a+(n)*d)<<endl; }
true
aa6905eece9ada0695d372c9c122cb08fcd3b711
C++
dreamJarvis/Problem_Solving
/hackerRank_interViewKit/searching/temp.cpp
UTF-8
1,906
3.953125
4
[]
no_license
/*Consider n machines which produce same type of items but at different rate i.e., machine 1 takes a1 sec to produce an item, machine 2 takes a2 sec to produce an item. Given an array which contains the time required by ith machine to produce an item. Considering all machine are working simultaneously, the task is to f...
true
9b21aff812e6b4749631836267d518180e3b7a96
C++
cs-topicosIA/IRIS
/RedNeuronal.cpp
UTF-8
7,573
2.71875
3
[]
no_license
#include "RedNeuronal.h" RedNeuronal::RedNeuronal() { nCapas = 0; capas = 0; neuronasXCapa = 0; nEntradas = 0; entradas = 0; nSalidas = 0; salidas = 0; fa = 1; nIteracions = 10; maximoError = 0.1; } RedNeuronal::~RedNeuronal() { for(int i = 0; i < nCapas; ++i) ...
true
822a82d40960bbb1f0a486bef711bc4c8091ef93
C++
ameks94/PrataTasks
/5.6.cpp
UTF-8
863
2.984375
3
[]
no_license
#include "CheckInput.h" #include <array> const short year = 3; void main () { char **month = new char*[12]; month[0] = "January: "; month[1] = "February: "; month[2] = "March: "; month[3] = "April: "; month[4] = "May: "; month[5] = "June: "; month[6] = "July: "; month[7] = "August: "; month[8] = "September: "...
true
8b0310938283ab9f32b4806520e722fd2fd62c19
C++
shreyasoni15/Assignment-1
/lab5_q1.cpp
UTF-8
479
3.890625
4
[]
no_license
//WAP to find maximum number between two numbers //library #include <iostream> using namespace std; int main () { //Declare variables int num1,num2; cout<< " Enter num1 = "; cin>> num1; cout<< " Enter num2 = "; cin>> num2; //Specify condition for output if (num1> num2) { cout<< " The maximum numbe...
true
1ef4e3cf4cbaac59cb81b5a275989e87450e41f8
C++
Stackleon/BasicPractice
/language/c_plus/carplay_ie.cpp
UTF-8
6,633
2.5625
3
[]
no_license
#include <iostream> #include <string.h> #include <vector> #include <string> #include <stdint.h> #include <sstream> #include <iomanip> using namespace std; #define MAX_PROPERTY_VALUE_SIZE 96 #define CARPLAY_ELEMENT_SIZE 7 #define CARPLAY_ELEMENT_ID_FLAGS 0x00 #define CARPLAY_ELEMENT_ID_NAME 0x01 #define CARPLAY_EL...
true
851eae256bba078b7993c5a478f4217a092964ec
C++
VerparDev/Quadris
/backup/sblock.cc
UTF-8
607
2.53125
3
[]
no_license
#include <vector> #include "sblock.h" #include "coord.h" SBlock::SBlock(bool heavy): Block{'S', Coord{0,5}, heavy}/*: Block{'L', std::vector<Coord> = [Coord{0,3}, Coord{0,4}, Coord{0,5}, Coord{1,5}], Coord{1,1}*/ { // symbol = 'S'; //this coord is the tail end of the long part of the L coords.emplace_back(Coord{0...
true
ff6bcf7500a5573d79fa847b6e1a9afdcaf89052
C++
patryk0504/IMN_2020
/lab4/main.cpp
UTF-8
5,947
2.875
3
[]
no_license
#include <iostream> #include <cmath> #include <stdio.h> #include <array> #include <thread> //przyjete wartosci parametrow w zadaniu double eps = 1.; double delta = 0.1; const int nx = 150; const int ny = 100; double V1 = 10.; double V2 = 0.; double xmax = delta*nx; double ymax = delta*ny; double sigmax = 0.1 * xmax...
true
8c7b5b7e087a18d2d1ee30e7e4c3a75ba8503b29
C++
ManasviGoyal/Competitive-Programming
/FB Hacker Cup 45 points first pgm.cpp
UTF-8
1,316
3.21875
3
[]
no_license
#include<iostream> #include<string> using namespace std; void step2and3(int, int, int, int, string, string); void step4(int, int, int, int, string, string); void step5(int, int, int, int, string, string); void step6(int, int, int, int, string, string); int main() { int a,b,i,j; string A, B; i = j = 1; ...
true
d786a3d45673d3d86b7466e61d23c394219c9de9
C++
cekaem/chess2.0
/Board.cc
UTF-8
7,399
2.875
3
[]
no_license
#include "Board.h" #include "utils/Utils.h" Square Square::InvalidSquare = {static_cast<size_t>(-1), static_cast<size_t>(-1)}; std::ostream& operator<<(std::ostream& ostr, const Board& move) { ostr << move.createFEN(); return ostr; } Board::Board(const std::string& fen) { std::...
true
8fcc47186cd0ad6450950ba8d3f42fb52cf3175f
C++
youngar/omtalk
/om/om/include/om/Om/Array.h
UTF-8
1,216
2.75
3
[]
no_license
#ifndef OM_OM_ARRAY_H #define OM_OM_ARRAY_H #include <cstdint> #include <om/Om/ArrayLayout.h> #include <om/Om/ObjectHeader.h> #include <om/Om/SlotProxy.h> namespace om::om { struct Array { static const ObjectType TYPE = ObjectType::ARRAY; static std::size_t allocSize(Type type, std::size_t length) noexcept { ...
true
27f0b05832597efbf462c4830f6a9d22a4cf7ac9
C++
RossBlakeney/SortingAlgsCompCpp
/AlgsAndDataStructures/AlgsAndDataStructures/BaseSorter.cpp
UTF-8
1,349
2.921875
3
[]
no_license
#include "StdAfx.h" #include "BaseSorter.h" BaseSorter::BaseSorter(void) { } BaseSorter::~BaseSorter(void) { } void BaseSorter::printResults(int methodTag, vector<int> vectorToPrint) { switch (methodTag) { case INSERTION_SORT: printf("Insertion sort results:\n"); break; case MERGE...
true
cfd63d4d7d907ca6df49c982ce11bbe1a83f6cd0
C++
ZhiqWu/pat-1
/1152 Google Recruitment.cpp
UTF-8
515
2.875
3
[]
no_license
#include <iostream> #include <cmath> #include <string> using namespace std; int N,L; string s; bool prime(int n) { if(n == 1) return false; else if(n == 2) return true; else { int e = sqrt(n); for(int i = 2; i <= e; i ++) if(n % i == 0) return false; return true; } } int main() { cin...
true
25377a4ea55ed073e5d5cae627679f8152a2822b
C++
muniatnoshin453/CompilerDesign
/problem_14.cpp
UTF-8
2,304
2.875
3
[]
no_license
#include"stdio.h" #include"conio.h" #include"string.h" int i=1,j=0,no=0,tmpch=90; char str[100],left[15],right[15]; void findopr(); void explore(); void fleft(int); void fright(int); struct exp { int pos; char op; } k[15]; int main() { printf("\t\tQuadruple CODE GENERATION\n\n"); printf("Enter the Expr...
true
0f23abb32a69a98dd029e3649d0005f8dc44818a
C++
BullHacks3/Competitive_Programming
/Hackerrank/Algorithms/2.Implementation/17_Picking_Numbers.cpp
UTF-8
578
2.921875
3
[]
no_license
#include<bits/stdc++.h> using namespace std; void picking_numbers(int k[],int s) { sort(k,k+s); int count=0; int max=0; for(int i=0;i<s;i++) { count=0; for(int j=i+1;j<s;j++) { if(abs(k[i]-k[j])==1 || abs(k[i]-k[j])==0) count++; else { break; ...
true
c055b12bd5a541201eae39e4fd4aeb6abe4288b1
C++
MESH-Model/MESH_Project_Baker_Creek
/Model/Ostrich/Interpolator.cpp
UTF-8
4,837
2.75
3
[]
no_license
/****************************************************************************** File : Interpolator.h Author : L. Shawn Matott and James Craig Copyright : 2004, L. Shawn Matott and James Craig A class that uses radial basis function to interpolates the value at a given point, based on known values at a ...
true
1f6dc1e92a8e144d172ad24b7c95e0e7090b1bb7
C++
rohit16794/codes
/hash1.cpp
UTF-8
376
2.53125
3
[]
no_license
# include <bits/stdc++.h> using namespace std; int hash(int n) { return (n%10); } int main() { int t; cin>>t; int n; while(t--) { cin>>n; int a[n]; for(int i=0;i<n;i++) cin>>a[i]; int freq[10]={0}; long long count=0; for(int i=0;i<n;i++) { if(freq[a[i]%10]==0) freq[a[i]%10]=1; else ...
true
a9ef253f89010c5652950dd6fa0de9ad3897467e
C++
pyInvenio/cv
/lab06/coins.cpp
UTF-8
2,116
2.578125
3
[]
no_license
#include <opencv2/opencv.hpp> using namespace cv; using namespace std; int main(int argc, char** argv) { const char* filename = argc >= 2 ? argv[1] : "coinseasy.jpg"; Mat src = imread(samples::findFile(filename), IMREAD_COLOR); // Check if image is loaded fine if (src.empty()) { printf(" Error...
true
f0ed68060e82f3be485854248b968afd0243e39f
C++
Anushka-S10/Practice-Coding-Problems
/Cpp/Twist the Matrix/another_program.cpp
UTF-8
926
2.5625
3
[]
no_license
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int a[1005][1005],n,state; int get(int x,int y) { if(state==0) return a[x][y]; if(state==1) return a[y][n-x+1]; if(state==2) return a[n-x+1][n-y+1]; return a[n-y+1][x]; } int main() { ...
true
a9de6dbd8abc66b7623786732d53d0d4cb3c0275
C++
huynguy97/IP-Week11
/main.4930211009162994535.cpp
UTF-8
4,452
3.5
4
[]
no_license
#include <iostream> #include <cassert> #include <string> #include <cstring> using namespace std; // // // ...
true
0c2804c080294fb5207efbbe4489612f9a0784da
C++
areejhasan/Project
/project/project/Person.h
UTF-8
799
2.640625
3
[]
no_license
#include"Address.h" #pragma once class person:public address{ char* fullname; char* nic; int age; char* gender; char* bloodType; char* phoneNumber; public: ~person(); void setFullName(char*); char *getFullName()const; void setNIC(char*); char *getNIC()const; void setAge(int); int getAge()co...
true
5e4695938ccbf9495e226c6c4612111effb8279e
C++
ChristopherBric/PF2
/Objeto.h
UTF-8
1,127
2.78125
3
[]
no_license
// // Created by Santiago Madariaga on 2/07/2019. // #ifndef UNTITLED1_OBJETO_H #define UNTITLED1_OBJETO_H #include <string> #include <iostream> using namespace std; class Objeto { protected: string nombre; string calificacion; public: int y; int x; void mostrar(); Objeto(...
true
30aad3570365c152152fdb511ef9d08b6e80e545
C++
Huangyan0804/vjudge
/UVA-1586/UVA - 1586/UVA - 1586.cpp
UTF-8
714
2.875
3
[]
no_license
#include<iostream> #include<string> using namespace std; int main() { int t; cin >> t; while (t--){ string a; int num[100] = { 0 }; double ans; cin >> a; for (auto iter = a.begin(); iter != a.end(); iter++) { if (*iter == 'C'|| *iter == 'H'|| *iter == 'O'|| *iter == 'N') { auto tempiter = iter; ...
true
b8db803149cce50cf41859af8eac58bfee094240
C++
jjmerle/eecs381-p6
/Warship.cpp
UTF-8
3,451
3.109375
3
[]
no_license
#include "Warship.h" #include "Utility.h" #include <iostream> #include <memory> using std::cout; using std::endl; using std::string; using std::shared_ptr; using std::weak_ptr; // initialize, then output constructor message Warship::Warship(const string& name_, Point position_, double fuel_capacity_, double maximu...
true
4934c9fa6bb8bceac50992f9f2c319a2193a50d7
C++
suyashmahar/CSN-102
/search.cpp
UTF-8
840
3.703125
4
[ "BSD-2-Clause", "LicenseRef-scancode-chicken-dl-0.2" ]
permissive
#include<iostream> #include<string> using namespace std; int binarySearch(int* inputArr, int element, int low, int high); int main(){ int *sampleArray = new int[10]; for (int i = 0; i < 10; i++){ sampleArray[i] = i+1; } cout << binarySearch(sampleArray, 8, 0, 9); } int binarySearch(int* i...
true
da6fd5dadb1fb618375d4f2226551da74f522170
C++
PawelMasluch/Programming-tasks-and-my-solutons
/szkopul.edu.pl/Archiwum Zadań Konkursowych/OIJ - Olimpiada Informatyczna Juniorów/II OIG/Minimalna liczba (II OIG, etap II).cpp
UTF-8
660
2.671875
3
[]
no_license
#include<iostream> // 100 pkt #include<vector> #include<algorithm> typedef long long LL; typedef std::vector <LL> VLL; #define REP(i,a,b) for(LL i=a; i<=b; ++i) #define PB push_back int main(){ std::ios_base::sync_with_stdio(0); LL n, k; std::cin >> n >> k; VLL v; LL x; REP(i,1,n){ std::cin >> x; ...
true