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
3e50362d-1346-4b25-8ca5-62bcab8646b7
mrsac7/CSES-Solutions
src/1668 - Building Teams.cpp
/* Problem Name: Building Teams Problem Link: https://cses.fi/problemset/task/1668 Author: <NAME> (mrsac7) */ #include<bits/stdc++.h> using namespace std; template<typename... T> void see(T&... args) { ((cin >> args), ...);} template<typename... T> void put(T&&... args) { ((cout << args << " "), ...);} template<typenam...
ALGO
0.999975
4.684524
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2020-05-06T08:18:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 394, "forks": 157, "issues": 1, "pull_requests": 4 }, "file_meta": { "content_id": "fd53a...
a07e3899-8258-449e-b54c-cf4270787ad3
vipul-2003/ACM-PROJECT
ENCRYPTION TECHNIQUES/vigenere_encryption/vigener_decrypt.cpp
#include <iostream> #include <stdio.h> using namespace std; void vigenere_decrypt(string, string); // function prototyping string generate_key(string, string); // function prototyping int main(void) { cout << "enter the message without including space in between them " << endl; string ciphertext; getlin...
ALGO
0.999615
3.370052
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2021-08-30T05:48: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": "2d094e08816...
02afe57d-9c66-438a-8c79-acd5545784bb
Deeplearning-JorD/DAIMA
18550.cpp
/* * @Author: JorD * @LastEditTime: 2023-07-29 22:36:55 * how to Get */ #pragma GCC optimize(2) #include <bits/stdc++.h> using namespace std; using ll = long long; using db = double; #define endl '\n' #define PII pair<ll, ll> #define siz(s) (ll)(s.size()) #define all(a) a.begin(), a.end() #define all1(a) a.begin() ...
ALGO
0.999724
4.754509
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-12-26T13: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": "64cb2a8183ec...
e1488c76-f01e-46d8-8376-20e2fc0f93a9
chenx/oj
leetcode/BasicCalculator_II.cpp
/* Works. Further cleaned from Solution7, and ignored unnecessary details. Very good. * http://www.engr.mun.ca/~theo/Misc/exp_parsing.htm E --> T {( "+" | "-" ) T} T --> F {( "*" | "/" ) F} F --> num | "(" E ")" * Note: F could be: - T */ class Solution8 { public: int calculate(string s) { co...
ALGO
0.999606
5.263916
{ "github_metadata": { "branch": "master", "commit_count": 1737, "repo_created_at": "2013-12-15T09:45:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "374f69e...
e09e855c-009d-4051-a76c-2fe5c0cae699
yancouto/competitive-programming
ojs/cf/757C.cpp
#include <bits/stdc++.h> using namespace std; #define fst first #define snd second typedef long long ll; typedef pair<int, int> pii; #define pb push_back const ll modn = 1000000007; inline ll mod(ll x) { return x % modn; } #ifdef ONLINE_JUDGE # define debug(args...) {} #else # define debug(args...) fprintf(stderr, args...
ALGO
0.999973
3.656546
{ "github_metadata": { "branch": "master", "commit_count": 143, "repo_created_at": "2016-08-26T11:17:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2fac2385...
eb0921d1-765a-4076-aa54-1a8384dd1ea4
sameer2800/mohit-fu
docs/dolfin/1.2.0/cpp/source/demo/undocumented/conditional/cpp/main.cpp
// Copyright (C) 2010 <NAME> // // This file is part of DOLFIN. // // DOLFIN is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. ...
ALGO
0.998249
5.985248
{ "github_metadata": { "branch": "master", "commit_count": 1376, "repo_created_at": "2017-10-12T12:28: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": "152febd...
c53e3f06-7257-4242-8122-0d46fca6babc
tonyz74/CompetitiveProgramming
Problems/USACO/Gold/JustGreenEnough_BF.cpp
#include <iostream> #include <vector> using namespace std; int N; int grid[501][501]; int main(void) { cin >> N; for (int i = 1; i <= N; i++) { for (int j = 1; j <= N; j++) { cin >> grid[i][j]; } } int ans = 0; for (int r1 = 1; r1 <= N; r1++) { for (int c1 = ...
ALGO
0.999568
4.436595
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-04-23T01:15: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": "536d680cc37a...
bce1f103-fa67-4678-8366-4d1c2a195679
Wokzy/sigma_algos_syspro
mini_8.cpp
#include <fstream> #include <vector> using namespace std; vector<vector<int>> simple_mul(vector<vector<int>>& x, vector<vector<int>>& y) { int n = x.size(); int half = (n >> 1); if (n == 1) return {{x[0][0] * y[0][0]}}; vector<vector<int>> a(half, vector<int>(half, 0)), b(half, vector<int>(half, 0)), c(half, ...
ALGO
0.999931
4.526901
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2025-02-03T20:42: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": "b9508c05d...
6f7ca9f6-46ff-4c7b-b067-8fc0e04acab1
ishandutta2007/codeforces-e
eternalalexander/normal/1423/H.cpp
#include <bits/stdc++.h> #define maxn 500005 #define mp std::make_pair int n,q,k,z[maxn],ans[maxn]; std::vector<std::pair<int,int> > inc[maxn<<2]; std::vector<std::pair<int,std::pair<int,int> > > start[maxn]; namespace dsu { int fa[maxn],size[maxn],a[maxn<<4],b[maxn<<4],c[maxn<<4],d[maxn<<4],sz=0; int getf(int x) {...
ALGO
0.999548
3.716501
{ "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": "8d5c4aeb6a2b...
16cc681c-d216-40aa-93c8-796b86bb21b9
Tarunagg1/Ds_Alog_notes
Prime_Number/Prime_Number.cpp
#include<iostream> #include<math.h> using namespace std; bool Prime (int num, int i) { if (num == 1) return false; // Base case if (i <= 1) return true; // Checking if i is a divisor of num or not if (num % i == 0) return false; // Calling recursive function ...
ALGO
0.999914
4.406635
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-01-19T04:18:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f4ca79628...
9a09c832-db43-4ad7-a775-d3c6e2d2ea8b
PriviteraGabriele/Programmazione_1
Esercizi/GMF/10_2.cpp
/* [Esercizio 10] Scrivere un metodo che prenda in input un parametro formale matrice di stringhe A di dimensioni n × m, una matrice di caratteri C di dimensioni k × z, uno short w e restituisca true se esiste almeno una riga o una colonna di A che contiene almeno una sequenza contigua di w o piu’ caratteri che si t...
ALGO
0.997677
4.373894
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-12-01T07:27: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": "879c91108dd...
cba5810e-68dc-4621-ad52-ab283263c589
Riyanadi120802/Data-Structure-Practicum
Practice 7/coba.cpp
#include <iostream> using namespace std; class Antrian{ public: void enQueue(); int deQueue(); void TampilkanQueue(); }; struct Node { int data; string NIK; string nama; string tempatLahir; string tanggalLahir; string jenisKelamin; string gol; string almtRumah; string rt; string rw; ...
ALGO
0.990686
3.717362
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-05-20T09:15: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": "c678a4a0e27c...
c077006f-bb91-470e-a632-23c17cc07d2a
n-engine/nebuladevice
code/extlibs/bullet/Extras/obsolete/AlgebraicCCD/BU_AlgebraicPolynomialSolver.h
/* Bullet Continuous Collision Detection and Physics Library Copyright (c) 2003-2006 <NAME> http://continuousphysics.com/Bullet/ This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is ...
TOOL
0.995883
5.615518
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-11-16T20:03:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "56fa6bcda...
3d7f3ca3-2b66-4422-be8c-2d0473dbbda1
nshinde5486/associative_cache
lru-algo.hpp
#ifndef LRU_ALGO_HPP #define LRU_ALGO_HPP #include "N-way-set-associative-cache.hpp" #include <cmath> #include <list> #include <set> #include <unordered_map> #include "dll_node.hpp" #include "cache_algo.hpp" using namespace std; namespace NwaySetAssociative { template <typename key_type, typename value_type> class...
ALGO
0.988371
5.675272
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-04-15T01:07: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": "ecc9bfdd513f...
05ff7edf-6da4-470b-afd3-630ebb35af35
Eduardocin/Algorithms
Graphs/Kruskal/Kruskal.cpp
#include <bits/stdc++.h> using namespace std; class Graph { private: struct DijointsSubsets { vector<int> parent; DijointsSubsets(int n) { parent.resize(n); for (int i = 0; i < n; ++i) parent[i] = i; } int find(int curr) { if (parent[curr] == c...
ALGO
0.999989
5.180324
{ "github_metadata": { "branch": "main", "commit_count": 79, "repo_created_at": "2024-04-01T11:59: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": "6f6fde4fefd...
957a4dd4-8ebf-4712-9f03-581c74951e5b
jerrycxj/BigInteger
src/DynamicDecimal/DynamicDecimal.cpp
#include <iostream> #include "DynamicDecimal.hpp" // DecimalNode // DecimalNode::DecimalNode(unsigned long long newData) : data(newData), left(nullptr), right(nullptr) { unsigned long long overflow = newData / base; if(overflow) { left = new DecimalNode(overflow); left->right = this; data %= base; } ...
ALGO
0.984993
4.771966
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2018-09-06T01:29:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "885dd700a...
e62cab2a-d97c-4c3c-bdeb-578865762c88
AhanafTahmid/CP
contest/Codeforces Round 973 (Div. 2)/D_Minimize_the_Difference.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define int long long void solve(){ int n;cin>>n; vector<int>a(n); int mn = 1e18, mx = -1; for(int i=0;i<n;i++){ cin>>a[i]; } if(n==1){ cout<< 0 <<endl; return; } bool ok = 0; while(1){ ...
ALGO
0.999791
4.188385
{ "github_metadata": { "branch": "master", "commit_count": 103, "repo_created_at": "2023-02-04T20:18:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e1a7e4c...
d8503c8f-0a35-415a-b68a-30ceddb6802b
VivekKumarMishra1301/competative-coding
Leetcode Problems/Dynamic_Programming_Interleaving_string.cpp
class Solution { public: map<pair<pair<int, int>, int>, bool> mp; bool memo(string s1, string s2, string s3, int l1, int l2, int l3, int i, int j, int k) { if (k == l3) { if (i == l1 && j == l2) { return true; } return false; ...
ALGO
0.999871
5.463911
{ "github_metadata": { "branch": "master", "commit_count": 608, "repo_created_at": "2022-08-19T19:24: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": "81d6686a...
fb5d282e-3bb6-4aaf-8735-33e64ee63ccc
Nitrostorm/Assignment4-Java-2016
R_Pescozo-assignment4-f090aaacd6a1/tree.h
#ifndef TREE_H #define TREE_H #include "treenode.h" // TODO your code goes here: template<typename T> class BinarySearchTree{ private: std::unique_ptr<TreeNode<T>> root; public: void write(ostream& stream) const{ root->write(stream); } TreeNode<T>* insert(T data){ TreeNode<T>* insertNode = new Tree...
TOOL
0.992651
5.330796
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-08-08T08:52: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": "348f9560573e...
fe4b0fbf-ddad-421b-b68a-7ae83b0876fc
mayank7jha1/Launcpad_Oct
Lecture 9/Sorting_Algo.cpp
#include<iostream> using namespace std; int main() { int n; cin >> n; int a[n], b[n], c[n]; for (int i = 0; i < n; i += 1) { cin >> a[i]; } for (int i = 0; i < n; i += 1) { cin >> b[i]; } for (int i = 0; i < n; i += 1) { cin >> c[i]; } int bubble = 0; int flag = 0; // //Code For Bubble Sort for...
ALGO
0.999869
3.69812
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2023-10-06T05:30:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76a76bd8109...
2588d9b9-906c-45e3-b570-15e48195f53c
CrimsonTheLegoBuilder/MyBaekjoonSolve
Cpp/boj_solve/boj29448_geo_tangent_bi_search.cpp
#include <iostream> #include <algorithm> #include <cmath> typedef long long ll; typedef long double ld; const int LEN = 1e5 + 1; //const ld TOL = 1e-7; int N, M, K; ld memo[LEN]{ 0 }; //bool z(ld x) { return std::abs(x) < TOL; } struct Pos { ll x, y; Pos(ll X, ll Y) : x(X), y(Y) {} Pos() : x(0), y(0) {} bool opera...
ALGO
0.999986
4.535768
{ "github_metadata": { "branch": "main", "commit_count": 2586, "repo_created_at": "2023-06-01T12:38: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": "9734196d6...
485caab8-9c20-412f-af97-d3c5990f8064
TodayNonri/CodingTest
백준/Silver/4949. 균형잡힌 세상/균형잡힌 세상.cc
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <stack> using namespace std; string strInput; void Check() { stack<char> st; for (int i = 0; i < strInput.size(); ++i) { if (strInput[i] == '(' || strInput[i] == '[') { st.push(strInput[i]); ...
ALGO
0.999847
5.318161
{ "github_metadata": { "branch": "main", "commit_count": 203, "repo_created_at": "2025-01-19T09:36: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": "689b095b5d...
c418daef-c091-4026-92ff-c3c7f00d5d2e
aarsh-sharma/Competitive-Programming
ProjectEuler/soln12.cpp
/*<EMAIL> <NAME>*/ #include<bits/stdc++.h> using namespace std; #define PI 3.1415926535897932384626433832795 #define MOD 1000000007 #define debug(x) cout << (#x) << " is " << (x) << endl #define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) typedef long long int ll; #define int ll typedef pair < ll, ll > pll; ...
ALGO
0.999974
4.770541
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2019-08-18T11:53:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aed264ae9...
6892f517-ff05-4f95-a829-19e22d853628
sandexp/Pat-Algorithm
Basic/PAT-Basic-50.cpp
#include <iostream> #include <cstring> #include <stdio.h> using namespace std; int pow(int base,int times){ int mul=1; while (times--) mul=mul*base; return mul; } int main(int argc, char const *argv[]) { int n;string s;double sum=0.0;int cnt=0,num=0;bool flag; string str="0123456789-."; ...
ALGO
0.999273
3.764048
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2019-12-17T13:45: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": "0e2500293...
9202704e-ddd6-458d-9795-a4ed7c07ed96
claranceliberi/data-structures-course
Data Structures/stack/StructLinkedStack.cpp
// // Created by ntwar on 3/11/2021. // #include <iostream> #include <climits> using namespace std; struct Node { int data; struct Node* next; }; struct Node* top; void push(int data){ struct Node* temp = (struct Node*)malloc(sizeof(struct Node)); if(!temp){ cout << " Heap overflow"; ...
ALGO
0.999009
4.031545
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2021-03-10T08:08:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb170fc3175...
10e7e693-f27c-4a84-9975-891439f6deeb
rezeile/algorithms
sorting/quick-sort/quick.hh
/* * The program implements the quicksort algorithm. Quicksort is a divide and * conquer algorithm that solves the sorting problem by first partitioning * elements into two halves, around a particular pivot. Then the algorithm * recursively calls quicksort to sort the two halves. No items or a single * item is co...
ALGO
0.999997
6.672476
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2015-12-24T01:16:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "0bdcba1c4...
18cf7146-ce80-4bd2-b193-d424d1a46a41
Lium1126/competitive-programming
ABC390/d.cpp
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <queue> #include <set> #include <map> #include <stdio.h> #include <math.h> #include <atcoder/all> #define ll long long #define rep(i, n) for (ll i = 0;i < n;i++) #define rrep(i, n) for (ll i = n - 1;i >= 0;i--) #define irep(i,...
ALGO
0.999904
4.546904
{ "github_metadata": { "branch": "main", "commit_count": 116, "repo_created_at": "2021-07-15T04:02: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": "adca73cba8...
9e92b790-57bc-4360-933f-8a8418bed61c
huannd0101/CTDLGT_HaUI
BaiThucHanh/Bai Thuc Hanh 04/NguyenDinhHuan_Bai3_veNha.cpp
#include<bits/stdc++.h> using namespace std; void merge(string *a, int low, int high, int mid){ int i=low, j=mid+1, k=0; string temp[high-low+1]; while(i<=mid && j<=high){ if(a[i] < a[j]) temp[k++] = a[i++]; else temp[k++] = a[j++]; } while(i<=m...
ALGO
0.999953
4.0462
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-05-31T10:24: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": "3f75f79221...
86eca903-5cfd-481d-9144-1552be7a83bb
sunfanyunn/acm
math/nttCrt.cpp
constexpr int mod = 1e9+7; typedef vector<int> VEC; // ntt + Crt, code referenced from the internet namespace nttCrt { constexpr int magic[3] = {1004535809, 998244353, 104857601}; constexpr int MOD = 1000000007; constexpr int G = 3; int P; inline int quick_mod(int x, int k, int MOD) { int an...
ALGO
0.999961
4.802356
{ "github_metadata": { "branch": "master", "commit_count": 260, "repo_created_at": "2016-02-05T08:03:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "64365e89...
03811936-efad-4f31-a443-7e9da531bf5a
HarshitKhurana/DataStructures
HashMap/main.cpp
#include"HashMap.cpp" #include<stdlib.h> void help() { cout << "[*] Enter as follows : "<<endl; cout << "\t1. Insert a key-value pair" <<endl; cout << "\t2. Update a key-value pair" <<endl; cout << "\t3. Delete a key-value pair" <<endl; cout << "\t4. Print the key-Value pair for key provided by user" <<endl...
TOOL
0.938915
3.700705
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2019-07-03T07:22:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "df174759c...
bf70c83f-0f90-4924-bf60-8171ee2a59e3
Tuki277/learn-oop
operator oop/bai2.cpp
#include <bits/stdc++.h> using namespace std; class SP { int thuc, ao; public: SP(); SP(int x, int y); SP operator+ (SP x); SP operator- (SP x); friend istream& operator >> (istream& a, SP& x); friend ostream& operator << (ostream& a, SP x); }; SP :: SP () { ...
ALGO
0.960058
4.049701
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2021-01-08T11:11: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": "2c62c63692...
822c2c41-06bd-4178-92cd-1b4a65e39270
yopio/aoj
0034.cpp
#include <iostream> using namespace std; int main(void){ double l[10]; double v1,v2; char ten; while( cin >> l[0] ){ for( int i = 1 ; i < 10 ; i++ ){ cin >> ten >> l[i]; } cin >> ten >> v1 >> ten >> v2; double way = 0; for( int i = 0 ; i < 10 ; i++ ){ way += l[i]; } ...
ALGO
0.999197
3.045611
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2015-10-22T15:50: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": "3dcc3b6efc...
f3833942-ca96-4e55-8c8e-648939a4affc
luot-ai/GPU
src/submodule/Bmm.hpp
#ifndef BMM_HPP #define BMM_HPP void Bmm_cpu( std::vector<float> input_A, std::vector<float> input_B, std::vector<float> &output, int M_A, int K_A, int K_B, int N_B, int BatchSize = 1) { // 输入规模:BatchSize * M_A * K_A, BatchSize * K_B * N_B // 输出规模:BatchSize * M_A * N_B if (i...
ALGO
0.975149
4.859678
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2024-09-25T15:38:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f234b12eda5...
c7be12a2-e6d9-4dd8-931d-33962991cf6a
SamCode-BD/cosc320
Homework/Homework05/main.cpp
// Author: <NAME> // Creation Date: 3/13/24 // Last Update: 3/13/24 // Description: // User Interface: // Notes: #include <iostream> #include <cstdlib> #include <ctime> #include <cmath> #include "IntBinaryTree.h" #include "timer.h" using namespace std; int main() { srand(time(0)); int n, max; double s...
ALGO
0.999517
4.675319
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2024-01-30T14:43: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": "7712f0444...
e9b3a4c0-a223-479e-83c8-c14bebcb6989
SuRiTrA/CPPAssignment6
CPP4.cpp
#include <iostream> #include <cstdio> #include <string> using namespace std; /*Program to Create a string and store your name in it. Use a loop to print string character by character using the normal index method as well as the pointer method.*/ int main() { cout<<"Create a string and store your name in it. Use a lo...
TOOL
0.933748
3.311932
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-10-23T10:00: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": "da5f341de...
d3c19803-99ae-4dbe-aaa2-93cf5e71d512
WenbinTeng/LeetCode
2212.h
#include <vector> class Solution { public: std::vector<int> maximumBobPoints(int numArrows, std::vector<int> &aliceArrows) { std::vector<int> path; dfs(aliceArrows, path, numArrows, 0, 0); return res; } private: int max = 0; std::vector<int> res; void dfs(std::vector<int> ...
ALGO
0.999772
4.79259
{ "github_metadata": { "branch": "master", "commit_count": 323, "repo_created_at": "2021-03-01T09:06:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "84d7764c...
f22565c0-2e0a-494d-94dd-43f685d3e5ce
JakeMate15/competitive-programming
codeForces/B_Not_Quite_Latin_Square.cpp
#include<bits/stdc++.h> using namespace std; #define all(v) v.begin(),v.end() #define sz(a) (int)a.size() #define nl cout << "\n"; typedef long long ll; typedef long double ld; const int mod = 1e9 + 7; const int MX = 2e5 + 5; void sol(){ vector<string> a(3); for(auto &x: a) {...
ALGO
0.999932
4.205594
{ "github_metadata": { "branch": "master", "commit_count": 163, "repo_created_at": "2022-09-19T02:47: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": "14e29a1d...
7497b796-319b-4566-86c1-3c3182c83978
Deivmercer/advent-of-code
2022/day-08a/day-08a.cpp
#include <fstream> #include <string> #include <cassert> #include <vector> #include <iostream> struct tree { int height; bool visible; }; typedef tree tree; const std::string file_name = "input.txt"; int main() { std::ifstream input(file_name); assert(input.is_open() && !input.eof()); std::vector<std::vector<t...
ALGO
0.999849
5.166304
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2021-12-20T22:21:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01d5b2580...
6b4e8a17-8a00-47fb-ba33-657b01fb8547
feanorye/leetcode
139.cpp
#include "listnode.h" #include <algorithm> #include <corecrt.h> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <utility> #include <vector> using std::cout; using std::endl; using std::greater; using std::map; usin...
ALGO
0.999358
4.857874
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2023-09-23T14:58: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": "4f85466c7...
4d36157d-28d3-4a37-8d4b-2537ed4d99a6
Holzlsauer/linguagem_programacao
aula_07/ex_10.cpp
/* Preencher um vetor de 8 elementos inteiros. Mostrar o vetor na horizontal com\t. Calcular a média do vetor. Mostrar quantos números são múltiplos de 5. Quantos números são maiores que 10 e menores que 30. Qual o maior número do vetor. */ #include <stdio.h> int main() { short int size = 8; int array[size]; ...
ALGO
0.993461
3.330524
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2020-05-13T00:57:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e9f6fa30...
cb590847-759d-49a6-90f8-237598fe5be8
yashnagrawal/DSA
Find Nth root of M - GFG/find-nth-root-of-m.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: bool isPowGreaterThanLimit(int base, int pow, int limit){ long long int ans = 1; while(pow--){ ans*=base; if(ans>=limit) return true; } return false; ...
ALGO
0.999963
5.856596
{ "github_metadata": { "branch": "main", "commit_count": 1048, "repo_created_at": "2023-04-07T15:32: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": "ab220d3c9...
2cfb0414-f078-4d14-a97b-029cde4aaa6a
yutarchery/GitCoder
ABC/301-350/abc307/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> Pii; typedef pair<int, ll> Pil; typedef pair<ll, ll> Pll; typedef pair<ll, int> Pli; typedef vector<vector<ll>> Mat; #define fi first #define se second const ll MOD = 1e9 + 7; const ll MOD2 = 998244353; c...
ALGO
0.999993
4.375436
{ "github_metadata": { "branch": "main", "commit_count": 1429, "repo_created_at": "2021-04-20T14:39:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f196a4be...
73e4138a-c4dd-4383-b172-e2416ab73b00
sunny-lan/cpp-contest
dwite10c1p3.cpp
#ifdef DMOJ #include <bits/stdc++.h> #else #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <algorithm> #include <climits> #include <cstring> #include <string> #include <vector> #include <unordered_map> #include <unordered_set> #include <queue> #include <math.h> #endif // DMOJ using namespace std; type...
ALGO
0.999945
3.572335
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-07-02T19:05:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2b4f321985...
3849952f-5072-4380-9981-28d1651d5933
anaCS-26/HeartRateMonitor
HeartRateMonitor.ino
// Include the Math library for calculations #include <math.h> // Variable Definitions int count = 0; // Counter for trial # int n = 20; // Number of readings taken per trial // Digital I/O Pins connected to each light on the RGB LED int redPin = 6; int greenPin = 5; int bluePin = 3; float threshold = 25.0; // Compare...
ALGO
0.994864
5.820831
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-12-02T20:40: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": "bf0a8913c5...
218b5332-527e-4e23-a10c-dbb6ec227c36
GDongLin/leetcode
source/PartitionList.cpp
// // Created by GDongLin on 2018/5/2. // #include <iostream> using namespace std; struct ListNode { int val; ListNode *next; explicit ListNode(int x) : val(x), next(nullptr) {} }; class Solution { public: ListNode *partition(ListNode *head, int x) { // 注意两个head必须为不同对象 ListNode pHe...
ALGO
0.999987
5.351678
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-01-03T04:28: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": "697ff1bd0a...
26babd0c-dab8-44d3-b0e0-658b186792c0
JordanEAbbott/Cpp-C-Compiler
src/Lexer.cpp
#include <iostream> #include <fstream> #include <sstream> #include <string> #include <regex> struct Match { std::vector<std::string> keywords{ "int", "return" }; enum Punctuation { LogicalNegation = 33, OpenBracket = 40, CloseBracket = 41, Multiplication = 42, Addition...
TOOL
0.961775
3.885371
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2024-01-07T16:12: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": "28fe41bcae...
c0508941-b329-4a01-bf3c-5f9313088f9c
seven320/AtCoder
ants_book/2-1_全探索/maze.cpp
//encoding:utf-8 #include <iostream> //c++ #include<time.h> //時間にかんして #include<stack> //スタックに関して 最新のデータから捨てる #include<queue> //キューに関して 最古のデータから捨てる #define ll long long using namespace std; const int INF = 10000; typedef pair<int,int> P; int n,m; char field[100][101]; int sx,sy; int gx,gy; //最短郷里を保存 int d[100][100];...
ALGO
0.999707
3.628621
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2018-12-22T16:46: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": "6b47f5fc8...
225a3f5b-ed04-42ee-a5cc-ae8987f2ac8c
cubercsl/The-road-to-ACMer
HDOJ/4847.cpp
#include <bits/stdc++.h> using namespace std; int main() { string s; int cnt = 0; while (cin >> s) { int now = 0; for (auto t : s) { if (now == 0 || now == 4) now = t == 'd' || t == 'D' ? 1 : 0; else if (now == 1) now = t =...
ALGO
0.995682
3.471946
{ "github_metadata": { "branch": "master", "commit_count": 611, "repo_created_at": "2017-04-28T00:42:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 54, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c247d3...
490813f5-b1d9-4389-bf68-371fa28edb22
gavinbu1860/ppu
ppu/mpc/util/circuits.h
// Copyright 2021 Ant Group Co., Ltd. // // 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 ...
ALGO
0.987779
7.45191
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-06-23T02:20: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": "a3e09669e5ac...
d172b0b8-2a7b-431b-8c10-a8e1e0a21fb4
diegoQiu/PAT-advanced
PAT again/A1123. Is It a Complete AVL Tree (30)/源.cpp
#include<iostream> #include<vector> #include<algorithm> #include<queue> using namespace std; const int maxn = 25; int n; struct node { int data,height; node *lchild, *rchild; }; int getHeight(node* root) { if (root == NULL) return 0; else return root->height; } void updateHeight(node* root) { root->height=...
ALGO
0.999998
4.149752
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-03-01T03:37:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "08113a1363...
91bdf865-cf30-497d-ad19-d0df449e4fc5
sumitsasidharan/muj-cpp-dsa-all-exercises
17-Dijkstra-Algorithm.cpp
/****************************************************************** Write a C++ program for implementation of Dijkstra’s algorithm *******************************************************************/ #include <iostream> #include <conio.h> #include <ctype.h> using namespace std; struct node { int DistanceValue; ...
ALGO
0.999969
4.576499
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2023-08-06T08:00:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7784612efd2...
2ae11351-2ba7-449c-8686-48d7f1d59ee2
ayushrakesh/Competitive-Programming
general_arrival.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> v; while (n != 0) { int h; cin >> h; v.push_back(h); n--; } int mini = *min_element(v.begin(), v.end()); int maxi = *max_element(v.begin(), v.end()); int count = 0; int min_index = 0; int max_...
ALGO
0.999888
3.63566
{ "github_metadata": { "branch": "main", "commit_count": 55, "repo_created_at": "2024-01-16T04:57: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": "77650424cb0...
829b4276-3191-40e9-81dd-e89941931b50
WillHaack/staRt-ionic
audio-plugin/src/ios/AudioPlugin/AudioPlugin/AudioManager.cpp
/** * @file AudioManager.cpp * @Author <NAME> * @date 1/16/14 * @brief Classes and functions used in audio analysis. */ #include <complex> #include <math.h> #include <Accelerate/Accelerate.h> #include "AudioManager.h" DoubleBuffer::DoubleBuffer(UInt32 bufferSize, UInt32 numBuffers) : _curr_write_idx(0), _curr_r...
TOOL
0.932719
6.106444
{ "github_metadata": { "branch": "master", "commit_count": 627, "repo_created_at": "2019-08-05T23:13: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": "e3bd59e3...
b01698cd-a702-47ef-ae16-7ed10d8e24ca
keywet06/code
SOJ/SOJ864.cpp
#include <bits/stdc++.h> const int N = 200005; int n, m, q, flag, x, y; int f[N], t[N]; std::vector<int> out[N]; int main() { std::ios::sync_with_stdio(0); std::cin.tie(0); std::cout.tie(0); std::cin >> n >> m >> q; for (int i = 1; i < n; ++i) { std::cin >> x >> y; out[x].push_back(y...
ALGO
0.999924
4.148561
{ "github_metadata": { "branch": "master", "commit_count": 702, "repo_created_at": "2019-04-21T10:13:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90553cae...
57bd0d68-b168-48ba-86ac-6b3abf1fc318
Renegade-3863/Hotaru_at_Leetcode
CollectionOfSolutionsCC/_505shortestDistance.cc
#include "Solution.h" struct status { int x; int y; // dist 存储一个 "当前状态下球已经运动过的距离" 值 int dist; status(int _x, int _y, int _dist) : x(_x), y(_y), dist(_dist) {} }; int Leetcode501_600::Soltuion::shortestDistance(vector<vector<int>>& maze, vector<int>& start, vector<int>& destination) { // 本质上依然...
ALGO
0.999953
5.528262
{ "github_metadata": { "branch": "main", "commit_count": 111, "repo_created_at": "2024-04-25T06:57:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "673a015952...
fe2fe053-3ec7-4a2a-95aa-ded6c01b64b5
prakashpandey16/coding
c++/LINKED_LIST/DeleteNodeAtLinkedList.cpp
#include<iostream> using namespace std; // Define the structure of a Node in the linked list class Node { public: int val; // Value of the node Node* next; // Pointer to the next node // Constructor to initialize a node with a value and set the next pointer to NULL Node(int val) { th...
ALGO
0.999882
6.356068
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-01-30T16:05:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d1bb654aaafb...
93949e67-e57b-482c-8391-3770874d91a4
knzkhuka/kyopro
atcoder/abc192/d.cpp
int main() { string x; bigint m; cin >> x >> m; if (x.size() == 1) { // cout << 1 << endl; cout << (stoi(x) <= m) << newl; return 0; } auto f = [](string x, bigint n, bigint m) { bigint cur = 0, p = 1; repr(i, x.size()) { bigint digit = x[i] - '0'; cur += digit * p; p *...
ALGO
0.999798
3.722929
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2021-02-19T08:37:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e6f8ac14e05...
c9673959-8fbb-4617-b223-29debf51f1d6
lucianovr/competitive-programming
URI/1439.cpp
#include <algorithm> #include <iostream> #include <queue> #include <utility> #include <vector> using namespace std; int p, m, n, dir; vector<pair<int, string>> pilha; vector<pair<int, string>> jog[11]; pair<int, string> pd; bool compare(pair<int, string> a, pair<int, string> b) { if (a.first > b.first) re...
ALGO
0.999811
3.72278
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-05-28T00:31:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8031e4a33...
fd611c2b-5d42-47f8-aee6-91db959d7de9
dhirajpatil2346/compitative
new/dfs_graph.cpp
#include <bits/stdc++.h> using namespace std; int cost = INT_MAX; void dfs(int sr, int sc, int row, int col, vector<vector<bool>> vis, vector<vector<int>> &c, vector<vector<int>> &e, int cost_c, int energy) { if (sr < 0 || sr > row || sc < 0 || sc > col) { return; } if (sr == row && sc == col) ...
ALGO
0.999969
4.163034
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2022-09-28T12:31: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": "9706f086885...
bc212f5c-15a8-48a4-a2c8-04aec6dd4a59
FuHongbao/OJ_Code
194.cpp
/************************************************************************* > File Name: 194.cpp > Author: victoria > Mail: <EMAIL> > Created Time: 2019年06月27日 星期四 21时58分37秒 ************************************************************************/ #include <iostream> #include <algorithm> #include <string.h> using...
ALGO
0.999995
3.406768
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-10-02T11:25: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": "d618626af0...
b5dbf7a9-8c6b-4c53-8ed9-9e0bf4abf435
pidddgy/competitive-programming
codeforces/zebras.cpp
// https://codeforces.com/contest/949/problem/A #include <bits/stdc++.h> using namespace std; #define endl '\n' #define cerr if(false) cerr #define watch(x) cerr << (#x) << " is " << (x) << endl; #define fi first #define se second bool used[300000]; vector<int> ans[300000]; signed main() { ios::sync_with_stdio(0)...
ALGO
0.999621
3.712337
{ "github_metadata": { "branch": "master", "commit_count": 87, "repo_created_at": "2018-07-01T19:03:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "78f7634f5...
f90e32ea-df45-426c-ab3e-a2cc2befa0a0
kolomietsbogdan/SearchServer
search-server/search_server.cpp
#include "search_server.h" SearchServer::SearchServer(const std::string& stop_words_text) : SearchServer( SplitIntoWords(stop_words_text)) {} SearchServer::SearchServer(const std::string_view stop_words_text) : SearchServer( SplitIntoWordsView(stop_words_text)) {} void SearchServer::AddDocument(int document_id, s...
WEB
0.980611
6.041362
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-10-12T15:10: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": "75e0d33029b1...
f606e8c6-cbbd-435a-81b1-cb94c1a2ea49
iprashantkr1/Leetcode
Minimize the Heights II - GFG/minimize-the-heights-ii.cpp
//{ Driver Code Starts // Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution { public: int getMinDiff(int arr[], int n, int k) { sort(arr,arr+n); int diff=arr[n-1]-arr[0]; int least,most,mini...
ALGO
0.999861
5.974375
{ "github_metadata": { "branch": "main", "commit_count": 753, "repo_created_at": "2022-08-31T18:19:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "008688e603...
84b6b680-1439-4cdc-9844-85c24e606b42
SouL909/Cooper_Michael_CSC17C_43484
Exams/17c_Midterm/10/main.cpp
/* * File: main.cpp * Author: <NAME> * Created on May 12, 2022, 2:53 PM * Purpose: Midterm Problem 10 */ #include <iostream> #include <cmath> #define TOLERANCE 10.0f * 10.0f * 10.0f * 10.0f * 10.0f * 10.0f // ^^ 10 ^ 6 using namespace std; float g(float x) { if(abs(x) < TOLERANCE) { return x -...
ALGO
0.998361
4.85219
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-02-17T05:02: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": "8758324d872...
4ef0f499-5d38-47de-bc50-c329c4e78d3d
SadafSaqlain7/RamboRun-ConsoleShooter
JohnRambo.cpp.cpp
#include<iostream> #include<fstream> #include<cstdlib> #include<ctime> #include<conio.h> #include<windows.h> #include<iomanip> #include<string> using namespace std; constintmap_height = 50; constintmap_width = 50; char map[map_height][map_width]; intramboheight; intrambowidth; intramboOnemove = 2; int obstacles[30...
TOOL
0.924043
3.459141
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-21T01:02: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": "bbee1c701d87...
553dee66-8eff-4bfe-b991-4d384e1a1e9f
YasserGomma/Online-Judges-solutions
CodeForces/242C/27478402_AC_342ms_7364kB.cpp
#define _CRT_SECURE_NO_WARNINGS #include<bits/stdc++.h> #include<unordered_map> #include<unordered_set> clock_t T; #define ctime cerr << "Time : " << double(clock() - T) / CLOCKS_PER_SEC << endl #define all(v) ((v).begin()), ((v).end()) #define sz(v) v.size() #define endl "\n" using namespace std; typedef long long l...
ALGO
0.999767
3.84007
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-01-07T21:59: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": "1e14ea21cf...
2e6016eb-0673-4efa-a03d-4dbab539cdff
mkolleck/AdventOfCode
2020/15.cpp
// https://adventofcode.com/2020/day/15 #include <iostream> #include <regex> #include <sstream> #include <vector> typedef std::vector<int> Numbers; int main(int argc, char** argv) { if (argc != 2) { return 1; } int limit = std::stol(argv[1]); std::string line; std::cin >> line; ...
ALGO
0.999812
4.492179
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2020-12-02T17:02: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": "1e75905d0...
c923dff3-df8c-46da-810d-b1f697e97cd1
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/06/0605/personal_submission/cf1579e2_md.cpp
// 0605 #include <bits/stdc++.h> using i64 = long long; template <typename T> struct Fenwick { int n; std::vector<T> a; Fenwick(int n = 0) : n(n), a(n, T()) {} // set num[x] = v void add(int x, T v) { for (int i = x + 1; i <= n; i += i & -i) { a[i - 1] += v; } ...
ALGO
0.999966
5.710466
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "f160...
e8b19d8b-900e-49ed-960d-b2022966dd28
HughLocke/ACM-template
数论/bsgs.cpp
//baby step,giant step 算法 //给定整数a,b,p,其中a,p互质,求一个非负整数x,使得a ^ x ≡ b (mod p) LL bsgs(LL a,LL b,LL p){ map<LL,LL> hash; hash.clear(); b %= p; int t = (int)sqrt(p) + 1; for(int j = 0 ; j < t; j ++){ int val = (LL)b * quick_power(a,j,p) % p; hash[val] = j; } a = quick_power(a,t,p); ...
ALGO
0.999979
3.958599
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-03-11T06:27:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa0d6de82...
1777e19f-63b8-4bc3-a38b-6dc1cae395e7
yashparmar15/Cpp-Codes
Add_One_Row_To_Tree.cpp
/*Given the root of a binary tree, then value v and depth d, you need to add a row of nodes with value v at the given depth d. The root node is at depth 1. The adding rule is: given a positive integer depth d, for each NOT null tree nodes N in depth d-1, create two tree nodes with value v as N's left subtree root and ...
ALGO
0.99998
6.589775
{ "github_metadata": { "branch": "master", "commit_count": 831, "repo_created_at": "2020-06-30T16:20:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a39d232f...
a3f7e08f-6a1b-40f0-b6db-e863875cb37a
kavin23923/Leetcode
problem/651-700/653.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: bool findTarget(TreeNode* root, int k) { vector<int> node; inorderTraverse(node, root); ...
ALGO
0.999997
6.5824
{ "github_metadata": { "branch": "master", "commit_count": 102, "repo_created_at": "2019-10-20T03:53:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4018b803...
0117c118-e210-4c06-b0c1-dfd4cd8f4155
yuliapetryk/Multithreading
Sort/MergeSort.h
#ifndef MERGESORT_H #define MERGESORT_H #include "../Sort/Sort.h" template<class T> ///Class implements sorting by Merge sort. class MergeSort : public Sort<T> { private: ///The function performs a partial sort, ordering its elements from left to right /// @param array Array we want to sort /// @param le...
ALGO
0.99976
6.174538
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2023-06-08T19:22: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": "5979f84540d...
92508989-7c38-442e-998c-57e5bdd842a3
ZoranPandovski/al-go-rithms
sort/Cocktail Selection Sort/cpp/CocktailSelectionSort.cpp
//Returns Sorted elements after performing Cocktail Selection Sort //It is a Sorting algorithm which chooses the minimum and maximum element in an array simultaneously, //and swaps it with the lowest and highest available position iteratively or recursively #include<iostream> using namespace std; //Iterative Versio...
ALGO
0.999961
5.892552
{ "github_metadata": { "branch": "master", "commit_count": 7457, "repo_created_at": "2017-06-05T19:20:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1359, "forks": 1929, "issues": 20, "pull_requests": 44 }, "file_meta": { "content_id": ...
f2b0de10-2bc2-4370-a4ba-ef5fbd2589b5
kesalin/CppSnippet
Algorithms/BinaryTree.cpp
#include "BinaryTree.h" #include <stdlib.h> #include <stdio.h> #include <assert.h> void BST_insert(BSTree* tree, int key) { assert(tree); BSTNode* parent; BSTNode* node = *tree; // find the parent that will add the new node. while (node) { // already exists if (node->key == key) { return; } parent =...
ALGO
0.999928
3.731703
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2012-10-22T13:51:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82732b5531...
c8bd57a8-6bd3-444e-b70b-843c1fa536da
roosephu/project-euler
393.cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
ALGO
0.999964
3.67779
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2013-02-09T04:55:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 68, "forks": 27, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2197b80...
b5c359e8-12a9-4430-ac22-8cf9af12a42d
antonilo/flightmare_agile_autonomy
rpgq_simulator/src/framework/objects/directly_controlled_object.cpp
#include <rpgq_simulator/framework/objects/directly_controlled_object.h> // standard library #include <algorithm> namespace RPGQ { namespace Simulator { // simulate directly controlled object void DirectlyControlledObject::RunSimulation(USecs dt) { // simulation loop ...
ALGO
0.955647
6.815571
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2021-04-20T09:16:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d1891a80b3...
c6086922-e37e-4a8c-9564-ed283f172a3f
daixiongsheng/algorithm
112.路径总和.cpp
/* * @lc app=leetcode.cn id=112 lang=cpp * * [112] 路径总和 */ // @lc code=start /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), rig...
ALGO
0.999842
6.306253
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2020-08-10T05:38: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": "5eb4571d6...
ed39bef0-9438-4bcc-8455-9283f76cd826
songqiang/leetcode
Trapping-Rain-Water.cpp
/* * <NAME> <<EMAIL>> 2013 */ /* Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. For example, Given [0,1,0,2,1,0,1,3,2,1,2,1], return 6. The above elevation map is represented by array [0,1,0,2,1,0,1,3,2,1,2,1...
ALGO
0.999991
6.452418
{ "github_metadata": { "branch": "master", "commit_count": 133, "repo_created_at": "2012-12-05T05:56: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": "d3356719...
f1d22982-5cb3-4311-b7fa-d6535ca6dafc
Danendra10/IRCAR-ITS
src/utils/include/potential_field/potential_field.hh
/** * @file vector_repulsive.h * @author Danendra (<EMAIL>) * @brief * @version 1 * @date 2023-03-01 * * @copyright Copyright (c) 2023 * */ #include "math.h" namespace VectorRepulsive { class VectorRepulsive { private: float _max_field_radius, _gain_field_gradient, _c; public: ...
ALGO
0.996587
5.675215
{ "github_metadata": { "branch": "master", "commit_count": 120, "repo_created_at": "2023-05-17T10:54:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "03ec51aa...
b8435d47-e344-47d9-84df-d9cef2de24f4
ishandutta2007/codeforces-f
fataleagle/normal/549/F.cpp
#include <bits/stdc++.h> #define scan(x) do{while((x=getchar())<'0'); for(x-='0'; '0'<=(_=getchar()); x=(x<<3)+(x<<1)+_-'0');}while(0) char _; using namespace std; int N, K; int A[300001]; int cnt1[1000005]; int cnt2[1000005]; long long ans=0; struct info { int type, s, m; bool operator< (const info& other)...
ALGO
0.999722
4.047227
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43: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": "5910408c05d1...
6059704d-c952-480c-b4f8-a82c4991ab79
YuktaS14/CP-Practise-Problems
Practise Problems/palindrome.cpp
#include <bits/stdc++.h> // #include "stdafx.h" // #pragma warning(disable : 4996) //_CRT_SECURE_NO_WARNINGS using namespace std; #define ll long long #define fo(i,n) for(ll i=0;i<n;i++) bool palindrome(string B, int n) { fo(i,n) { if(B[i] != B[n-i-1]) { return false; } ...
ALGO
0.999884
3.677253
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-01-13T18:37: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": "1147415618...
bca53c67-88c0-469f-93ce-7b25e5b347ac
kazi-nayeem/Programming-Problems-Solutions
lightoj/1145 - Dice (I).cpp
#include<cstdio> #include<cstring> using namespace std; const int mod = 100000007; int dp[2][15005]; int main() { int n, k, s; int te, ti; scanf("%d", &ti); for(te = 1; te <= ti; te++) { scanf("%d%d%d", &n, &k, &s); memset(dp,0,sizeof dp); for(int i = 0; i <= s; i++) dp[0]...
ALGO
0.999935
4.027638
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-07-13T19:00:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6cdeccbdb...
50a74124-e888-4d94-a6d2-14f4788e1125
c00291296/aoc2024
21b.cpp
#include<iostream> #include<map> #include<string> #include<vector> #include<list> #include<algorithm> #define R(I, M) for(int (I)=0; (I)<(M); (I)++) #define ROBOT_DEPTH 25 using namespace std; pair<int, int> mkp(int a, int b) { return make_pair(a, b); } pair<int, int> adp(pair<int,int> a, pair<int, int> b) { ret...
ALGO
0.999301
3.645282
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2024-12-02T23:58: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": "5c0f9eeb3bb...
057d33c8-81ae-4ef4-8014-d3b5726219eb
calvetalex/EPITECH
tek2/cppPool/cpp_d16_2019/ex00/Parser.cpp
/* ** EPITECH PROJECT, 2020 ** Parser ** File description: ** Parser */ #include <iostream> #include "Parser.hpp" /* --- CALC ---- */ static int add(int a, int b) { return a + b; } static int minus(int a, int b) { return a - b; } static int mul(int a, int b) { return a * b; } static int divide(int a, in...
TOOL
0.944485
4.149828
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2020-10-23T13:47:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82fa5d0b6ea...
7189a343-d6f5-4366-b3af-2d75c9b26060
hikjik/leetcode
solutions/print-binary-tree/solution.hpp
#pragma once #include <queue> #include <string> #include <vector> #include <tree_node.h> // Time: O(N) // Space: O(N) namespace bfs { // Time: O(N) // Space: O(N) class Solution { public: static std::vector<std::vector<std::string>> printTree(TreeNode *root) { const auto height = getDepth(root) - 1; cons...
ALGO
0.999892
6.356913
{ "github_metadata": { "branch": "main", "commit_count": 2011, "repo_created_at": "2023-02-14T21:59:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7d69aaa4...
8cd5d2a2-603d-468d-81ec-9f508ac52499
outline1988/h743iit6_modulation_recognition
Middle/CMSIS-DSP/ComputeGraph/examples/simple/generated/scheduler.cpp
/* Generated with CMSIS-DSP Compute Graph Scripts. The generated code is not covered by CMSIS-DSP license. The support classes and code is covered by CMSIS-DSP license. */ #include "custom.h" #include "GenericNodes.h" #include "AppNodes.h" #include "scheduler.h" #if !defined(CHECKERROR) #define CHECKERROR i...
ALGO
0.980417
4.780091
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-11-22T14:06:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "46a08b4549...
452e1e1d-7caf-4859-a456-cb2f19d17ec9
ishandutta2007/codeforces-h
halyavin/normal/808/E.cpp
#include <algorithm> #include <string> #include <iostream> #include <vector> #include <utility> #include <functional> void run(std::istream &in, std::ostream &out) { int n, m; in >> n >> m; std::vector<int> q3; std::vector<int> q2; std::vector<int> q1; for (int i = 0; i < n; i++) { int w, c; in >> w >> c; ...
ALGO
0.999863
3.72852
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01: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": "83c8e3f22210...
5f5b180e-e973-42fd-adc5-b06b2981207f
MedicaicloudLink/Rosetta
main/source/src/protocols/filters/CalculatorFilter.cc
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the co...
TOOL
0.925782
7.572212
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-01-09T08:17:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7107de7d13...
cd1aaba5-7ff3-4a1d-89c7-ff0992d4ae26
Dhruv-Rathi/Code
mathsaz.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define mod 1000000007 #define vi vector<ll> #define vvi vector<vi> #define f(x,a,b) for(int x=a;x<b;x++) #define pb push_back #define eb emplace_back //faster than push_back #define mod1 1000000007 #define mod2 998244353 #define...
ALGO
0.999989
3.807657
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-07-14T17:56:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d344de98a...
55b08da3-054c-4705-8b80-1cec016de8ac
ishandutta2007/codeforces-s
sana/normal/1712/C.cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <ctime> #include <cstrin...
ALGO
0.999603
3.848995
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07: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": "787a900289bb...
13a76bea-dc12-498e-be12-192e7e9d3614
alexdimitrov18/SDP-personal
Списъци/8 9 Move_alternating.cpp
//! Link List: MoveNode() AlternatingSplit() #include <iostream> using namespace std; struct Node { int data; Node* next; }; void Insert_begin(Node*& head, int x) { Node* temp= new Node; temp->data=x; temp->next=head; head = temp; } void MoveNode(Node*& dest, Node*& source) { if(source!=...
ALGO
0.999915
4.902575
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2020-07-02T20:14: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": "04aa880c1d...
a088897b-2e0e-4659-b2a7-8b90a83dfe50
caochao39/tare_planner
src/tare_planner/or-tools/include/coin/CglSimpleRounding.hpp
// $Id$ // Copyright (C) 2000, International Business Machines // Corporation and others. All Rights Reserved. // This code is licensed under the terms of the Eclipse Public License (EPL). #ifndef CglSimpleRounding_H #define CglSimpleRounding_H #include <string> #include "CglCutGenerator.hpp" #include "CoinPackedMa...
ALGO
0.970977
6.009255
{ "github_metadata": { "branch": "melodic-noetic", "commit_count": 189, "repo_created_at": "2021-05-08T14:30:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 544, "forks": 116, "issues": 12, "pull_requests": 0 }, "file_meta": { "content_i...
65ff8d12-dbf7-4798-8d8b-955bf3106970
lemire/Code-used-on-Daniel-Lemire-s-blog
2012/08/13/elazartest.cpp
/** * Inspired by <NAME>. * * g++ -O0 -g3 -funroll-loops -o elazartest elazertest.cpp */ #include <sys/stat.h> #include <sys/time.h> #include <sys/types.h> #include <string.h> #include <iostream> #include <limits> using namespace std; class WallClockTimer { public: struct timeval t1, t2; WallClockTimer() : ...
ALGO
0.914058
4.979957
{ "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": "829...
e7827034-95ac-4f6a-95d3-c1d77b83326d
polossk/Code-Archive
_OtherOJ/FZU/fzu2102.cpp
/**** *@PoloShen *Title:A */ #include <iostream> #include <cstdio> #include <string> #include <cstring> #include <cmath> using namespace std; int transform(int x,int y,string s){ int sum = 0; for (int i=0;i<s.size();i++){ if (s[i]>='0' && s[i]<='9') sum=sum*x+s[i]-'0'; e...
ALGO
0.999695
4.39993
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2014-08-03T14:23:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ecc43efdd...
116118b2-5896-4c68-86ef-9d093af3fac4
Rakibul1411/Data_Structrures_and_Algorithms
Sorting-Searching/QuickSort-End-Pivot/main.cpp
#include <iostream> #include <vector> using namespace std; int partition(vector<int>& arr, int left, int right) { int pivotValue = arr[right]; int leftIndex = left - 1; for (int j = left; j <= right - 1; ++j) { if (arr[j] <= pivotValue) { leftIndex++; swap(arr[leftIndex], ar...
ALGO
0.999997
5.911011
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-04-12T01:33: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": "0053eb7ebe63...
4accb276-d946-4dae-af19-171e338e664a
camil0palacios/Competitive-programming
solutions/codeforce/Codeforces Round #293 (Div. 2)/b.cpp
#include <bits/stdc++.h> #define endl '\n' #define ll long long #define fori(i,a,b) for(int i = a; i < b; i++) #define forr(i,a,b) for(int i = a; i >= b; i--) #define fore(i,a,b) for(int i = a; i <= b; i++) #define ft first #define sd second #define all(v) v.begin(), v.end() #define sz(v) (int) v.size() #define mp make...
ALGO
0.999997
4.103145
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2018-10-30T16:26: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": "fa1fa200d...
782e34e8-7e69-4099-9cae-78a0baf50ed4
zju3dv/ENFT
include/CVD/cvd/irls.h
/* This file is part of the CVD Library. Copyright (C) 2005 The Authors This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at ...
ALGO
0.997357
7.269525
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-06-10T09:25:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 79, "forks": 13, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "dae8e07a5...
1f9e2261-3565-4482-9410-e52af1e643bf
ZadeAo/licode-windows
ThirdParty/webrtc/src/webrtc/modules/remote_bitrate_estimator/test/estimators/nada.cc
/* * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contribut...
ALGO
0.999545
5.134975
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2018-11-12T09:54:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 9, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "2585b9387...
44552963-0af0-481d-8e8d-5b2ec5a39607
onionhoney/codesprint
judge/sessions/2018Individual/paolobuts@gmail.com/PD_01.cc
#include <iostream> #include <string> #include <math.h> using namespace std; class StopMap{ public: bool* stops; int floors; StopMap(int f){ floors = f; stops = new bool[f]; } ~StopMap(){ delete [] stops; } }; void loadStringToBoolArr(string rep, bool* arr, int size){...
ALGO
0.985698
3.857851
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2018-04-17T22:14: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": "8f6a46e9f...
98ab5765-89c3-402f-96e9-e18650a8dd09
KaHIP/CluStRE
extern/VieClus/extern/KaHIP/lib/partition/coarsening/contraction.h
/****************************************************************************** * contraction.h * * Source of KaHIP -- Karlsruhe High Quality Partitioning. * *****************************************************************************/ #ifndef CONTRACTION_VIXZ9K0F #define CONTRACTION_VIXZ9K0F //#include "data_...
ALGO
0.965108
5.521854
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-05-12T06:39:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3be0559deb642...