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
d70aea4d-9097-410c-ad89-bbd6750d9f6b
shahnewaz-labib/template-codes
String/KMP.cpp
// <NAME> string matching algorithm // link: https://youtu.be/sMARZCTPyNI // https://gist.github.com/dipta10/4658935c9f119fb7db966ba467c8dd7f //colab between labib and faisal #include <bits/stdc++.h> using namespace std; /* void kmp(string &text,string &pattern){ int n=pattern.length(),l=text.length(),i=0,j,lps[n]; ...
ALGO
0.999951
5.419724
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2020-04-30T12:09:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ddb97d68d...
9fe54a9f-2a23-44ed-b1bf-9db95c4f83ab
darkbits018/Aurdiuno-UNO
the_code.ino
//7 segement pin number - 7 segement light - arduino pin number //pin 11 - A = 12 //pin 7 - B = 10 //pin 4 - C = 8 //pin 2 - D = 7 //pin 1 - E = 6 //pin 10 - F = 11 //pin 5 - G = 9 //pin 3 is decimal /* 12 11 10 9 8 7 | | | | | | A --- F | | B | G | --- E | | C | | --- . dec D | |...
TOOL
0.98162
4.548638
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-06-29T11:14:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "217f4f987e...
699ba3e5-ceca-4e35-a127-385df05ed29f
cheef-keef/binkios
ios/primativesoncondvars.inl
// Copyright Epic Games, Inc. All Rights Reserved. // This file will make rrmutex and rrsemaphore from rrcondvar // must define before including: // the thread id type: //#define MUTEX_TID_TYPE pthread_t // the thread id getter: //#define MUTEX_TID_GET() pthread_self() // the interal mutex structure with at least...
TOOL
0.931476
6.617813
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-03-11T02:09:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6c52d3715c72...
a5506159-dd85-4a9d-9699-a771e639d13f
Hengle/misc_microsoft_gamedev_source_code
misc_microsoft_gamedev_source_code/misc_microsoft_gamedev_source_code/xcore/math/plane.h
//============================================================================ // // File: plane.h // Copyright (c) 2005-2006, Ensemble Studios // //============================================================================ #pragma once #include "generalVector.h" #include "generalMatrix.h" template<typename scalarT...
ALGO
0.929667
7.024866
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-09-30T07:02:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4ec07d728...
318d5445-8935-4163-8a91-5563f6d3f399
msurkovsky/kaira_projects
aco-round/aco/tsp/cTspAnt.cpp
#include "cTspAnt.h" cTspAnt::cTspAnt(float * pheromones, // const double * distances, const std::vector<std::pair<double, double> > &cities, const unsigned int graph_dim) : cAnt(pheromones, graph_dim, graph_dim - 1), m_Cities(cities) // , m_Distances(distances) { S...
ALGO
0.999713
4.513188
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2013-02-19T20:24: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": "0a4a0c440...
d520fa3a-afea-4869-ab94-ac44a57ce269
RIVeR-Lab/wpi_jaco
wpi_jaco_wrapper/src/jaco_kinematics.cpp
#include <wpi_jaco_wrapper/jaco_kinematics.h> using namespace std; JacoKinematics::JacoKinematics(void) { loadParameters(n); //calculate additional parameters double AA, CA, SA, C2A, S2A, D4B, D5B, D6B; if (arm_name_ == "jaco2") AA = 30.0 * PI / 180.0; else AA = 11.0 * PI / 72.0; //common param...
ALGO
0.960672
5.976995
{ "github_metadata": { "branch": "develop", "commit_count": 347, "repo_created_at": "2014-05-15T16:01:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 34, "issues": 8, "pull_requests": 1 }, "file_meta": { "content_id": "9911f26...
9664aa5e-830b-401c-a533-3013ba146b0d
Ose-4g/advent-of-code
2023/day6.cpp
#include <iostream> #include <fstream> #include <ostream> #include <string> #include <vector> #include <algorithm> #include <sstream> bool checkCanWin(long timePressed, long totalRaceTime, long currentMaxDistance) { return timePressed * (totalRaceTime - timePressed) > currentMaxDistance; } std::vector<long> pars...
ALGO
0.999607
4.879671
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-12-06T13:33:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1be3baf43a9d...
ec0262c5-38de-47e8-9bad-667e54fb5d92
NICTA/obsidian
src/fwdmodel/mt1d.hpp
//! //! Contains the interface for the 1D MT forward model. //! //! \file fwdmodel/mt1d.hpp //! \author <NAME> //! \date 2014 //! \license Affero General Public License version 3 or later //! \copyright (c) 2014, NICTA //! #pragma once #include "datatype/datatypes.hpp" #include "fwdmodel/fwd.hpp" #include "world/inte...
ALGO
0.987472
6.243937
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2014-06-18T07:55:01.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10, "forks": 14, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "874b6afa0...
19881e1e-f671-4aa7-9ebb-3baadb648f80
jungle401/leetcode
Algorithms/2024/Jan/328_Odd_Even_Linked_List.hpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* oddEvenList...
ALGO
0.999964
6.040686
{ "github_metadata": { "branch": "main", "commit_count": 161, "repo_created_at": "2022-08-21T01:59: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": "31d95793ed...
dc808189-6cf2-4d0e-92c6-2bbefd4f68be
mongodb/mongo
src/mongo/db/s/primary_only_service_helpers/retry_until_majority_commit.cpp
/** * Copyright (C) 2023-present MongoDB, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the Server Side Public License, version 1, * as published by MongoDB, Inc. * * This program is distributed in the hope that it will be useful, * but W...
ALGO
0.976685
7.880081
{ "github_metadata": { "branch": "master", "commit_count": 90314, "repo_created_at": "2009-01-15T16:15:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 27329, "forks": 5655, "issues": 0, "pull_requests": 82 }, "file_meta": { "content_id": ...
48d91ca4-a3aa-4005-b90d-644acc7db30d
Eduardofig/Competitive-Programming-Solutions
cf-ladder/ladder-3/68.cpp
#include <bits/stdc++.h> using namespace std; using ui = unsigned int; using l = long; using ul = unsigned long; using ll = long long; using ull = unsigned long long; const int MXN = 2e5 + 3; const int INF = 0x3f3f3f3f; const int MOD = 1e7 + 9; int m; //int k; //int a[MXN]; //int b[MXN]; string s; int op[MXN]; i...
ALGO
0.999998
3.999758
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2021-02-21T04:11:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d414d54f...
441ee439-8e96-4f4f-baa5-3874d68219a1
servo/skia
experimental/Intersection/LineParameterization.cpp
/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "CurveIntersection.h" /* This rejects coincidence with two muls, two adds, and one cmp. Coincident candidates will take another four muls and two adds, but may sti...
ALGO
0.989333
5.479426
{ "github_metadata": { "branch": "master", "commit_count": 12842, "repo_created_at": "2012-11-01T02:37:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 108, "forks": 60, "issues": 6, "pull_requests": 6 }, "file_meta": { "content_id": "21ec...
7669c678-6dbb-4fea-bb35-3f2687e8d1f5
c4lnn/CP-Code
Nowcoder/contest/8282/C.cpp
#include <bits/stdc++.h> #define SZ(x) (int)(x).size() #define ALL(x) (x).begin(),(x).end() #define PB push_back #define EB emplace_back #define MP make_pair #define FI first #define SE second using namespace std; typedef double DB; typedef long long LL; typedef pair<int,int> PII; typedef vector<int> VI; typedef vector...
ALGO
0.999144
4.153211
{ "github_metadata": { "branch": "master", "commit_count": 239, "repo_created_at": "2021-03-30T03:01: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": "26ad8df6...
13572492-4273-441d-a4a9-d960080a4eb8
scrm/scrm-r
src/scrm/summary_statistics/oriented_forest.h
/* * scrm is an implementation of the Sequential-Coalescent-with-Recombination Model. * * Copyright (C) 2013, 2014 <NAME>, Sha (<NAME>, <NAME> and <NAME> * * This file is part of scrm. * * scrm is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as p...
ALGO
0.944009
6.422529
{ "github_metadata": { "branch": "master", "commit_count": 191, "repo_created_at": "2014-09-10T12:58:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a3acaa8d...
bf93008e-17ed-44ff-a73b-3e97510b7238
min050410/CODING_TEST
Geometry/polygon/1004.cpp
// 어린왕자 #include<iostream> using namespace std; int main() { int n, T; int e, d; int x, y, r, x1, y1, x2, y2; cin >> T; while (T--) { cin >> x1 >> y1 >> x2 >> y2; cin >> n; e = 0; d = 0; while (n--) { cin >> x >> y >> r; if ((x - x1) * (x - x1) + (y - y1) * (y - y1) < r * r) if ((x -...
ALGO
0.999174
4.021551
{ "github_metadata": { "branch": "master", "commit_count": 205, "repo_created_at": "2022-01-20T15:33: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": "206fb1e1...
38618b87-4ca3-4df6-a726-1a22e390eedb
ishandutta2007/codeforces-i
ivan100sic/normal/852/B.cpp
#include <cstdio> #include <algorithm> #include <vector> #include <string> #include <set> #include <map> using namespace std; typedef vector<int> vec; typedef vector<vec> mat; const int MOD = 1'000'000'007; int n, l, m; /* 2 3 13 4 6 2 1 3 4 */ mat mnozi(mat a, mat b) { mat c(m, vec(m, 0)); for (int i = 0; i < m...
ALGO
0.999942
4.042912
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:39:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b3b2e1e3a22e...
f8debb78-c809-418b-ad3d-2f33ed58bb03
shinkeonkim/today-ps
BOJ/17000~17999/17300~17399/17396.cpp
// http://www.secmem.org/blog/2019/01/09/wrong-dijkstra/ #include <cstdio> #include <queue> #include <vector> #define MAX_V 100000 using namespace std; using ll = long long; const ll INF = (ll)1e18; struct st { int node; ll cost; bool operator<(const st &to) const { return cost > to.cost; } }; ll dist[MAX_V + ...
ALGO
0.99992
3.90053
{ "github_metadata": { "branch": "master", "commit_count": 505, "repo_created_at": "2019-03-13T01:25:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "abb1c92c...
9aa18dad-6bc7-4d69-a00b-a5633175995a
gado321/CodeLearn
OldCode/tapcode.cpp
#include <bits/stdc++.h> using namespace std; int dau, dau1, cuoi, cuoi1, a[37][37], q[37] ; bool ok[37]; /*void bfs(int u) { q[1] = u; ok[u] = true; int l = 1, r = 1; while (l <= r) { u = q[l]; r++; for (int v = 1; v <= 6; v++) } }*/ int main() { freopen("tapcode.inp","...
ALGO
0.999457
3.126676
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2021-09-30T09:41: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": "05ee6089190...
6586b4b2-85c2-40e7-bb39-932b45a7e5e0
Spirit599/algorithm
leetcode/cpp/76_1.cpp
// 76. 最小覆盖子串 class Solution { public: unordered_map<char, int> check_list; string minWindow(string s, string t) { //unordered_set<char> active_list; for(char c : t) ++check_list[c]; // for(auto& kav : check_list) // active_list.insert(kav.first); ...
ALGO
0.999992
6.061771
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2022-04-25T08:50: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": "510157885...
ce38fe3e-18e1-47e3-a6a1-3a811467da84
Ibrahim-898/XPSC_ProblemSolving
Week5/Day1/C_A_TRUE_Battle.cpp
#include<bits/stdc++.h> using namespace std; #define endl '\n' #define ll long long #define ld long double #define ios() ios_base:: sync_with_stdio(0);cin.tie(0); bool cmp(const pair<int,int> &a,const pair<int,int> &b){ if(a.first!=b.first) return (a.first<b.first); else return (a.second>b.second); } ...
ALGO
0.999945
4.315283
{ "github_metadata": { "branch": "main", "commit_count": 81, "repo_created_at": "2024-10-27T16:36: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": "a5d26672f3c...
f0345d98-c2a5-4606-bad6-f69bd38535b9
Audi80cabrio/GP2
praktikum/aufgabe4/route.cpp
#include "route.h" #include <algorithm> Route::Route(float pHeight, std::function<float(const float, const float, const float, const float, const float)> pDist) { destinations = new std::vector<std::pair<float, float>>(); setHeight(pHeight); setDist(pDist); } Route::Route(const Route& route) { height ...
ALGO
0.997684
5.057194
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2025-04-01T12:25: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": "395cea86ec9...
d3c7b194-83dc-42ee-95bc-1d332cb8d426
kyomin/algorithm
Baekjoon/1652.cpp
#include <iostream> #include <string> using namespace std; string map[100]; int main() { int N; cin >> N; for (int row = 0; row < N; row++) cin >> map[row]; int width = 0; int height = 0; // for width for (int row = 0; row < N; row++) { int cnt = 0; for (int col = 0; col < N; col++) { if (map[row...
ALGO
0.999884
3.768064
{ "github_metadata": { "branch": "master", "commit_count": 1211, "repo_created_at": "2020-09-26T17:32: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": "36d6c25...
5efd9f72-ff3c-483f-a68b-eb3167186634
tiankonguse/leetcode-solutions
contest/2/261/B.cpp
#include "base.h" typedef long long ll; typedef long long LL; typedef unsigned long long ull; typedef unsigned long long ULL; typedef pair<int, int> pii; typedef pair<ll, ll> pll; // const int mod = 1e9 + 7; template <class T> using min_queue = priority_queue<T, vector<T>, greater<T>>; template <class T> using max_qu...
ALGO
0.999483
4.015727
{ "github_metadata": { "branch": "master", "commit_count": 1037, "repo_created_at": "2015-04-11T09:31:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 81, "forks": 26, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "f33fd...
2f2709fd-b75f-4912-ae30-41f986686f38
dmitryrashkeev/HackerRankSolutions
IQR_with_Freq/IQR_with_freq.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cstdlib> #include <iomanip> int main() { int N = 0; int M = 0; double Q1, Q2, Q3; std::cin >> N; std::vector<int> input_data(N); std::vector<int> freq(N); for (auto& x : input_data) { std::cin >> x; } for (auto& f : freq) { std::cin >>...
ALGO
0.999977
4.461614
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2017-03-03T00:36:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b8d2cac85...
0be60e5e-31b4-48b4-ba15-a4a752f508e0
DiegoSaburi/calculo_numerico
interpolação/interpolacao_lagrange.cpp
#include <iostream> #include <cmath> #include <stdio.h> #include <vector> using namespace std; int fatorial (int i){ if (i == 0) return 1; return i*fatorial(i-1); } double derivada (vector <double> fx, double ordem, double valor){ int i, j, sum = 0; for (j = 0; j < ordem; j++){ for (i = 0; i < fx.size()-1;i...
ALGO
0.999207
3.910683
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-03-05T02:26: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": "e0f21ccd0b...
6900b737-ddb3-4653-a249-5bae5b01505f
TypeErrorEngine2022/Binary-Indexed-Tree
IndexPriorityQueue.h
#pragma once #include <vector> template <typename Item> class IndexPriorityQueue { public: IndexPriorityQueue(int maxN); int size() const; bool empty() const; bool contains(int key) const; void insert(int k, Item item); void deleteNode(int k); ...
ALGO
0.999353
5.660872
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-07-31T11:57: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": "244ba288890c...
03d943c2-3fab-4403-bd86-59e158324435
Harshit-Singh-23/DSA
recursion/recursion.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; int sumtilln(int n){ if(n == 0){ return 0; } int prevsum = sumtilln(n-1); return n + prevsum; } long long int factorial(int n) { long long int recAns = 1; if (n > 0) recAns = n * factorial(n - 1); return r...
ALGO
0.999904
4.656951
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2021-10-21T20:13: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": "fc1c7a06e...
b61ee0fa-62a2-4c51-b1f6-bc5f04399659
hschoi1104/Algorithm
BOJ/시뮬레이션/3190_뱀.cpp
#include <iostream> #include <deque> #include <string> using namespace std; int arr[101][101], dir[4][2] = { {0,1},{1,0},{0,-1},{-1,0} }, n, k, l, x, t = 0; string c; typedef struct point { int y, x, d; }; deque<point>dq; bool move() { point next = dq.back(); next.y += dir[next.d][0]; next.x += dir[next.d][1]; if (...
ALGO
0.999976
3.973546
{ "github_metadata": { "branch": "master", "commit_count": 293, "repo_created_at": "2019-08-11T02:11:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3845054a...
2c9c6232-f8ff-4d96-a826-04cf0df695e9
space-sea1231/space_sea
比赛/暑期集训/7.9/CJ杨子航/letter.cpp
#include <iostream> #include <stdio.h> #include <vector> #define __Debug using namespace std; typedef long long ll; const int N=1e5+10; const int M=5e3+10; int n, m, q; int cnt, ans, root; int head[N], to[N<<1], nxt[N<<1]; int ru[N]; struct Node{ int x, y; bool vis; }e[N]; void Add(int u, int v){ to[++...
ALGO
0.999869
4.120533
{ "github_metadata": { "branch": "main", "commit_count": 136, "repo_created_at": "2025-01-15T08:15: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": "00aef33809...
b4591545-3272-457c-b499-36778ecc6e7f
yogykwan/acm-challenge-workbook
src/poj2315.cpp
/* * POJ 2315: Football Game * 题意:n个球距离门框距离不同,每次选不超过m踢,踢出距离是周长的整数倍,单次最长不超过l。问先手必胜还是后手胜。 * 类型:Nim博弈 * 算法:将距离除以周长变为整数,则问题转化为Nim加强。n堆石头,每次最多取m堆,每堆最多取k个。首先每堆石头对k+1取模,接下来的每堆石头转为2进制数并进行模为m+1的xor(只加不进位),结果非0则必胜,否则必败。 */ #include <cstdio> #include <cmath> #include <cstring> const double PI = acos(-1.0); int sg[28]; in...
ALGO
0.99997
3.457083
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2016-11-12T12:14:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1766, "forks": 340, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "370d...
2d4a5509-d683-486f-8296-77e862fa63fd
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/07/0705/personal_submission/cf570c_tsreaper.cpp
#include <bits/stdc++.h> #define MAXN ((int) 3e5) using namespace std; int n, q, ans; char s[MAXN + 10]; int f[MAXN + 10]; void upd(int i) { if (s[i] == '.') { f[i] = 1; if (i == 1 || s[i - 1] != '.') f[i] = 0; } else { f[i] = 0; } } int main() { scanf("%d%d%s", &n, &q, s + 1...
ALGO
0.998534
3.715984
{ "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": "c562...
c2e7ab91-c415-48fe-9f5e-3acf0aac0b71
prokarius/hello-world
C/Teque.cpp
#include<cstdio> #include<cstring> #include<deque> char command[16]; int main(){ int n; scanf("%d", &n); // Apparently cpp deques have O(1) random access :0 std::deque<int> first_half; std::deque<int> second_half; // Process each input seperately for (int i = 0; i < n; ++i){ int ...
ALGO
0.999133
4.564304
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2017-06-01T15:50:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d30b3152...
11617371-4921-4016-acda-ebe9a0501fa4
CharlieHon/Algorithm_note
03_sort/02_select_sort.cpp
#include <iostream> using std::cout; using std::cin; using std::endl; // 选择排序 void selectSort(int a[], const int n){ for(int i=0; i<n-1; ++i){ // 进行n-1趟操作 int flag = i; // [0,i-1] 为已排序部分 for(int j=i+1; j<n; ++j){ // 从 [i+1,n-1] 中选出比a[i]小的与其交换 if(a[j] < a[flag]) // 使得 [0,i] 已排序 ...
ALGO
0.999972
4.939271
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2023-04-29T11:39: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": "7424efd1e1...
85d26c94-b3c8-4f73-9b26-1014b0a330d4
Anjana-sankar-k/OOP_S1
compile.cpp
#include<iostream> using namespace std; //Creating parent class class RBI{ public: float loanrule(float loan){ float repay=loan+loan*(0.05); return repay; } }; class SBI:public RBI{ public: float sbirule(float loan) { if(loan>1000000) { float repay1= loan*(0.0...
TOOL
0.98401
3.467873
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-15T10:00:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4c8be48825fd...
e01051a1-bf5f-4958-9a10-753d103c805c
betterCallSherlock/RSA-CPP
code/RSA.h
#ifndef RSA_H #define RSA_H #include <iostream> #include <math.h> #include <numeric> #include <valarray> // 使用幂模算法来计算 a^b mod c long long modPow(long long a, long long b, long long c) { long long result = 1; while (b > 0) { if (b % 2 == 1) { // 如果 b 是奇数 result = (result * a) % c; }...
ALGO
0.999409
5.224508
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-03-05T13: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": "3024bc5f3b4f...
793da180-0b90-430f-a974-bc634a912650
mr-kamlesh-pawar/DSA-Problems-Solved
Solved Problems/longestSubsequenceArray.cpp
class Solution { public: int longestConsecutive(vector<int>& nums) { // if(nums.size() ==0) return 0; // sort(nums.begin(), nums.end()); // int count=0; // int presmall=INT_MIN; // int longestcount=1; // for(int i=0; i<nums.size(); i++){ // if(nums[i] -...
ALGO
0.999978
5.54863
{ "github_metadata": { "branch": "main", "commit_count": 176, "repo_created_at": "2024-01-21T18:46: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": "377faa15ce...
1cde1c2a-bb27-4745-939d-623eff32b86a
btcup/sb-admin
exams/2559/02204111/2/midterm/4_2_837_5820551214.cpp
//5820551214 <NAME> #include<iostream> using namespace std; int main() { int x; cout<<"Enter a positive integer : "; cin>>x; cout<<endl; cout<<endl; if(x==24) { cout<<"Number of digit is 2"<<endl; cout<<"factor of 24 are : "<<endl; cout<<"1 *...
ALGO
0.99451
3.663372
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-04-03T17:31:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "07d31e92d9...
e5c326a9-4924-4d22-adb7-ad501a0532ec
Raulidze/OOP
Лаба ООП/Лаба ООП/bin_tree.cpp
#include "bin_tree.h" node* create(node* root, int key) { node* tmp = (node*)malloc(sizeof(node)); tmp->key = key; tmp->parent = NULL; tmp->left = tmp->right = NULL; root = tmp; return root; } node* add(node* root, int key) { node* tmp = (node*)malloc(sizeof(node)); tmp->key = key; ...
ALGO
0.99955
3.70708
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-02-23T18:30:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d1caba48c087...
1b63b5ab-3c40-4846-9623-3bfbfa043053
k-tanotra/LeetCode
problems/kth_largest_element_in_an_array/solution.cpp
class Solution { public: int partition(vector<int> &nums,int start,int end,int pivot){ int i = start; int x = nums[pivot]; swap(nums[end],nums[pivot]); for(int j=start;j<end;j++){ if(nums[j]<=x){ swap(nums[i],nums[j]); i++; } ...
ALGO
0.999979
5.811002
{ "github_metadata": { "branch": "main", "commit_count": 541, "repo_created_at": "2021-12-23T21:49: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": "f40d883b86...
45596672-d703-452c-b469-45a48d05fcdf
pandeyji711/LeetCode
3837-grid-teleportation-traversal/grid-teleportation-traversal.cpp
class Solution { public: int minMoves(vector<string>& matrix) { int n = matrix.size(); int m = matrix[0].size(); vector<vector<int>> sc(n, vector<int>(m, INT_MAX)); unordered_map<char, vector<pair<int, int>>> portals; unordered_set<char> usedTeleport; // pus...
ALGO
0.999947
5.386331
{ "github_metadata": { "branch": "main", "commit_count": 666, "repo_created_at": "2024-05-03T20:06:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "874abc32e4...
303ffdf2-33c9-407a-9428-2c7fe07f20b1
SymbianSource/oss.FCL.sf.mw.dlnasrv
upnpmediaserver/avobjects/src/upnpdlnaprotocolinfo.cpp
/** @file * Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" * which accompanies this distribution, and is available * at the URL "http://www.eclipse.org/...
TOOL
0.931788
4.667111
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-10-14T20:16:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "132ce0a6a4c...
734db848-6d69-4d57-b5b4-3410d7ded24f
lenniaa/Dev
C++/SW_Exp_Academy/SWEA_1206.cpp
#include <iostream> #include <vector> /** View SWEA_1026 ( https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV134DPqAA8CFAYh&categoryId=AV134DPqAA8CFAYh&categoryType=CODE ) * */ using namespace std; int max(int &a, int &b) { return a > b ? a : b; } int solution(vector<int> &arr, in...
ALGO
0.999814
4.218281
{ "github_metadata": { "branch": "master", "commit_count": 831, "repo_created_at": "2019-08-06T09:56:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6bf42659...
a861e50f-2c43-4234-9123-33819a62b88b
ClickHouse/ClickHouse
src/Storages/MergeTree/Compaction/MergeSelectors/TTLMergeSelector.cpp
#include <Storages/MergeTree/Compaction/MergeSelectors/TTLMergeSelector.h> #include <Storages/MergeTree/Compaction/MergeSelectors/MergeSelectorFactory.h> namespace DB { static bool canIncludeToRange(size_t part_size, time_t part_ttl, time_t current_time, size_t usable_memory) { return (0 < part_ttl && part_ttl <=...
ALGO
0.92519
6.840538
{ "github_metadata": { "branch": "master", "commit_count": 183246, "repo_created_at": "2016-06-02T08:28:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 41764, "forks": 7471, "issues": 4250, "pull_requests": 622 }, "file_meta": { "content_...
49f6e071-dfdd-406b-951f-0f8cbb43756f
juanjo0911/Sistemas-Embebidos
Vasquez_Juan_Deber12/Vasquez_Juan_Deber12.ino
/* * Deber No 11 * */ #include "datos.h" int resp; int contador=0; int por=0; int knn (int veci, int eti, int tam_col, int col_fil); void setup() { Serial.begin(9600); for(contador;contador<24;contador++){ resp=knn(3,2,3,100); } } void loop() { } int knn (int veci, int eti, int tam_col, int tam_fil){...
DATA
0.976151
3.717285
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2020-11-22T19:31: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": "93adba7d6a7...
7539a623-3efa-4cab-877c-9f7c9acafb15
2044-space-elevator/OnlineJudgeCode
Luogu/P_2783_有机化学之神偶尔会做作弊.cpp
#include <bits/stdc++.h> #define rty printf("Yes\n"); #define RTY printf("YES\n"); #define rtn printf("No\n"); #define RTN printf("NO\n"); #define rep(v,b,e) for(int v=b;v<=e;v++) #define repq(v,b,e) for(int v=b;v<e;v++) #define rrep(v,e,b) for(int v=b;v>=e;v--) #define rrepq(v,e,b) for(int v=b;v>e;v--) #define stg str...
ALGO
0.999977
3.984488
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2023-09-03T04:39: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": "dfb92fbdbd5...
0b3222a4-d0dc-42eb-b130-263f587a996c
DucManhPhan/basic-programming
Data-Structure/Linked List/Singly Linked List/Basic_Linked_List/LinkedList.h
#pragma once #include "stdafx.h" #define NOT_ITERATE 0 #define ITERATED 1 #define LOOP 2 struct node { int nData; int nFlag; node *next; node(int n) : nData(n), next(nullptr), nFlag(0) { // nothing to do. } }; typedef void(*LLCALLBACK)(int, void*); class CLinkedList { private: node* pFirstNode; ...
TOOL
0.99727
4.751385
{ "github_metadata": { "branch": "master", "commit_count": 367, "repo_created_at": "2018-07-30T14:03:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "d26bcfa3...
76bf74d9-387b-42ee-83de-163f43faa075
VastoLorde95/Competitive-Programming
Codeforces/224 Division 2/Problem C/C.cc
#include<cstdio> #include<iostream> #include<cmath> #include<algorithm> #include<cstring> #include<map> #include<set> #include<vector> #include<utility> #include<queue> #include<stack> #define sd(x) scanf("%d",&x) #define sd2(x,y) scanf("%d%d",&x,&y) #define sd3(x,y,z) scanf("%d%d%d",&x,&y,&z) #define fi first #define...
ALGO
0.999954
3.077672
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2017-07-25T11:08:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 171, "forks": 41, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99bd2d...
68c00ba0-d60c-4e7b-b775-a96411459d75
lizhijian-cn/courses
buaa/algorithm/2019/e0/b.cpp
#define local #include <cstdio> #include <iostream> #include <algorithm> #include <queue> using namespace std; const int maxn = 1e6 + 5; struct Film { long long l; long long v; }; Film films[maxn]; // 大顶堆(greater) struct cmp_by_l { bool operator() (const Film& a, const Film& b) { return a.l > b...
ALGO
0.999986
3.937479
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2019-08-21T13: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": "27e14549a...
1b8dd2cb-c496-4fd5-bbfd-208ea6d2f536
light17ln/problemSolving
DP 1/06_House_Robber.cpp
#include <bits/stdc++.h> using namespace std; //lc198 //METHOD 1 class Solution { public: int rob(vector<int>& nums) { int n = nums.size(); if(n==0) return 0; vector<int> rob(n+1,0); rob[n] = 0; rob[n-1] = nums[n-1]; for(int i=n-2; i>=0; i--){ rob[i] = m...
ALGO
0.999941
5.012014
{ "github_metadata": { "branch": "main", "commit_count": 132, "repo_created_at": "2024-03-08T16:37: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": "45b6a4090c...
0aa4a03d-9670-44ba-8529-73079f024653
c-avi/DSA-Questions-Bank
QUESTIONS/01_3Divisors.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: vector<int> threeDivisors(vector<long long> query, int q) { // Write your code here int MAX = 1e6 + 1; vector<bool> isPrime(MAX, true); isPrime[0] = isPrime[1] =...
ALGO
0.997252
5.283671
{ "github_metadata": { "branch": "main", "commit_count": 85, "repo_created_at": "2025-02-19T13:16: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": "d2e14d66a74...
0016a772-5e9f-4604-9423-c16db1b86d0e
Jassy930/leetcode_main
950.卡牌分组.cpp
/* * @lc app=leetcode.cn id=950 lang=cpp * * [950] 卡牌分组 * * https://leetcode-cn.com/problems/reveal-cards-in-increasing-order/description/ * * algorithms * Medium (74.52%) * Total Accepted: 1.2K * Total Submissions: 1.6K * Testcase Example: '[17,13,11,2,3,5,7]' * * 牌组中的每张卡牌都对应有一个唯一的整数。你可以按你想要的顺序对这套卡片进行...
ALGO
0.999993
6.022293
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2019-03-13T08: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": "123a214fc...
bcf55111-d9a7-47c4-8ab3-ead8f5b6444a
lukaspospisil/permon_examples
test_02/string.cpp
static char help[] = ""; #include <permonqp.h> /* manipulation with quadratic programming problems (QP) */ #include <permonqps.h> /* manipulation with solvers (QPS) */ #include "mpi.h" /* get rank of the procesor */ #include <iostream> /* std::cout */ #include <string> /* manipulation with strings */ #include <fstrea...
ALGO
0.999139
4.229624
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2016-10-19T15:04:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "336a7e249...
0a3f36a5-7044-42dd-93ed-bec8358297b2
Joby-John/strivers_dsa_list
ThreeSumTest.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { int n = nums.size(); vector<vector<int>>triplets; sort(nums.begin(), nums.end()); for(int i = 0; i<n-2; i++) { if(i>0 && nums[i]==nums[i-1]...
ALGO
0.999942
5.828334
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2023-10-18T01:53: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": "16fdc9cdcc4...
1f07cdad-7e65-4a3f-9d47-0d8db95ba29a
google-ai-edge/mediapipe
mediapipe/calculators/video/tvl1_optical_flow_calculator.cc
// Copyright 2019 The MediaPipe Authors. // // 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 a...
ALGO
0.988607
7.650533
{ "github_metadata": { "branch": "master", "commit_count": 4767, "repo_created_at": "2019-06-13T19:16:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 30689, "forks": 5453, "issues": 443, "pull_requests": 149 }, "file_meta": { "content_id"...
359d9445-04be-4cfd-afa8-249162fca763
raincross7/code-similarity
codes/train_code/problem273/problem273_87.cpp
// first second push_back unordered return continue break vector visited check flag bool while iterator begin end lower_bound upper_bound temp true false ll_MAX ll_MIN insert erase clear pop push compare ll64_MAX ll64_MIN reverse replace stringstream string::npos length substr front priority_queue #include<bits/stdc++...
ALGO
0.999738
3.618692
{ "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": "bea9d1fa2b7a...
18d89a77-9321-4aca-868b-956074f27371
fmihpc/vlasiator
particles/particle_post_pusher.cpp
/* * This file is part of Vlasiator. * Copyright 2010-2016 Finnish Meteorological Institute * * For details of usage, see the COPYING file and read the "Rules of the Road" * at http://www.physics.helsinki.fi/vlasiator/ * * This program is free software; you can redistribute it and/or modify * it under the terms...
ALGO
0.984533
5.945843
{ "github_metadata": { "branch": "master", "commit_count": 6974, "repo_created_at": "2014-01-29T12:49:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 57, "forks": 48, "issues": 131, "pull_requests": 41 }, "file_meta": { "content_id": "7f3...
16f1b9e8-11c1-4bb8-a047-e4a5880674f1
LC-John/HWSolutions2Introduction2Computation
第三阶段编程练习1/487-3279.cpp
/***** 描述 商家喜欢拥有容易记忆的电话号码。让电话号码容易被记住的一种方式是让它能够拼成一个单词或者短语。 例如,你可以通过容易记住的单词TUT-GLOP拨叫University of Waterloo。有时只有号码的一部分能够用 来拼写单词。当你今晚回到酒店你可以通过拨打310-GINO来从Gino's订一份pizza。另外一种让电话号码容 易被记住的方法是把号码分组。你可以从Pizza Hut订pizza,用含有三个十的号码3-10-10-10. 电话号码的标准格式是七个十进制数字,第三个和第四个数字之间有一个连接符(例如:888-1200)。电话 拨号盘提供字母到数字的映...
ALGO
0.999414
3.737419
{ "github_metadata": { "branch": "phase4-3", "commit_count": 51, "repo_created_at": "2020-09-26T07:26:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a73444...
e201864b-370e-4262-9552-d629357fd2b5
JorgeRuizDev/UBU_ARPA_MPI
P06.cpp
#include <mpi.h> #include <stdio.h> #include <stdlib.h> #include <iostream> using namespace std; #include <windows.h> #define ETIQUETA 288 #define ORIGEN 0 #define DESTINO 1 long long unsigned int factorial(int); /* Method definitions */ int main(int argc, char* argv[]) { int rango_proceso; // ID Proceso. int nu...
ALGO
0.999674
4.138227
{ "github_metadata": { "branch": "Iván", "commit_count": 23, "repo_created_at": "2020-10-06T17:16: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": "779759c08ec...
cbde6e2e-fae9-4971-a809-1ad9ae35cfeb
ishandutta2007/codeforces-o
olphe/normal/1497/E2.cpp
#include "iostream" #include "climits" #include "list" #include "queue" #include "stack" #include "set" #include "functional" #include "algorithm" #include "string" #include "map" #include "unordered_map" #include "unordered_set" #include "iomanip" #include "cmath" #include "random" #include "bitset" #include "cstdio" ...
ALGO
0.999851
4.655419
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:45: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": "0361565db0e1...
d166611d-7cfd-4a46-9b43-8c8a3debcf11
Natali-Skv/algorithms-and-datastructures
AaDS_mod-2/task3_2.cpp
#include <iostream> #include <queue> // 3_2. Вычислить количество узлов в самом широком слое декартового дерева и количество узлов в самом широком слое // наивного дерева поиска. Вывести их разницу. Разница может быть отрицательна. template<typename T, typename Comparator = std::less<T>> class Treap { public: ex...
ALGO
0.99948
5.039889
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-05-15T19:40: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": "e812f1e319...
678dc36f-8a4b-424f-8e33-5ea278d01599
RedHerisson/Chess-Engine
IA_V2.cpp
#include "game.h" float Game::minimaxV2(int depth, bool team, int alpha, int beta, std::unordered_map<unsigned long long, TranspositionTable> TTList[10], std::unordered_map<int, std::pair<position, position> > killerMove[10], unsigned long long keyArray[12][8][8]) { depth--; incrTour(); float CurrValue = 0, nodeVal...
ALGO
0.999096
3.72269
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-08-30T20:34: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": "36852e7ce7b3...
168cfb32-a4c3-430c-9016-428da977d2c6
haote216/Codes
exercise29/exercise29/test.cpp
#include<iostream> #include<vector> #include<queue> using namespace std; //class Solution { //public: // vector<int> GetLeastNumbers_Solution(vector<int> input, int k) { // vector<int> ret; // if (k <= 0 || k>input.size()) // return ret; // priority_queue<int> pq; // for (int i = 0; i<k; ++i) // pq.push(input...
ALGO
0.9993
4.30274
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2018-07-27T02:31: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": "a370074e1...
8f98d0a7-4f46-4e8b-8204-1f16411e12f9
wintercher/C-
10/10.4.cpp
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; void lostablicy(int* tablica, int rozmiar) { srand(time(0)); for (int i = 0; i < rozmiar; ++i) { *(tablica + i) = rand() % 51; } } bool sprawdzanie(int* liczba, int* tablica, int rozmiar) { for (int i = 0; i < rozmiar...
ALGO
0.993693
3.703252
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2025-03-01T07:39: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": "835bdbf377b...
3f2609c2-f906-43ba-8c02-c01a9ecd28a9
BaZzz01010101/ReflaxMan
src/common/Sphere.cpp
#include "trace_math.h" #include "Vector3.h" #include "Sphere.h" Sphere::Sphere() { } Sphere::Sphere(const Vector3 & center, float radius, const Material & material) : center(center), material(material) { assert(radius > VERY_SMALL_NUMBER); if (radius <= VERY_SMALL_NUMBER) radius = VERY_SMALL_NUMBER; ...
ALGO
0.931949
5.603379
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2015-07-05T22:35: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": "7a7791ae9...
336fb979-ed38-4c41-a6b4-fbf709d0de73
lieuwex/PM-4
main.cpp
/* * Auteurs: <NAME> (s2012820) en <NAME> (s2030098) * Compiler: clang++ 800.0.42.1 * Last modified on: 2017-12-07 * * PM opdracht 4: Grote getallen */ #define _GNU_SOURCE // asprintf #include <iostream> #include <memory> #include <vector> #include <string> #include "bignum.h" using namespace std; unique_ptr<...
TOOL
0.979036
4.294745
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2017-11-13T23:14: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": "3bea87686...
e3e88035-8e6e-4740-b3db-98f8afba8325
v2v3v4/BigWorld-Engine-14.4.1
programming/bigworld/tools/bwlauncher/utils.hpp
#ifndef BWLAUNCHER_UTILS__HPP #define BWLAUNCHER_UTILS__HPP #include <exception> typedef BW::vector<tstring> StringVector; typedef BW::map<tstring, tstring> StringMap; /** * Custom exception class, raised when a permissions problem is encountered. */ class UnprivilegedException : std::exception { }; void launchUR...
TOOL
0.951514
6.718412
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2023-01-09T19:54:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 225, "forks": 106, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc75c16...
0e3f8264-5008-4fe3-b8b3-5316d186bd9c
dmytra/cpp_hint_and_trick
pointer/pointer_all_maind.cpp
#include <iostream> // https://t.me/easy_c_plus/117 // Что в себе хранит указатель ? // Указатель (pointer) — это переменная, которая хранит адрес другой переменной в памяти. По сути, указатель "указывает" на местоположение другого значения. void func() { std::cout << "Hello, World!" << std::endl; } int m...
ALGO
0.972488
5.034865
{ "github_metadata": { "branch": "main", "commit_count": 132, "repo_created_at": "2024-10-19T20:05: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": "03cebbe456...
acf9911c-f6d8-4191-a690-ba7369013488
marvellouschandan/Data-Structures
SortingAlgos/mergeSort.cpp
// To merge sort an array #include<iostream> using namespace std; void merge(int array[], int LB, int MB, int UB) { int tempArray[UB - LB +1]; int i = LB,j = MB +1,k = 0; while(i < (MB+1) && j < (UB +1)) { if(array[i] < array[j]) { tempArray[k] = array[i]; ...
ALGO
0.999999
5.364073
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2018-09-04T03:13:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 5, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "9fd8eb8ed...
c385c40f-4959-4de4-9d6a-c5e633a6bee9
2hyunjinn/Algorithm
Baekjoon_10828.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <string> using namespace std; int stack[10001]; /* 인덱스는 0부터 시작하기 때문에 공백은 -1 */ int idx = -1; /* top */ // idx가 -1이면 공백, 아니면 가장 최근에 넣은 값 반환 int top() { if (idx == -1)return -1; return stack[idx]; } /* push */ // 인덱스 +1 한 후 stack 배열에 x 넣기 void push(int x)...
ALGO
0.999356
4.30469
{ "github_metadata": { "branch": "main", "commit_count": 180, "repo_created_at": "2022-01-20T15:00: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": "0a2dfaf244...
485e6877-ec8a-41da-9cb9-03c398c617f4
satishagrwal/Interview
DP/countSubsetSum.cpp
/* Given an array arr[] of length N and an integer X, the task is to find the number of subsets with a sum equal to X. Examples: Input: arr[] = {1, 2, 3, 3}, X = 6 Output: 3 All the possible subsets are {1, 2, 3}, {1, 2, 3} and {3, 3} Input: arr[] = {1, 1, 1, 1}, X = 1 Output: 4 */ #include <bits/stdc++.h> ...
ALGO
0.999976
5.481122
{ "github_metadata": { "branch": "main", "commit_count": 82, "repo_created_at": "2021-07-01T05:14: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": "d50effe4323...
f21508fa-8798-4ac3-b65e-4c1b99e68df2
AlFed13-02/cpp-search-server
search-server/paginator.h
#pragma once #include <algorithm> #include <iostream> #include <utility> #include <vector> #include <iterator> template <typename Iterator> class IteratorRange { public: IteratorRange(Iterator range_begin, Iterator range_end): range_begin_(range_begin), range_end_(range_end), size_(distance...
TOOL
0.95619
6.367007
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2023-03-06T19:59: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": "672e1d93c7d...
dd531788-917b-48df-a0bd-a42cd27268ce
affan-01/My-LeetCode
226-invert-binary-tree/226-invert-binary-tree.cpp
/** * 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), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999981
5.921973
{ "github_metadata": { "branch": "main", "commit_count": 129, "repo_created_at": "2022-06-23T21:17:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d28c52f21a...
c7bafca9-32e8-4250-9c32-681756debacc
softarts/myoj
ojcpp3/0234_palindromelist.cpp
#include "../common.h" using namespace std; /* O(n) & O(1) space 1-2-2-1 使用O(1)空间的话只能用递归,或者从中间断开 使用递归,cur=当前需要比较的node */ class Solution { public: ListNode *cur; bool hitMiddle = false; bool isPalindrome(ListNode* head) { cur = head; return helper(head); } bool helper(ListNode *node...
ALGO
0.999973
5.809156
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2022-09-26T01:29:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab16108e5...
d3ab244f-90bd-414b-9380-2dd6bbfc5f70
ccd97/cp_solutions
codeforces/0-976/DIV2-E/898E.cpp
#include <bits/stdc++.h> using namespace std; bool isPerfectSquare(long x) { long double sr = sqrt(x); return ((sr-floor(sr)) == 0); } long nearest_square_diff(long n) { long double root = sqrt(n); long fr = floor(root); long cr = ceil(root); return min(abs(fr*fr - n), abs(cr*cr - n)); } int...
ALGO
0.999936
4.027667
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2018-04-24T09:38: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": "1602b1449...
7ff40ecd-47f5-4864-9d69-02e85385f125
goodpaperman/effectcpp
item31/02.cc
#include <iostream> #include <string> #include <vector> #include <list> #include <map> using std::cout; using std::endl; using std::string; using std::vector; using std::list; using std::map; using std::pair; using std::ostream; class SpaceShip; class SpaceStation; class Asteriod; class GameObject { p...
ALGO
0.966751
4.956637
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-06-01T04:43: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": "dc5bc87c18...
bca2f232-c2e5-4163-9900-7ffa9c68008b
ishandutta2007/codeforces-b
bidzilya/normal/438/C.cpp
#include <cstdio> #include <cstdlib> #include <vector> #include <iostream> #include <algorithm> using namespace std; typedef long long ll; const int modulo = 1e9 + 7; const int max_n = 202; struct point { ll x, y; point() { } point(ll _x, ll _y): x(_x), y(_y) { ...
ALGO
0.999865
4.302376
{ "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": "1eab7f44951d...
b7e610d4-e619-4552-ade7-d1d667ddf642
yjl9903/XCPC
Codeforces/edu84/c.cpp
#include <iostream> #include <cstdio> #include <cassert> #include <cstring> #include <cmath> #include <functional> #include <algorithm> #include <utility> #include <vector> #include <string> #include <map> #include <set> #define ms(a,b) memset(a,b,sizeof(a)) using namespace std; using ll = long long; using PII = pair<i...
ALGO
0.999744
3.365305
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-03-25T19:33:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a891e419f394...
7f68909a-361a-4269-a081-a6a6465603cf
SirQuinMacKenzie/DSA-Design
CS300ProjectTwo.cpp
/********************************************************************************** * Project Name: ABCU Course Information System * File Name: CS300ProjectTwo * Author: <NAME> * Date Created: 4/20/24 * Last Modified: 4/20/24 * Description: Loads course data from a file, sorts alphanumerically, * and allow...
TOOL
0.979949
5.231122
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-04-29T02:37: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": "88f0ab12e3af...
1e9a7455-e803-4231-b785-1d877173d719
ralthor/tsp-cpp
graph.cpp
#include <cmath> #include <iostream> #include <fstream> #include <vector> #include "graph.h" #define MY_BIG_INT 100000000 Graph::Graph() { //ctor } Graph::Graph(int n) { dist = vector<vector<int> > (n, vector<int>(n, -1)); } Graph::Graph(string filename) { ifstream fin(filename.c_str()); int n; ...
ALGO
0.998562
3.631654
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2018-08-04T12:30: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": "0910202d8...
962bfa21-ea29-47e2-a9b2-eda0a6316bb3
Jay7221/competitve-programming
codechef/starters/Starters165/d.cpp
#include <bits/stdc++.h> using namespace std; //#pragma GCC optimize("Ofast,unroll-loops") //#pragma GCC target("avx,avx2,avx512,fma") template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; } template<typename T_container,...
ALGO
0.999937
4.906961
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-12-20T15:54:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "813249440ccb...
d3132824-05a7-4ee3-8753-2c4e1a8636d3
lidiasolomon/Lidia-Solomon
Numar persoane plus varsta.cpp
#include "pch.h" #include <iostream> using namespace System; using namespace std; struct Persoana { unsigned vs; char nume[20]; char prenume[20]; }; class Pers { //Sa cautati despre moficatorii private , public si protected; private: unsigned vs; char nume[20]; char prenume[20]; public: ...
TOOL
0.91643
3.704155
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-03-04T21:19: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": "7b6532aaa634...
0d7f4e38-6be4-4312-b8f4-787a91928832
florinaero/cpp_training
hashTable/theElectricType/src/main.cpp
/* Everyone knows that some special Pikachus hate evolving into Raichus. (The legend says because Raichu is ugly, and Pikachu looks good!) The question is how do we find these special Pikachus who hate evolution? The crazy Poke'mon trainer <NAME> has derived a random algorithm, which is completely wrong, but since h...
ALGO
0.999828
4.398101
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2019-05-08T19:38: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": "c09372fff...
9285b614-92e2-4728-9f94-dbd0e33f0e97
avhkbcj99/learn-cpp
03/091 quote use for args.cpp
/** * Created by author on 2023/5/11 18:10 */ #include <iostream> using namespace std; void func(int &a, int &b) { int tmp = a; a = b; b = tmp; } void func2(int *a, int *b) { int tmp = *a; *a = *b; *b = tmp; } int main() { int a = 1; int b = 2; // 引用就是指向变量的指针常量,引用的变量地址和被引用的变量的地...
ALGO
0.998698
3.752579
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-05-04T10:35: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": "7c04043c596...
dee9cfc2-8b11-4c44-89dc-3561d52f039f
ayush-kumar774/Competitive-Programming
TOPH/TidyBits.cpp
// In the name of <NAME> #include <bits/stdc++.h> using namespace std ; #define int long long #define fast std::ios_base::sync_with_stdio(false); cin.tie(0) ; cout.tie(0) ; void solve() { int countOne = 0 , n ; cin >> n ; while(n != 0) { n = n & (n - 1) ; countOne++ ; } //cout...
ALGO
0.999953
4.634735
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2020-11-18T08:07:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3efcb8ec76...
27379507-9c1c-41b6-81ba-b191c39148ca
h3fang/leetcode
cpp/211. Add and Search Word - Data structure design.cpp
#include <cstdio> #include <vector> #include <string> using namespace std; class Trie { private: Trie* next[26] = {nullptr}; bool end = false; public: Trie() {}; ~Trie() {}; void addWord(const string& w) { Trie* t = this; for (char c : w) { if (!t->next[c - 'a']) { ...
ALGO
0.998853
5.366724
{ "github_metadata": { "branch": "master", "commit_count": 2167, "repo_created_at": "2020-05-14T09:49: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": "050515d...
ed213e12-dfaf-4ea4-a87c-016f5921778f
bit-chess/A.I.
src/Algorithm/alphabeta.cpp
#include "alphabeta.hpp" #include "graph_builder.hpp" #include "../Rules/bits.hpp" #include <stddef.h> typedef u64 uint64_t; using namespace std; double max(double x, double y) { if(x >= y) return x; else return y; } void AlphaBeta(Bits bit){ createGraph(bit); } double algorithm(int node, int depth, d...
ALGO
0.999716
4.948773
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2023-08-27T05:39:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4c1474474f96...
19456120-be1b-4b85-be94-246debfda6ba
AdityaKumbhar21/DSA_CPP
Two_pointer/trappingRainWater.cpp
#include<bits/stdc++.h> using namespace std; int totalTrappedWaterB(vector<int> a){ int waterTrapped = 0, n = a.size(); for(int i = 0;i<n;i++){ int j = i, leftMax = 0, rightMax = 0; while(j>=0){ leftMax = max(leftMax, a[j]); j--; } j = i; while...
ALGO
0.999985
5.723779
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-02-01T05:43:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01a26c9e2280...
565a84c9-91e1-4e4f-b5c1-1df3f2a481f5
J2814/stringsDZ
strings_task1-5/main.cpp
#include <iostream> #include <string> using namespace std; //задание1 string Remove_char_at_pos(string str, int pos) { string new_string = str.substr(0, pos); string end = str.substr(pos+1); new_string.append(end); //s.append(); return new_string; } int Count_instances_of_char(string str, char c)...
TOOL
0.910125
4.028872
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-11-18T09:24: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": "08ca5cabf9cf...
01723d2d-6f5a-47c8-9db5-8d16b8c3fec7
noogler-eng/dsa-pratise
chapters/chapter-2/6_task_scehduler.cpp
// Task Scheduler // QUESTION - https://leetcode.com/problems/task-scheduler/description/ // nice question #include<iostream> #include<vector> using namespace std; // Input: tasks = ["A","A","A","B","B","B"], n = 2 // Output: 8 // Explanation: A possible sequence is: A -> B -> idle -> A -> B -> idle -> A -> B. // st...
ALGO
0.99998
6.614992
{ "github_metadata": { "branch": "main", "commit_count": 109, "repo_created_at": "2024-11-17T10:16: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": "52610b3e73...
4bc6be14-92bf-46cf-a61d-6905d43bb917
BitFunnel/BitFunnel
src/Index/src/ShardCostFunction.cpp
// The MIT License (MIT) // Copyright (c) 2016, Microsoft // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, mo...
ALGO
0.924227
7.448103
{ "github_metadata": { "branch": "master", "commit_count": 1300, "repo_created_at": "2016-04-01T22:44:40.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 401, "forks": 38, "issues": 187, "pull_requests": 1 }, "file_meta": { "content_id": "3b6...
95c5c01a-3d1e-4c3f-acdf-91db31be8fa3
STEllAR-GROUP/hpx-local
libs/core/algorithms/include/hpx/parallel/container_algorithms/sort.hpp
// Copyright (c) 2015-2020 <NAME> // Copyright (c) 2021 <NAME> // // SPDX-License-Identifier: BSL-1.0 // Distributed under 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) /// \file parallel/container_algorithms/sort.hpp #pragma o...
ALGO
0.999992
7.615736
{ "github_metadata": { "branch": "master", "commit_count": 238, "repo_created_at": "2021-09-22T09:00:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8346bfd4c...
fd44c388-ac34-4ab0-b86c-10d03d802094
AkiyamaKunka/leetcode-sde-algorithm
Data Structure & Algorithm /String Matching/KMP + BM.cpp
#include <vector> #include <cmath> #include <stack> #include <string> #include <iostream> #include <algorithm> #include <cstdio> #include <queue> #include <time.h> using namespace std; #define LOCAL const int maxn =1000000; class BM{ private: vector<int>GSMap; string raw; string cp; vector<int>ans; pu...
ALGO
0.999895
4.334894
{ "github_metadata": { "branch": "main", "commit_count": 96, "repo_created_at": "2021-05-10T11:11:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00fa32617e7...
1a97c051-a2e1-42c5-a7d5-329c6f1e548e
UNSWComputing/rUNSWift-2022-release
robot/perception/stateestimation/localiser/multimodalcmkf/MultiModalCMKF.cpp
#include "MultiModalCMKF.hpp" #include "types/EstimatorInfoInit.hpp" #include "types/EstimatorInfoIn.hpp" #include "types/EstimatorInfoMiddle.hpp" #include "types/EstimatorInfoOut.hpp" #include "perception/stateestimation/localiser/multimodalcmkf/MultiModalCMKFTransitioner.hpp" #include "types/FieldFeatureInfo.hpp" #in...
ALGO
0.971595
4.981029
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-02-11T08:27:03.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "35e93ac9ed696...
b418cecd-1380-495d-a6a2-65e8371dc5a6
cerati/p2z-tests
backup/src/propagate-toz-test_Eigen.cpp
/* icc propagate-toz-test.C -o propagate-toz-test.exe -fopenmp -O3 -I/mnt/data1/dsr/mkfit-hackathon/eigen --expt-relaxed-constexpr -I/mnt/data1/dsr/cub */ #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <unistd.h> #include <sys/time.h> #ifndef bsize #define bsize 128 #endif #ifndef n...
ALGO
0.981236
3.89677
{ "github_metadata": { "branch": "master", "commit_count": 409, "repo_created_at": "2019-05-15T22:40:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 7, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "10d621eb...
3c9df1da-4cda-4efe-9e4d-63bd26ad397f
Doublc-Qluv/ProgrammingAlgorithm
HundredQBank/06OppositeNum.cpp
// 问题描述 // 有 N 个非零且各不相同的整数。请你编一个程序求出它们中有多少对相反数(a 和 -a 为一对相反数)。 // 输入格式 // 第一行包含一个正整数 N。 (1 ≤ N ≤ 500)。 // 第二行为 N 个用单个空格隔开的非零整数,每个数的绝对值不超过 1000,保证这些整数各不相同。 // 输出格式 // 只输出一个整数,即这 N 个数中包含多少对相反数。 // 样例输入 // 5 // 1 2 3 -1 -2 // 样例输出 // 2 #include <iostream> #include <cstdio> #include <algorithm> using namespace std; int m...
ALGO
0.999962
4.618696
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2021-01-11T05:48: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": "990ea068794...
e9c11dbc-f254-42ba-9dfd-e5719580baac
DimitryusX/robotdreams
Homework25/Homework25.cpp
#include <iostream> #include "Graph.h" int main() { std::cout << "Homework 25!" << std::endl; GraphAdjList graph(11); graph.addEdge(0, 1); graph.addEdge(0, 2); graph.addEdge(0, 3); graph.addEdge(1, 4); graph.addEdge(2, 5); graph.addEdge(2, 6); graph.addEdge(3, 7); graph.addEdge(4, 8); graph.addEdge(5, 9...
ALGO
0.990911
4.40629
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2023-11-18T17:05:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ba67ecea46...
5c0c73e8-8ad4-4ba2-9ffc-bb60e0f9a5ce
HASAN-49/Competitive-Programming
LightOJ/Greedy/Sum_of_Factorials.cpp
// Problem Link --> https://lightoj.com/problem/sum-of-factorials // بسم الله الرحمن الرحيم #include<bits/stdc++.h> using namespace std; #define test int t; for(cin >> t; t; t--) void solve(int tc) { long long n; cin >> n; long long f = 1, c = 1; while (f <= n / c) { f *= c; c++; } c--; vector<in...
ALGO
0.9999
4.545508
{ "github_metadata": { "branch": "main", "commit_count": 153, "repo_created_at": "2023-11-22T17: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": "e92f986964...
7e81826b-921f-46a6-81f0-1beaa5a4bd42
FantomasM/2024-LeetCode_tasks
Medium/Longest_palindromic_substring/src/task.cpp
#include <iostream> #include <iomanip> #include <vector> #include <algorithm> #include <cassert> using namespace std; class Solution { public: bool is_palindrome(const string & s, size_t from, size_t to){ for(size_t i=0;i<(to-from+1)/2;i++) { if(s[from+i]!=s[to-i]) { return fa...
ALGO
0.999932
5.467326
{ "github_metadata": { "branch": "main", "commit_count": 72, "repo_created_at": "2024-06-19T09:32: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": "72e96c1bda6...
b2033ece-5dbb-4f3e-8e92-2f8ac1e48ea1
Pooh1223/Online-Judge
Uva/444.cpp
#include <bits/stdc++.h> using namespace std; stringstream ss; void encode(string s){ string tmp = ""; string ans = ""; for(int i = 0;i < s.length();++i){ ss.str(""); ss.clear(); ss << int(s[i]); tmp = ss.str(); reverse(tmp.begin(),tmp.end()); ans += tmp;...
ALGO
0.999948
3.847481
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2019-09-14T06:54: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": "4b19e674a...
f392f9cd-f08e-443d-8fdd-062073637bde
itsourov/c-programming
codeforces/676-A.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> numbers(n); for (int i = 0; i < n; i++) { cin >> numbers[i]; } int maxIndex = max_element(numbers.begin(), numbers.end()) - numbers.begin(); int minIndex = min_element(numbers.begin(), numbe...
ALGO
0.999934
4.060491
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2023-08-06T15:49:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65e89ec1f9f...