uuid
stringlengths
36
36
repo_name
stringlengths
5
133
relative_path
stringlengths
3
3.76k
content
stringlengths
282
4.03M
category
stringclasses
6 values
algo_rel_score
float32
0.9
1
quality_score
float32
3
8.13
source_meta
dict
98e8fd21-d2f2-4616-ad43-ada025ce30a1
chnwjian/Projects-by-Arduino
Arduino程序/Display/Seven-segment Display/Temperature and Humidity.ino
/***** Show temperature with dig3 and dig2 Show humidity with dig1 and dig0 Change once per second *****/ /*7-segment display (common anode) with 2 74hc595*/ /*Show numbers from 0-9 with dig0,dig1,dig2,dig3*/ /*位: dig0 dig1 dig2 dig3 a b c d e f g dp*/ /*数字0-9对应段码:03 9F 25 0D 99 49 41 1F 01 09*/ #include <MsTimer2....
TOOL
0.939401
4.843657
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-04-24T14:06:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "77bd6c82f5...
953c07ed-9412-44c2-8c18-a23a2e4672a6
mysql/mysql-server
storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp
/* Copyright (c) 2004, 2025, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is designed to work with certain software (includ...
ALGO
0.997962
6.400445
{ "github_metadata": { "branch": "trunk", "commit_count": 186679, "repo_created_at": "2014-09-26T09:31:03.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11540, "forks": 4072, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "...
407c07d3-59df-482c-9324-4d2368d900c5
Kim-jeongmin/algorithm_problem_solved
그리디 알고리즘/15953.cpp
#include <iostream> using namespace std; int code2017[6] = { 5000000,3000000,2000000,500000,300000,100000 }; int code2018[5] = { 5120000,2560000,1280000,640000,320000 }; int main() { int a; cin >> a; while (a--) { int result = 0; int c1, c2; cin >> c1 >> c2; if (c1 == 1) result += code2017[0]; else if (2 <=...
ALGO
0.997426
3.355726
{ "github_metadata": { "branch": "master", "commit_count": 708, "repo_created_at": "2019-12-27T13:03:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad59d9bd...
3f8da77c-fc26-47c8-8a46-7300b06271c6
pranabp-bit/Game-of-Blocks
Dijkstras-algorithm.cpp
#include <iostream> #include<bits/stdc++.h> using namespace std; //defining a macro infinite # define INF 0x3f3f3f3f //a class representing graph as an abstract data-type. Following is the graph implementation in the form of adjacency list class graph{ private: int E=0;//initially set number of edges as 0 i...
ALGO
0.999843
4.068362
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2021-05-17T00:53:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f4da6e3d731...
0a43b13a-8e27-47e8-b4fe-ec9c1ccfd86a
phongvcao/CP_Contests_Solutions
cpp/Codeforces/451-500/456A_Laptops.cc
#include <iostream> #include <string> #include <sstream> #include <vector> #include <stdint.h> class Laptop { public: Laptop(); Laptop(int64_t price, int64_t quality); virtual ~Laptop(); int64_t price; int64_t quality; }; Laptop::Laptop() : price(0), quality(0) {...
ALGO
0.999472
3.612605
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-12-16T14:20:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60012840d4...
78c1d876-4073-47c1-8aa9-d3f2e3cd4480
BestJourin/ChinaOpenSSL
Medusa/src/PathPlan/ObstacleNew.cpp
#include "ObstacleNew.h" #include "utils.h" #include "GDebugEngine.h" #include <iostream> #include "PlayInterface.h" #include "TaskMediator.h" #include "WorldModel.h" namespace { const double MAX_PROB_VEL = 500*10; const double MAX_DEC = 650*10; const double ZERO_VEL = 20*10; const double ROBOT_RADIUS = PARAM::Vehicle...
ALGO
0.99638
4.967618
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-02-08T07:12:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe528cadf87d...
b389f80f-10c8-45c8-83cb-b9cea2f1f2b3
noureldin-khaled/workspace
C++/UVA/Page Hopping.cpp
#include <bits/stdc++.h> #define MAX 130 #define INF 1000000000 using namespace std; int main() { int c = 1; while(true) { int adjmat[MAX][MAX]; for (int i = 0; i < MAX; i++) for (int j = 0; j < MAX; j++) adjmat[i][j] = INF; for (int i = 0; i < MAX; i++) ...
ALGO
0.999515
3.633051
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2016-02-12T10:25:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2bf2f4b25...
6d5e2db9-b24b-4f3b-bd2d-5d66e2e1ede6
hrosman94/MipsSimulator
components.cpp
#include "components.h" #include "stages.h" #include <string> #include <iostream> #include <vector> #include <math.h> #include <sstream> #include <fstream> #include <stdio.h> using namespace std; int ALU[3] = {0,0,0}; int PC_REGS[10] = {2,4,6,0,0,0,0,0,31,33}; int MEM[10] = {8,10,12,0,0,0,0,0,0,99}; void i...
ALGO
0.95404
3.065096
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2022-01-21T03:24:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2eb6a68aac7...
71340f9c-563e-4d7d-a50d-e5b2a174f624
Wesley25I/CS-303-Project1B
Library.cpp
#include "Library.h" #include <iostream> #include <algorithm> using namespace std; // Default constructor initializes book details Book::Book() : name(""), circulation_start(0, 0, 0), last_pass_date(0, 0, 0), archived(false) {} Book::Book(string name, Date start) : name(name), circulation_start(start), last_pas...
ALGO
0.99783
5.459659
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-05-08T19:52:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "684a39a0694b...
90407bad-33b2-43d8-81cc-eeae66f8abe8
elemental/Elemental
include/El/matrices/deterministic/classical/Circulant.hpp
/* Copyright (c) 2009-2016, <NAME> All rights reserved. This file is part of Elemental and is under the BSD 2-Clause License, which can be found in the LICENSE file in the root directory, or at http://opensource.org/licenses/BSD-2-Clause */ #ifndef EL_MATRICES_DETERMINISTIC_CLASSICAL_CIRCULANT_HPP #defi...
ALGO
0.990507
7.514726
{ "github_metadata": { "branch": "master", "commit_count": 3773, "repo_created_at": "2012-05-06T08:37:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 513, "forks": 110, "issues": 38, "pull_requests": 7 }, "file_meta": { "content_id": "bde...
769a432f-0b76-417f-82f6-003c6ad3ce39
ArtemPerrySwift/Computer_Modern_Technologies_2
GausseIntegr/GausseIntegr.h
#pragma once #include <vector> #include <functional> #include <array> #include <utility> #include "GausseIntegrBase.h" template <unsigned char DIMENSION_COUNT> class GausseIntegr : GausseIntegrBase { private: template<unsigned char DIMENSION> //requires is_less<dimNum, DIM_COUNT + 1> double iterateOverDimension(std:...
ALGO
0.982673
5.854163
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2023-12-06T11:39:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fc3c016001...
8653b5bf-9c2f-4fc9-88ab-9d4a1ddbcbf9
Alipashaimani/Competitive-programming
Codeforces/505B.cpp
#include<bits/stdc++.h> using namespace std; const int maxN = 100 + 10; int n, m; vector<int> adj[maxN][maxN]; bool mark[maxN]; bool dfs(int v, int u, int c){ if (v == u) return true; if (mark[v]) return false; mark[v] = true; for (int i = 0 ; i < adj[v][c].size() ; ++i) if ...
ALGO
0.999895
4.094045
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2020-02-19T02:03:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6eae88e03c...
4fc9b112-bf16-4167-b118-6885feefe7ac
cogitates/Code
Cplus/Leetcode/Stack/MinStack.cc
// Min Stack // https://leetcode.com/problems/min-stack/ #include <bits/stdc++.h> using namespace std; class MinStack { private: stack<int> s1; // 正常栈 stack<int> s2; // 最小值栈 public: /** initialize your data structure here. */ MinStack() { } void push(int x) { s1.push(x); ...
ALGO
0.999896
6.167889
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2020-03-30T02:17:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5bd1d7f5a...
04a62be3-fe3d-4675-b432-eb53e0c0a24e
Kung-Fuzi/PIPE
MEGADOCK/src/docking.h
/* * Copyright (C) 2020 Tokyo Institute of Technology */ //============================================================================// // // Software Name : MEGADOCK // // Class Name : Docking // // Contact address : Tokyo Institute of Technology, AKIYAMA Lab. // //=============================================...
TOOL
0.970487
4.900532
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2022-03-21T02:07:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "92fc63b9010...
b7f4a893-ff47-4e8c-b573-f67e123fc99f
mateusazis/programming-problems
100/solution.cpp
#include <algorithm> #include <iostream> static int getCycleLength(int n) { int cycleLength = 1; while (n != 1) { if (n % 2 == 0) { n /= 2; } else { n = 3 * n + 1; } cycleLength++; } return cycleLength; } int main(int ...
ALGO
0.999943
4.391322
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2021-01-01T17:21:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a6781a83d0...
d3a3525c-a35c-4073-896d-9a101943fd90
kamena/FMI-Programming
WinterSession2017-2018/SD_HW3/main.cpp
/* Homework 3 * by * <NAME>, 71672 * * Browser Tabs * * Type HELP to see the commands you can use. * * OS used: Linux */ #include <iostream> #include <cstring> #include <sstream> #include <ctime> #include "DlList.h" using namespace std; struct Page { string name; time_t timev; }; void toLower(string& s)...
TOOL
0.902003
4.387089
{ "github_metadata": { "branch": "master", "commit_count": 95, "repo_created_at": "2016-10-10T20:52:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "261fa44ea...
d07f3d9d-5566-4b08-98b9-d36ac853e235
jdurantoro/sudoku
Sudoku/SudokuGrid.cpp
#include "SudokuGrid.h" #include <iostream> #include <fstream> #include <sstream> #include <vector> #include <algorithm> #include <ctime> #include <cstdlib> #include <random> #include <chrono> using namespace std; CSudokuGrid::CSudokuGrid() { } CSudokuGrid::~CSudokuGrid() { } /** * Reads a Sudoku from a norma...
ALGO
0.998658
4.350201
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-04-30T09:08:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b27976fed9...
91681349-b25c-4c11-bbe2-2c885c666c41
0xecho/KattisSubmissions
perfectpowers.cpp
#include <bits/stdc++.h> #include <cstdio> #include <cstring> #include <cmath> #include <cstring> #include <chrono> #include <complex> #define endl "\n" #define ll long long int #define vi vector<int> #define vll vector<ll> #define vvi vector < vi > #define pii pair<i...
ALGO
0.999813
3.5332
{ "github_metadata": { "branch": "master", "commit_count": 226, "repo_created_at": "2020-02-13T15:02:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd732578...
10652d30-cae8-43ac-a0a8-d6f8c755d45e
pocketform/ProgramStudy
Lesson4/Lesson4/Lesson4.cpp
#include <iostream> using namespace std; void swap(int *a, int *b) { int temp; temp = *a; *a = *b; *b = temp; } void implement(int *a) { for (int i = 0; i < 5; i++) { a++; cout << *a << endl; a++; } } int main() { int in_one = 11; int in_two = 22; int arr[10] = { 1,2,3,4,5,6,7,8,9...
ALGO
0.995031
4.756575
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-11-14T21:16:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "164f9fa6a1...
184011a7-5afe-4760-b342-2e73929d9b92
LighteningIce/partition-trees
example/main3.cpp
#include <iostream> #include <fstream> #include <string> #include <math.h> #include <stdlib.h> #include "lib-io-tree.h" #include "heuristics.h" //./call-heuristics -s -c 0.001 -n 100 -d .././realTrees/example10.tree.nf >> ../result/result_split_1 int main(int argc, const char * argv[]) { // for(int i=0...
ALGO
0.999601
3.219175
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-08-29T01:49:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e75df0a09e...
0ed71424-0e16-4bed-b3ef-d4b21099ca08
thegamer1907/Code_Analysis
contest/1542593881.cpp
#pragma comment(linker, "/stack:20000000") #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,sse3,sse4,popcnt,abm,mmx") #include <bits/stdc++.h> #define f first #define s second #define pb push_back #define pp pop_back #define mp make_pair #define sz(x) (int)x.size() #define sqr(x) ((x) ...
ALGO
0.999912
3.306076
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2019-05-24T10:35:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8a3ac9580...
7d05fc02-a3cc-45e0-9e41-2df0bc3e351d
zhmz90/Lan
DSA/Leetcode/107.cc
/**107. Binary Tree Level Order Traversal II Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). */ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *...
ALGO
0.999968
6.213903
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2015-12-26T16:02:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1aa6b627e...
91e3c68c-4223-4ebc-b5f0-96fbba8f0ecc
ishandutta2007/codeforces-c
crackersamdjam/normal/653/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int lli; typedef pair<int,int> pii; typedef pair<lli,lli> pll; template<typename T> int sz(const T &a){return (int)a.size();} const int MAXN=150003; int arr[MAXN]; set<pii> used; int n; bool valid(int loc){ if(loc%2){ if(arr[loc]<arr[loc-1]&&ar...
ALGO
0.999949
3.628156
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:17:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9878e44bf930...
e1dd8cff-0a42-417b-8631-e3cce89fc21b
varaste/FP-Queue
queuecpp.cpp
#include<iostream> #include<vector> #include<string.h> #include <windows.h> using namespace std; HANDLE hstdout = GetStdHandle(STD_OUTPUT_HANDLE); //Color for text HANDLE hstdin = GetStdHandle(STD_INPUT_HANDLE); //Color for text void access() { system("cls"); SetConsoleTextAttribute(hstdout, 0x0a); cout << "for e...
ALGO
0.980275
3.748636
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2018-04-21T20:30:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7b971a03...
b94bed7c-88b4-4142-af4c-19c55a6f21e8
Abhilash-03/Data-Structure-linkedList
gfgQuestions/cloneNextAndRandomPointer_LL.cpp
/* You are given a special linked list with N nodes where each node has a next pointer pointing to its next node. You are also given M random pointers, where you will be given M number of pairs denoting two nodes a and b i.e. a->arb = b. Construct a copy of the given list. The copy should consist of exactly N new nod...
ALGO
0.999724
4.510403
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-10-18T14:06:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cfb3538310d...
488b9250-6363-418f-8856-1b7baeb30931
billmguo/codechallange
coin_in_line.cpp
/*[lintCode] Coins in a Line II There are n coins with different value in a line. Two players take turns to take one or two coins from left side until there are no more coins left. The player who take the coins with the most value wins. Could you please decide the first player will win or lose? Example Given values ...
ALGO
0.999955
5.021678
{ "github_metadata": { "branch": "master", "commit_count": 393, "repo_created_at": "2016-04-04T20:43:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "06076745...
b7d2d3da-95bb-4535-a2f7-509f5eeaa129
myousefi2016/Hiflow3_2.0
examples/met_flow/conv_diff/conv_diff.pp.cc
// Copyright (C) 2011-2017 <NAME> // // HiFlow3 is free software: you can redistribute it and/or modify it under the // terms of the European Union Public Licence (EUPL) v1.2 as published by the // European Union or (at your option) any later version. // // HiFlow3 is distributed in the hope that it will be useful, but...
ALGO
0.983416
5.402499
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-06-06T14:44:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d5e03ce36...
aed2d248-ecdd-45c0-830f-3839dab41c31
MidhaShrey/DSA-Practice
Lec 12 Strings/printAllSubstrings.cpp
// Problem statement // For a given input string(str), write a function to print all the possible substrings. // Substring // A substring is a contiguous sequence of characters within a string. // Example: "cod" is a substring of "coding". Whereas, "cdng" is not as the characters taken are not contiguous // Detailed e...
ALGO
0.998586
5.121956
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-12-31T15:56:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "586ee0faa7e8...
80261a59-6caa-4d72-b37d-6efbc83e93f1
jgharehchamani/OS-SSE
OSSE/Client.cpp
#include "Client.h" Client::Client() { } Client::~Client() { } Client::Client(Server* server, int N, int keywordSize) { this->server = server; this->keywordSize = keywordSize; bytes<Key> key{0}; for (int i = 0; i < 16; i++) { IKey[i] = 1; DKey[i] = 2; secretKey[i] = 5; } ...
TOOL
0.928196
3.281616
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-05-12T07:20:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "897809529d4...
770159d9-3df0-46cb-9350-ea013e0b8eba
RoboJackets/robocup-software
soccer/src/soccer/optimization/nelder_mead_2d_config.hpp
#pragma once #include <rj_geometry/point.hpp> #include <functional> class NelderMead2DConfig { public: /** * Creates a Nelder-Mead 2D Config * * @param f std function pointer which returns F(X, Y) * @param start starting point of the simplex (Triangle in 2D Case) * @param step starting st...
ALGO
0.999584
5.915623
{ "github_metadata": { "branch": "ros2", "commit_count": 10361, "repo_created_at": "2014-01-06T01:09:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 186, "forks": 184, "issues": 125, "pull_requests": 14 }, "file_meta": { "content_id": "7e...
7a0243e7-c899-471d-9086-0d760e510772
uk2410/LeetCode-and-GFG-Solutions
Sorted Link List to BST - GFG/sorted-link-list-to-bst.cpp
// { Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; struct LNode { int data; struct LNode* next; LNode(int x){ data = x; next = NULL; } }; struct TNode { int data; struct TNode* left; struct TNode* right; ...
ALGO
0.999975
6.46142
{ "github_metadata": { "branch": "master", "commit_count": 1594, "repo_created_at": "2022-02-03T07:19:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "668d83d...
1c894222-2a39-448a-a5d9-54b976a5ed3f
LyTruongsinh/DSA
Data_Structures/Tree/Binary_Tree/Diameter_Of_Binary_Tree.cpp
#include <algorithm> #include <iostream> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999978
6.530044
{ "github_metadata": { "branch": "main", "commit_count": 95, "repo_created_at": "2025-02-25T13:54:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1163eb03b51...
36f0ff55-2d28-4246-9e9b-914c7f862349
imritik21/CodeForces
TLE/TLE_DAILY/week6/Nodblach.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> p32; typedef pair<ll, ll> p64; typedef pair<double, double> pd...
ALGO
0.999974
5.021951
{ "github_metadata": { "branch": "main", "commit_count": 96, "repo_created_at": "2024-02-03T18:52:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "03684ddb382...
d9332fa8-2e7e-4fce-be62-668346c7aa40
Kan19990810/Cpp
dayly/1/minimumTime.cpp
class Solution { public: int minimumTime(vector<int> &nums1, vector<int> &nums2, int x) { int n = nums1.size(); vector<int> ids(n); iota(ids.begin(), ids.end(), 0); sort(ids.begin(), ids.end(), [&](const int i, const int j) { return nums2[i] < nums2[j]; }); ...
ALGO
0.999975
5.503
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2023-07-03T14:53:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e97b156b8...
1818dd47-10de-439b-bf35-f83b2af1ae74
AhmedEssamYassin/Problem-Solving
CP Sheets Solutions/ICPC Assiut Advanced - Newcomers 2023/Contest 1/G/Solution.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("Output.txt", "w", stdout); #endif int N; cin >> N; int *arr = new int[N]; for (int i{}; i < N; i++)...
ALGO
0.999885
4.731183
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2025-05-02T14:49:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cda76dd1b0d...
6e85e6be-8e00-45cf-a386-4b371d4b7711
ishandutta2007/codeforces-i
igorbunov/normal/1150/B.cpp
// // main.cpp // Work in Moscow // // Created by <NAME> on 21.07.17. // Copyright 2017 <NAME>. All rights reserved. // /*#pragma GCC optimize("Ofast,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("fa...
ALGO
0.999936
4.813136
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:39:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "22f2ec40ef43...
af05ed97-ae54-4ec4-be15-710c24acf41e
YhgzXxfz/lintcode
unique_binary_search_trees_ii.cpp
/** * Definition of TreeNode: * class TreeNode { * public: * int val; * TreeNode *left, *right; * TreeNode(int val) { * this->val = val; * this->left = this->right = NULL; * } * } */ class Solution { public: /** * @paramn n: An integer * @return: A list of root ...
ALGO
0.999961
5.704284
{ "github_metadata": { "branch": "master", "commit_count": 349, "repo_created_at": "2016-09-12T20:38:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f6d56fc5...
e3583698-7f89-4e41-9681-39ae1caa23de
gnawme/leetpraxis
sortString.cpp
#include <algorithm> #include <iostream> #include <iterator> #include <string> class Solution { public: std::string sortString(std::string s) { std::cout << s << std::endl; std::string result; auto loop{0}; while (!s.empty()) { // Step 1 auto smoll{std::min_...
ALGO
0.999986
5.800087
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2020-11-18T19:47:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "37dcd6967...
e2dd8c81-cad8-4ea2-9a46-7b3ba2f977d6
Divansh369/MIT-LABS
Parallel Programming/Week-7/Point-to-Point.cpp
#include <stdio.h> #include <mpi.h> int main(int argc, char* argv[]) { int myrank, numprocs; int value; MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &myrank); MPI_Comm_size(MPI_COMM_WORLD, &numprocs); if (numprocs < 2) { printf("This program requires at least 2 processes.\n")...
ALGO
0.997131
5.055802
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2024-01-18T18:08:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "38d50f5ce2e...
c8efe453-7afd-4de2-a4bb-778e57c1a8a1
GouravShDev/codeforces-sol
teatangeerine.cpp
#include <bits/stdc++.h> using namespace std; #define sync_off \ ios::sync_with_stdio(0); \ cin.tie(0); #define ll long long int int main() { sync_off; #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); #endif int tc; cin >> tc; while (tc--) { int n; cin ...
ALGO
0.999885
3.76049
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-09-05T19:20:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1053e58a9bf8...
c4848107-707a-4563-a178-efcf554f98ff
tlx/tlx
tlx/algorithm/multisequence_selection.hpp
/******************************************************************************* * tlx/algorithm/multisequence_selection.hpp * * Implementation of multisequence partition and selection. * * Copied and modified from STXXL, see http://stxxl.org, which itself extracted * it from MCSTL http://algo2.iti.uni-karlsruhe....
ALGO
0.999278
6.644251
{ "github_metadata": { "branch": "master", "commit_count": 496, "repo_created_at": "2017-02-18T18:57:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 416, "forks": 74, "issues": 8, "pull_requests": 3 }, "file_meta": { "content_id": "9add74...
716e5fdb-2d07-495f-8bbc-33bcd27d9dce
ershehzan/Cpp_Codes
Sum diagonal element.cpp
#include <iostream> using namespace std; int main() { // Initialize a 4x4 matrix with given values int arr[4][4] = {{1, 2, 3, 4}, {19, 5, 6, 72}, {6, 8, 9, 10}, {15, 12, 13, 14}}; // Variables to store the sum of the primary and secondary diag...
ALGO
0.999964
5.789523
{ "github_metadata": { "branch": "main", "commit_count": 640, "repo_created_at": "2024-10-05T10:47:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d0ad460cb...
1ab6c75c-e4c4-4152-b946-b779a1052378
bxinquan/zynqmp_cam_isp_demo_linux
prebuild/rootfs/usr/src/debug/opencv/4.5.2-r0/contrib/modules/ximgproc/src/edge_drawing.cpp
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. #include "precomp.hpp" #include "edge_drawing_common.hpp" using namespace std; namespace cv { namespace ximgproc { class E...
ALGO
0.999175
4.769406
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2022-11-25T15:07:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 19, "forks": 15, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "9d87d52ef...
db935df0-2d6d-4cc8-bcc1-7ae09154037f
valdrin18/Algorithms-and-Data-Structures
Assingment 9/StackAndQueue.cpp
/* CH08-320211 (lanuage-Cpp) <NAME> <EMAIL> */ #include <iostream> using namespace std; //class stack template <typename T> class Stack{ private: struct StackNode { // linked list T data; StackNode *next; }; StackNode *top; // top of stack int size; ...
ALGO
0.981009
4.472216
{ "github_metadata": { "branch": "main", "commit_count": 80, "repo_created_at": "2021-06-15T21:41:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b71055e430...
1b378644-69e1-4642-aaa0-99fa5cd370b2
pavel-zeman/HackerCup
2018/1/LetItFlow.cpp
// Description // https://www.facebook.com/hackercup/problem/180494849326631/ #include <bits/stdc++.h> using namespace std; #define FOR(c, m) for(int c=0;c<(int)(m);c++) #define FORE(c, f, t) for(int c=(f);c<(t);c++) #define LLI long long int #define MOD 1000000007 char ccc = 0; int getInt() { int r = 0; whi...
ALGO
0.999958
3.936673
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2013-11-24T15:50:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3181c423a...
d3fbb796-55b5-494e-862c-d18b7dc357cf
lavish123409/csesSolutions
Factory_Machines.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; // 3 2 5 /* limit after which we can make target or more than target products I approach (cheated from <NAME>) - binary search the answer, from 0 to max in array * target - take mid value of time and traverse through the array -...
ALGO
0.999946
4.131398
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-08-24T12:47:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2819150fda1...
0e075036-dff1-4c5b-9e98-830ce2fb4bf0
ryannowen/3DGP
ThreeGPStart/PerlinNoise.cpp
#include "PerlinNoise.h" #include <math.h> #include <time.h> #include <cstdlib> float PerlinNoise::Noise(int argX, int argY, int argSeed) { int n = argX + argY * argSeed; // 57 is the seed –can be tweaked n = (n >> 13) ^ n; int nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff; return 1.0f - ((floa...
ALGO
0.995595
4.882353
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2019-11-26T19:44:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb2afdfae...
a4e96c68-93a2-4147-add9-4975e97cae5e
Argonne-National-Laboratory/PIPS
PIPS-NLP/Test/parmodel9.cpp
#include "./Drivers/parallelPipsNlp_C_Callback.h" #include "mpi.h" #include "global_var.h" #include <iostream> #include <cassert> #include <math.h> #ifdef TIMING double timeFromAMPL; double probGenTime; double PartSolver_GenTime; double PartSolver_SolTime; double PartSolver_FactTime; int call_sol_Times;...
ALGO
0.999325
4.644289
{ "github_metadata": { "branch": "master", "commit_count": 916, "repo_created_at": "2015-10-12T17:32:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 77, "forks": 20, "issues": 8, "pull_requests": 4 }, "file_meta": { "content_id": "8367667...
558cbf8c-5725-4be7-a5f3-55d60e92b80e
steinarmh14/ArangursrikForritun
trik/trik/main.cpp
// // main.cpp // trik // // Created by <NAME> on 5/13/16. // Copyright © 2016 <NAME>. All rights reserved. // #include <iostream> #include <string> using namespace std; int main(int argc, const char * argv[]) { string str; cin >> str; int ball = 1; for(int i = 0;i <...
ALGO
0.999906
3.839468
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-01-29T20:45:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2103134b15...
87c21dbe-c283-440c-baf9-b84eac886df7
abhiagx/InterviewBit
Trees/KthSmallestElementInTree.cpp
/* Given a binary search tree, write a function to find the kth smallest element in the tree. Example : Input : 2 / \ 1 3 and k = 2 Return : 2 As 2 is the second smallest element in the tree. NOTE : You may assume 1 <= k <= Total number of nodes in BST https://www.interviewbit.com/problems/kth-smallest-e...
ALGO
0.999998
6.398184
{ "github_metadata": { "branch": "master", "commit_count": 440, "repo_created_at": "2016-04-11T17:26:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 265, "forks": 167, "issues": 2, "pull_requests": 8 }, "file_meta": { "content_id": "bd9f...
94797206-03c1-40a1-a644-1ef242ddaa5b
jegonzal/PowerGraph
toolkits/graph_analytics/connected_component_stats.cpp
/* * Copyright (c) 2009 <NAME> University. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unl...
ALGO
0.953089
6.139107
{ "github_metadata": { "branch": "master", "commit_count": 5464, "repo_created_at": "2013-07-01T07:59:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 356, "forks": 514, "issues": 39, "pull_requests": 9 }, "file_meta": { "content_id": "30...
3413e176-45a6-4fc8-a230-8f7f0e9e4ea1
ajclaros/rl_ctrnn
updated/auxilary.cpp
#include "auxilary.h" #include <eigen3/Eigen/Dense> int maxOfAxis(int axis, Eigen::MatrixXd &m){ int val; if(axis==0){ for(int i=0; i<m.rows(); i++) if(m(i,0)==m.maxCoeff()) val = i; } else{ for(int j=0; j<m.cols(); j++){ if(m(0,j)==m.maxCoeff()) val = j; } } ret...
ALGO
0.997913
5.590317
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2022-06-15T04:43:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "29ec523c67c...
bdc89961-8613-44b2-b9b5-bb9729d5db0e
oxheron/yao
src/forrus/forrus.cpp
#include "forrus.h" // unsigned char leftRotate(unsigned char val, int n) // { // unsigned int t; // t = val; // for(int i=0; i < n; i++) { // t = t << 1; // /* If a bit shifts out, it will be in bit 8 // of the integer t. If this is the case, // put that bit on the right side...
ALGO
0.999137
4.086003
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-02-04T22:35:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "788dc344e5c...
0ef929b5-2029-499b-9c70-cc55dd25527e
hijkl2e/problem_solving
boj/Volume 7/boj7511.cpp
#include <bits/stdc++.h> using namespace std; class UF { public: UF(int N) : par(N), sz(N, 1) { for (int i = 0; i < N; ++i) { par[i] = i; } } int root(int x) { return par[x] == x ? x : (par[x] = root(par[x])); } bool same(int x, int y) { return root(x) == root(y); } bool unite(int x, int y) { x = ...
ALGO
0.999816
5.485755
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-12-04T14:16:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "79c01d57fc24...
39032cd0-202a-4b71-b565-56d77afbdc39
VoCongLinh/VoCongLinh_monC
Chapter 10/Programming challenges/Challenges_14.cpp
#include <iostream> #include <cctype> int main() { std::string inputSentence; // Read the sentence from the user std::cout << "Enter a sentence with words run together: "; std::getline(std::cin, inputSentence); // Process the input to separate words std::string separatedSentence; bool new...
TOOL
0.958379
5.626891
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-09-24T14:09:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d88682fb4761...
e58ae3f4-f861-4ad7-a1fe-a2c4379405db
namanrajpal/Pattern-Matching
PatternMatching.cpp
#include<iostream> #include<string> #include<vector> #include"AlgoKeeper.h" int main() { int _input = 0; string pattern,text; AlgoKeeper runner; string enteredString; std::vector<string> texts; bool loop =true; while(loop) { cout<<"\n\n *************************** PATTERN MATCHING **********************...
ALGO
0.997481
3.797209
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-03-04T04:25:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "937b9e07ef...
98c3878b-bce2-47b0-bf77-4ebe9f076773
AbdelliOussama/Programming-Advices-RoadMap
CPP PROGRAMMS/algorithme and problem solving level 4/Increase Date BY X/Increase Date BY X/Increase Date BY X.cpp
#include<iostream> using namespace std; struct stDate { short Year; short Month; short Day; }; bool isLeapYear(short Year) { return (Year % 4 == 0 && Year % 100 != 0) || (Year % 400 == 0); } bool IsDate1BeforeDate2(stDate Date1, stDate Date2) { return (Date1.Year < Date2.Year) ? true : ((Date1.Year == Date2.Year)...
TOOL
0.925231
3.839004
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2025-01-26T10:33:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c736d72c004...
3e35e281-3313-4ce0-9a91-c2d61e2dcabc
xif-fr/BrownianMotion
pysimul-common.h
#include <utility> #include <inttypes.h> #include <vector> #include <array> #include <map> #include <string> #include <pthread.h> #include <queue> #include <functional> #ifndef SIMUL_HEADLESS #include <SFML/Graphics.hpp> #endif extern const size_t pysimul_N; struct simul_thread_info_t { enum var_type_t : int8_t { ...
TOOL
0.906608
4.181913
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2020-04-28T16:55:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f074092f...
98bdcbf7-5e3e-41ef-b716-6f90aef99410
Wait2Late/Casino
Casino 6/Casino 6/OddOrEven.cpp
#include "OddOrEven.h" #include <iostream> #include "Utilities.h" #include "Casino 6.h" namespace Games { void OddOrEvens::OddOrEven(int& cMoney, std::array<Utilities::eGameResult, 5>& myLastResults, const Casino& aCasino) { //Casino casino; std::cout << "Your Money: " << cMoney << std::en...
ALGO
0.994332
3.872269
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-01-17T17:59:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "98b59b599cd7...
4ab613e3-d3f5-4ea6-af84-277c08fb362f
majharul-web/Basic-Data-Structures
linked-list/practice/doubly-linked-list-reversed.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node *next; Node *prev; Node(int val) { this->val = val; this->prev = NULL; this->next = NULL; } }; void print_forword(Node *head) { Node *temp = head; while (temp != NULL) { ...
ALGO
0.999875
4.824896
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2024-12-08T03:45:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f3c77cf97e...
da5cc051-42f2-4281-a047-cbb2f8856e0b
fengyc/leetcode
143.cpp
#include <deque> using namespace std; /** * Definition for singly-linked list. */ struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: void reorderList(ListNode *head) { if (!head) { return; } deque<ListN...
ALGO
0.999996
6.26769
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-09-03T09:42:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd01b3bc7e...
674666ff-c483-43f5-b1ab-4fdebd16439c
chrisdel101/coding_challenges
hackerRank/30days/day23-2.h
#include <iostream> #include <string> using namespace std; class Node { public: Node *left; Node *right; int data; Node(int newData, Node *pointLeft, Node *pointRight) { data = newData; left = pointLeft; right = pointRight; } }; class BST { public: Node *root = NULL; ...
ALGO
0.999603
3.324572
{ "github_metadata": { "branch": "master", "commit_count": 195, "repo_created_at": "2017-01-27T15:17:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2886be37...
ee0385fb-7b75-4739-9db3-e875714b3a17
ChocoBreeze/Problem-Solving
Baekjoon/Source Code/11495.cpp
// edmonds-karp // 그래프 구성 idea : https://m.blog.naver.com/kks227/220804885235 #include <iostream> #include <vector> #include <algorithm> #include <queue> using namespace std; constinit const int INF = 1 << 30; // 50 * 50 -> max = 2499 constinit const int SRC = 2500; constinit const int SINK = 2501; constinit const in...
ALGO
0.999991
5.569349
{ "github_metadata": { "branch": "master", "commit_count": 207, "repo_created_at": "2022-04-04T16:11:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7600b233...
ce6102a3-00db-4af4-aa2b-778413a17ea9
Mingyum-Kim/Algorithm
알고스팟/동적 계획법/PACKING.cpp
#include <iostream> #include <vector> #include <string.h> using namespace std; int n, w; string name[101]; int need[101], volume[100]; int cache[1001][101]; // 만들어질 수 있는 조합의 절박도의 최댓값 반환 int pack(int capacity, int item) { if (item == n) return 0; int& ret = cache[capacity][item]; if (ret != -1) return ret; //...
ALGO
0.999889
3.483269
{ "github_metadata": { "branch": "main", "commit_count": 595, "repo_created_at": "2020-12-26T08:24:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ca32b8ae9a...
bbfea1e9-7b4c-41cb-a067-dd73cd01d5bd
IbrahimNavas/Internship
Exercise_01/ip2.cpp
#include <iostream> using namespace std; int main(){ int year; string month; cout << "Enter the year : "; cin >> year; cout << "Enter the month : "; cin >> month; int leap = 1; if(year%4 == 0){ leap = 1; } else{ leap = 0; } if(leap == 1 && month == "February"){ cout << "The month has 29 days "; } el...
ALGO
0.989295
3.727991
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-11-23T11:58:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "14415110ac37...
6b58ea04-4170-46ea-b74c-6161ff77944a
zyy0704/CPSC-221-Programming-Assignments
PA3/ptree.h
/* * File: ptree.h * Description: Definition of a partitioning tree class for CPSC 221 PA3 * Date: 2022-02-28 00:08 * * DO NOT MODIFY THIS FILE! * PRIVATE FUNCTION DEFINITIONS SHOULD GO IN ptree-private.h */ #ifndef _PTREE_H_ #define _PTREE_H_ #include "cs221util/PNG.h" #...
ALGO
0.989575
6.205746
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-05-08T00:44:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e034c950b4bd...
ddb18017-5496-435d-9a29-43fd10730c5a
leafji/Leetcode
ContainsDuplicateII/ContainDuplicateII.cpp
#include <iostream> #include <vector> using namespace std; /* II Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the difference between i and j is at most k. I Given an array of integers, find if the array co...
ALGO
0.998213
5.224703
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-09-06T03:25:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8f2fa7946f...
71b45ff9-9ed7-485d-8da4-0f88a265f912
ishandutta2007/codeforces-l
lhic/normal/1237/F.cpp
#ifndef BZ #pragma GCC optimize "-O3" #endif #include <bits/stdc++.h> #define ALL(v) (v).begin(), (v).end() #define rep(i, l, r) for (int i = (l); i < (r); ++i) using ll = long long; using ld = long double; using ull = unsigned long long; using namespace std; const ll MOD = 998244353; ll pw(ll a, ll b) { ll ans ...
ALGO
0.999899
4.58585
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:17:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b6376122309...
c39fa017-7f7e-4652-9f05-de7ef409b86c
the-stranded-alien/LeetCode
0001_0100/058_Length_of_Last_Word.cpp
#include<bits/stdc++.h> using namespace std; #define int long long int #define double long double #define F first #define S second #define pb push_back #define pob pop_back #define mp make_pair #define si set <int> #define vi vector <int> #define vs vector <string> #define...
ALGO
0.999208
4.760011
{ "github_metadata": { "branch": "main", "commit_count": 421, "repo_created_at": "2022-01-01T17:46:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b97ae2eff...
c172e101-4bcd-475a-ab8e-eabaef3a8027
zhangty019/Toolpath_Gcode_generation
ShapeLab/spiralToolpath.cpp
#include "spiralToolpath.h" spiralToolpath::spiralToolpath(QMeshPatch* isoLayer, PolygenMesh* spiralTPath, double deltaWidth, double deltaDistance){ surfaceMesh = isoLayer; spiralPath = spiralTPath; toolpath_Width = deltaWidth; toolpath_Distance = deltaDistance; } spiralToolpath::~spiralToolpath() {} void spira...
ALGO
0.955052
4.201887
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-03-17T15:20:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "5eacf2c1f9...
79f85f24-9f2f-46dd-b67a-02889b5664b3
ismdeep/ICPC
hdu/1397/main.cpp
//project file: 1397 (Goldbach's Conjecture) //file name: main.cpp //author:键盘杀手 //date & time: 2012 5 4 -> 22:21 #include <iostream> #include <cmath> #include <stdio.h> using namespace std; bool prime[32768]; void initPrime() { prime[0] = false; prime[1] = false; prime[2] = true; prime[3] = true; ...
ALGO
0.999461
4.179864
{ "github_metadata": { "branch": "master", "commit_count": 141, "repo_created_at": "2013-04-30T07:19:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c141b23c...
7d16aaa4-92c2-441f-9d15-c52cec883672
SydianAndrewChen/CSC4140-ComputerGraphics
Assignment6/Assignment6/src/pathtracer/advanced_bsdf.cpp
#include "bsdf.h" #include <algorithm> #include <iostream> #include <utility> #include "application/visual_debugger.h" using std::max; using std::min; using std::swap; namespace CGL { // Mirror BSDF // Vector3D MirrorBSDF::f(const Vector3D wo, const Vector3D wi) { return Vector3D(); } Vector3D MirrorBSDF::samp...
ALGO
0.916189
5.448353
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2023-01-14T06:41:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ef7a2fc794...
cfdc530b-c786-4c43-b285-8e94cbb921bc
yzzupgo/MFTCG
Data/abc170_b/Mohammad_Yasser/wa/14350777.cpp
#ifndef Local #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.2,popcnt,abm,mmx,avx") #endif #include <bits/stdc++.h> using namespace std; #define popCnt(x) (__builtin_popcountll(x)) #define sz(x) ((int)(x.size())) #define all(v) begin(v), end(...
ALGO
0.999984
3.971415
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-08-22T17:27:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "446b10a5b219...
80074b64-7fa9-48f1-8a2b-3913ed93b9f3
Nilesh-0203/Daily-Codes
Difficulty: Medium/Maximum sum of Non-adjacent nodes/maximum-sum-of-nonadjacent-nodes.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // Tree Node struct Node { int data; Node* left; Node* right; }; // Utility function to create a new Tree Node Node* newNode(int val) { Node* temp = new Node; temp->data = val; temp->left = NULL; ...
ALGO
0.999468
6.119573
{ "github_metadata": { "branch": "main", "commit_count": 2152, "repo_created_at": "2023-09-19T19:01:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b7cfafa79...
7b4bdc16-dd8f-42d2-943e-7566f58dd155
algoboy101/LeetCodeCrowdsource
backup/source/cpp/[923]三数之和的多种可能.cpp
//给定一个整数数组 A,以及一个整数 target 作为目标值,返回满足 i < j < k 且 A[i] + A[j] + A[k] == target 的 //元组 i, j, k 的数量。 // // 由于结果会非常大,请返回 结果除以 10^9 + 7 的余数。 // // // // 示例 1: // // 输入:A = [1,1,2,2,3,3,4,4,5,5], target = 8 //输出:20 //解释: //按值枚举(A[i],A[j],A[k]): //(1, 2, 5) 出现 8 次; //(1, 3, 4) 出现 8 次; //(2, 2, 4) 出现 2 次; //(2, 3, 3) 出现 2...
ALGO
0.999897
5.981659
{ "github_metadata": { "branch": "master", "commit_count": 194, "repo_created_at": "2020-03-06T03:43:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "0bbf2683...
079fcf20-93a0-478f-93bf-03b86947b442
harshiththota/LowLevelDesign
cppPatterns/test2.cpp
// C program to find minimum number of appends // needed to make a string Palindrome #include<iostream> #include<stack> using namespace std; // Checking if the string is palindrome or not bool isPalindrome(char *str) { int len = strlen(str); // single character is always palindrome if (len == 1) return true; ...
ALGO
0.999964
6.170311
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-12-22T08:17:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a0fc9a872d4...
4445b70b-b426-436c-a67e-e27df623dea2
raincross7/code-similarity
codes/train_code/problem083/problem083_298.cpp
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; using ll=long long; using ld=long double; using st=string; using ch=char; typedef pair<ll,ll> P; typedef vector<ll> vl; typedef vector<vl> vvl; typedef vector<P> vP; typedef vector<ch> vc; typedef vector<vc> vvc; #define FOR(i,a,b) for(ll i=a;i<b;i+...
ALGO
0.999957
4.303773
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99d829d665bb...
96284ae8-2065-4403-ac14-97b54bdcb081
KIET-Github/2024-B-Training
2000290120102/WEEK_02/Stack-Implementations/StackPop.cpp
#include <bits/stdc++.h> using namespace std; int main(){ stack<int> s; // creating a stack of integers s.push(1); // This pushes 1 to the stack top s.push(2); // This pushes 2 to the stack top s.push(3); // This pushes 3 to the stack top s.push(4); // This pushes 4 to the stack top s.push(5); // This pushes 5 to...
ALGO
0.999384
4.753339
{ "github_metadata": { "branch": "main", "commit_count": 429, "repo_created_at": "2023-07-06T07:09:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 38, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e2392d26c...
77be1092-9bc3-45e8-9646-b5b9d63bfcde
creep06/competitive-programming
ABC/021/D.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++) #define rept(i,n) for(int (i)=0;(i)<=(int)(n);(i)++) #define reps(i,s,n) for(int (i)=(s);(i)<(int)(n);(i)++) #define repst(i,s,n) for(int (i)=(s);(i)<=(int)(n);(i)++) #define repr(i,n) for(int (i)=(n);(i)>=0;(i)--) #define...
ALGO
0.999984
4.37887
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2018-12-03T05:31:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6c70fd1fe...
6db25223-632e-406c-983d-26ed81fccf22
danielplawrence/RayTracerChallengeCpp
include/raytracerchallenge/base/Intersections.h
#pragma once #include <raytracerchallenge/base/Ray.h> #include <memory> #include <optional> #include <utility> #include <vector> namespace raytracerchallenge { class Shape; class Computations; class Intersection; class Intersections; /** * @brief Represents an intersection between a ray an object */ ...
ALGO
0.998216
5.129041
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2021-08-14T14:08:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e0909ba7...
b4c1ae4e-11ca-4091-886f-74ed0587100d
paulzcy/USACO
1.4_milk/milk.cpp
/* ID: paulzcy3 TASK: milk LANG: C++ */ #include <algorithm> #include <fstream> #include <iostream> #include <string> using namespace std; int main() { ofstream fout("milk.out"); ifstream fin("milk.in"); struct Farmer { int p; int a; }; int n; int m; Farmer f[5000]; fin >> n >> m; for (int...
ALGO
0.999863
3.744362
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2024-12-21T01:08:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8f6f35226c...
9929e2a4-15de-4e64-80e0-92ac6efaa0b3
tusharnavneet/Hanoi-Chronicles
manual_play.h
#ifndef MANUAL_PLAY_H #define MANUAL_PLAY_H #include <iostream> #include <vector> #include <string> using namespace std; // Global variables used in the implementation extern int points; // Points for valid/invalid moves extern int steps; // Keeps track of the number of steps extern vector<strin...
ALGO
0.994008
4.627831
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-02-26T12:38:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d716ce0e528...
e32ef485-e804-4757-882b-0d677ce35ef6
AbodSinan/Embedded-System-Design-Projects
Project/WireFrame/WireFrame.ino
char lookup[3][3][3] = {{ {'a', 'b', 'c'}, {'d', 'e', 'f'},{'g', 'h', 'i'} }, { {'j', 'k', 'l'}, {'m', 'n', 'o'},{'p', 'q', 'r'} }, { {'s', 't', 'u'}, {'v', 'w', 'x'},{'y', 'z', ' '} } void setup() { bool waitSignal, waitPeriod, reading = FALSE; int inputVal, cou...
ALGO
0.995372
4.137341
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-11-09T07:42:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b7855956d4...
3a47acdc-4580-4189-b22d-8662b83d2af9
InsightSoftwareConsortium/ITK
Modules/Registration/Metricsv4/include/itkJensenHavrdaCharvatTsallisPointSetToPointSetMetricv4.hxx
/*========================================================================= * * Copyright NumFOCUS * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.o...
ALGO
0.969549
6.589458
{ "github_metadata": { "branch": "main", "commit_count": 57165, "repo_created_at": "2010-07-27T15:48:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1517, "forks": 701, "issues": 268, "pull_requests": 49 }, "file_meta": { "content_id": "7...
4c9691a0-a723-45f2-8740-6436cb7aee12
gottingen/flare
src/backend/cuda/kernel/sort_by_key.hpp
// Copyright 2023 The EA Authors. // part of Elastic AI Search // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by...
ALGO
0.999506
6.901559
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2024-02-15T17:18:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4874b5abdb0...
061d1d9a-bef1-416d-8a44-79fb093ec99c
harveyc95/Project-Euler
001.cpp
/* Project Euler Problem 1 - https://projecteuler.net/problem=1 * Multiples of 3 and 5 * If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. * The sum of these multiples is 23. * Find the sum of all the multiples of 3 or 5 below 1000. * * Created by <NAME> on 08/10/201...
ALGO
0.999947
4.81271
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2015-10-08T02:20:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26ce3164d...
5bafe95a-4453-47cc-ad20-39b1fd9cdb72
eemali/utilities
xt/test/src/assignment/src/kbestRemoveDuplicates.cpp
#include "../include/kbestRemoveDuplicates.h" #include "../include/kbestRemoveUnassigned.h" #include <xtensor/xsort.hpp> #include <xtensor/xview.hpp> namespace assignalgo { std::deque<solution_t> kbestRemoveDuplicates(const std::deque<solution_t> &solutionList, const...
ALGO
0.998005
5.780427
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2022-09-28T07:18:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "09f4e94d4...
600de471-7367-4d86-bed2-7a331dfd203d
reddy-lab-code-research/MuST-CoST
data/transcoder_evaluation_gfg/cpp/LONGEST_COMMON_INCREASING_SUBSEQUENCE_LCS_LIS.cpp
// Copyright (c) 2019-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the license found in the // LICENSE file in the root directory of this source tree. // #include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include...
ALGO
0.999956
5.50224
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2022-02-08T19:28:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "dd29fd32108...
cf84cc58-9ff5-46ef-9212-845cf611404f
schnaader/precomp-cpp
contrib/preflate/preflate_reencoder.h
/* Copyright 2018 <NAME> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, so...
TOOL
0.987428
7.521829
{ "github_metadata": { "branch": "master", "commit_count": 389, "repo_created_at": "2014-06-16T09:40:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 434, "forks": 54, "issues": 43, "pull_requests": 5 }, "file_meta": { "content_id": "5b01...
2241fc96-93e5-4735-9ba0-f412685881a1
xhytom/acm
struct/SegmentTree.cpp
struct Info { }; Info operator+(const Info &a, const Info &b){ } template<class Info> struct SegmentTree{ int n; vector<Info> info; SegmentTree() {} SegmentTree(int n, Info _init = Info()){ init(vector<Info>(n, _init)); } SegmentTree(const vector<Info> &_init){ ...
ALGO
0.999889
4.721671
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-07-09T07:49:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "77bc2e58f4a3...
83f3093d-03ae-4dd5-80f2-77629d296663
lemire/Code-used-on-Daniel-Lemire-s-blog
2012/02/17/bitmaps-are-surprisingly-efficient/bitmapslow.cpp
/** * * <NAME>, February 2012, http://lemire.me/ * * Bitmaps are surprisingly efficient * http://lemire.me/blog/archives/2012/02/17/bitmaps-are-surprisingly-efficient/ * * Suppose that you want to copy an array over * another, except for some exceptions. * What is faster? * * g++ -Ofast -o bitmapslow bitmapslow.cpp ...
ALGO
0.963324
5.23575
{ "github_metadata": { "branch": "master", "commit_count": 2385, "repo_created_at": "2012-04-06T00:13:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 885, "forks": 184, "issues": 2, "pull_requests": 5 }, "file_meta": { "content_id": "aaf...
df0a841e-6bb0-4617-833b-b3514c6815f8
hyeon0121/baekjoon_problem
1316_그룹단어체커.cpp
#include <iostream> #include <vector> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; int answer = 0; vector<string> v(n); for (int i = 0; i < n; ++i) { cin >> v[i]; } for (int i = 0; i < n; ++i...
ALGO
0.999965
3.870029
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-08-09T03:51:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3657c87ed...
e0879a48-6b07-4ffb-bfbf-b10a37a83fc4
MathProgrammer/CodeForces
2021/Div 2/708/Programs/k-LCM.cpp
#include <iostream> using namespace std; void solve_3(int n) { switch(n%4) { case 1 : case 3 : cout << "1 " << n/2 << " " << n/2 << "\n"; return; case 2 : cout << "2 " << (n - 2)/2 << " " << (n - 2)/2 << "\n"; return; case 0 : cout << n/2 << " " << n/4 << " " << n/4 << "\n"; r...
ALGO
0.999627
3.741349
{ "github_metadata": { "branch": "master", "commit_count": 2511, "repo_created_at": "2017-03-13T14:02:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 224, "forks": 90, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "eab2...
cdbf9ebd-95bd-46bf-b535-424b62cb3684
miretteamin/TopCoder-Problems
250DIV2-SRM511/250DIV2-SRM511.cpp
#include <iostream> #include<string> #include<algorithm> using namespace std; class GameOfLifeDivTwo { public: string theSimulation(string init, int T) { string temp = init; for (int t = 0; t < T; ++t) { for (int i = 0; i < init.length(); i++) { if (i == 0) { if (init[i] == '0' && init[init....
ALGO
0.999997
4.99154
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-11-29T11:25:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e07058d8b...
9f37b239-8d5b-4300-9f3a-bd8f0bb077b0
SeanCampbell/WordAnalysis
vxl_src/contrib/brl/bseg/boxm/algo/boxm_merge_mog.h
// This is brl/bseg/boxm/algo/boxm_merge_mog.h #ifndef boxm_merge_mog_h_ #define boxm_merge_mog_h_ //: // \file // \brief class with methods to merge gaussian mixtures. // \author <NAME> // \date April 20, 2009 // // \verbatim // Modifications // Nov 7 2009 - <NAME>: Copied from bvxm // \endverbatim #include <bsta/...
ALGO
0.997987
5.368324
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2016-02-16T04:49:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b3b0f50e9...
8caa930f-0942-4793-9605-9c3c0d18bc6d
Elisabethhui/Proyecto-Tesis-PUCP-
Geodesic/include/Geodesic/gw_geodesic/GW_GeodesicMesh.h
/*------------------------------------------------------------------------------*/ /** * \file GW_GeodesicMesh.h * \brief Definition of class \c GW_GeodesicMesh * \author <NAME> * \date 4-9-2003 */ /*------------------------------------------------------------------------------*/ #ifndef _GW_GEODESICM...
ALGO
0.98664
6.669279
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-09-23T02:33:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a560c2e9b3...
fc7c48ac-dc0b-424b-9804-72159edb7bf6
netvipec/AdventOfCode
2022/02/main.cpp
#include <algorithm> #include <bits/stdc++.h> #include <iterator> #include <numeric> #include <utility> using ll = int64_t; using input_t = std::vector<std::pair<char, char>>; static std::vector<std::string> split(std::string const &s, char delim, bool removeEmpty = false) { st...
ALGO
0.999919
5.000217
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-12-30T11:34:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d7c0a4192c2c...
f56043b9-46e3-42bc-adbc-5e07d1e16ff5
piochelepiotr/Ludumdare
src/rosetree/path.hpp
#pragma once #include <deque> #include "utils/id.hpp" template <typename Node> class Path { public: // Crée un chemin avec un seul nœud Path(ID<Node> n); // Ajoute un nouveau nœud à la fin du chemin void addNode(ID<Node> n); // Insère un nouveau nœud au début du chemin void insertNode(ID<Node> n); // Renvoie...
ALGO
0.933478
5.201303
{ "github_metadata": { "branch": "master", "commit_count": 159, "repo_created_at": "2017-11-29T11:26:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2697c773...
9313456c-f813-4783-91ac-cca9d2e293a4
RickyL-2000/cpp-learning
Algorithm/Data_Structure(Summer2020)/pp15_dfs_bfs.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> using namespace std; int n, e; int edges[11][11]; bool visited[11]; void dfs(int node, vector<int> &part) { visited[node] = true; part.push_back(node); for (int v = 0; v < n; v++) { if (edges[node][v] && visited[v] == fals...
ALGO
0.999862
4.65386
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2019-06-15T01:55:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f543b69...
63a2a9b6-8063-44ad-a9c3-2a5d4aef79cc
mdnh42/Problem_Solving_CP
Week_13/Day_04/D_Friends_and_the_Restaurant.cpp
/* itzmrnh */ #include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <typename T> using pbds = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define ll long long int #define yes cout...
ALGO
0.999965
4.526996
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2023-06-04T16:45:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d07a0831cd9...