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
5412a4d25348fc5f0336a32593632c96f9b83f28
C++
zhangzhenyu13/TankWar
/MapData.cpp
WINDOWS-1252
11,717
2.796875
3
[]
no_license
#include"MapData.h" #include"CommonFunc.h" using namespace std; void MapData::generateMap(std::vector<Brick>& data) { Brick brick; brick.health = 100000; brick.style = 1; int x, y; RECT rt; //up x = 0; y = -20; rt.left=x;rt.top=y;rt.right=x+1200;rt.bottom=y+20; brick.rect = rt; data.push_back(brick); //le...
true
4cac3f84f4389648856d880982f658538795b743
C++
rara1818/games
/Cpp/Video/src/Scenery.cpp
UTF-8
3,637
2.546875
3
[]
no_license
/* * Scenery.cpp * * Created on: 29/07/2013 * Author: vitor */ #include "Scenery.h" #include <unistd.h> #include "enemies.h" #include "objects.h" #include "viewpoints.h" /* Testing purpose only! */ #include "utils.h" #include <time.h> #include "scen0.h" /************************************************...
true
0d045bba1af6c751b527f74b0db77f16ecf7c019
C++
nunik2255/program-konversi-waktu
/program konversi waktu.cpp
UTF-8
646
2.96875
3
[]
no_license
#include <iostream> using namespace std; int main () { int hari,jam,menit,detik; cout<<"PROGRAM KONVERSI WAKTU"<<endl; cout<<"Konversi hari ke detik"<<endl; cout<<"Masukan jumlah hari = " ; cin>>hari; hari=hari*86400; cout<<"hasillnya = "<<hari<<"detik"<<endl; cout<<"konversi ...
true
b1a964518193cc5b32aae2c35159e5a568495a30
C++
yehudis-k/DNA-Analyzer-project
/Controller/Command/new.cpp
UTF-8
1,787
3.0625
3
[]
no_license
// // Created by student on 10/08/2020. // #include "new.h" size_t New::s_counter = 1; std::string New::getDocumentation() const{ return "Creates a new DNA sequence.\n" "New accepts sequence and adds it to the system.\n" "A name for the new sequence can be given by the user after the sequen...
true
d2e887f98db3605aa086f48191b84f9ea83102fa
C++
chengyeh/EECS268
/workspace/Lab5/Lee-2482962-Lab-05/main.cpp
UTF-8
3,927
3.359375
3
[]
no_license
/* * File Name: main.cpp * Author: Cheng Yeh Lee * KUID: 2482962 * Email: chengyeh@ku.edu * Assignment: EECS-268 Lab5 * Description: This is the main class. It is where we give the user a set of options to interact with AnimalPen. * Created on: Oct 17, 2015 * */ #include <iostream> #include "FarmAnimal.h" #in...
true
40f4d6c75c671864e3240cf8cf4449acba854843
C++
so-soon/coding_test_boj
/17471_gerrymandering1.cpp
UTF-8
2,642
2.59375
3
[]
no_license
// // main.cpp // cplusplus // // Created by soonhyuk on 2020/01/22. // Copyright © 2020 soonhyuk. All rights reserved. // #include <iostream> #include <stdio.h> #include <stdlib.h> #include <set> #include <queue> #include <map> #include <vector> using namespace std; int N; int popularity[11]; map<int,vector<in...
true
cda8f924e88e036f3ce2821c6c21b3b1cc67183e
C++
Antonija5654/oop_vjezbe
/Vjezba3/Zadatak3/zadatak3.cpp
UTF-8
844
3.046875
3
[]
no_license
#include <iostream> #include <string> #include <vector> using namespace std; vector<char> popravi(string str, vector<char> novi) { int i; for (i = 0; i < str.size(); i++) { cout << "OMEGALUL" << endl; if (str[i]==' ') { cout << "test1" << endl; if (str[i + 1] == ',' || str[i + 1] == '.') { novi.p...
true
5d0a971e335f4b4c275729f1515276c00f4619dc
C++
13465220927/ven
/ven/include/ven/util/func.h
UTF-8
8,743
2.796875
3
[]
no_license
#pragma once #if defined(WINDOWS) #else # include <cstdarg> # include <cstring> # include <unistd.h> # include <sys/stat.h> # include <iconv.h> # include <termios.h> # include <unistd.h> #endif // thread namespace ven { static uint64_t tid() { std::stringstream ss; ss << std::this_thread::get_id(); ...
true
224e3db671b926177bec34864d5f12b1001d33b6
C++
iam-abbas/cs-algorithms
/Searching and Sorting/Binary Search/C++/Binary Search.cpp
UTF-8
910
3.953125
4
[ "MIT" ]
permissive
// Coding Binary Search Algorithm through Functions Topic Approach #include<iostream> using namespace std ; //Function that implements the binary search algorithm int BinarySearch(int arr[] ,int n , int val ) { int start=0 ; int end=n-1 ; int mid ; while(start<=end) { mid=(start+end)/2 ; if(val==arr[m...
true
f2ab3363c1daf74e294f01c0d4b866407a305f20
C++
rwalker-com/Arduino
/libraries/misc/md10c/md10c.ino
UTF-8
435
2.890625
3
[]
no_license
#include "md10c.h" static MD10C motor(4,/* aka D4, direction */ 3 /* aka D3, pwm */); static void setup(void) { Serial.begin(115200); } static void loop(void) { static int speed = 0; static int increment = 1; motor.run(speed += increment); if (speed >= 255 || speed <= -255) { ...
true
435f5ee1d40c9efd3625ff0058b3a9efbfe6983d
C++
T1g/Ray-Tracer
/RGBColor.cpp
UTF-8
1,344
3.625
4
[]
no_license
#include "RGBColor.h" RGBColor::RGBColor(){ } RGBColor::RGBColor (float RR, float GG, float BB) { r = RR; g = GG; b = BB; } RGBColor::RGBColor(const RGBColor& old){ r = old.r; g = old.g; b = old.b; } RGBColor::~RGBColor(){ } RGBColor& RGBColor::operator= (const RGBColor& old){ //delete anything i...
true
c9bede99b865935a57a2cbb4fccd6a2c06f98800
C++
JingxueLiao/Data_Structures_and_Algorithms
/problems/longest_common_prefix.cpp
UTF-8
602
3.765625
4
[ "MIT" ]
permissive
// Write a function to find the longest common prefix string amongst an array of strings. #include <string> #include <vector> using namespace std; string LongestCommonPrefix(const vector<string> &strs) { if (strs.empty()) return string(); string prefix; int i = 0; while (true) { int j...
true
8f715e1fcd018a4152d6596512725dbe113f65b7
C++
shawwn/bootstrap
/Documentation/Code/Engine/Common/MRay.h
WINDOWS-1252
2,820
2.71875
3
[ "MIT" ]
permissive
//---------------------------------------------------------- //! File: MRay.h //! Author: Kevin Bray //! Created: 07-17-06 // //! Purpose: To contain a ray. // //! Copyright 2004 Bootstrap Studios. All rights reserved. //---------------------------------------------------------- #pragma once //! project includes...
true
0214cee574963c6e08169c27f8edce99da132c91
C++
justin111175/GE2
/課題1/Project1/CardServer.h
SHIFT_JIS
525
2.6875
3
[]
no_license
#pragma once #include <utility> #define LpCardServer CardServer::GetInstance() using PairInt = std::pair<int, int>; class CardServer { public: // ÓIVOh static CardServer& GetInstance() { static CardServer s_Instance; return s_Instance; } bool Payment(int price); // J[hx PairInt& GetCardState(void); ...
true
91a74291aad16cb0a8dd5d590a0272ee123b5b11
C++
kusejoan/FlightSimulator
/src/Models/PlaneParts/Wing.cpp
UTF-8
1,153
2.71875
3
[]
no_license
// // Created by igor on 22.05.19. // #include <Models/AtmosphereModel.h> #include <Basic/Physics.h> #include "Wing.h" #include <math.h> std::pair<ForceV, MomentOfForce> Wing::getForces(const PlaneState &state) const { VelocityV airspeed = getRlativeAirspeed(state); Velocity parallelAirspeed = Velocity(airspe...
true
d5241f4b7d8fa63d797ac03cd5de1a6b85db5b93
C++
YannGarcia/repo
/dev/g++/ifsttar/wifiMapping/aggreg/src/datum.cpp
UTF-8
6,668
2.53125
3
[ "MIT" ]
permissive
#include <iostream> #include <iomanip> #include <sstream> // Used for std::ostringstream #include <stdexcept> // Used for std::invalid_argument #include "ipcCommon.h" #include "datum.h" namespace beagleboneStorage { datum::datum(const std::vector<unsigned char> & p_data) : _archive(), _xfer(0.0), _bw(0.0), _atem...
true
69f424e115487f986751cd8a5253e8ddbf705977
C++
suhyunx/xcode-files
/20131122/main.cpp
UTF-8
687
3
3
[]
no_license
// // main.cpp // 20131122 // // Created by JM Park on 13. 11. 22.. // Copyright (c) 2013년 JM Park. All rights reserved. // #include <iostream> using namespace std; int main(int argc, const char * argv[]) { const int number=4; int en[number]; int sum=0; int avg=0; int *pen; pen=en; ...
true
f3013776645a988e5ce02d4b22811a8d4f50a8f8
C++
Igronemyk/OI
/HDU/3001.cpp
UTF-8
1,782
2.625
3
[]
no_license
#include <cstdio> #include <iostream> #include <cstring> using namespace std; const int INF = 0x3f3f3f3f; int myPow(int a,int b){ int result = 1,base = a; while(b){ if(b & 1) result*=base; base*=base; b >>= 1; } return result; } int graph[10][10],visit[59049][10],dp[10][59049...
true
0bc173eb4fff22907271646e7dfba89f28fc6b44
C++
alxsoares/Topcoder-4
/srm_550_2/250.cpp
UTF-8
719
3.625
4
[]
no_license
#include <iostream> #include <string> using namespace std; class EasyConversionMachine { public: string isItPossible(string originalWord, string finalWord, int k); }; string EasyConversionMachine::isItPossible(string originalWord, string finalWord, int k) { int size = originalWord.size(), c = 0; for (int i = 0...
true
99d2ee02c0fd7a34ede32e517c95a337947c367b
C++
KevinRobichon/Makemupo
/Makemupo/Singleton.h
UTF-8
369
3.03125
3
[]
no_license
#pragma once namespace MKPatterns { template<typename T> class Singleton { public: static T* getInstance() { if (m_instance == NULL) m_instance = new T(); } static void destroy() { if (m_instance != NULL) delete m_instance; m_instance = NULL; } protected: static T* m_instance; pr...
true
3cf20287d64919b3b7757bfa7a994214d7a5cb85
C++
JerryTheUser/Leetcode
/Valid_Sudoku.cpp
UTF-8
2,650
3.125
3
[]
no_license
#include <iostream> #include <vector> #include <unordered_set> using namespace std; class Solution { public: bool isValidSudoku(vector<vector<char>>& board) { unsigned char rows[9][9] = {0}, cols[9][9] = {0}, boxes[9][9] = {0}, val = 0; bool ret = true; for(int i=0 ; i<9 ; ++i){ ...
true
5388be17c207644a5e41774561d2e7f66fa22e6b
C++
josokw/Fuzzy
/libFuzzyEngine/Defuzzification.h
UTF-8
2,049
3
3
[ "MIT" ]
permissive
#ifndef DEFUZZIFICATION #define DEFUZZIFICATION #include "OutputFuzzySet.h" #include <cmath> #include <iostream> #include <vector> namespace { constexpr double EPSILON = 1e-4; inline bool equals(double d1, double d2) { return std::fabs(d1 - d2) < EPSILON; } const OutputFuzzySet *findHighestMbsSet(const std::ve...
true
0d88c4253bffd7a6190645ca2a14817a28115017
C++
clairew17/LeetCode
/322.CoinChange.cc
UTF-8
1,318
3.140625
3
[]
no_license
//322.CoinChange.cc #include"../CC/header.h" void helper(vector<int>& coins, int begin, int amount, int count, int &min_num){ if(begin>=coins.size()){ return; } if(coins[begin]>amount)return; int maxnum = amount/coins[begin]; for(int i=0;i<=maxnum;i++){ int newcount = count + i; int new_amount = amou...
true
00d1d6614575064a5ddf02fb4e326e6fd8de18d2
C++
ckhawks/utd-cs-assignments
/cs2336/ParkingLot/Bus.h
UTF-8
544
2.765625
3
[]
no_license
/* * Bus.h * * Author: Carter Hawks from CS2336.001 * To run: the main() is located in ParkingLot.cpp * Different sections of the code are commented out; * these sections accomplish the different variations of the parking lot. */ // Bus: simple class that represents a Bus object. Sole purpose is to ...
true
2445b91747a2e94b6aff537d18fce0559cc6967f
C++
Mohamed-Hossam/Problem-Solving
/codeforces/513-A/513-A-9748482.cpp
UTF-8
590
2.59375
3
[]
no_license
#include<iostream> #include<string> #include<cmath> #include<algorithm> #include <functional> #include <sstream> #include<stack> #include<queue> #include <bitset> #include<iomanip> #include<vector> #include<map> #include<set> using namespace std; int main() { int n1, n2, k1, k2; cin >> n1 >> n2 >> k1 >> k2; ...
true
ae6e541fc62b3605a9e955e536b72cfb6c956242
C++
chromium/chromium
/chrome/browser/performance_manager/policies/working_set_trimmer_policy_unittest.cc
UTF-8
2,671
2.53125
3
[ "BSD-3-Clause" ]
permissive
// Copyright 2019 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/performance_manager/policies/working_set_trimmer_policy.h" #include <memory> #include "components/performance_manager/graph/process_node_impl.h" #inc...
true
2277305547ad9217f556de5353cbf65ac5e6877d
C++
setzer22/miri_CA_crowdsym
/PlaneRenderer.h
UTF-8
1,501
2.703125
3
[]
no_license
#pragma once #include "Geometry.h" #include "Texture.h" #include <SDL2/SDL_opengl.h> namespace plane_renderer { int plane_tex_id; void init() { plane_tex_id = texture::load_texture("./plane_texture.tga"); } void render_plane(const Plane &p, float box_size) { glEnable(GL_DEPTH_TEST); glShadeModel(GL_SMOOTH);...
true
5cb8158649687f9218e21ae3c51647022f60d761
C++
chrystallagh/HavadjiaChrystalla_CSC17a_42824
/Homework/Assignment 4/Assignmnet4.sngl_Funtion/RetailItem.h
UTF-8
905
2.78125
3
[]
no_license
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: RetailItem.h * Author: chrystallahavadjia * * Created on April 28, 2016, 5:41 PM */ #ifndef RETAILITEM_H #define R...
true
08c8eacd0c9b3bd4a2ce76ab9375d06145306270
C++
Vasiliska89/myList
/l.cpp
WINDOWS-1251
3,466
3.328125
3
[]
no_license
#include "l.h" void menu() { std::cout << "\n"; std::cout << "1 - " << "\n"; std::cout << "2 - " << "\n"; std::cout << "3 - " << "\n"; std::cout << "4 - " << "\n"; std::cout << "5 - " << "\n"; std::cout << "6 - " << "\n"; std::cout << "7 - " << "\n"; std::c...
true
41c759ccb0f0ad69be6bd29e392087d26c75fddb
C++
237K/ProblemSolving
/SAMSUNG_SWEA#2382_ver2.cpp
UHC
3,121
2.625
3
[]
no_license
// // OS Windows // 2019.05.09 // // [Algorithm Problem Solving] // // SAMSUNG SW Expert Academy <#2382> () ̻ ݸ // #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <memory.h> #include <vector> using namespace std; typedef pair<int, int> coor; const static int SIZE = 100; const static int MAX_MICROORGA = 100...
true
a74e6556423bff75a6f6dfc201e05aff21952c7b
C++
vaneet-hash/Competitive-Programming-codes-CPP
/COVIDLQ.cpp
UTF-8
515
2.625
3
[]
no_license
#include <iostream> #include <vector> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int t, n; cin>>t; while(t--) { cin>>n; vector<int> a(n); for(int i=0; i<n; i++) cin>>a[i]; bool flag=true; for(int i=0; i<n; i++) { if(!flag) break; if(a[i]==1) { ...
true
76384c9f38bfb1226b16e9c67ba85b04ef451709
C++
arturoverdin/AVLTree-BSTree-RotateTree
/rotateBST.h
UTF-8
4,303
3.609375
4
[]
no_license
#ifndef ROTATEBST_H #define ROTATEBST_H #include "bst.h" #include <set> template<typename Key, typename Value> class rotateBST : public BinarySearchTree<Key, Value> { public: rotateBST(); virtual ~rotateBST(); bool sameKeys(const rotateBST& t2) const; void transform(rotateBST& t2) const; protected: void leftRot...
true
138dc878e98959c298188b7d878e321b46a2d621
C++
foolisb/PAT-A-level
/C语言代码/pat1002.cpp
UTF-8
905
3.28125
3
[]
no_license
//注意系数相加等于0的情况,要删除该项 //声明的变量类型与输入的格式化匹配,%d不能赋值给float变量 #include<stdio.h> struct Dot{ int ex; float co; bool f; }; int main( ) { int i = 0; struct Dot bn[1001]; int q,k1,k2,count = 0; float p; for(i = 0;i < 1001;i++) { bn[i].f = false; bn[i].co = 0; } scanf("%d...
true
d7245ac37ba6c4884d9b7905e711c24f992c37a7
C++
MICHAEL-MAURICE/problem_solving_training
/Majority Element/main.cpp
UTF-8
235
2.6875
3
[]
no_license
#include <bits//stdc++.h> using namespace std; int majorityElement(vector<int>& nums) { sort(nums.begin(),nums.end()); return nums[nums.size()/2]; } int main() { std::cout << "Hello, World!" << std::endl; return 0; }
true
05bafea2993616fb614eead216e832b8700c58c5
C++
WhereIsHeroFrom/Algorithm
/数学/图论/有向图判环/HDU 3592 ( World Exhibition ) .cpp
WINDOWS-1252
1,589
3.046875
3
[]
no_license
#include <iostream> #include <vector> #include <queue> using namespace std; #define MAXN 1010 struct edge { int to, val; edge() { } edge(int _t, int _v) { to = _t; val = _v; } }; int n; int dis[MAXN]; int visitCount[MAXN]; vector <edge> vec[MAXN]; // Ƿڻ bool spfa(int s) { int i; for (i = 1; i <= n; i++...
true
a162fd8a21f535e6e62e938fff74e4b7189dd92f
C++
TulioAbreu/uri-online-judge
/code/1007.cpp
UTF-8
233
2.828125
3
[]
no_license
#include<iostream> #include<iomanip> using namespace std; int main(){ int a[5]; cin >> a[1] >> a[2] >> a[3] >> a[4]; a[5] = a[1] * a[2] - a[3] * a[4]; cout << fixed << setprecision(1) << "DIFERENCA = "<< a[5] <<endl; return 0; }
true
5a59e5ec04971e3284077f47069be26e799e8208
C++
wewe799/100
/36.0.cpp
GB18030
884
3.59375
4
[]
no_license
//ڼĵһĸжһڼһĸһжϵڶĸ #include<stdio.h> int main(void) { char c,ch; printf("ڵĸ\n"); c=getchar(); switch(c) { case 'M':printf("һ\n");break; case 'T': { printf("ڶĸ\n"); getchar(); ch=getchar(); switch(ch) { case'u':printf("ڶ");break; case'h':printf("");break; default:printf(""); ...
true
9c8d992890d72ce78b8232db6a76695243d383ed
C++
RI45816/341_SP2018
/Projects/proj3/QTNode.h
UTF-8
1,953
3.046875
3
[]
no_license
#ifndef QTNODE_H #define QTNODE_H #include <vector> #include "Point.h" #include "BBox.h" #define QT_NUM_KIDS 4 enum {BL,BR,TL,TR}; // Enumerator with the values of the directions class QTNode { public: class iterator { public: iterator(); bool operator==(const QTNode::iterator &other); bool operator!=(con...
true
5c306a16281d69829360e61ad512336f503a9d31
C++
intelfx/data-processing
/differentiator/node-compare.cpp
UTF-8
2,914
2.75
3
[]
no_license
#include "node.h" namespace Node { bool Base::compare (const Base::Ptr& rhs) const { if (typeid (*this) == typeid (*rhs.get())) { return compare_same_type (rhs); } else { return false; } } bool Base::less (const Base::Ptr& rhs) const { if (typeid (*this) == typeid (*rhs.get())) { return less_same_type (rhs...
true
30afc2795939d31e0dcd795d7e922f826881e69b
C++
lxq2537664558/Leetcode-1
/11. Container With Most Water.cpp
UTF-8
768
3.140625
3
[]
no_license
// Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water. // Note: You m...
true
d6c1fc5f269e9a0e681a22f936d37d945798d4b5
C++
wxinjie/Fushilianxi
/数学问题/最大公约数.cpp
UTF-8
242
2.90625
3
[]
no_license
#include<iostream> #include<cstdio> using namespace std; int GCD(int a, int b){ if(b == 0){ return a; } else { GCD(b, a % b); } } int main(){ int a,b; while(scanf("%d%d",&a,&b) != EOF){ printf("%d\n",GCD(a,b)); } return 0; }
true
c893432f3eba76b90b0f765ed52c770ce73933b7
C++
haipz/LeetCode
/13. Roman to Integer | Easy | Math, String.cpp
UTF-8
1,786
3.65625
4
[ "MIT" ]
permissive
/* Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. */ // I(1)、V(5)、X(10)、L(50)、C(100)、D(500)、 M(1000) /* old version class Solution { public: int romanToInt(string s) { int nums[] = {1, 5, 10, 50, 100, 500, 1000}, res = 0; string chs("IVXL...
true
aa0eb5c87759d6c0920a840a2617e82b85dc43b7
C++
personaluser01/Algorithm-problems
/20130527/LAH08/contestant/Dung/badgras.cpp
UTF-8
1,767
2.53125
3
[]
no_license
#include <stdio.h> #include <queue> #include <vector> using namespace std; typedef pair<long,long> ii; long r, c, i, j, result; vector<vector<bool> > sign; vector<bool> b; void bfs(long u, long v){ long step, now, ofqueue, i, j, f, g; queue<ii> ryo; ryo.push(ii(u,v)); ofqueue= 1; for(;;){ ...
true
21493e0df0210b1a01dd9665ac57fcadfb330592
C++
JayGitH/839C-language-and-data-structure
/839数据结构/c语言/839代码(来自一位2018届考研学长)/HDSDC/AB升序数组合并我做的15.cpp
UTF-8
297
3.09375
3
[]
no_license
#include<stdio.h> void Merge(int *A,int n,int *B,int m){ int i,j,t; for(i=0;i<m;i++){ t=B[i]; for(j=n+i-1;j>=0&&t<A[j];j--) A[j+1]=A[j]; A[j+1]=t; } } int main(){ int a[20]={-1,6,28,38}; int b[20]={2,7,11}; Merge(a,4,b,3); for(int i=0;i<7;i++) printf("%5d",a[i]); return 0; }
true
f23aca2ab198ca140b91e997a3733d22c85d2fca
C++
alok27a/CSE2011-Data-Structures-Algorithm
/Lab/Module 4/Assignment 3/Practice/Q1BST.cpp
UTF-8
4,426
4.09375
4
[]
no_license
#include <stdio.h> #include <iostream> #include <string.h> using namespace std; struct node { int data; struct node *left_child; struct node *right_child; }; struct node *newNode(int n) { struct node *node = new struct node; node->data = n; node->left_child = NULL; node->right_child = NUL...
true
79c076acaea16a1611d0bb8fc60870fa7ccff47c
C++
TakuyaKimura/Leetcode
/093 Restore IP Addresses/93.cpp
ISO-8859-1
4,229
3.578125
4
[]
no_license
/* Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example: Given "25525511135", return ["255.255.11.135", "255.255.111.35"]. (Order does not matter) */ #include <string> #include <vector> using namespace std; class Solution { public: vector<strin...
true
77f6d999dd655fc6ea47144734f50529e9059a83
C++
zXif/lab2
/main — копия.cpp
UTF-8
3,039
3.828125
4
[]
no_license
#include <string> #include <iostream> using namespace std; class Triangle { protected: int first_side; int second_side; int third_side; public: Triangle() { first_side = 0; second_side = 0; third_side = 0; } Triangle(int first_side, int second_side) { this-...
true
77458cfa102a1911e93f51ad9e7cc3323cca2649
C++
MechEmpire/Mechempire-meches
/5551ef4d6d65633918cb0000/code/RobotAI.cpp
UTF-8
5,175
2.59375
3
[ "Apache-2.0" ]
permissive
#include "RobotAI.h" RobotAI::RobotAI() { } RobotAI::~RobotAI() { } //----------------------------------------------------- //1.必须完成的战斗核心 //----------------------------------------------------- void Aim (RobotAI_Order & order,const RobotAI_BattlefieldInformation& info, int myID) { double...
true
1b31cce13bb4fc816f56e38ae9928ffd80e0118f
C++
watashi/AlgoSolution
/zoj/14/1453.cpp
GB18030
2,294
2.984375
3
[]
no_license
#include <cmath> #include <cstdio> #include <algorithm> using namespace std; // Convex Hull const double eps = 1e-8; template<class T> struct Point { T x, y; Point() { } Point(int x, int y) : x(x), y(y) { } }; template<class T> bool operator <(const Point<T>& lhs, const Point<T>& rhs) { return (lhs....
true
10b613ca2a3fc1d51843ac89e3791634a5288112
C++
pedrolinhares/ANN
/src/Layer.cpp
UTF-8
2,118
2.96875
3
[]
no_license
#include <iostream> #include <sstream> #include "Layer.h" Layer::Layer(int numOfNeurones): hidden(true) { for (int i = 0; i < numOfNeurones; i++) neurones.push_back (Neurone()); } void Layer::setHidden(bool value) { hidden = value; } void Layer::setInput(const std::vector<double>& input) { int size = neuro...
true
6280690629a0e899980e4f28e5b7aa2af4d94567
C++
gcc-o-o/cpp_code
/content_1/CD/classic.cpp
UTF-8
815
3.171875
3
[]
no_license
//classic.cpp #include <iostream> #include <cstring> #include "classic.h" Classic::Classic(const char * sg, const char * pf, const char * lb, int sl, double pt) : Cd(pf, lb, sl, pt) { songs = new char [std::strlen(sg) + 1]; std::strcpy(songs, sg); } Classic::Classic(const Classic & c) : Cd(c) { songs = new char ...
true
86cada5841e482057365c08c998d339068156b96
C++
Vlajzi/KriptoAlgoritmi
/KriptoAlgoritmi/Knapsak.h
UTF-8
627
2.5625
3
[]
no_license
#pragma once #include <cstdint> #include <random> #include <ctime> class Knapsak { public: uint16_t PrivateKey[8]; unsigned int n; uint16_t im; public: uint16_t PublicKey[8]; Knapsak(); void SetKey(uint16_t PublicKey[8], uint16_t PrivateKey[8], uint32_t n, uint16_t im); void GenKey(); uint16_t...
true
553e529a0f0208a490240a4c40bc82c0e6636298
C++
keyclicker/labs
/Term4/OOOP/Lab1/include/Space.hpp
UTF-8
777
2.890625
3
[]
no_license
#pragma once #include "Particle.hpp" #include <vector> class Space { private: bool sideCollision = true; public: void setSideCollision(bool sideCollision); private: double entropy = 0; double speed = 1; double resistance = 1; std::vector<Particle> particles; void collisionDetection(); public: Space...
true
3e65ff62e6e2cad14db0f2c314cebc1481935d1e
C++
JiananYuan/OpenGL_simple_framework
/main.cpp
UTF-8
2,945
2.609375
3
[]
no_license
// dev #include "Angel.h" #include <string> // #pragma comment(lib, "glew32.lib") const int NUM_POINTS = 3; void init() { // 定义三角形的三个点 vec2 vertices[3] = { vec2(-0.75, -0.75), vec2(0.0, 0.75), vec2(0.75, -0.75) }; // 创建顶点数组对象 GLuint vao; #ifdef __APPLE__ // for MacOS glGenVertexArraysAPPLE(1, &vao); // 分配...
true
9bff4335b421aa4410b4d41c8d5497c328be654b
C++
bingmann/distributed-string-sorting
/src/util/measuringTool.hpp
UTF-8
9,797
2.671875
3
[ "BSD-2-Clause" ]
permissive
#pragma once #include "mpi/environment.hpp" #include "util/nonTimer.hpp" #include "util/timer.hpp" #include "util/leanNonTimer.hpp" #include <ostream> #include <vector> namespace dss_schimek { namespace measurement { struct PhaseValue { using PseudoKey = std::string; std::string phase; size_t value; Phase...
true
4ef77c804e32f86983b9515fff37c9aec1e26159
C++
cmusteata/workspace
/matrix/main.cpp
UTF-8
864
2.9375
3
[]
no_license
#include <cassert> #include <iostream> #include "matrix.h" const std::vector<std::vector<int>> before = { { 1, 2, 3, 4}, { 5, 6, 7, 8}, { 9,10,11,12}, {13,14,15,16} }; int main(int argc, char**) { assert(argc == 1); for (const auto& r : before) { std::cout << "before:"; fo...
true
589ed98fcb881ac672727c6d6d658d8c049159d4
C++
Und3rMySk1n/ood
/lab04_factory/Painter/Painter.cpp
UTF-8
1,065
2.546875
3
[]
no_license
// Painter.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "../libpainter/SVGCanvas.h" #include "../libpainter/Painter.h" #include "../libpainter/Designer.h" #include "../libpainter/ShapeFactory.h" #include "../libpainter/PictureDraft.h" #include <sstream> #include ...
true
66b1a515637d2be7ae6f041664ed97caa47c0096
C++
KashinYana/recognitionScans
/thresholding/thresholding.hpp
UTF-8
6,984
3.0625
3
[]
no_license
#ifndef THRESHOLDING_H_INCLUDED #define THRESHOLDING_H_INCLUDED #include <opencv2/opencv.hpp> #include <opencv2/highgui/highgui.hpp> #include <vector> #include <iostream> #include "../images/image.hpp" class Thresholding { private: cv::Mat matrix; const int middleValue; const int maxValue; const int m...
true
4cd081549de0ad56aa1606b74b14843299cf1f94
C++
lingnand/Helium
/src/srchilite/textstylebuilder.h
UTF-8
751
2.75
3
[]
no_license
/** * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005 * Copyright: See COPYING file that comes with this distribution */ #ifndef _TEXTSTYLEBUILDER_H_ #define _TEXTSTYLEBUILDER_H_ #include "textstyle.h" namespace srchilite { /** * Given TextStyle objects build a new one, * adding a starting par...
true
508e0086e71e3ad03a9390d0fa0c57e8172bcb7a
C++
bkyileo/algorithm-practice
/leetcode/Burst Balloons.cpp
WINDOWS-1252
622
3.09375
3
[]
no_license
#include<bits/stdc++.h> using namespace std; // ģ int maxCoins(vector<int>& nums) { nums.insert(nums.begin(),1); nums.push_back(1); int len=nums.size(); vector< vector<int> > dp(len,vector<int>(len,0)); for(int L=2;L<len;++L) { for(int left=0;left+L<len;++left) { int right=left+L; for(int k=left+1;k<...
true
73c7b2bfb2cd3bdc025c74dfc6166e8bb1b991e1
C++
colinw7/CQGnuPlot
/src/CGnuPlotBoxPlotStyleValue.h
UTF-8
1,622
2.578125
3
[ "MIT" ]
permissive
#ifndef CGnuPlotBoxPlotStyleValue_H #define CGnuPlotBoxPlotStyleValue_H #include <COptVal.h> #include <CGnuPlotTypes.h> #include <CGnuPlotStyleValue.h> class CGnuPlotBoxPlotStyleValue : public CGnuPlotStyleValue { public: typedef CGnuPlotTypes::BoxType BoxType; typedef CGnuPlotTypes::BoxLabels BoxLabels; pub...
true
63ca0c550e0a2fbb1266a77334bb880c0a7230b4
C++
JeffersonLab/qphix
/codegen/twisted_mass_enum.h
UTF-8
1,206
3.03125
3
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
#pragma once #include <map> #include <string> #include <vector> /** Versions of twisted mass. Previously, there was a simple `bool` value `twisted_mass` that would switch twisted mass on or off. Now with the non-degenerate case, there are three options that need to be represented. Having a second `bool` ...
true
cf83c7d830a5e93c36efc31c52695a6ab34b00a9
C++
Kawser-nerd/CLCDSA
/Source Codes/AtCoder/abc026/A/2196084.cpp
UTF-8
167
2.5625
3
[]
no_license
#include<iostream> #include <string> #include<vector> using namespace std; int main(){ int a; cin >> a; cout << (a/2)*(a/2) << endl; return 0; }
true
e3470be45c1a859d1fff1e5bc9e134c976ea21b0
C++
Ruturaj4/pin_examples
/flora.cpp
UTF-8
23,328
2.65625
3
[ "MIT" ]
permissive
#include <iostream> #include "pin.H" #include <fstream> #include <string> #include <list> #include <boost/algorithm/string.hpp> #include <unordered_map> #include <exception> // TODOs can be searched with ----> TODO: // #define RPB_DEBUG // comment out to disable rbp debugging // #define RBP_DETECTION // comment out t...
true
4e54fc40e2180afc6f10011c06bf7feb2bf3b433
C++
true-bear/cpp_server_study_projects_Pub
/ebook_GameServerProgramming/ServerCore/ServerLibrary/Util/GameObject.h
UHC
725
2.953125
3
[ "MIT" ]
permissive
#pragma once #include "stdafx.h" class Object { wstr_t allocFile_; int allocLine_; }; class NameObject { wstr_t name_; public: wstr_t& name() { return name_; } void setName(wstr_t name) { name_ = name; } }; class Work { public: virtual void tick() = 0; virtual void w...
true
4c0aa5dcd9a3fed8777d5029a319711a50d9bd4b
C++
jjdredd/math536
/hw1.cpp
UTF-8
1,613
3.09375
3
[]
no_license
#include <iostream> #include <fstream> #include "sbms.hpp" #include "util.hpp" // problem 2 void Problem_2() { std::cout << "Problem_2" << std::endl; unsigned N = 5; SBMS A(N, N); std::vector<double> R, b = {5, 3.55, 2.81428571428571, 2.34642857142857, 2.01746031746032}; for (unsigned i = 0; i < N; i++)...
true
1e253707a42775f3d08cbf9273d0724c9b58eeac
C++
KriAB/Oblig3Visualisering
/mousepicker.cpp
UTF-8
8,490
2.59375
3
[]
no_license
#include "mousepicker.h" #include <QMouseEvent> #include "renderwindow.h" #include "resourcefactory.h" #include "transformcomponent.h" #include "meshcomponent.h" #include "collisioncomponent.h" #include "systemmanager.h" #include "componentsystem.h" MousePicker::MousePicker(RenderWindow *renderWindow, Camera *cam, Sys...
true
87de34e2ecfa2d76799baa5039832740cbc9124b
C++
devanshdalal/leetcode-solutions
/MaximalSquare.cpp
UTF-8
916
2.578125
3
[]
no_license
class Solution { public: int maximalSquare(vector<vector<char>>& a) { int n=a.size(); if(n==0)return 0; int m=a[0].size(); // cerr << a[0][0] << endl; int x[n+1][m+1]; int y[n+1][m+1]; int d[n+1][m+1]; for(int i=...
true
6c4e43864210344c2faca45a582f8d70bd8123ae
C++
timcsy/SelfDrivingCar
/connection.cpp
UTF-8
904
2.859375
3
[]
no_license
#include <Arduino.h> #include "connection.h" int status = WL_IDLE_STATUS; void wifi_connect(char * ssid, char * pass) { // attempt to connect to Wifi network: while (status != WL_CONNECTED) { Serial.print("Attempting to connect to SSID: "); Serial.println(ssid); // Connect to WPA/WPA2 network. Change this lin...
true
70be2a4861e92f55fd969cbbd9287033efbe5902
C++
kevinclark/kata
/cpp/texting/include/Trie.hpp
UTF-8
3,134
3.625
4
[]
no_license
#ifndef TRIE_HPP #define TRIE_HPP #include <map> #include <set> #include <utility> #include <iterator> #include <boost/foreach.hpp> template <typename Key, typename Value> class TrieNode { public: typedef Key key_type; typedef Value value_type; type...
true
94fe0684f5366957bf02ade5f7ab34c3a97cac57
C++
Al3x76/cpp
/Pbinfo/KSort.cpp
UTF-8
497
2.796875
3
[ "MIT" ]
permissive
#include <iostream> using namespace std; void sortare(int a, int b, int v[], bool cresc){ for(int i=a; i<b; i++) for(int j=i+1; j<=b; j++) if(cresc){ if(v[i]>v[j]) swap(v[i], v[j]); } else if(v[i]<v[j]) swap(v[i], v[j]); } int main(){ int n, k, a[1...
true
a920e5d89975bcc4331a04971b9df4a19d50a02b
C++
billux/budgetwarrior
/include/console.hpp
UTF-8
8,285
2.984375
3
[ "MIT" ]
permissive
//======================================================================= // Copyright (c) 2013-2014 Baptiste Wicht. // Distributed under the terms of the MIT License. // (See accompanying file LICENSE or copy at // http://opensource.org/licenses/MIT) //=================================================================...
true
2a9674172678aee957a3c6c1b0c6b851ac21c57b
C++
Ayesha049/leetcode
/289-game-of-life/289-game-of-life.cpp
UTF-8
1,140
2.59375
3
[]
no_license
class Solution { public: void gameOfLife(vector<vector<int>>& board) { int n = board.size(); if(n==0) return; int m = board[0].size(); if(m==0) return; vector<bool>temp(m,0); vector<vector<bool> >v(n,temp); int dx[] = {0,0,1,-1,-1,-1,1,1}; int dy[] = {...
true
f8d88504af931ce6e30d39cbb12e200894867581
C++
wusiyan11/Flood-it
/Flood-it/floodit.cpp
UTF-8
1,292
3.078125
3
[]
no_license
#include "game.h" #include "textdisplay.h" #include "cell.h" #include <iostream> #include <string> #include <cstdlib> #include "PRNG.h" using namespace std; int seed; void change_option(char * first, char * second, int &moves, int &size, int &seed) { string option = string(first); int num = atoi(second); if (opt...
true
5bcf77791b9b0ab5b6dc2f63a9eace7e16c12dae
C++
diamante0018/tekno_uttv2
/ultimateteknotool.v2/CWinAPIFileW.cpp
UTF-8
1,730
2.796875
3
[]
no_license
#include "pch.h" #include "CWinAPIFileW.h" constexpr LARGE_INTEGER zero = { 0 }; CWinAPIFileW::CWinAPIFileW() { } CWinAPIFileW::~CWinAPIFileW() { if (this->m_hFile != INVALID_HANDLE_VALUE) { ::CloseHandle(this->m_hFile); } } bool CWinAPIFileW::OpenForWriting(wchar_t* name) { this->Close(); this->m_hFile ...
true
4eb5764063f0075ce003d74a632461467249524a
C++
Botrix/Minimax
/C4Board.cpp
UTF-8
6,628
2.765625
3
[]
no_license
#include <algorithm> #include "../MyEngine/MainEngine/ResourceManager.h" #include "../MyEngine/MainEngine/Random.h" #include "C4Board.h" C4Board::C4Board() { } C4Board::~C4Board() { } C4Board* C4Board::makeMove(int col) const { C4Board* newBoard = new C4Board(*this); for (int i = 5; i >= 0; i--) { ...
true
71d8f86ff8a4609fc9592b98dee108fe2a5582c7
C++
InochiTanaka/COMP_3512_Lab2
/Stack/Stack/Stacktester.cpp
UTF-8
2,091
3.640625
4
[]
no_license
#include "Stack.hpp" void stackTest() { cout << "Test 1: Store data { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }" << endl; int inputArray1[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; int numInput = sizeof(inputArray1) / sizeof(int); testing(inputArray1, numInput); cout << "Test 2: Store data { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1...
true
f5eb3c10959d7e8909b85d022f013e6314cd0c91
C++
philipwolfe/Samples
/WPF/Windows SDK WPF Samples/GraphicsMM_Shapes/ShapesProcedural/CPP/ShapesProcedural.cpp
UTF-8
10,373
3.140625
3
[]
no_license
//ShapesProcedural.cpp file using namespace System; using namespace System::Windows; using namespace System::Windows::Controls; using namespace System::Windows::Media; using namespace System::Windows::Shapes; using namespace System::Threading; namespace ShapesProcedural { public ref class app : Application { ...
true
62d10d86c0b1cfad1851923d89da65787b41ae02
C++
el-bart/TIGER
/shared/src/Parallel/Queue.t.cpp
UTF-8
1,846
3.1875
3
[]
no_license
#include <tut/tut.hpp> #include <thread> #include "Parallel/Queue.hpp" using namespace Parallel; namespace { typedef Queue<std::string> StrQueue; struct TestClass { StrQueue q_; }; typedef tut::test_group<TestClass> factory; typedef factory::object testObj; factory tf("Parallel/Queue"); } // unnamed ...
true
e2d1db0076460649cfbd27410a249e685c9add1c
C++
jindongh/pyfarm
/other/oj/checker_orig.cc
UTF-8
1,428
2.640625
3
[]
no_license
/** ID: hankjin1 LANG: C++ TASK: checker */ //hint4: reduce half by rotate // #include <iostream> #include <fstream> #include <algorithm> #include <iterator> using namespace std; int N; int found; int pos[13]; bool used[13];//used rows bool xadd[26];//used left-down to right-up bool xsub[26];//used left-top to right-d...
true
0259ef32ec6d67b7e2a9be6795cf6e3767cfd15c
C++
Rockmen0113/ConsoleSnakePractice
/SnakeGame/ConsoleSetting.cpp
UTF-8
531
2.578125
3
[]
no_license
#include "pch.h" #include "ConsoleSetting.h" HANDLE ConsoleSetting::hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); void ConsoleSetting::ShowCursor(bool visible) { CONSOLE_CURSOR_INFO cci = { sizeof(cci), visible }; SetConsoleCursorInfo(hStdOut, &cci); } void ConsoleSetting::SetColor(Color::ConsoleColor text, Color::C...
true
733e75e8aa0b063cfa8bea20cbc9a16f672c31af
C++
smilu97/hamtris
/common/server/player.cpp
UTF-8
1,341
2.734375
3
[]
no_license
#include "player.h" using namespace tetris; TetrisPlayer::TetrisPlayer(PlayerId id, tcp::socket socket): id(id), socket (std::move(socket)) { } void TetrisPlayer::Start() { ReadHeader(); } void TetrisPlayer::Deliver(const char* buf, int len) { socket.async_write_some(boost::asio::buffer(buf, le...
true
3a82a496796bbd563f8c4fa5702d0e8863719523
C++
zhangwengame/LeetCode
/155.cpp
UTF-8
915
3.046875
3
[]
no_license
class MinStack { private: long long minV; stack<long long > sta; public: /** initialize your data structure here. */ MinStack() { minV=0; } void push(int x) { if (sta.empty()){ minV=x; sta.push(0); } else { sta.push((long long)x-mi...
true
0d0758ad8bd3ae4415e661dd34bea329b36ae61a
C++
biancadragomir/school-work
/Faculty/TrenchCoatStoreQT/qt_lab/controller.cpp
UTF-8
1,896
2.984375
3
[]
no_license
#include "controller.h" #include <assert.h> void Controller::set_basket(Basket * b) { this->basket = b; } //function used for adding a new coat via the controller int Controller::controller_add(int size, const std::string color, int price, int quantity, const std::string photograph, int length) { Trench_coat c{ siz...
true
6a1986fa53a5a551501eb5b6ea95c3099768eaec
C++
wolves3d/idea
/_Shared/Math/matrix.h
UTF-8
7,522
2.828125
3
[]
no_license
//////////////////////////////////////////////////////////////////////////////// class mat3 { public: float Determinant() { return ( pArray[0] * ( pArray[4] * pArray[8] - pArray[7] * pArray[5] ) - pArray[1] * ( pArray[3] * pArray[8] - pArray[6] * pArray[5] ) + pArray[2] * ( pArray[3] *...
true
e957b0fa2e63eae614aa190e38406780c60b6720
C++
royredman4/SI-Sessions
/CPSC-121/Inheritance-Polymorphism/Rv.cpp
UTF-8
1,186
2.90625
3
[]
no_license
// Created by Roy Redman IV #include "Rv.h" #include <iostream> #include <string> using namespace std; Rv::Rv():Cars() { bathroomCount = seatCount = bedCount = hasStove = 0; } Rv::Rv(double mpppg, string clr, bool tm, int trSz, int bc, int sc, int bedc, bool hStove) : Cars(mpppg, clr, tm, trSz) { bathroomCount =...
true
388f811f75a5eb316ed43a41768019bcc74619c5
C++
Alfeim/njuee_LeetCode_Solutions
/Cpp/Submit Records/491. Increasing Subsequences.cpp
UTF-8
1,009
3.140625
3
[]
no_license
/******************************************** 作者:Alfeim 题目:递增子序列 时间消耗:320ms 解题思路:dfs ********************************************/ class Solution { public: vector<vector<int>> res; vector<vector<int>> findSubsequences(vector<int>& nums) { int n = nums.size(); vector<int> tmp; dfs(nums,0,...
true
b5daefd9a65b4f16404ce4da95ab9099d4e8e36d
C++
ryanulep/cs010_lab03
/lab3.cpp
UTF-8
1,551
3.65625
4
[]
no_license
// =============== BEGIN ASSESSMENT HEADER ================ /// @file lab3.cpp /// @brief Lab 3 /// /// @author Ryan Ulep [rulep001@ucr.edu] /// @date April 13, 2015 // ================== END ASSESSMENT HEADER =============== #include <iostream> using namespace std; int main() { double purchasePrice = 0.0; ...
true
561ac3c528afff45f12f6dba262b1d6067feeb0d
C++
fsatka/msu_cpp_spring_2018
/homework/Sokolova/03/Items.h
UTF-8
2,328
3.671875
4
[ "MIT" ]
permissive
/** @file @brief Header file with item classes declaration. File contains hierarchy of buyable items in the game. */ /** * @brief Interface of buyable items. * Can be bought. */ class Buyable { public: virtual void beBought(); }; /** * @brief Base class of all items. * Item has a unique id. * Every item ...
true
8a0addf9eb12040a9d4fc7e7dbb69fd666936945
C++
rayfill/cpplib
/tests/MPITest.cpp
UTF-8
14,563
2.625
3
[]
no_license
#include <iostream> #include <cppunit/extensions/HelperMacros.h> #include <math/MPI.hpp> #include <math/MersenneTwister.hpp> class MPITest : public CppUnit::TestFixture { private: CPPUNIT_TEST_SUITE(MPITest); CPPUNIT_TEST(notEqualOpTest); CPPUNIT_TEST(multiplyOpTest); CPPUNIT_TEST(plusOpTest); ...
true
010e8d3569ff40b5988f8ad2053fbc3c8beff49e
C++
LittlePupper/DrawingProgram
/DrawingProgram/Text.cpp
UTF-8
1,206
3.5625
4
[]
no_license
// \author Nora White // \date 2017-10-19 #include "stdafx.h" #include "Text.h" #include "Exception.h" // \fn Text::Text(int row = 20, int col = 40, string phrase = "HelloWorld"); // \brief Constructor for Text which takes in 3 parameters // \param row (Optional) int, the row of which the text will be on // \para...
true
96d295ad3493c9b705c96bf461e7dbfbd828dad1
C++
banhtieu/AnimoGame
/Source/Game/GameStates/InGameState.cpp
UTF-8
3,912
2.75
3
[]
no_license
// // InGameState.cpp // AnimoGame // // Created by Tran Khiem on 3/14/12. // Copyright (c) 2012 __MyCompanyName__. All rights reserved. // #include "InGameState.h" #include "Animals.h" #define ANIMAL_WIDTH 120 #define MAX_ANIMALS 6 #define ANIMAL_Y SCREEN_H - ANIMAL_WIDTH / 2 - 10 #define CELL_WIDTH (ANIMAL_WIDT...
true
19dc5f5e137e0cb79f49770838099be771a9194e
C++
jeffrey-cochran/tsl
/tse/src/application.cpp
UTF-8
4,739
2.671875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
#include <utility> #include <functional> #include <stdexcept> #include <vector> #include <thread> #include <chrono> #include <tsl/util/println.hpp> #include <tsl/util/panic.hpp> #include "tse/application.hpp" using std::string; using std::istreambuf_iterator; using std::bind; using std::move; using std::make_pair; u...
true
ddc5df13fcd2734d5c7737f5a33ea2773dc21304
C++
MikamiTetsuro365/Atcoder
/ABC116/D.cpp
UTF-8
1,615
2.59375
3
[]
no_license
#include "bits/stdc++.h" using namespace std; typedef long long int ll; typedef pair<ll, ll > pi; typedef pair<pair<ll, ll >, ll > pii; vector<ll > vec; vector<vector<ll > > vec2; ll MOD = 1000000007; ll INF = 1145141919454519; int main() { ll N, K; cin >> N >> K; //入力 priority_queue<pi > que; ...
true
2be6f02d785f839c49c68fe93b9f71afbf729cd0
C++
itomilin/freelance
/lab6/patient.hpp
UTF-8
441
2.765625
3
[]
no_license
#ifndef PATIENT_H #define PATIENT_H #include <string> #include <QDebug> // Класс для создания сущностей пациентов. class Patient { public: ~Patient(); Patient(std::string gender, std::string initials, size_t age); std::string getInfo(); private: const std::string _gender...
true
a412dafa5ab497e817f1adecc70679a004c7201c
C++
guiOsorio/CPP-Practice
/Section8Challenge/main.cpp
UTF-8
1,278
4.09375
4
[]
no_license
#include <iostream> using namespace std; // this program calculates the most efficient way (in terms of number of coins required) // to have a certain quantity of cents int main() { int cents_amount {}; int dollars {}, quarters {}, dimes {}, nickels {}, pennies {}; const int one_dollar {100}; const int one_quart...
true
095dee65d98cd6b3aa47fee4815e4c6e2a1ce5fc
C++
nrqu/answersprimer
/chapter 9/chap9_9.10/Source.cpp
UTF-8
312
3.171875
3
[]
no_license
//Exercise 9.10: What are the types of the following four objects ? //vector<int> v1; //const vector<int> v2; //auto it1 = v1.begin() vector<int>::iterator , it2 = v2.begin(); vector<int>::const_iterator; //auto it3 = v1.cbegin() vector<int>::const_iterator;, it4 = v2.cbegin(); vector<int>::const_iterator;
true
707d18737497d32136dce568fbaa458810241357
C++
drichardson/examples
/C++/max_subarray.cc
UTF-8
1,577
3.640625
4
[ "Unlicense" ]
permissive
#include <algorithm> #include <iostream> #include <vector> struct max_subarray_result { unsigned start = 0; unsigned end = 0; int value = 0; std::vector<int> maxes; }; max_subarray_result max_subarray_kadane(std::vector<int> const & v) { max_subarray_result r; r.maxes.resize(v.size()); if ...
true
72ca1cdd5515a97dfe9d9d2c1eca19ce88cc6ad9
C++
amirrezatav/Single-instance-applications
/source.cpp
UTF-8
246
2.59375
3
[]
no_license
#include <windows.h> int main() { HANDLE hMutex = CreateMutex(0, 0 , L"MutexName"); if (GetLastError() == ERROR_ALREADY_EXISTS) return 0; // your code ReleaseMutex(hMutex); CloseHandle(hMutex); return 0; }
true
3d57f1e64595fb38c3a48a31ea2ed3b4c01d21f8
C++
igalakhov/mks66-mdl
/matrix/transformation_matrix.h
UTF-8
1,515
2.5625
3
[]
no_license
// // Created by Ivan Galakhov on 2019-02-19. // #ifndef WORK_01_LINE_TRANSFORMATION_MATRIX_H #define WORK_01_LINE_TRANSFORMATION_MATRIX_H #include <cassert> #include "edge_matrix.h" #include "../settings.h" class EdgeMatrix; class TransformationMatrix { public: TransformationMatrix(float_mat *); // construct...
true