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
cd67195f-03e9-4f30-a2a5-5b2a02c5cb85
YotaFujii1/AUTD_250509
include/autd3/driver/datagram/stm/foci.hpp
#pragma once #include <optional> #include <ranges> #include "autd3/driver/datagram/stm/stm.hpp" #include "autd3/driver/datagram/tuple.hpp" #include "autd3/driver/datagram/with_segment.hpp" #include "autd3/driver/defined/freq.hpp" #include "autd3/driver/firmware/fpga/loop_behavior.hpp" #include "autd3/driver/firmware/...
TOOL
0.927205
7.159391
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2025-05-09T08:47: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": "0342d7f872...
aa713b0a-d979-4a8f-a53c-e09b63f92e27
entwanne/cluser_rt
client/Rt/matrix.hpp
#ifndef _RT_MATRIX_HPP_ #define _RT_MATRIX_HPP_ #include <array> namespace Rt { typedef std::array< std::array< double, 4 >, 4 > matrix_t; inline matrix_t transpose(const matrix_t& m) { matrix_t n; for (int y = 0; y < 4; ++y) for (int x = 0; x < 4; ++x) n[y][x] = m[x][y]; return n; } } te...
ALGO
0.994015
5.189691
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2014-02-28T16:58:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "beb2880d1...
348e2e56-c728-4f35-bb41-5a212d600d57
nhuin/CppRO
src/CppRO/FibonacciHeap.hpp
#ifndef FIBONACCI_HEAP_HPP #define FIBONACCI_HEAP_HPP #include "FixedSizeAllocator.hpp" #include <algorithm> #include <cassert> #include <list> #include <vector> template <typename T, typename Comparator = std::less<T>> class FibonacciHeap { public: struct Node { T value; private: explici...
ALGO
0.998688
6.5288
{ "github_metadata": { "branch": "master", "commit_count": 174, "repo_created_at": "2018-02-28T14:27: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": "e7f4cbcf...
7fcf7b44-06f9-4326-8e95-873a330a761a
tauhrick/Competitive-Programming
Contests/Codeforces/Ed-R-106/1499B.cpp
#ifndef LOCAL #include <bits/stdc++.h> using namespace std; #define debug(...) 42 #else #include "Debug.hpp" #endif class Task { public: void Perform() { Read(); Solve(); } private: string s; void Read() { cin >> s; } void Solve() { bool two_ones = false; for (int i = 0; i + 1 <...
ALGO
0.999856
4.921713
{ "github_metadata": { "branch": "master", "commit_count": 266, "repo_created_at": "2019-06-24T10:51:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a26ac656...
cc6e21a7-6499-4ad0-8a23-5358d7d19e79
Shahraaz/CP_S5
codeforces/DIV2_664/b.cpp
// Optimise #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "/home/shahraaz/bin/debug.h" #else #define db(...) #endif using ll = long long; #define f first #define s second #define pb push_back #define all(v) v.begin(), v.end() const int NAX = 100 + 5, MOD = 1000000007; bool vis[NAX][NAX]; bool ...
ALGO
0.999988
3.050033
{ "github_metadata": { "branch": "master", "commit_count": 219, "repo_created_at": "2019-07-15T23:57:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5254c051...
ee3fdc50-e87d-4902-bebf-94893ef5ae64
ishandutta2007/codeforces-e
eecs/normal/1548/E.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 200010; int n, m, X, a[maxn], b[maxn], c[maxn], d[maxn], tr[maxn]; long long ans; vector<int> M[maxn]; vector<pair<int, int>> Q[maxn]; void add(int p) { for (; p <= X; p += p & -p) tr[p]++; } int sum(int p) { int s = 0; for (; p; p -= p & -p)...
ALGO
0.999941
3.925486
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:34: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": "828983aa20af...
e989858b-f0d0-40f1-a4ab-631a85da5664
Nanako7-ix/AlgorithmExperiment
experiment3/solveAlgo/BurteForce.hpp
#pragma once #include <bits/stdc++.h> int BurteForce(const int n, const std::vector<std::vector<int>>& adj, const int count, const bool find_first = false) { std::vector<int> col(n + 1); auto check = [&]() -> bool { for (int u = 1; u <= n; ++u) { for (auto v : adj[u]) { ...
ALGO
0.999761
5.411054
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2025-05-31T15:08: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": "4851215f9...
9b9eaf86-0e60-4980-851f-281897a3d31a
ggome009/ARan-Concept
opencv-master/modules/imgproc/src/smooth.cpp
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
ALGO
0.978957
3.066607
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-02-04T17:14:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55da6b7482...
b32eddb2-9340-4d54-949c-8bc0a5815a07
nilanjanajui/Data-Structures
Practice Problems/Graphs/Dijktra's_Algorithm.cpp
#include<iostream> #include<vector> #include<queue> #define INF 1e9 using namespace std; int main() { int nodes, edges; cout << "Enter number of Nodes and Edges: " << endl; cin >> nodes >> edges; vector<pair<int, int>> adj[nodes + 1]; cout << "Enter " << edges << " edges and weight (u v w):\n"...
ALGO
0.999937
3.923665
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2025-02-06T18:12: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": "c380e980695...
206d10ca-6e69-4f1a-b3a6-accb1fd4d3fc
Ganber/TetrisGame
TetrisGame/TetrisGame/Bomb.cpp
#include "Bomb.h" int Bomb::createExplotion(char mapArr[][Game::WIDTH+1]) { int hitShapeCounter = 0; for (int i = -1; i < 2; i++) { for (int j = -1; j < 2; j++) { int y = this->getShapeArr()[0].getY() + i; //the y value of the bomb +i int x = this->getShapeArr()[0].getX() + j; //the x value of the bomb +j ...
TOOL
0.918114
3.898453
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2017-12-03T06:26:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa8fb593d...
36f1ec1f-ff73-4a46-a169-69361757ad3a
aliabbasnagari/Progrmming-Fundamental-Practise-Tasks
Assignment_2/4.cpp
#include <iostream> #include <iomanip> #include <cmath> using namespace std; // Signatures of functions float distance_Z(float, float); float time_X(float, float); float time_Y(float, float); float average_Velocity(float, float); // Main function int main() { // Variable declaration float X, x_Speed, x_Time, Y...
ALGO
0.994346
5.153766
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2021-12-06T20:50:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "919ac505eb20...
f1f019f0-ab1d-47f1-a98d-fce0226ad7e2
JohnGrime/MolecularUtilities
Programs/Centroids.cpp
/* Author: <NAME>, The University of Chicago. */ #include "../Util/Util.h" using namespace Util; // // Calculates centoids of point sets. // Assumes inputs already superposed onto a common reference frame! // class AtomInfo { public: // // Key for info map - sorts on resSeq, then resName, then atom name. ...
ALGO
0.932507
5.355258
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2018-06-12T21:00: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": "60f1a8f3a...
2d41f173-a292-4e55-a043-9f4cb814fbbe
Flipfloppm/aoc-solutions
2024/day3/d3p2.cpp
#include <iostream> #include <fstream> #include <string> #include <unordered_map> #define INPUT_FILE "input.txt" using namespace std; unordered_map<int, unordered_map<char, int> > transition_map; void init_transition_map() { transition_map[0]['m'] = 1; transition_map[1]['u'] = 2; transition_map[2]['l'] =...
ALGO
0.999877
4.305899
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2024-12-07T05:10: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": "65c422e2711...
71fda2e8-7efa-4001-9ab0-6cdf080773c0
Kawser-nerd/CLCDSA
Source Codes/AtCoder/arc097/A/2574231.cpp
#include <iostream> #include <string> #include <vector> #include <map> #include <algorithm> using namespace std; void insert(vector<string> &cont, string value) { auto it = lower_bound(cont.begin(), cont.end(), value, less<string>()); cont.insert(it, value); } int main() { string str; int n; cin >...
ALGO
0.999991
3.411272
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-09-30T05:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "b208d9e0...
95705eb8-1c23-4000-9356-1f74f17d5ac7
LittleTimeCc/PAT
PAT (Advanced Level) Practise/1005. Spell It Right (20).cpp
/* 1005. Spell It Right (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 <NAME> Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Specification: Each input file contains one test case. Each case occupies one lin...
ALGO
0.999729
5.193438
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2017-12-11T04:26:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cb4c97f06...
70ffa8b4-6b42-4a86-94f3-8d22520008da
IshanManchanda/competitive-cpp
Codeforces/ladders/id15 - d4/28 - 332B - Maximum Absurdity.cpp
//#pragma GCC optimize("O2,unroll-loops") //#pragma GCC target("avx,avx2,fma,tune=native") //#pragma GCC target("avx,avx2,fma") #include <bits/stdc++.h> using namespace std; #define F first #define S second #define all(x) begin(x), end(x) #define rall(x) (x).rbegin(), (x).rend() #define PB emplace_back #define MP ma...
ALGO
0.999978
3.836987
{ "github_metadata": { "branch": "master", "commit_count": 144, "repo_created_at": "2019-04-29T11:25: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": "dc4e5e7b...
dfecf4b5-eba6-4d96-9b97-eda06ab64025
kingcheng2000/rdkit-rdkit
Code/GraphMol/Fingerprints/Fingerprints.cpp
// $Id$ // // Copyright (C) 2003-2010 <NAME> and Rational Discovery LLC // // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit source tree. // #include <GraphMo...
ALGO
0.996963
4.340764
{ "github_metadata": { "branch": "AlternateValence_21Nov2012", "commit_count": 2004, "repo_created_at": "2020-12-08T03:11:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "c...
964378f8-6446-4c24-9e64-9a894063e1ba
Deanamic/UPC2-PDF
content/graph/Blossom.h
/** * Author: Dean * License: CC0 * Description: Computes a MaxMatching on a graph * Usage:Pass x, y the number of vertices and edges, mat[i] provides the matching or is 0 if unmatched, out prints in nice format. * Source: uoj.ac submission * Status: Tested on uoj and timus */ #include<bits/stdc++.h> using names...
ALGO
0.999969
3.498909
{ "github_metadata": { "branch": "master", "commit_count": 176, "repo_created_at": "2017-10-09T21:07: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": "42934a11...
12e591da-d295-4aa5-9b45-67f5335f0731
geopaparazzi/libjsqlite-spatialite-android
libjsqlite-spatialite-android/spatialite-android-library/jni/proj-6.1.1/src/projections/tmerc.cpp
/* * Transverse Mercator implementations * * In this file two transverse mercator implementations are found. One of Gerald * Evenden/<NAME> origin and one of <NAME>/<NAME> origin. The * former is regarded as "approximate" in the following and the latter is "exact". * This word choice has been made to ...
ALGO
0.999107
6.059871
{ "github_metadata": { "branch": "master", "commit_count": 111, "repo_created_at": "2013-12-05T07:39:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 78, "forks": 24, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "ecd2cba...
95cf6d76-697f-4373-a453-71465b2baa38
MarleneBarahona/Labo04-AA
MisingNumber.cpp
#include <bits/stdc++.h> using namespace std; // Una función para cambiar dos elementos void swap(int* a, int* b){ int t = *a; *a = *b; *b = t; } /* Esta función toma el último elemento como pivote, lo coloca en su posición correcta en el arreglo y posiciona todos los elementos menores a la izquierda y los ...
ALGO
0.99948
3.312199
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-09-19T02:47: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": "a58b9ae801...
7b985266-db9c-4b34-af74-32f222de4a5a
linxichen/jq_nobond_noadjustment
cuda_helpers.h
#include <cstdio> #include <fstream> #include <iostream> #include <iomanip> #include <string> // This function converts index to subscripts like ind2sub in MATLAB __host__ __device__ void ind2sub(int length_size, int* siz_vec, int index, int* subs) { // Purpose: Converts index to subscripts. i -> [i_1, i_2, ..., i_n]...
ALGO
0.995739
4.396486
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2014-05-26T04:24:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "88a9c850f...
aaceea3d-3177-4a25-b096-acf4c97ba8a8
Sourav61/Leetcode-Practice
1192-critical-connections-in-a-network/1192-critical-connections-in-a-network.cpp
class Solution { public: vector<int> tin; vector<int> low; vector<int> vis; vector<vector<int>> graph; vector<vector<int>> ans; void dfs(int node, int parent, int timer) { vis[node] = 1; tin[node] = low[node] = timer++; for (auto &x : graph[node]) { ...
ALGO
0.999971
5.748075
{ "github_metadata": { "branch": "main", "commit_count": 1782, "repo_created_at": "2022-06-09T16:26:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "725859600...
60f2758c-cc06-4eab-a811-46cfec662405
Leonardo16AM/ICPC-WF-2023-UH-Top
Extended team reference/data_structures/persistent_array.cpp
struct node{ node *l, *r; int value; }; node* clone(node *u){ node *ans = new node(); ans->l = u->l, ans->r = u->r, ans->value = u->value; return ans; } node* build(int b, int e){ node *ans = new node(); if (b + 1 < e){ int m = (b + e) >> 1; ans->l = build(b, m); an...
ALGO
0.999985
4.771196
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-07-24T13:30:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9f2f682cc1...
8a26085b-6e4a-4eb8-b487-8d5ee7ab7af8
Jyunpp/Algorithm
acmicpc.net February 2019/20190213/9205.cpp
// 20190213 01:50 ~ #include <iostream> #include <stdio.h> #include <stdlib.h> #include <string> #include <memory.h> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <math.h> using namespace std; #define sd(x) scanf(" %d", &x); #define slld(x) scanf(" %lld", &x); #define pb push_back ...
ALGO
0.99991
3.407534
{ "github_metadata": { "branch": "master", "commit_count": 239, "repo_created_at": "2017-03-05T09:03:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bbe4b639...
8caa404b-3f80-4a08-89b6-761173717ac7
JocelynHub/leetCode
224.基本计算器.cpp
/* * @lc app=leetcode.cn id=224 lang=cpp * * [224] 基本计算器 * 栈来实现计算器 * 存在数字栈 操作符栈 类似最小栈来处理 * 状态机 概念 * 是否进行计算的标志位 * 处理为 long long */ // @lc code=start #include <string> #include <stack> using namespace std; class Solution { public: int calculate(string s) { static const int STATE_BEGIN = 0; ...
ALGO
0.999979
4.818418
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-03-06T10:57: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": "86b9dcda79ef...
ab51a798-f0b2-4dcb-8492-ff0032cca79d
Chetandev16/C_Plus_Plus
Heap/deletion.cpp
#include <bits/stdc++.h> using namespace std; class Heap { public: int arr[100]; int size; Heap() { arr[0] = -1; size = 0; } void insert(int val) { size++; int index = size; arr[index] = val; while (index > 1) { int paren...
ALGO
0.999911
4.686086
{ "github_metadata": { "branch": "main", "commit_count": 92, "repo_created_at": "2021-09-03T15:09:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9130d4e9c3e...
1a5ade87-0828-42f3-b2e0-a8669958af39
Relph1119/cpp-primer-plus
exercises/ch16/ex08.cpp
// // Created by HRF on 2022/3/1. // #include <iostream> #include <set> #include <string> using namespace std; int main() { set<string> mat_friends, pat_friends, all_friends; cout << "Please input the name of Mat's friend:"; string name; while (getline(cin, name) && !name.empty()) { mat_frien...
ALGO
0.982216
3.937561
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2022-01-30T15:22:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 15, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "91ff1c3c...
aadc52b7-8850-432d-8f29-08732150aa64
Amit-code-eng/DSA
DS_Algo/Query_on_a_tree_again.cpp
#include<bits/stdc++.h> using namespace std; static int seg[1000000+7]; class HLD{ public: vector<vector<int>>g; vector<int>dep,hv,head,lt,pos,par,sz; int n,idx=1; HLD(vector<vector<int>>&g){ this->g=g; this->n=g.size(); dep.assign(n+1,0); sz.assign(n+1,0); ...
ALGO
0.999947
4.602631
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2023-06-22T07:30: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": "78f492c4111...
6d23e579-707f-4271-874e-fe575aa52735
semkilljaeden/LeetCodePractice
LeetCodePractice/LeetCodePractice/Q456_132Pattern.cpp
#include "LCHeader.h" #include<set> //3:04 3:23 //nlogn /* Runtime: 12 ms, faster than 79.29% of C++ online submissions for 132 Pattern. Memory Usage: 14.6 MB, less than 10.15% of C++ online submissions for 132 Pattern. */ class Solution { public: bool find132pattern(vector<int>& nums) { vector<int> min(nu...
ALGO
0.999948
5.91162
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2020-06-17T09:11:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "63e050645...
ab66a64b-f513-4326-9d0b-b3894876485e
yular/CCplusplus-Project
ICPC/2014/2014-Asia-Guangzhou-howmanymaoguangxiworth.cpp
/* * * Tag: Graph * Time: O(n^4) * Space: O(n^2) */ #include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <climits> #include <string> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <set> #include <list> #include <unordered_map> #include ...
ALGO
0.999993
3.779258
{ "github_metadata": { "branch": "master", "commit_count": 863, "repo_created_at": "2014-02-22T06:18:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7bda6a3d...
ebbcd2ed-0416-4f06-8e4f-427f5b139eb7
csus4uwu/sync2024
sol/luogu/P3149.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; template <typename T> struct Fenwick { int n; std::vector<T> a; Fenwick(int n_ = 0) { init(n_); } void init(int n_) { n = n_; a.assign(n, T{}); } void add(int x, const T &v) { for (int i =...
ALGO
0.999977
4.549329
{ "github_metadata": { "branch": "main", "commit_count": 829, "repo_created_at": "2024-03-03T00:44: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": "bcb18379da...
64f46681-1589-4666-9e59-ff2297d876cb
Turbo-Lelic/Libraries_Arduino
Libraries/Stepper_28BYJ/examples/stepper_oneStepAtATime/stepper_oneStepAtATime.ino
/* Stepper_28BYJ Motor Control - one step at a time This program drives a unipolar or bipolar stepper motor. The motor is attached to digital pins 8 - 11 of the Arduino. Эта программ управляет униполярным или биполярным шаговым двигателем. Шаговый двигатель присоединён к цифровым выходам 8-11 платы Arduino. ...
TOOL
0.920259
5.648951
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-11-14T10:56:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35d95934d7...
4bc4346f-a4e5-49ed-ac1f-bae583064a2f
jason-ryu94/algorithm
확장게임.cpp
#include <iostream> #include <queue> #include <deque>; #include <vector> #include <cstring> #include <tuple> #include <cstdlib> #include <algorithm> #include <tuple> #include <set> #include <string> #include <map> #include <iomanip> #include <stack> using namespace std; int n, m, p; int s[10]; int a[1000][1000]; int d[...
ALGO
0.999917
3.691488
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2020-04-20T16:59:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "73ad00869...
e24864af-53b2-4721-9712-40afb4fcc87a
phaistos-networks/TANK
Switch/ext/FastPFor/headers/fastpfor.h
/** * This code is released under the * Apache License Version 2.0 http://www.apache.org/licenses/. * * (c) <NAME>, http://lemire.me/en/ */ #ifndef EPFOR_H_ #define EPFOR_H_ #include "common.h" #include "codecs.h" #include "packingvectors.h" #include "cpubenchmark.h" #include "blockpacking.h" #include "simple8b.h...
ALGO
0.996376
7.196303
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2016-06-29T14:35:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 937, "forks": 70, "issues": 31, "pull_requests": 2 }, "file_meta": { "content_id": "f28f04...
45eeb55d-2d70-42aa-8528-ed5b079d7f87
nafeezKhan/FirstProject
B. Two Arrays And Swaps(1353B).cpp
#include <iostream> #include <cmath> #include <algorithm> using namespace std; int main(int argc, char const *argv[]) { int t; cin >> t; while (t--) { int n, k; cin >> n >> k; int a[n], b[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } ...
ALGO
0.999997
3.626916
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-18T08: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": "2d451560bd60...
b800ca72-6bbf-4776-9bee-7efcb6ee8050
Leaves333/cs491-cap
single_source_shortest_path/b.cpp
#pragma optimize("O3") #include <bits/stdc++.h> using namespace std; #define all(x) begin(x), end(x) typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ll> vll; typedef vector<vll> vvll; struct edge { int dest, weight; }; in...
ALGO
0.999979
4.048204
{ "github_metadata": { "branch": "master", "commit_count": 130, "repo_created_at": "2025-02-20T15:14: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": "23f2830d...
d580530e-6bc0-4c75-b29e-2d39072686f9
LateJune/OpenGL-Line-Art
Source.cpp
#define _USE_MATH_DEFINES #include <iostream> #include <cmath> #include <math.h> #include "glut.h" void display(void) { glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_LINES); double radius{ 0.9 }; double angle{ 0.0 }; double incrementAngle{ 0.0 }; int numOfSides{ 0 }; int numOfLines{ 0 }; std::cout << "Enter the n...
ALGO
0.995854
4.881982
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-10-25T03:10:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4d74ea31fa...
ac993be9-0b0f-4e93-a8fb-796dc83ff567
VictoriaShirleyUnifei/ECOP13A
LABORATORIOS/LAB_11/ex02.cpp
// ex02.cpp #include <iostream> #include <list> using namespace std; int main() { list<int> minhaLista; int escolha; do { cout << "===============================" << endl; cout << "Implementacao de Lista no STL" << endl; cout << "===============================" << endl; ...
ALGO
0.948665
5.607434
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2025-03-28T19:51: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": "10fd08535cc...
a326c29c-63fb-4de6-974b-fb4543d07345
JaroslavUrbann/ICPC-library
numerical/mint.cpp
const int mod=998244353; // (119<<23)+1 template<int M,int R> struct modnum{ int v; static int minv(int a,int m){return (a%=m)==1?1:m-ll(minv(m,a))*m/a;} static constexpr modnum root(){return R;} static constexpr int mod(){return M;} modnum():v(0){} modnum(ll v_):v(int(v_%M)){if(v<0)v+=M;} explicit operator int(...
ALGO
0.999605
3.795107
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2021-07-19T09:19:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59e6d3e0e043...
7f8285ca-d8c4-40bd-9679-5a7f1b81bf61
apache/doris
be/src/olap/rowset/segment_v2/inverted_index_cache.cpp
// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may...
TOOL
0.95191
6.9444
{ "github_metadata": { "branch": "master", "commit_count": 26499, "repo_created_at": "2017-08-10T12:13:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13962, "forks": 3497, "issues": 2697, "pull_requests": 616 }, "file_meta": { "content_i...
2188f922-c1b4-4f7a-b41b-44de0f10bd8a
coder2hacker/Explore-open-source
LeetCode/Largest subarray with 0 sum/Largest subarray 0 sum.cpp
//SOLUTION class Solution { public: int maxLen (vector < int >&A, int n) { int maxi = 0; int sum = 0; unordered_map < int, int >m; for (int i = 0; i < n; i++) { sum += A[i]; if (sum == 0) { maxi = i + 1; } else { ...
ALGO
0.999903
5.103016
{ "github_metadata": { "branch": "main", "commit_count": 2176, "repo_created_at": "2020-12-19T14:27:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 54, "forks": 363, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50a8325...
58833026-a165-49be-ae7e-9b6a8f52a540
TimurYamchuk/7.-------------------2
main.cpp
#include <iostream> #include <map> #include <string> using namespace std; map<string, string> dictionary; int main() { int choice; string word, definition; while (true) { cout << "\nМеню:" << endl; cout << "1. Добавить/Обновить слово" << endl; cout << "2. Удалить слово" << endl; ...
TOOL
0.909542
4.365314
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-09-28T10:49: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": "00a94c8e2723...
b3b32b53-d9e0-4f58-8e3c-0c02271a56b1
pt13762104/code-archive
square2.0.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #ifndef yoshi_likes_e4 #define endl '\n' #endif #define problem "" #define multitest 0 #define debug(x) cerr << #x << " = " << x << endl; void init() { } void Yoshi() { int x; cin >> x; int a[3] = {x, x + 1, 2 * x + 1}; for (auto &i : a...
ALGO
0.999967
4.162717
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-16T08:19: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": "d1012ed7651f...
97199cef-e994-4449-86f2-831003c4f93c
ishandutta2007/codeforces-e
errichto/normal/1044/D.cpp
#ifndef LOCAL #pragma GCC optimize("O3") #endif #include "bits/stdc++.h" using namespace std; #define sim template < class c #define ris return * this #define dor > debug & operator << #define eni(x) sim > typename \ enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) { sim > struct rge { c b, e; }; sim > r...
ALGO
0.999833
4.56781
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:34: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": "13284b58c5c7...
53b6c133-d9c0-4fd3-a081-94b95287846d
mokhtarivahid/sefcm
main.cpp
/*************************************************************************** * Copyright (C) 2007 by <NAME> and <NAME> * * <EMAIL> * * <EMAIL> * * ...
ALGO
0.996379
3.510771
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-02-16T17:56:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76a4cce5a5...
2b9a81cb-885e-4f0b-b34a-7b1abc1ac4f6
maryialejandra/CursoFCII_UdeA-2020-2
Documentos/Seguimiento1/CC1017248976/Dice/Dice_Array.cpp
#include <iostream> #include <iomanip> #include <cstdlib> //rand function #include <ctime> using std::setw; using std::rand; using namespace std; int main() { const int LA= 13; // LengthArray longitud del arreglo (2-12) int Frecuency[LA]={}; //Arreglo para la frecuencia srand(time(NULL)); //semilla con el rel...
ALGO
0.987673
3.301682
{ "github_metadata": { "branch": "master", "commit_count": 616, "repo_created_at": "2020-08-20T13:35:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 22, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4b300ba...
f8523f9c-eb62-4354-bc53-619f99fded13
hohehohe2/fluid
sph/CalculatorPressure.cpp
#include "CalculatorPressure.h" #include "Constants.h" #include <hohe2Common/container/CellCodeCalculator.h> #include <hohe2Common/container/CompactHash.h> #include "ParticlesFluid.h" #include "particlesWall.h" #include "FluidSolverSimpleSph.h" using namespace hohehohe2; //------------------------------------------...
ALGO
0.999005
4.819906
{ "github_metadata": { "branch": "master", "commit_count": 141, "repo_created_at": "2015-11-13T07:31: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": "a777758d...
3f28e568-c6ff-4f28-a553-d4127c7e1e9f
isaigm/leetcode
validate-binary-tree-nodes/Wrong Answer/3-27-2021, 2_32_47 AM/Solution.cpp
// https://leetcode.com/problems/validate-binary-tree-nodes class Solution { public: bool validateBinaryTreeNodes(int n, vector<int>& leftChild, vector<int>& rightChild) { std::map<int, int> m; std::map<int, std::pair<int, int>> childs; int root = 0; for(int i = 0; i < n; i++) ...
ALGO
0.999959
5.893415
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-03-20T06:00:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6751b74bcf...
5b405784-2d5f-4cea-b9a1-fb691b5c468d
MiraclesinWang/ACM_exercise
动态规划/插头dp/HDU1693.cpp
#include <cstdio> #include <cstring> #include <cmath> using namespace std; const int maxs = (1<<12); #define ll long long ll dp[15][15][maxs][2]; int mp[15][15]; int n, m; int solve() { scanf("%d%d", &n, &m); for(int i = 1; i <= n; i++){ scanf("\n"); for (int j = 1; j <= m; j++) scanf("%d", &mp[i][j]); } ...
ALGO
0.999929
3.597546
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-10-10T07:16:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b809cf14b851...
4ebfdec5-349d-4e17-af3a-1256b472bba1
zh-plus/Code_Library_Cpp
Codeforces/Round580_div2/A.cpp
// // Created by 10578 on 2019/8/18. // #include <iostream> #include <set> #include <vector> using namespace std; #define BOOST_IO ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); pair<int, int> solve(int n, vector<int> A, int m, vector<int> B) { set<int> a_set(A.begin(), A.end()); set<...
ALGO
0.999997
4.027063
{ "github_metadata": { "branch": "master", "commit_count": 136, "repo_created_at": "2019-08-15T01:38:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "081e9fe5...
6d74e5ab-c0aa-4921-856b-c95fc198f1c8
snwagh/securenn-public
src/secondary.cpp
#include "secondary.h" #include <iostream> using namespace std; //this player number int partyNum; //aes_key of the party char *party_aes_key; //For faster DGK computation smallType additionModPrime[PRIME_NUMBER][PRIME_NUMBER]; smallType multiplicationModPrime[PRIME_NUMBER][PRIME_NUMBER]; //communication extern ...
DATA
0.960459
3.259686
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-02-20T21:07:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 130, "forks": 29, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "2651cac...
6324b496-604c-4c9c-b973-7e8346a97b9f
daxiangpanda/FutureHuawei
FutureNet/future_net/route.cpp
#include "route.h" #include "lib_record.h" #include <stdio.h> #include <iostream> #include <cstdlib> #include <cstring> #include <ctime> #include <algorithm> //constant const int MAXV = 600 + 5; const int MAXE = 600 * 8 + 5; //variable int S, T; //start and end vertice int edge_num; int demand[MAXV]; int Stime; //func...
ALGO
0.999744
3.346794
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-03-21T09:23:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "818036942d...
28bec4ff-6174-45e2-a9fb-042a5554e20a
stellar-deprecated/stellard
src/beast/beast/crypto/tests/BinaryEncoding.cpp
//------------------------------------------------------------------------------ /* This file is part of Beast: https://github.com/vinniefalco/Beast Copyright 2013, <NAME> <<EMAIL>> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted,...
ALGO
0.911361
7.52309
{ "github_metadata": { "branch": "master", "commit_count": 8600, "repo_created_at": "2014-04-23T16:15:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 268, "forks": 60, "issues": 62, "pull_requests": 0 }, "file_meta": { "content_id": "9f89...
8adc7b52-d86d-4fd9-872b-37ba47ed3fc7
rishabhs/sygus-comp14
solvers/enumerative/esolver-synth-lib/src/z3-4.3.1/src/ast/rewriter/array_rewriter.cpp
/*++ Copyright (c) 2011 Microsoft Corporation Module Name: array_rewriter.cpp Abstract: Basic rewriting rules for Arrays. Author: Leonardo (leonardo) 2011-04-06 Notes: --*/ #include"array_rewriter.h" #include"ast_lt.h" #include"ast_pp.h" void array_rewriter::updt_params(params_ref const & p) { ...
TOOL
0.92813
6.807182
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2014-01-02T19:42:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 40, "forks": 19, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "6f9d920...
7133953c-d589-4a71-873d-755e9144d95a
stan-dev/math
stan/math/opencl/prim/weibull_cdf.hpp
#ifndef STAN_MATH_OPENCL_PRIM_WEIBULL_CDF_HPP #define STAN_MATH_OPENCL_PRIM_WEIBULL_CDF_HPP #ifdef STAN_OPENCL #include <stan/math/prim/meta.hpp> #include <stan/math/prim/err.hpp> #include <stan/math/prim/fun/constants.hpp> #include <stan/math/prim/fun/elt_divide.hpp> #include <stan/math/prim/fun/elt_multiply.hpp> #in...
ALGO
0.997524
7.252251
{ "github_metadata": { "branch": "develop", "commit_count": 28933, "repo_created_at": "2015-07-01T18:40:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 785, "forks": 195, "issues": 298, "pull_requests": 19 }, "file_meta": { "content_id": ...
3e14bc93-248b-48e1-8cdc-caf22a450936
ishandutta2007/codeforces-b
bredor/normal/18/A.cpp
// 228 #include <bits/stdc++.h> using namespace std; #define int long long #define endl '\n' #define pb push_back #define mod 1000000007 #define ff first #define ss second #define all(x) (x).begin(), (x).end() #define PI 3.1415926535 #define INF INT_MAX #define SPEED \ ios_base::sync_with_std...
ALGO
0.999886
3.911638
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a4a6e74caf4...
b0584251-b475-4c42-95a7-0dedb871236d
emSantos12/CPP-Data-Structures
LinkedList/IntegerList.cpp
/**@file written by <NAME> and <NAME> on 1July2015 * @brief This file contains the implementation of IntegerList class using vector class*/ #include "IntegerList.h" #include <assert.h> #include <iostream> #include <cstdlib> using namespace std; IntegerList::IntegerList() { length = 0; listHead = NULL; listTail = ...
TOOL
0.943393
5.342131
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-02-04T22:31: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": "07bacf9873...
1f99b667-f426-4b9a-8849-3f771f25c54d
OloieriAlexandru/Competitive-Programming-Training
codeforces/803D.cpp
#include <bits/stdc++.h> using namespace std; int k, ln, ans; string s; bool ok(int m) { int nrr = 1, lst = -1, act = 0; for (int i=0;i<ln;++i) { ++act; if (act > m) { if (lst == -1) return false; ++nrr; act = i - lst; lst = -1; ...
ALGO
0.999558
3.669067
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2019-05-29T19:18:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "188014744...
3e45d304-4805-4803-bee2-3334f9d5085b
aneeshareddybathina/Aneesha-Reddy
exercise 7.cpp
#include <stdio.h> struct Process { int id; // Process ID int burstTime; // Burst time of the process int arrivalTime; // Arrival time of the process int completionTime; // Completion time of the process int waitingTime; // Waiting time of the process int turnaroundTime; ...
ALGO
0.999942
5.334434
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2024-07-17T15:42:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ac334662cc...
9471ab10-02f0-4305-85fb-9625d6639089
a-dev1/CP-Repo
challenges/BACK/Virtual/719/A_Do_Not_Be_Distracted_.cpp
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <set> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; #define ar array #define ll long long const int MAX_N = 1e5 + 1; const ll MOD = 1e9 + 7; const ll INF = 1e9; int main() {...
ALGO
0.999972
4.194147
{ "github_metadata": { "branch": "main", "commit_count": 174, "repo_created_at": "2021-06-14T18:35:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ead4b6769...
92ca69c3-e9a5-4936-bb46-6ec14884d734
mikkoteras/softrend
src/math/vector_util.cpp.h
#include "math_detail.h" #include <algorithm> namespace math { template<typename float_t, int dim> vector<float_t, dim> elementwise_min(const vector<float_t, dim> &lhs, const vector<float_t, dim> &rhs) { vector<float_t, dim> result; for (int i = 0; i < dim; ++i) result[i] = std::mi...
TOOL
0.98792
5.04254
{ "github_metadata": { "branch": "master", "commit_count": 458, "repo_created_at": "2017-11-11T06:36: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": "ae5f9b32...
f0183d97-b257-4036-9605-f96895036f03
JunShern/motor-controller
main.cpp
#include "mbed.h" #include <string> #include "rtos.h" #include "PID.h" //Photointerrupter input pins #define I1pin D2 #define I2pin D11 #define I3pin D12 //Incremental encoder input pins #define CHA D7 #define CHB D8 //Motor Drive output pins //Mask in output byte #define L1Lpin D4 //0x01 #define L...
TOOL
0.922792
4.382066
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-03-24T19:50: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": "43774b51a9...
e7f64b08-1e07-413b-bbde-7f8a2b4be45b
initviks7d7t/initviks7d7t
src/visitor.cpp
#include <iostream> #include <map> #include <jsonsimplecpp/node.hpp> #include <jsonsimplecpp/parser.hpp> #include <complex> #include <optional> #include <fstream> #include <queue> #include <simulation.hpp> #include <forwardDecl.hpp> #include <fileutils.hpp> #include <matlayer.hpp> #include <visitor.hpp> void ConfigV...
TOOL
0.918069
6.058747
{ "github_metadata": { "branch": "main", "commit_count": 199, "repo_created_at": "2021-12-12T11:30: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": "21214ffa76...
54ab919b-29d6-4bb5-b8d0-7808117776a4
ishandutta2007/codeforces-d
dragonslayerintraining/normal/1267/E.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <cstdio> #include <map> #include <queue> #include <set> #include <iomanip> #include <deque> #include <cassert> #include <ctime> #include <cstring> #include <cstdlib> #include <chrono> #include <ctime> #include <random> #include <stack>...
ALGO
0.999996
3.220977
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:31: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": "947df0d6f0d7...
9f749a0c-8780-47f2-a27f-b69c9972ad09
coldEr66/online-judge
CF/960F.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double lf; typedef pair<ll,ll> ii; typedef pair<ii,ll> iii; #define REP(i,n) for(int i=0;i<n;i++) #define REP1(i,n) for(ll i=1;i<=n;i++) #define RST(i,n) memset(i,n,sizeof i) #define SZ(a) (int)a.size() #define ALL(a) a.begin(),a.end() #define ...
ALGO
0.999995
3.734256
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2018-04-07T03:54:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8da0650a6...
add78748-1abd-4702-92b8-e3434266b77c
Brenokly/Calculo_Numerico
Unidade II Resolução de Sistemas Lineares ⚖️/MétodoGaussiano.cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; // Protótipos de função double frobeniusNorm(double** matriz, int tam); double** inverseMatrix(double** matrix, int n); double determinant(double** matrix, int n); void swapRows(double** matrix, int row1, int row2); bool verifyLinearidade(dou...
ALGO
0.999823
4.879648
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-10-23T23:13:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "899db479b5f...
88dd574b-2abc-4435-8f6f-535675998bc9
alexandraback/datacollection
solutions_5662291475300352_0/C++/nikhil30/c.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int lol; typedef unsigned long long int ull; #define cin fin #define cout fout #define pb push_back #define mp make_pair bool between(int prev,int curr,int pos); int main() { ifstream fin; ofstream fout; fin.open("C-small-1-attempt0.in"...
ALGO
0.999878
3.529425
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c964b3fde...
5e3c569f-67d6-4a22-b5fe-167addd75b3b
muhammadyaseen01/DSA
Trees/postfix_evaluation.cpp
#include<iostream> #include<string> #include<cstdlib> #include<math.h> using namespace std; struct Stack { int val; Stack *next; }; Stack *head = NULL; int currSize=0; bool isEmpty() { return head == NULL; } void push(int new_val){ //overflow ki condition Stack *new_node = new Stack(); new_no...
ALGO
0.999932
3.845704
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2023-08-30T14:46:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4591c86c1...
6141b9c7-25b1-4f68-a9d4-52758c433fe1
wbzhang233/interviews_2020_fall
heapSort.cpp
// // Created by wbzhang on 2020/9/15. // #include <iostream> using namespace std; void max_heapify(int arr[], int start, int end) { // 建立父结点指标和子结点指标 int dad = start; int son = dad * 2 + 1; while (son <= end) { // 子结点指标在范围内才做比较 if (son + 1 <= end && arr[son] < arr[son + 1]) // 先比较两个子结点大小,选择最大的 son++; ...
ALGO
0.999886
4.707838
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-09-13T12:50:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34098bfa0e...
6cb40d70-a132-4ee9-8839-023c28b1fe7c
yanayukhimuk/Lab_work_8
Source.cpp
#include "Info.h" #include "Func.h" #include <Windows.h> int userMenu() { system("cls"); cout << "Выберите действие: \n" << "1. загрузить данные из файла\n" << "2. вывод данных на экран\n" << "3. добавление данных\n" << "4. сортировка базы данных по алфавиту(по фамилии)\n" << "5. сортировка базы данных по ...
TOOL
0.964194
3.746046
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-11-28T06:01:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11d2e90255...
e2152a61-c265-4574-b749-9ab64392aa1f
Akash225274/SEPARATION-OF-STUDENTS-BASED-ON-MARKS-SUCH-AS-FAIL
SEPARATION OF STUDENTS BASED ON MARKS SUCH AS FAIL.cpp
#include <stdio.h> #include <string.h> // Define a structure for student data struct Student { int rollNo; char name[50]; float marks; char section[10]; // Section added }; void enterStudentData(struct Student students[], int totalStudents); void displayStudentData(struct Student students[], int tota...
TOOL
0.967383
5.334399
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-03-13T09:02:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6c0eec99e73e...
7d39cf82-ee5a-49d7-8855-f4f8e4752852
homer6/c_reading
boost-trunk/boost/geometry/extensions/algorithms/buffer/sectionalizing_buffer.hpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2011 <NAME>, Amsterdam, the Netherlands. // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST...
ALGO
0.987076
6.400109
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2011-04-30T04:21:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 25, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c9c819d5e...
9500b5c7-15c8-49df-b112-c6134b9d8f06
SubratKumarSingh2001/Data-Structures-and-Algo-DSA-Supreme
Lectures Codes/Binary-Search Lec1/main (2).cpp
#include <iostream> #include<vector> #include<algorithm> using namespace std; int firstOcc(vector<int> arr, int target) { int s = 0; int e = arr.size() - 1; int mid = s + (e-s)/2; int ans = -1; while(s <= e) { if(arr[mid] == target) { //ans store ans = mid; //left search e = mid ...
ALGO
0.999939
5.142717
{ "github_metadata": { "branch": "main", "commit_count": 318, "repo_created_at": "2023-02-07T05:40:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 79, "forks": 9, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "24e5978d8...
ef34980a-5630-4188-9d8c-e3f262d5eab2
alexandraback/datacollection
solutions_1484496_0/C++/nuzelac/C.cpp
#include <cstdio> using namespace std; int n, br[100]; int sum(int mask) { int sum = 0; for(int i = 0; i < 20; ++i) { if( ((1 << i) & mask) > 0 ) { sum += br[i]; } } return sum; } void ispisi(int mask) { for(int i = 0; i < 20; ++i) { if( ((1 << i) & mask) > 0 ...
ALGO
0.999286
3.360793
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c36db383f...
ad8096d6-2a55-4750-ad7c-c988d0850677
tasogare66/atcoder
ALDS1_11_C.cpp
//http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_11_C&lang=ja //幅優先探索 #include <bits/stdc++.h> #if LOCAL #include "dump.hpp" #else #define dump(...) #endif using namespace std; using ll=long long; #define FOR(i,a,b) for(ll i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) template<class T>bool chmax(T &a, co...
ALGO
0.999956
3.63212
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2019-04-13T16:12: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": "81a748b35...
1286dc60-8e78-4726-b323-2ce344020e8f
svanegas/programming_solutions
Entrenamientos RPC/2014/Entrenamiento III/C - Missing Pages/c2.cpp
#include <algorithm> #include <iostream> #include <iterator> #include <numeric> #include <sstream> #include <fstream> #include <cassert> #include <climits> #include <cstdlib> #include <cstring> #include <string> #include <cstdio> #include <vector> #include <cmath> #include <queue> #include <deque> #include <stack> #inc...
ALGO
0.999849
3.031659
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2013-08-19T23:24:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a812b62...
b3ade992-4e9b-43d7-8f8c-128a5e1b3b3b
RashmiKamdar/OperatingSystemCodes
Fifo.cpp
#include <bits/stdc++.h> using namespace std; int pageFaults(int *pageString, int pageSlots, int n) { int faults = 0; // Set to store the elements present in queue, used to check if a page is present or not unordered_set<int> set; // Queue to maintain the order of insertion queue<int> q; ...
ALGO
0.999868
5.47355
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-01-11T15:36: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": "f7319b5d68aa...
a9a40926-a399-414e-9d92-fd75b151e5a5
ddayzzz/algorithm-and-basic-apps
tjpu-oj/2n皇后.cpp
#include "stdio.h" #include <iostream> #include <cmath> int N; int ans = 0; int maps[9][9];//0 not be place 1 for being placed ;2 is white set;3 is black set int black[9]; int white[9]; bool vaild(int i, bool isblack) { //i表示的是i行 flag[i]表示的是列 需要检查之前的行是否有冲突 int *flag = black; if (!isblack) flag = white; if (maps[i]...
ALGO
0.999936
3.963021
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2018-10-14T06:28: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": "ffc123b080...
8954eebe-409e-4c5c-90fa-6e179a145aeb
dudfoKim/Algorithm
과제/실습 4주차_Quick Sort/Quick Sort.cpp
// 소스 코드 구현을 위한 헤더파일 선언 #include <stdio.h> #include <stdlib.h> #include <windows.h> // 퀵 정렬 구현을 위한 함수 선언random_partition void quickSort(int *array, int p, int q); int partition(int *array, int p, int q); void random_quickSort(int *array, int p, int q); int random_partition(int *array, int p, int q); void swap(int *a, ...
ALGO
0.999783
4.258091
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-05-03T11:43: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": "b9ffef4c6a...
f4839395-31a9-4920-b0b2-391263b27ba8
GheoC/Structuri-de-Date
002_Tema_01/010_Exercitiul10.cpp
///*Exercitiul 10. Se considera o matrice mat cu dimensiunile m*n. Sa se afiseze indicii //acelor coloane, care au toate elementele nenule si sa se construiasca o a //doua matrice rezult care sa aiba exact coloanele din mat gasite anterior*/ // //#include <iostream> //#include <fstream> //#include<iomanip> // //struct ...
ALGO
0.998568
3.118076
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2021-05-16T14:55:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd7e9474d...
deacb25b-3bcb-4a5c-a8a6-e65c79508ae5
santosh500/Project3_CS303
Project/main.cpp
#include <string> #include <cstring> #include <sstream> #include "Morse_Code.h" #include "BinaryTree.h" #include<iostream> #include<fstream> #include<vector> using namespace std; int main() { MorseCode obj; string in, str; string choice; obj.build_encode_tree(); obj.build_decode_tree(); bool started = true...
TOOL
0.970582
3.621179
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2016-11-21T06:39:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "06699203b...
0cea9ac9-910f-496e-8bca-c62866d8ae3a
ishaanshah/Competitive-Programming
Codeforces/Set B/959B. Mahmoud and Ehab and the message.cpp
/* Created by <NAME> on 24-01-2019. * Problem Name: <NAME> Ehab and the message * Problem Link: https://codeforces.com/problemset/problem/959/B */ #include <bits/stdc++.h> #define INF 1e15 using namespace std; long long n, k, m; long long cost[100005]; map <string, long long> mp; string msg[100005]; int main() { ...
ALGO
0.999169
3.811705
{ "github_metadata": { "branch": "master", "commit_count": 202, "repo_created_at": "2018-01-17T07:59:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c08069bf...
0d060d45-76d8-41d8-9f03-66eaa32470db
raincross7/code-similarity
codes/train_code/problem242/problem242_499.cpp
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define ALL(v) begin(v),end(v) #define fi first #define se second template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; } template<typename A, typename B>...
ALGO
0.99988
3.371293
{ "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": "6ee6e48c8f87...
b3b67c4d-cfad-4d79-bb2f-dc1cf2aafc8f
atuljangra/Ukkonen-SuffixTree
suffixTree.cpp
#include "suffixTree.h" #include <iostream> #include <unordered_map> // Required c++11 support. #include <string> #include <cassert> #include <ctime> #include <chrono> using namespace std; // TODO Add proper debug messages using macros. // Buffer for input string. string Input; int inputLength; // The initial tree c...
ALGO
0.999212
3.773402
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2014-03-06T14:42:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 15, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "433075c...
18afa9b5-7e5d-42cf-9904-ddb5cd740362
MonkTanishq/Data-Structure-Algorithm-using-CPP
CPP/Switch_Case/switchHW.cpp
#include<iostream> using namespace std; int main() { int total_amount; int Rs100, Rs50, Rs20, Rs10; cout << "Enter the total amount: "; cin >> total_amount; switch(1) { case 1: Rs100 = total_amount / 100; total_amount %= 100; cout << "Number of Rs100 N...
ALGO
0.979644
3.397062
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2023-02-05T09:00: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": "7e509d5988d...
f42cd860-a784-46ce-9f9c-4e52c35715f9
mattiacurri/Data-Structures
Alberi binari/ESERCIZI/zero_one_binary_tree.h
#ifndef ALBERI_ZERO_ONE_BINARY_TREE_H #define ALBERI_ZERO_ONE_BINARY_TREE_H #include "linkedBinTree.h" template<class T> class zero_one_binary_tree : public BinTree_pt<T> { public: friend BinTree_pt<T>; bool is_zero_one(const BinTree_pt <T> &B); int zero_nodes(const BinTree_pt <T> &B); private: voi...
ALGO
0.951277
5.116607
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-04-23T19:32: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": "53eb02cc61f8...
83f0a741-14f4-4985-9d7c-21a27542742d
nillerusr/source-engine
hammer/clipcode.cpp
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: // // $NoKeywords: $ //=============================================================================// #include "stdafx.h" #include "IEditorTexture.h" #include "MapFace.h" #include "clipcode.h" // memdbgon must be the last i...
ALGO
0.990329
4.782443
{ "github_metadata": { "branch": "master", "commit_count": 551, "repo_created_at": "2020-10-22T15:16:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1850, "forks": 286, "issues": 89, "pull_requests": 19 }, "file_meta": { "content_id": "2...
b7fc3939-b093-4531-bdb1-f4ddbe429a39
rkalz/xbmc4xbox
sources/screensavers/Drempels/gpoly.h
/* * This source file is part of Drempels, a program that falls * under the Gnu Public License (GPL) open-source license. * Use and distribution of this code is regulated by law under * this license. For license details, visit: * http://www.gnu.org/copyleft/gpl.html * * The Drempels open-source pro...
ALGO
0.976497
4.057148
{ "github_metadata": { "branch": "master", "commit_count": 1593, "repo_created_at": "2018-04-13T04:09:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4607c8...
7092f732-60ed-477d-bcff-5f058d051b91
nathansttt/hog2
environments/RubiksCubeCorners.cpp
// // RubiksCorner.cpp // hog2 glut // // Created by <NAME> on 1/11/13. // Copyright (c) 2013 University of Denver. All rights reserved. // #include "RubiksCubeCorners.h" #include "GLUtil.h" #include <assert.h> #define LINEAR_RANK 1 #define POLYNOMIAL_RANK 0 /** * * Implementation details: * * This just impl...
ALGO
0.999343
4.236927
{ "github_metadata": { "branch": "PDB-refactor", "commit_count": 2251, "repo_created_at": "2015-08-19T21:02:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 117, "forks": 62, "issues": 9, "pull_requests": 1 }, "file_meta": { "content_id":...
0fee0234-029f-4385-9a5c-29e31d3a683c
ishandutta2007/codeforces-m
maximumshot/normal/234/E.cpp
#include <iostream> #include <math.h> #include <cmath> #include <vector> #include <map> #include <set> #include <fstream> #include <string> #include <algorithm> #include <stack> #include <queue> #include <list> #include <cstring> #define ALL(x) (x).begin(), (x).end() #define mp make_pair #define vec vector #define deb...
ALGO
0.999317
3.562984
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03: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": "e5344f6b1fd7...
92ed15d8-b4b0-43a8-a548-78a5440b5aa1
misawa-budg/AtCoder
Archive/Beginners/Beginner356/C.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int N, M, K; cin >> N >> M >> K; vector<int> keys(M, 0); vector<int> results(M, 0); for (int i = 0; i < M; i++) { int keyNum; cin >> keyNum; for (int j = 0; j ...
ALGO
0.999958
4.147003
{ "github_metadata": { "branch": "main", "commit_count": 263, "repo_created_at": "2025-03-30T04:06:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9d21e84592...
88f0afaa-5d88-4836-bb5b-f0e76b437c89
3agwa/CompetitiveProgramming
CodeChef/CODECHEF SUBBXOR.cpp
/* we'll use a trie data structure to insert the xor-ed numbers we'll query on how many subarrays in the tree who's xor with (number) is < k a details explanation could be found here: https://github.com/MohamedNabil97/CompetitiveProgramming/blob/master/CodeChef/SUBBXOR.cpp */ #include <bits/stdc++.h> using names...
ALGO
0.999935
5.044267
{ "github_metadata": { "branch": "master", "commit_count": 603, "repo_created_at": "2017-04-19T19:59:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ee1b154...
b5fc0c2f-b628-4a30-9240-dc6e7b967bdd
ronick-grammer/Algorithm
Programmers/무지의 먹방 라이브.cpp
#include <iostream> #include <algorithm> #include <utility> #include <queue> #include <vector> using namespace std; // problem link: https://programmers.co.kr/learn/courses/30/lessons/42891 bool compare(pair<int, int> a, pair<int, int> b) { return a.second < b.second; } int solution(vector<int> food_times, long lon...
ALGO
0.999928
4.996754
{ "github_metadata": { "branch": "main", "commit_count": 435, "repo_created_at": "2020-12-02T23:30:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc10a93b4e...
77d51dc7-d029-48bf-b6a6-824df8c71233
JesusChristLu/lbt_qt_code
FreqAllocator-0.1.666/FreqAllocatorCpp/src/interpolation.h
#pragma once #include <vector> #include <algorithm> #include "utils.h" class Interp1d { // Generated by ChatGPT public: // std::vector<double> x_; // std::vector<double> y_; std::vector<std::pair<double, double>> x_y; Interp1d() {} Interp1d(const std::vector<double>& x, const std::vector<...
ALGO
0.958278
5.776761
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-06-06T00:19: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": "2f34639de274...
3d3909ac-d23a-4022-a943-ec3b11b4e5bc
StruggleForCode/ACMPractice
IMUSTACM/整数整除.cpp
#include <iostream> using namespace std; const int INF = 1000000007; int gcd(long long int a, long long int b) { long long int r; while (b != 0) { r = a % b; a = b; b = r; } if (a == 1) return 0; return a % INF; } int main() { long long int n; long long int sum = 0; while (cin >> n) { sum = 0; ...
ALGO
0.999953
3.901121
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2020-02-16T06:12:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "517a4b6e6a...
97702d94-7a0d-4285-9b41-1132c86e7c3e
RakibNoushad/Problem-Solving
CodeForces/1366B. Shuffle.cpp
#include<bits/stdc++.h> using namespace std; typedef unsigned long long int ULLI; typedef long long int LLI; typedef vector<int> vi; #define SQR(x) ((x)*(x)) #define pb push_back #define pw(x,y) (int)pow(x,y)+0.5 #define ub(a,b) upper_bound(a.begin(),a.end(),b)-a.begin() #define lb(a,b) lower_bound(a.begin(),a....
ALGO
0.999934
3.394405
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2020-02-25T19:57:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "968db215f...
a6c8ca08-e6b3-43da-85cb-2c0ce285246e
AnkitChoudhaary/Search-Engine-and-Dictionary-Implementation
search.cpp
// Do NOT add any other includes #include "search.h" vector<int> suffixes(string str) { vector<int> res(str.length()); int sz = str.length(); int var1 = 0, var_2 = sz - 1; res.back() = sz; for (int i = sz - 2; i >= 0; i--) { if (i > var_2 && res[i + sz - 1 - var1] < i - var_2) ...
ALGO
0.999909
4.301339
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-12-30T04:12:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3af3903f3135...
01fadf7c-7a8d-4bd5-8933-20eb26e20e52
no-garlic/old-game-dev
XBOX/Source/Engine/Maths/Source/Primatives2D.cpp
// ---------------------------------------------------------------------------- // File: Primatives2D.cpp // Desc: 2D Primative classes // Auth: <NAME> // (C) Copyright: 2006 // ---------------------------------------------------------------------------- // ------------------------------------------------------------...
ALGO
0.981326
6.771346
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-02-13T08:57: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": "b8315d23a3...
4e5a6801-864f-4879-a2f1-1dc589bf45f8
Nicholai518/summary-ranges-cpp-leetcode
App.cpp
#include <iostream> #include <vector> #include <string> using namespace std; class Solution { public: vector<string> summaryRanges(vector<int>& nums) { // result to be returned vector<string> list; // size of nums int size_of_nums = nums.size(); // iterate through vector ...
ALGO
0.999883
6.330728
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-11-10T17:46: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": "be111fbdd0c3...
f68d6278-53f1-462d-b2cd-31267e82dd2f
kybr/MAT201B
centers-and-bounds/cab-5.cpp
/* Boxes and centers? adapted from <NAME>, 12/8/2010 (putnam.lance at gmail dot com) */ #include "al/app/al_App.hpp" #include "al/app/al_GUIDomain.hpp" #include "al/graphics/al_Shapes.hpp" #include "al/math/al_Random.hpp" using namespace al; const int N = 100; class MyApp : public App { public: // ParameterC...
ALGO
0.99646
5.683243
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2022-01-04T15:13:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "409ab5312e1...