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
fba123d9b8d8dc43527ac3997741fc5baeb720cd
C++
ndhuanhuan/16_coding_practice
/1201-1400/1381. Design a Stack With Increment Operation.cpp
UTF-8
642
3.34375
3
[]
no_license
// https://zxi.mytechroad.com/blog/stack/leetcode-1381-design-a-stack-with-increment-operation/ class CustomStack { public: CustomStack(int maxSize): max_size_(maxSize) {} void push(int x) { if(data_.size() == max_size_) return; data_.push_back(x); } int pop() { if(data...
true
c2a68d8e0c53f389d25dd06603387c4573cd6337
C++
ThoseBygones/ACM_Code
/HDU/HDU 2159.cpp
GB18030
1,071
2.515625
3
[]
no_license
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; int a[105],b[105]; int dp[105][105]; //iɱjֻԺܻõྭֵ int n,m,k,s; //άñ int main() { while(~scanf("%d%d%d%d",&n,&m,&k,&s)) { memset(dp,0,sizeof(dp)); for(int i=1; i<=k; i++) scanf("%d%d...
true
23ea356d8210057733e993783b9374ea6555126e
C++
camolezi/MinecraftCpp-OpenGL
/MinecraftC++/Sources/terrainRenderer.cpp
UTF-8
9,202
2.546875
3
[ "MIT" ]
permissive
#include <terrainRenderer.hpp> terrainRenderer::terrainRenderer(int size, glm::vec3 renderPosStart) : cubes(terrainRenderer::compareInMap) { this->size = size; loadSize = 900; renderPos = renderPosStart; generateSurfaceTerrain(); renderPosX = renderPos.x; renderPosY = renderPos.y; renderP...
true
d91a6cb8623e124f7d6d82befdeec61e4ce22753
C++
KimBoWoon/ACM-ICPC
/ACM-ICPC/10814.cpp
UTF-8
556
3.234375
3
[ "MIT" ]
permissive
#include <iostream> #include <algorithm> #include <string> using namespace std; typedef struct Account { string name; int age, order; } account; int n; account a[100001]; bool comp(const account &x, const account &y) { if (x.age == y.age) { return x.order < y.order; } return x.age < y.age; ...
true
b023efe98b93f509e84044bf6836a96532e9d6ae
C++
omanrichard/Final-Project-ECE-3220
/Final Project/main/thermalgraphics.cpp
UTF-8
633
2.984375
3
[]
no_license
#include "thermalGraphics.h" progressBar::progressBar(int x, int y, int length, int width){ //(x,y) cordinate upper left corner of object xMin = x; yMin = y; xSize = length; ySize = width; //background rectangle fill(50,127,17); rec(x,y,length,width); //empty bar fill(40,0,127); rec(x,y+width/4,length,...
true
d4645a4cccda9167cf16928d6a5a8f1f930234aa
C++
realbucksavage/esp-oled-sysmon
/esp/monitor/monitor.ino
UTF-8
2,230
2.765625
3
[]
no_license
#include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include <ArduinoJson.h> #include <ESP8266WiFi.h> #include <ESP8266HTTPClient.h> // Wifi SSID const char *ssid = "WifiSSID"; const char *pass = "Password"; WiFiClient client; HTTPClient http; DynamicJsonBuffer jsonBuffer(200); #define SCREEN...
true
61867b98db92d958305f611ba38f1b360a2b8edd
C++
timostrating/PokeWorld
/src/util/input/keyboard.cpp
UTF-8
1,022
2.59375
3
[]
no_license
// // Created by sneeuwpop on 23-6-19. // #include "keyboard.h" #include <iostream> #include <map> // REMEMBER: we import this from <GLFW/glfw3.h> // // #define GLFW_RELEASE 0 // #define GLFW_PRESS 1 // #define GLFW_REPEAT 2 namespace INPUT::KEYBOARD { std::map<...
true
46e0bafab2b93ca3e0252b42647fa45a64904848
C++
kevinche75/algorithms_and_datastructures_itmo_spring_2020
/Part_3/P3210_DBelyakov_1521.cpp
UTF-8
1,405
3.1875
3
[]
no_license
#include <iostream> using namespace std; const int t = (1 << 20) - 1; int a[2 * t + 2]; void delete_soldier(int y) { y += t; a[y] = 0; for (int i = y / 2; i > 0; i /= 2) { a[i] = a[2 * i] + a[2 * i + 1]; } } int get_position(int l, int r){ int res = 0; l += t; r += t; while (...
true
a3e80d8394db3568174183090af50630d5f5ecf1
C++
AryanP281/Sudoku-Solvers
/C++ Console/SudokuSolver.cpp
UTF-8
3,477
3.6875
4
[]
no_license
// SudokuSolver.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <vector> #include <cmath> #include <random> #include <time.h> std::vector<char> SolveSudoku(char row, char col, char n, std::vector<char> board); bool PossibleMove(char row,...
true
198bf268ac48ac0816d9efb679f69f1f3759afe1
C++
downkhg/GAMP18
/ProgramingBasic/C/7.Struct/7.Struct/7.struct.cpp
UHC
4,007
3.21875
3
[]
no_license
#include <stdio.h> #include <string.h> //÷̾ //Ӽ(ɼִ°:):ɷġ(ݷ,,ü),ġ,,̸ //ü : ü ϴ ҵ  Ǵ ϴ 赵 /// : ü ϰ Ͽ ϴ ִ. //ü ̹Ƿ üȿ ִ.( Statusü ) struct Player //ü 4Ʈ ޸𸮰 Ҵȴ. 4ǹ ƴϸ ޸𸮰 ɼ. { char strName[253];//256 //253 . int nAtk; //4 int nDef; //4 int nHP; //4 int nExp; //4 int nLv; //4 }; //ü ̹Ƿ ϾǷ ϱؼ ؾѴ. Player InitP...
true
675d81da57ccd437a1a4b7895b009730f3972d96
C++
NoamCohen1/ServersProject
/FileCacheManager.h
UTF-8
695
2.59375
3
[]
no_license
#ifndef SERVERSPROJECT_FILECACHEMANAGER_H #define SERVERSPROJECT_FILECACHEMANAGER_H #include "CacheManager.h" #include <iostream> #include <fstream> #include <vector> #define START_STRING 0 #define DELIMITER2 "$" class FileCacheManager : public CacheManager { public: FileCacheManager() { pthread_mutex_in...
true
1d5ce44a29576723ac3c06b9a10efd8bbe3b658a
C++
ikkz/FunctionParser
/src/DivideFunction.cpp
UTF-8
805
2.8125
3
[ "MIT" ]
permissive
#include <DivideFunction.h> #include <MinusFunction.h> #include <CosFunction.h> #include <SinFunction.h> #include <MultiplyFunction.h> namespace cl { DivideFunction::DivideFunction(BaseFunctionPtr lhs, BaseFunctionPtr rhs) : _lhs(lhs), _rhs(rhs), BaseFunction(T_DIVIDE_FUNCTION) { } std::string DivideFunction::str() ...
true
71112ef3789b067df4dbad2f06fea11bb8e7e5bd
C++
HeRaNO/OI-ICPC-Codes
/LibreOJ/LOJ6.cpp
UTF-8
406
2.625
3
[ "MIT" ]
permissive
#include "interaction.h" using namespace std; vector <int> ans; inline int Binary(int index) { int l = 0, r = 1000000, mid, res; while (l <= r) { mid = l + r >> 1; res = guess(index, mid); if (res > 0) r = mid - 1; else if (!res) return mid; else l = mid + 1; } return l; } int main() { int n = get_nu...
true
130ed2d9183db38374d071ccaf5f885eafb7e361
C++
dlakaplan/arduino
/matrix_sweep/matrix_sweep.ino
UTF-8
13,847
2.84375
3
[]
no_license
/* sweep across a RGB LED Matrix Can work with either 16x32 or 32x64 Matrices, but make sure to wire up correctly For 32x64 Matrix wiring is (for Arduino Mega): G1=25 R1=24 GND=GND B1=26 G2=28 R2=27 GND=GND B2=29 B=A1 A=A0 D=A3 C=A2 LAT=10 CLK=11 GND = GND OE=9 For 16x32 Mat...
true
90af3ae4efcdd012f1c32f7c1e9680eebaca75b4
C++
Verg84/COOP
/CH06/sample07.cpp
UTF-8
288
3.09375
3
[]
no_license
// greater #include<iostream> using namespace std; int main(){ int x,y; cout<<"Press two different numbers: "<<endl; if(!(cin>>x && cin>>y)){ cout<<"Invalid"<<endl; } else{ cout<<"The greater is "<<(x>y?x:y)<<endl; } return 0; }
true
d370794c04313e2572dac50e933a7d6e7bce77a6
C++
makenzielarsen/ITAK
/PortScanner.cpp
UTF-8
2,244
3.015625
3
[]
no_license
// // Created by Makenzie Larsen on 4/14/17. // #include "PortScanner.h" #include "Utils.h" PortScannerAnalyzer::PortScannerAnalyzer(const Configuration &configuration) : Analyzer(configuration) {} bool PortScannerAnalyzer::checkConfigurationValid() { string likelyAttack = configuration.getStringValue("Likely Att...
true
3b50f3d6dd5678b5043329f065f955810e017957
C++
PiscesDante/LintCode
/75. 寻找峰值.cpp
UTF-8
710
2.84375
3
[]
no_license
class Solution { public: /* * @param A: An integers array. * @return: return any of peek positions. */ int findPeak(vector<int>& A) { int head = 0; int tail = A.size() - 1; int len = A.size(); while (head <= tail) { int mid = head + (tail - head) / 2; ...
true
2f74c50629611b8ad179e2512b9051908df44f9a
C++
phu54321/eudasm
/eudasm/eudasm/type/typevoid.h
UTF-8
440
2.59375
3
[]
no_license
#pragma once #include "typebase.h" class CType_Void : public CType { public: CType_Void(); virtual ~CType_Void(); virtual CTypeType GetType() const { return CTypeType::TYPE_NONE; } virtual bool IsElementaryType() const; virtual size_t GetSize() const; virtual size_t GetElementNum() const; virtual bool GetElem...
true
acee8fc5ad39024647df1da0e5ac19bd6c2b3f56
C++
WhiZTiM/coliru
/Archive2/92/a153cabd2719e4/main.cpp
UTF-8
393
2.921875
3
[]
no_license
#include <stddef.h> #include <type_traits> template<typename T> class Bar { public: template<size_t N> struct foo{}; template<typename> struct is_foo : std::false_type{}; template<size_t N> struct is_foo<foo<N>> : std::true_type{}; template<typename = typename std::enable_if<is_foo<foo<0>>::va...
true
a629df601dd0fc936d390cf5c306b69c7b99c6f1
C++
RBDLAB/Drones-Mission-Control
/Utilities.h
UTF-8
1,852
2.8125
3
[]
no_license
#pragma once #include <math.h> #include <map> struct Name { int rb; int markerIndex; }; struct Marker { int id; double x; double y; double z; Name oldName; Name newName; }; struct MarkerPos { int id; double time; long frame; double x; double y; double z; }; struct DataContainer { int n; MarkerPos* mark...
true
d3d4b00f57dc50f243d9ccd8cc03b859092ce2c3
C++
kailasgangan/Data-Structure
/searching sorting/BubbleSort.cpp
UTF-8
608
2.75
3
[]
no_license
#include<iostream> #include<bits/stdc++.h> using namespace std; int a[10]={150,2430,30,420,506,605,70,80,990,1020}; void BubbleSort(int a[],int Size){ int i,j,t; for(i=0;i<Size-1;i++){ for(j=0;j<Size-1;j++){ if(a[j]>a[j+1]){ t=a[j]; a[j]=a[j+1]; a[j+1]=t; ...
true
131ff60625245c6af4b124d650ad09fe360a66e3
C++
leanprover-community/lean
/src/library/documentation.cpp
UTF-8
6,671
2.515625
3
[ "Apache-2.0" ]
permissive
/* Copyright (c) 2016 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Author: Leonardo de Moura */ #include <string> #include <algorithm> #include <functional> #include <cctype> #include <utility> #include <vector> #include "util/sstream.h" #include "libr...
true
2578fdce86e2dab7f7af5d72b1c26ebfb27f4057
C++
Kasymkhankhubiyev/Sea-Battle-Game
/main.cpp
UTF-8
5,069
2.890625
3
[]
no_license
#include "Game.h" #include "Graphics.h" #include "player.h" int main() { Game game; //класс, который закручивает всю игруху Field field; //класс, рисующий поле //field.Draw_field_line(); Player player1; //бот Player player2;//тоже бот size_t mode, tact; menu_print();//выводим главное меню size_t n; std::cin ...
true
f29f6c2b531f9ae9e60b9023a0747de092073be4
C++
shayyn20/CSE306
/assignment 2/main.cpp
UTF-8
5,177
2.640625
3
[]
no_license
#include "include.h" int main(int argc, char** argv) { if ((argc > 1) && (!strcmp(argv[1], "sh"))) { Polygon p = Polygon({ Vector(0.05, 0.15), Vector(0.2, 0.05), Vector(0.35, 0.15), Vector(0.35, 0.3), Vector(0.25, 0.3), Vector(0.2, 0.25), Vector(0.15, 0.35), Vector(0.1, ...
true
684b3724cfd32654295476b0372a33ee6060c571
C++
pawelkulig1/StarCraft-III
/StarCraft III/Players/SI.hpp
UTF-8
847
2.5625
3
[]
no_license
// // SI.hpp // StarCraft III // // Created by Paweł Kulig on 25.10.2017. // Copyright © 2017 Paweł Kulig. All rights reserved. // #ifndef SI_hpp #define SI_hpp #include <stdio.h> #include "Player.hpp" #include "unit.h" #include "game.h" #include <stdlib.h> //rand() srand() #include <time.h> //time() class SI: p...
true
fb229e5794d549bb587755ea21ed2f79d1012086
C++
HarryWei/grafalgo
/java/cpp/graphAlgorithms/misc/cgraph.cpp
UTF-8
1,400
3.390625
3
[]
no_license
// usage: cgraph type // // Copy a graph of specified type from stdin to stdout. // Why you ask? To test input and output operators, of course. // We also do an assignment in between input and output, // in order to test the assignment operator. // // The allowed values of type are graph, wgraph, // digraph, wdigraph, ...
true
4cb3f765ef46f58c3e353dc7ebccc08db1b871d1
C++
Ahren09/CS31
/Discussion/CS 31 Dis W7.cpp
UTF-8
1,339
3.328125
3
[]
no_license
#include <cstring> #include <iostream> #include <cmath> using namespace std; //4 void reverse(char* arr){ //if(! *arr) return; OPTIONAL char* start=arr; char* end=arr; while(*(++end)); end--; /* OR: while(*(end++)); end-=2; //notice here the pointer goes back by 2 */ while(st...
true
d8fe7163ab2976279b87193311b339e96678a181
C++
ArrowganceStudios/Space-Navies-Arena
/src/Game.cpp
UTF-8
3,475
2.75
3
[ "MIT" ]
permissive
#include "Game.h" #include <iostream> #define internal static const double Game::MS_PER_UPDATE = (1.0 / FPS) * 1000; internal inline bool IsReadyToRender(ALLEGRO_EVENT_QUEUE *eventQueue, ALLEGRO_EVENT event) { return al_is_event_queue_empty(eventQueue) && event.type == ALLEGRO_EVENT_TIMER; } internal inline bool ...
true
3123da639536d82e42104ac8411709b11a20eb23
C++
ThiagoAugustoSM/CInProjects
/2017-2/algoritmos/lista5/test.cpp
UTF-8
274
2.59375
3
[]
no_license
#include <iostream> #include <vector> using namespace std; int main(){ vector <int> distancias(10); vector <bool> shortPath(10); // distancias.insert(0); distancias[1] = 3; shortPath[1] = false; cout << distancias[1]; return 0; }
true
2a6d0e155ec5e275ac535b52e57c6fb082262728
C++
klauchek/2-sem
/subcontainers_templated/vector_templated/vector_templated/vector_templated.cpp
UTF-8
2,043
3.46875
3
[]
no_license
 #include "vector_templated.h" template <typename T> subvector<T>::subvector() { mas = nullptr; capacity = 0; top = 0; } template <typename T> subvector<T>::~subvector() { delete[] mas; mas = nullptr; } template <typename T> void subvector<T>::clear() { top = 0; } template <typename T> void...
true
0f87e2891e298c7b080e8f73bbb567b903ab1e3a
C++
iandioch/solutions
/uva/13146/solution.cc
UTF-8
869
3.15625
3
[]
no_license
#define min(a, b) ((a) < (b) ? (a) (b)) #include <iostream> using namespace std; int levenshtein(string a, string b) { int d[105][105]; int m = a.length(); int n = b.length(); for (int i = 1; i <= m; ++i) { d[i][0] = i; } for (int j = 1; j <= n; ++j) { d[0][j] = j; } fo...
true
dc592112d5482ce9f7b83c97b6bc9f49d4e31803
C++
danasf/simplepixel
/simplecolor.ino
UTF-8
5,877
3.125
3
[]
no_license
/** * Simple WS2812B / Neopixel Driver * Dana Sniezko & Alex Segura * Coded at Hacker School (http://www.hackerschool.com), Summer 2014 * * General resources: * http://www.avr-asm-tutorial.net/avr_en/beginner/ * http://www.avrbeginners.net/ * http://www.arduino.cc/ * https://learn.adafruit.com/adafruit-neopixel...
true
9cfb4f0ff1f8f46295ba17936e1f5fbca80eab21
C++
hamedsabri/RayTracingTheNextWeek
/src/raytrace/diffuseLight.h
UTF-8
1,174
2.84375
3
[ "MIT" ]
permissive
#pragma once /// \file raytrace/diffuseLight.h /// /// A diffuse emissive material. #include <raytrace/hitRecord.h> #include <raytrace/material.h> #include <raytrace/randomUnitVector.h> #include <raytrace/texture.h> RAYTRACE_NS_OPEN /// \class DiffuseLight /// /// An emissive class DiffuseLight : public Material { ...
true
2ac019c58a26959f75b98ef6102281a07e213bd7
C++
alooftr/OxyPremiumSRC
/CSGOSimple/valve_sdk/misc/BoneAccessor.h
UTF-8
368
2.6875
3
[]
no_license
#pragma once class matrix3x4_t; class CBoneAccessor { public: inline matrix3x4_t* GetBoneArrayForWrite() { return m_pBones; } inline void SetBoneArrayForWrite(matrix3x4_t* bone_array) { m_pBones = bone_array; } alignas(16) matrix3x4_t* m_pBones; int m_ReadableBones; // Which bones can be read. int m_...
true
2b544204ffd6cc1cc62adde412b25821478e21d3
C++
liyuefeilong/leetcode
/Longest Valid Parentheses/Longest Valid Parentheses/LongestValidParentheses.h
UTF-8
549
3.328125
3
[]
no_license
#include <iostream> #include <string> #include <stack> using namespace std; class Solution { public: int longestValidParentheses(string s) { int maxLength = 0, start = 0; int Size = s.size(); stack<int> temp; for (int i = 0; i < Size; ++i) { if (s[i] == '(') { temp.push(s[i]); } else { ...
true
9952a6a13db7b1c9c9362e29e48a44e230076805
C++
ewilbur/ucr-work
/CS14/Lab 2/Martian/Smart.cpp
UTF-8
3,419
3.71875
4
[]
no_license
/* ****************************************************************************** Evan Wilbur CS14 UCR Winter 2016 January 2016 Assignment 2 Lab Section 21 ****************************************************************************** */ #include "Smart.h" Smart::Smart(unsigned val) : Martian(val...
true
d38c5a20765ca0b02181c460ccfbc72c34e5d2a2
C++
DanNixon/stfc-eew-2018
/code_samples/mcu/single_button/src/main.ino
UTF-8
638
2.78125
3
[]
no_license
#include <Streaming.h> const int button_pin = 15; volatile unsigned long last_change_time = 0; volatile bool button_pushed = false; unsigned int times_pressed = 0; void handle_interrupt() { const auto now = millis(); if (now - last_change_time > 500) { button_pushed = true; last_change_time = now; } ...
true
81cfc999198f095827465979f49ebaf3320b365f
C++
JosvanGoor/ScientificVisualisation
/src/window/mousemoved.cc
UTF-8
2,017
2.71875
3
[]
no_license
#include "window.ih" #include <iostream> void Window::mouse_moved(double xpos, double ypos) { d_mouse_zx = xpos; d_mouse_zy = ypos; if (!d_mouse_dragging) return; // If we render in 3d we need to unproject the mouse and // translate the coordinates to screen space. if (d_drawmode ==...
true
573093588953579c2af234f14e94b2a8f63840f2
C++
chukgu/Algorithm
/Baekjoon/Algorithm_study/2156_포도주 시식.cpp
UTF-8
1,003
2.5625
3
[]
no_license
#include <iostream> #include <string> #include <algorithm> #define max(a,b) (((a)>(b))?(a):(b)) using namespace std; int dp[10001][3]; int p[10001]; int main() { int T; scanf("%i", &T); for (int i = 1; i <= T; i++) { scanf("%i", &p[i]); } dp[1][0] = 0, dp[1][1] = p[1]; for (int i = 2; i <= T; i++) { dp[i][0...
true
f0ec42b3f7250340aa64452bb11dbb42fd6ea820
C++
datakun/SourceCodeReading
/2015/OpenCL/Resources/Samples_UTF8_unix/Chapter5/Bitmap/MyError.h
UTF-8
505
2.78125
3
[]
no_license
// List5.4 /* * MyError.h (rev1.1, 28.Nov.2010) * Copyright 2010 Takashi Okuozno All rights reserved. */ #ifndef __MY_ERROR_H__ #define __MY_ERROR_H__ #include <string> class MyError { public: MyError(const std::string & msg, const std::string & function = "") {mMsg = msg + " " + function;} ...
true
c86c376295f50c7e1a067b662b554ff38b28be1b
C++
kevpeng/mips-simulation
/Simulate2.cpp
UTF-8
34,208
2.5625
3
[]
no_license
//g++ -Wall main.cpp Simulate.cpp InstructionMemory.cpp InstructionParser.cpp ConfigFileParser.cpp DataMemory.cpp ShiftLeft.cpp SignExtend.cpp ALU.cpp MUX.cpp ALUControl.cpp Control.cpp RegParser.cpp MemParser.cpp RegisterFile.cpp PC.cpp -o main /* * * * Author: Tianchang Yang * Date: 11/30/17 */ #in...
true
30fb0eebf9ebc3e22d85731258556beb900e27d8
C++
lythesia/leet
/cc/game-of-life/game-of-life.cc
UTF-8
1,589
2.75
3
[]
no_license
#include <bits/stdc++.h> using namespace std; #define inject(x) { cerr << "Function: " << __FUNCTION__ << ", Line: " << __LINE__ << ", " << #x << ": " << (x) << endl; } typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<string> vs; typedef vector<vs> vvs; const int dir[][2] = { {-1, -1}, {-1, 0}, {...
true
754597fd330c0457c19eda28a887a41776a2afff
C++
shreyaganesh/Leetcode-Practice
/190_reverse_bits.cpp
UTF-8
628
3.4375
3
[]
no_license
#include "iostream" class Solution { public: uint32_t reverseBits(uint32_t n) { int count=32; uint32_t reversed=0; for(int i =1; i<=32; i++) { reversed=(reversed<<1)|(n&0x01); n>>=1; } return reversed; } }; int main() { Solution revBits; uint32...
true
3b643323437a2564d4b052ebad70af6da3e2bafc
C++
shubhgkr/Codechef
/Tournaments/CYNO2019/KW6.cpp
UTF-8
485
2.734375
3
[]
no_license
/* * @author Shubham Kumar Gupta (shubhgkr) * github: http://www.github.com/shubhgkr * Created on 18/11/19. * Problem link: https://www.codechef.com/CYNO2019/problems/KW6 */ #include <iostream> int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); int n; std::cin >> n; int cO = 0, cE = ...
true
d4ede122d0efb805459effd28c9c97b641a784fa
C++
yaroslavpalamar/samples
/interview_tasks/math/countFactors.cpp
UTF-8
1,068
3.859375
4
[]
no_license
#include <iostream> #include <vector> #include <algorithm> using namespace std; /* * 1. count all integer factors of a positive integer number N, including 1 and the number itself. * 2. For example for 12 there are 6 such factors: 1, 2, 3, 4, 6, 12. * 3. In this task N will be in the range [1, 10^12]. * 4. Functio...
true
6b8821b7e972663eb4f83a56e7b4c6e65b4fac7e
C++
taynaralopes/projetoSolar
/projeto.cpp
UTF-8
2,098
2.9375
3
[]
no_license
#include "projeto.h" Projeto::Projeto() { } Consumidor Projeto::operator[](int indice) { return projetoSolar[indice]; } int Projeto::size() { return projetoSolar.size(); } void Projeto::inserirCliente(const Consumidor c) { projetoSolar.push_back(c); } int Projeto::QuantidadeDeProjetos() { return p...
true
b45bf03f4a4505639bed0110dceb8797e292e8fd
C++
LiuJiLan/LeetCodeStudy
/LC_0026. 删除排序数组中的重复项/#1.cpp
UTF-8
719
3.265625
3
[]
no_license
//2020.09.13_#1 class Solution { public: int removeDuplicates(vector<int>& nums) { int count = 0; //本质上for (int i = 0; i < nums.size(); i++)是对for _ in nums的改写 for (int i = 0; i < nums.size(); i++) { //count == 0 是防止||后的条件越界 //nums[i] > nums[count-1]就是当发现有新的元...
true
a794ee7b1c9fb5a075cad89dcee5836e1c7b8dbb
C++
lingqing97/c-primer_plus_programing
/10.10/10.10.7/10.10.7/list.h
UTF-8
348
2.921875
3
[]
no_license
#pragma once #ifndef LIST #define LIST #include <iostream> struct Node { int data; Node* next; }; class list { private: static const int LIMIT = 25; Node* first; int total; public: list() { first = NULL; } void insert(int data); bool del(int data); bool isEmpty() const; bool isFull() const; void reverse(...
true
070e7d4fec9b0d364a068ee5897a42053e6aceee
C++
zerodeusx/programing_Gladkov
/lab31/src/lib.h
UTF-8
3,208
3.046875
3
[]
no_license
#pragma once #include <iostream> #include <cstring> #include <vector> #include <list> using namespace std; struct boss{ char first_name[50]; char second_name[50]; char email[50]; }; class Agency{ protected: char agency_name[50]; char servicing_city[50]; int agency_age; struct boss agency...
true
3cb3a1603645f1e332dcec6388c030845c873ef8
C++
wrawdanik/ApiPack2
/source/datastore/Topics.h
UTF-8
1,646
2.5625
3
[]
no_license
// // Created by warmi on 5/5/16. // #ifndef APIPACK2_TOPICS_H #define APIPACK2_TOPICS_H #include <cstddef> #include <ostream> #include <folly/Format.h> using namespace folly; namespace ApiPack2 { enum class Topic : size_t { Metamorphosis_Station , Metamorphosis_Linuep, Metamorphosis...
true
f592ea6cb448b8284fbb877f157ee23c80f0f7ed
C++
xzhangpeijin/LHSLabs
/Term1Labs/Lab16.cpp
UTF-8
1,945
3.640625
4
[]
no_license
// ****************************** // * Lab 16 Peijin Zhang * // * Extra Additives * // ****************************** #include <iostream> #include <vector> #include <iomanip> #include <cmath> using namespace std; int asciitoint (char ch); void calculate(vector<char> &int1, vector<char> &int2, vector<int> la...
true
fd418e96bcf0c58ab88f0567df7c12eca67a33b6
C++
Paul-Hi/Mango
/mango/src/rendering/renderer_pipeline_cache.hpp
UTF-8
9,358
2.796875
3
[ "Apache-2.0" ]
permissive
//! \file renderer_pipeline_cache.hpp //! \author Paul Himmler //! \version 1.0 //! \date 2022 //! \copyright Apache License 2.0 #ifndef MANGO_RENDERER_PIPELINE_CACHE_HPP #define MANGO_RENDERER_PIPELINE_CACHE_HPP #include <core/context_impl.hpp> namespace mango { //! \brief Cache for \a gfx_pipeli...
true
5de1d7773f0b02d6e308b7e58ba61bf25d2586c9
C++
ZieIony/Ghurund
/engine/Engine.Core/src/core/math/Size.h
UTF-8
1,342
2.96875
3
[ "MIT" ]
permissive
#pragma once #include <stdint.h> #include <compare> #include <regex> namespace Ghurund::Core { struct IntSize { uint32_t width, height; auto operator<=>(const IntSize& other) const = default; static IntSize parse(const AString& text) { std::regex regex(" *(d+) *, *(d+) *"); ...
true
c6b153cf32cdf182f421e8f89445f0e66c981008
C++
begozcan/CS201-Homeworks
/Homework-3/Movie.h
UTF-8
1,037
2.90625
3
[]
no_license
// // Begum Ozcan - Homework 3 // 21302654 // CS201 - 3 // #ifndef HOMEWORK3_MOVIE_H #define HOMEWORK3_MOVIE_H #include <string> #include <iostream> #include "Actor.h" using namespace std; class Movie { public: Movie(string movieTitle, string directorName, int releaseDay, int releaseMonth, int releaseYear); ...
true
1334e1055043c4f445388fdf0265ba85183bb6f2
C++
komadog/cpp
/ABC062_B.cpp
UTF-8
505
2.578125
3
[]
no_license
#include <bits/stdc++.h> using namespace std; int main() { int h,w; char board_a[100][100],board_b[102][102]; cin >> h >> w; for(int i=0; i<h; i++){ cin >> board_a[i]; } for (int i=0; i<h+2; i++){ for (int j=0; j<w+2; j++){ board_b[i][j] = '#'; } } for (int i=0; i<h; i++){ for (in...
true
4262c7731ef3f3fb08473301269963c549ad76ae
C++
feedblackg44/kpilabs2
/CHM/Lab3/Lab3/main.cpp
UTF-8
665
3.078125
3
[]
no_license
#include <iostream> #include "functions.h" using namespace std; int main() { int size = 5; int* numbersX = new int[size]; fillInSeq(numbersX, size); double** A = createMatrix(size); matrix5Init(A); cout << "Matrix after 1 gauss step:\n"; print(A, size); double* B = createVec(size); ...
true
ca18ccaab7df96487696cb57a2616f0d9d2ca383
C++
skyformat99/data_collector
/lib/ClientSocket.h
UTF-8
1,125
2.765625
3
[]
no_license
#pragma once #include <BaseSocket.h> #include <string> class ServerSocket; class SocketCallback; class SocketManager; class ClientSocket: public BaseSocket { public: ClientSocket(); ClientSocket(int clientType, int socketFD, SocketManager* socketMan, SocketCallback* callback, char* remoteServerIP, int remot...
true
c57044cf8024706903323556f4526a7ce3ce186f
C++
dompham21/DoAn-ThiTracNghiem-C
/DocGhi.h
UTF-8
9,301
2.59375
3
[]
no_license
#pragma once #include <iostream> #include "Lop.h" #include "MonHoc.h" #include "CauHoiThi.h" #include "DiemThi.h" #include "SinhVien.h" int getIDTuFile() { int n; int x; int soLuong; //so luong phan tu da su dung ifstream fileIn; fileIn.open("SourceRDNumber.txt", ios_base::in); if(fileIn.fail()) cout << "K...
true
ef3507745c1c01afb3011a52856d7e999daffea7
C++
Kannupriyasingh/CodeForces-Solutions
/Make_Sum_Divisible_By_P_LC_Imp.cpp
UTF-8
2,040
3.5625
4
[ "MIT" ]
permissive
/* Given an array of positive integers nums, remove the smallest subarray (possibly empty) such that the sum of the remaining elements is divisible by p. It is not allowed to remove the whole array. Return the length of the smallest subarray that you need to remove, or -1 if it's impossible. A subarray is defined as...
true
ac25c8c7b8a9d65809cacc4b498b4fce600e8891
C++
bobbyrx/CPP
/SHOP/SHOP/ProductShoes.cpp
UTF-8
948
3.015625
3
[]
no_license
#include <iostream> #include <cstring> #include "ProductShoes.h" #include <string> using namespace std; ProductShoes::ProductShoes() { Product:set_variant(shoes); } string ProductShoes::getBrand() const { return brand; } string ProductShoes::getColor() const { return color; } void ProductS...
true
3b8be98a8f7b1de07b0559ef1cb7c4dc8b0a313d
C++
ArshaShiri/Courses
/Build a Modern Computer from First Principles/nand2tetris/projects/10/JackCompiler/JackCompiler/Helper.cpp
UTF-8
2,577
3.046875
3
[]
no_license
#include <dirent.h> #include <stdexcept> #include "Helper.h" #if defined(WIN32) || defined(_WIN32) #define PATH_SEPARATOR "\\" #else #define PATH_SEPARATOR "/" #endif std::vector<std::string> getListOfJackFiles(const std::string &fileOrDirPath) { auto listOfJackFiles = std::vector<std::string>{}; const aut...
true
1b2e5a4d96c4ea60939722d8db5b497585a65f86
C++
s011075g/Project-LimeViolet
/Project-LimeViolet/scr/Render2/RenderContext.hpp
UTF-8
670
2.6875
3
[]
no_license
#pragma once #include "RenderDevice.h" #include "../Common/Color.h" #include "Shader.hpp" class RenderContext { public: inline RenderContext(RenderDevice& device); inline void Clear(bool shouldClearColor, bool shouldClearDepth, bool shouldClearStencil, const Color4& color, uint32_t stencil); inline void Clear(const...
true
ddc3b33b88d01b1caabc3cb98e90cf5c351d2679
C++
madhusudansinghrathore/competitive_programming
/icpc_2018/a.cpp
UTF-8
1,225
3.15625
3
[]
no_license
#include<iostream> using namespace std; bool compare( unsigned short int first[], unsigned short int second[] ){ unsigned short int gec=0, gc=0; for( unsigned short int k=0; k<3; ++k ){ if( first[k]>second[k] ){ ++gec; ++gc; }else if( first[k]>=second[k] ){ ++gec; } } if((gec==3) && (gc>0) ){ re...
true
68357feeef5e3739644995ac71ea0ec0e462cff9
C++
ToDevelopersTeam/DS-Algos
/codechef/practice/beginner/Three_Way_Communications.cpp
UTF-8
550
2.734375
3
[]
no_license
#include <iostream> #include<math.h> using namespace std; int main(int argc, char const *argv[]) { int t,r,count=0; double a[3][3],dist; cin>>t; while(t--) { cin>>r; count=0; for(int i=0;i<3;i++) cin>>a[i][0]>>a[i][1]; for(int i=0;i<3;i++) { if(i!=2) dist = sqrt(pow(abs(a[i][0]-a[i+1][0]),2)...
true
0ea441b58289cbe79ff9d0a63cceeb05709b575c
C++
el-bart/ACARM-ng
/src/logsplitter/LogSplitter/Parser.hpp
UTF-8
709
2.9375
3
[]
no_license
/* * Parser.hpp * */ #ifndef INCLUDE_LOGSPLITTER_PARSER_HPP_FILE #define INCLUDE_LOGSPLITTER_PARSER_HPP_FILE #include <string> #include <stdexcept> #include <boost/noncopyable.hpp> namespace LogSplitter { /** \brief parser looking for " [<digits>] " sequence. */ class Parser: private boost::noncopyable { public...
true
85e89c7b3ba19366c3e35c29a0588c1e40337de9
C++
bajajra30/Compiler-1
/Parser/test/test.cpp
UTF-8
241
2.765625
3
[]
no_license
#include <iostream> #include <fstream> using namespace std; int main(int argc, char** argv) { ifstream in; string line; in.open(argv[1]); while ( in.good() ) { getline(in, line); std::cerr << "At line ::" << line << "\n"; } }
true
f9a9526abd2cf476bf88e058bc19079196573ab9
C++
cihancanayyildiz/CSE241
/HW02/circle.h
UTF-8
583
3.0625
3
[]
no_license
#ifndef CIRCLE_H #define CIRCLE_H #include <iostream> #include <fstream> #include <cmath> #include <cstdlib> using namespace std; //Defining circle class class Circle{ public: Circle(); Circle(double radius); Circle(double radius,double cx,double cy); void setCx(double); void setCy(double); void setRadius(d...
true
c4149b5f3705cb6c555d6150c0e64bab2176d3db
C++
zw0610/SHMHT
/test_hash_table.cxx
UTF-8
1,485
2.828125
3
[ "Apache-2.0" ]
permissive
#include <iostream> #include "resource.h" int main(int argc, const char * argv[]) { RNM rnm{}; rnm.insert_rnode(std::make_tuple<int32_t, uint64_t>(312, 9475628405), RNode(312, 9475628405, 2)); rnm.insert_rnode(std::make_tuple<int32_t, uint64_t>(36452, 2646593046), RNode(36452, 2646593046, 7)); // later re...
true
395255fd94069afa2a41c198747af09f0699f5e0
C++
cchristou3/Firebrick
/Firebrick/CArmour.cpp
UTF-8
1,959
2.96875
3
[ "MIT" ]
permissive
#include "CArmour.h" #include "CMinion.h" CArmour::CArmour(string mName, int mDefenceValue):CEquipment(mName, mDefenceValue) {} void CArmour::Activate(CPlayer* pEnemyPlayer, CPlayer* pCurrentPlayer) { cout << "Armour activated" << endl; bool anyFriendlyMinions = CheckForFriendlyMinions(pCurrentPlayer); if (anyFri...
true
874c64726f7d543707f7d774f48ff996c5c03495
C++
arthurkhadraoui/TP-2
/viewMenu.h
UTF-8
405
2.59375
3
[]
no_license
#ifndef VIEWMENU_H #define VIEWMENU_H #include "observer.h" #include "view.h" #include "controller.h" class ViewMenu: public View{ public: //Constructeur de ka ckasse viewMenu ViewMenu(Controller& _controller); //Mets à jour le MVC virtual void notify(); //Affiche le menu principal virtual void display...
true
ee88e5a2b5648c4af5087f6d8d21b3b316c80f62
C++
elifesciences-publications/TeamHJ-tissue
/src/vertex.cc
UTF-8
4,692
3
3
[ "MIT" ]
permissive
// // Filename : vertex.cc // Description : A class describing a vertex // Author(s) : Henrik Jonsson (henrik@thep.lu.se) // Created : April 2006 // Revision : $Id$ // #include <cmath> #include <cstdlib> #include <vector> #include "myMath.h" #include "vertex.h" #include "wall.h" Vertex::Vertex() { }...
true
6c0bff164d153d121dcbde3b44aa796232b68559
C++
tangyingzhong/ToolKit_Windows
/ToolKit/Tool/Socket/SocketClient.cpp
UTF-8
3,155
2.609375
3
[]
no_license
#include "SocketClient.h" #pragma comment(lib, "wsock32.lib") using namespace System::Network; // Construct the SocketClient SocketClient::SocketClient(IPAddress strIPAddress, NetPort iPortNo) :m_ServerSocket(NULL), m_ServerIP(strIPAddress), m_ServerPort(iPortNo), m_Disposed(false) { Initialize(); } // Detructe...
true
258dccd79d6a15619892ebf12132d76e196872e0
C++
frazierk27/coe-f2018-fortran
/vectors.cpp
UTF-8
1,044
3.421875
3
[]
no_license
#include <iostream> #include <vector> using std::vector; using std::cout; using std::endl; vector<float> makeVector( int size, float value){ vector<float> x(size,value); return x; } int printVector(vector<float> Vector1){ for (auto i: Vector1){ cout << i << endl; } } int resetVectorToZero(vector<float> &myVec...
true
d4cf81e08bc580dee259e67bedf17c482d4178c1
C++
ccarr419/Academic-Projects
/sideprojects/derivatives/derivative1.cpp
UTF-8
2,826
4.03125
4
[]
no_license
/* Author: Christian Carreras ** File: derivatve1.cpp ** Purpose: To find the derivative of polynomials */ #include <iostream> using namespace std; /* Function: menu() ** Returns: void ** Parameters: none ** Purpose: displays the menu for the user */ void menu(); /* Function: select() ** Returns: int ** Parameters: ...
true
7fab32fc0b281c6a68b5cfd28cb674ddfa45bad7
C++
alvinalvord/CPL
/uva/103/10327/a.cpp
UTF-8
1,033
3.328125
3
[]
no_license
#include <stdio.h> #include <stdlib.h> void merge (int *left, int *right, int n, int m); void mergesort (int *arr, int n); long long swaps; void merge (int *left, int *right, int n, int m) { if (n > 1) mergesort (left, n); if (m > 1) mergesort (right, m); int i = 0, j = 0, size = n + m, *arr = (int *) malloc (s...
true
1fbc6c139011bac36f702a0df2ab923d7b1bb000
C++
yunqing/playground
/Singleton/singleton.h
UTF-8
479
2.671875
3
[ "MIT" ]
permissive
#ifndef __SINGLETON__ #define __SINGLETON__ // thread unsafe version class SimpleSingleton { public: static SimpleSingleton * get_singleton(); static void release_singleton(); int get_data(); void set_data(int); int get_data_static(); void set_data_static(int); SimpleSingleton * get_handle()...
true
779001139eaa3c667c5a770cb13f2121254311d6
C++
Badrivishal/CodeForcesPractice
/Cpp/Required_Remainder.cpp
UTF-8
478
2.640625
3
[]
no_license
#include <iostream> #include <string> #include <vector> #include<algorithm> #include <bits/stdc++.h> #include <iomanip> using namespace std; int main() { int t; cin >> t; while (t--) { long long int x, y, n, d; cin >> x >> y >> n; d = n / x; if ((d * x) + y <= n) ...
true
613fd9af46a491e76febb13f88e0da6063ba1806
C++
Ricky-Ting/coding-in-NJU
/C++/2018_practice/OJ2-13/my.cpp
UTF-8
1,150
2.765625
3
[]
no_license
#include<iostream> #include<ctime> #include<algorithm> #include<cmath> #include<cstdio> int tmp[10]; int snowflake[100001][7]; int x,y; int n; void input(void) { scanf("%d",&n); for(int i=0;i<n;i++) for(int j=0;j<6;j++) scanf("%d",&snowflake[i][j]); } bool cmp(int a, int b) { for(int i=0;i<6;i++) { if( (...
true
e39197ee1bd247458401df2e80a65bf37dcbc877
C++
GoToChess/OOP-C-
/goto() is all powerful/chess/chess.cpp
UTF-8
1,966
2.8125
3
[]
no_license
#include "user.h" /* Header Files Layout Piece.h -> Board.h -> rules.h -> situations.h -> computer.h -> user.h ctdlib, iostream and using namespace std have all been added to the pieces class*/ /** * @author Jack McErlean <mcerlean-j@ulster.ac.uk> * B00713696 * Main Terminal * * objects from all o...
true
8b43a4a116815e0ab7b7e0610302e4f53996aee5
C++
vishalpatil0/CPP-programs
/Initilize all element of array with same value.cpp
UTF-8
526
3.484375
3
[]
no_license
#include<iostream> #include<algorithm> using namespace std; int main() { int arr1[10]={}; // all elements are zeros. int arr2[10]={0}; // all elements are zeros. int arr3[]={}; // elements upto 26 are 0 rest are garabage value. size of this array is depend on system architecture. int arr4[100]; //...
true
45ed53077535cc64793b13af5aaf4661fc02ab94
C++
Leumash/ProjectEuler
/78/78.cc
UTF-8
2,074
3.6875
4
[]
no_license
/* Let p(n) represent the number of different ways in which n coins can be separated into piles. For example, five coins can be separated into piles in exactly seven different ways, so p(5)=7. OOOOO OOOO O OOO OO OOO O O OO OO O OO O O O O ...
true
a023aad1c1952d4e19f61fab592b26bacdb1bd8c
C++
turingcompl33t/coroutines
/applications/binary-search/vanilla.hpp
UTF-8
760
2.765625
3
[ "MIT" ]
permissive
// vanilla.hpp // Vanilla binary search. // // Adapated from original code by Gor Nishanov. // https://github.com/GorNishanov/await/tree/master/2018_CppCon #ifndef VANILLA_BS_HPP #define VANILLA_BS_HPP template <typename Iter> bool vanilla_binary_search(Iter first, Iter last, int val) { auto len = last - first; ...
true
fdee210bc8414a9452305f71df60537647e94592
C++
hallgeirl/master-project
/pathfinding/main.cpp
UTF-8
22,491
2.53125
3
[]
no_license
#include <FreeImage.h> #include <string> #include <fstream> #include <iostream> #include <cmath> #include <map> #include <algorithm> #include <vector> #include <assert.h> #include <limits> #include <unordered_map> #include <sstream> #include <getopt.h> #include <sys/time.h> #include "util.h" #include "vec2.h" #includ...
true
7441b3d079913cc47e6bee9511fd2f36229458a5
C++
seonyeong0215/Take-care-of-our-house
/blueinno/Temp_ble/Temp_ble.ino
UTF-8
633
2.765625
3
[]
no_license
#include <RFduinoBLE.h> const int TempPin = 2; boolean isConnect; void setup() { pinMode(TempPin, INPUT); RFduinoBLE.deviceName = "smartband"; Serial.begin(9600); Serial.println("Start Test"); RFduinoBLE.begin(); } void loop() { RFduino_ULPDelay(SECONDS(1)); if (isConnect) { int val = anal...
true
180f264304e66ec5353995c11e2413f0511f8df0
C++
Tsuguri/EngineQ
/EngineQ/Source/EngineQCommon/Resources/Resource.hpp
UTF-8
4,678
2.921875
3
[]
no_license
#ifndef ENGINEQ_RESOURCES_RESOURCE_HPP #define ENGINEQ_RESOURCES_RESOURCE_HPP // Standard includes #include <memory> #include <stdexcept> namespace EngineQ { namespace Resources { class ResourceDestroyedException : public std::runtime_error { public: using std::runtime_error::runtime_error; }; class...
true
e02a44c910f9f1fa90bd3b9d2396c6d7566a6952
C++
DariaTestOrganization/C-_Projects
/MyProject/MyCar.cpp
UTF-8
2,774
3.125
3
[]
no_license
#include "MyCar.h" MyCar::MyCar() { this->texture.loadFromFile("Texture/mycar.png"); this->sprite.setTexture(this->texture); movementSpeed = 5.f; this->hpMax = 100; this->hp = this->hpMax; this->coins = 0; this->fuelMax = 5000; this->fuel = this->fuelMax; } MyCar::~MyCar() { } MyCar::MyCar(const MyCar& ca...
true
b24c1c3f2bdc51faf63226b3d20b3b8e5979a75c
C++
TALI-OSU/Video-Code
/C++Basics/IntroToVariables.cpp
UTF-8
622
3.53125
4
[]
no_license
/****************************************** * Program: C++ Basics (2) - Intro to Variables * Author: TALI OSU * Description: How to declare variables in a C++ program. * Video Link: * **************************************/ #include <iostream> using namespace std; int main() { int myIntVar; myIntVar = ...
true
53faf937306a7f926665eb14d8c5e6f91a06da99
C++
aipotsyd/circular_buffer
/circular_buffer/src/cb_test.cpp
UTF-8
7,142
3.421875
3
[ "MIT" ]
permissive
#define CATCH_CONFIG_MAIN #include "catch.hpp" #include <limits> #include "circular_buffer.h" struct leak_checker { leak_checker(int value) : m_value{ value } { ++count; } static std::size_t count; leak_checker() { ++count; } ~leak_checker() { --count; } leak_checker(const leak_checker& lc) : m_value{ lc.m_...
true
6931a544d0b7cdcd5663b67e3a637a8fc7540989
C++
nikluep/genetic-evo
/GeneticEvolution/Optimizer.h
UTF-8
1,081
3.015625
3
[ "MIT" ]
permissive
#pragma once #include <vector> #include <chrono> #include "DroneController.h" class Optimizer { public: /** Create an optimizer for a set of controller. \param controllers DroneController to optimize \param generationTarget Number of generations to train for */ explicit Optimizer(std::vector<DroneControlle...
true
1653428d3a134ab5cade5ae604548c838e49a8f9
C++
colorbox/AtCoderLog
/abc/040/d.cpp
UTF-8
1,836
2.734375
3
[]
no_license
#include<bits/stdc++.h> #define rep(i,n) for(int i = 0; i < (n); i++) #define ll long long using namespace std; bool compare_by_second(pair<int, int> a, pair<int, int> b) { return a.second < b.second; } bool compare_by_second2(pair<pair<int, int>, int> a, pair<pair<int, int>, int> b) { return a.second < b.secon...
true
5fd6c394064e680279d2dab8d12b0d1776287c6e
C++
sayantikag98/Current_Data_Structures_and_Algorithms
/DSA_codes_in_cpp/Interview_Prep/Course_01_Basic_concepts_of_programming/Lec1_concepts_of_arrays_and_other_datatypes/mountain_view.cpp
UTF-8
1,164
3.15625
3
[]
no_license
#include<bits/stdc++.h> using namespace std; void func_alt(int* arr, int n){ int i = 0; while(i<n-1 and arr[i]<arr[i+1]){ i++; } if(i==0 or i ==n){ cout<<"False\n"; return; } while(i<n-1 and arr[i]>arr[i+1]){ i++; } if(i==n-1){ cout<<"True\n"; } else{ cout<<"False\n"; } } void func(int* arr...
true
254d6c8f443caec77d2ab833ae5636268aa7cec0
C++
youmych/bomberman
/src/SpeedPowerUp.h
UTF-8
296
2.78125
3
[ "MIT" ]
permissive
#pragma once #include "PowerUp.h" /*! * Powerup that increases bombermans speed. */ class SpeedPowerUp : public PowerUp { public: /*! * Creates the powerup at the specified coordinates. */ SpeedPowerUp(int initialX, int initialY); protected: void applyEffects(Game* game) override; };
true
dc23bda70e777a3852307003a70c2c567f62db1d
C++
yull2310/book-code
/www.cplusplus.com-20180131/reference/locale/locale/combine/combine.cpp
UTF-8
392
3.40625
3
[]
no_license
// locale::combine example #include <iostream> // std::cout #include <locale> // std::locale, std::num_put int main () { std::locale loc(""); // initialized to environment's locale // combine loc with the "C" locale for num_put loc = loc.combine< std::num_put<char> > (std::locale::classic()); ...
true
de8748a072d46da2182b2525126c180ff8294f82
C++
20191844319/G41
/c5/5章16题/5 16.cpp
UTF-8
386
2.53125
3
[]
no_license
// 5 16.cpp : Defines the entry point for the console application. // #include "stdafx.h" int main(int argc, char* argv[]) {int i,m,n; for(i=1;i<=4;i++) { for(m=1;m<=4-i;m++) {printf(" "); } for(n=1;n<=2*i-1;n++) { printf("*"); } printf("\n"); } for(i=1;i<=3;i++) { for(n=1;n<=i;n++) { printf(" "); } for(m=...
true
4cb8d8bfd0c9d5a6dc53bf7df9b157235d2b137e
C++
Mattishh/AlienInvaders
/Main.cpp
UTF-8
7,290
2.625
3
[]
no_license
#include <SFML/Window.hpp> #include <SFML/Graphics.hpp> #include <iostream> #include <string> #include "Player.h" #include "Entity.h" #include "Enemy.h" #include "Bullet.h" #include "UI.h" #include <vector> using namespace std; int main() { //Variables int windowX = 640; int windowY = 960; float bulletTimer = 0; ...
true
b029b58731f7b76af75c10a921aa059a0cf9c35a
C++
vincentrolypoly/Malice
/Front-End-Compiler/Nodes/numberASTNode.cpp
UTF-8
604
2.8125
3
[]
no_license
#include "numberASTNode.hpp" #include "intTypeNode.hpp" #include "../checkInterface.hpp" #include <iostream> numberASTNode::numberASTNode(int val) { value = val; type = new intTypeNode(); } void numberASTNode::accept(CheckInterface *c, SymbolTable *currentST) { c->check(this,currentST); } void nu...
true
1a72fdd4487e05bdc166d33a5df9b7e86df0caae
C++
yhnnd/wego-c-tutorial
/resources/code/day-17-2.cpp
UTF-8
216
2.53125
3
[]
no_license
#include <stdio.h> int main() { int a, b; for (a = 1; a < 26; ++a) { for (b = 1; b < 26; ++b) { if (a * b % 26 == 1) { printf("%2d ??? %2d,\t%2d ????????\n", a, b, a); break; } } } return 0; }
true
0f3e9a93b40b5f75dd5621ec5de7edde2484496b
C++
dream0630/piscine_cpp_d07
/ex06/Toy.h
UTF-8
1,083
2.75
3
[]
no_license
#ifndef TOY_HPP #define TOY_HPP #include <string> #include <iostream> #include "Picture.h" class Toy { public: enum ToyType { BASIC_TOY, ALIEN, BUZZ, WOODY }; class Error { public: enum ErrorType { UNKNOWN, PICTURE, SPEAK }; ErrorType type; Error(); void setType(ErrorType type); std::...
true
6b3cb5354982f6d6a82e82c401a6e87e2885a017
C++
superTangcc/toc-collaborate
/Pochoir/RMQ/wordSA/sa_for_ints_larsson.cpp
UTF-8
4,192
2.9375
3
[]
no_license
#include "sa_for_ints_larsson.hpp" /* Implementiert die SA-Konstruktion von Larsson/Sadakane. * Alphabet must be in the range from 1 to k with no holes. * String 'text' *must* be 0-terminated! * text: text for which suffix array is to be constructed * length: length of text (including 0-termination) * k: ...
true
ec769f0aa112f140cb81472b90a8b6edb0a9dbb0
C++
WULEI7/WULEI7
/ACM俱乐部/大一下学期训练/第10周周赛/C 数字最大个数.cpp
UTF-8
303
2.59375
3
[]
no_license
#include <iostream> #include <algorithm> using namespace std; int main() { int n,a[100]; cin>>n; for(int i=0;i<n;i++) cin>>a[i]; sort(a,a+n); int ans=1,temp=1; for(int i=1;i<n;i++) { if(a[i]==a[i-1]) temp++; else temp=1; if(temp>ans) ans=temp; } cout<<ans<<endl; return 0; }
true