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
9bbf54b3-e552-418c-a581-7804b5438e7d
fkanehiro/hrpsys-base
rtc/CollisionDetector/vclip_1.0/include/mv.h
//////////////////////////////////////////////////////////////////////////////// // // Copyright 1997 Mitsubishi Electric Information Technology Center // America (MEITCA). All Rights Reserved. // // Permission to use, copy, modify and distribute this software and // its documentation for educational, research and...
TOOL
0.986269
3.53603
{ "github_metadata": { "branch": "master", "commit_count": 3546, "repo_created_at": "2014-04-11T21:52:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 41, "forks": 89, "issues": 153, "pull_requests": 59 }, "file_meta": { "content_id": "73...
e8c84c71-1901-4515-bf24-4539fbc69636
funseiki/WebcamGestures
WebcamGestures/WebcamGestures/HullMaker.cpp
#include "HullMaker.h" #include "Utils.h" HullMaker::HullMaker(void) { setDefaults(); } HullMaker::HullMaker(Mat input) { inputImage = input; setDefaults(); MakeHull(input); } HullMaker::HullMaker(Mat input, BackgroundSubtractorMOG2 & bgSub, double learningRate = 0.005) { inputImage = input; Mat bgImage = sub...
ALGO
0.984923
4.980813
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2013-03-24T19:33: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": "bbac4b608...
4266905e-0b72-4b22-ad34-24f3e8369916
memset0/OI-Code
洛谷/CF1091A New Year and the Christmas Ornament.cpp
// ================================= // author: memset0 // date: 2018.12.30 22:33:00 // website: https://memset0.cn/ // ================================= #include <bits/stdc++.h> #define int long long #define pb push_back #define rep(i, l, r) for (register int i = l; i <= r; i++) namespace ringo { typedef long l...
ALGO
0.999955
3.899169
{ "github_metadata": { "branch": "master", "commit_count": 294, "repo_created_at": "2018-07-31T14:56:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eaaff4b...
98efa6f2-0cce-491b-8129-7b4ac9e3af8d
surarijit/DSA_ALGO
oracandmodels.cpp
// Problem : B. Orac and Models // Contest : Codeforces - Codeforces Round #641 (Div. 2) // URL : https://codeforces.com/problemset/problem/1350/B // Memory Limit : 256 MB // Time Limit : 3000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) /* <NAME> @duke_knight @surcode @comeback IIT ISM ...
ALGO
0.999558
4.364876
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2020-07-22T09:50:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a94e2310...
018251f1-55f8-4794-a8a7-2c21423eb21d
kbcgang/kbc
dat/Admission/nghean2024-2025_10/COPHIEU.cpp
/// Made by <NAME> #include <bits/stdc++.h> #define ll long long #define kien main using namespace std; const ll inf = LLONG_MAX; const ll mod = 1e9 + 7; ll n, a[10000005], p; ll Min[10000005]; void ChatGPT(ll i) { ll ans = 0; ll l = 0, r = i - 1; while (l <= r) { ll j = (l + r) / 2; if ...
ALGO
0.99993
4.751261
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2024-11-22T08:35:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "4e0cd2c8985...
fe3b9acb-c7d2-40d5-a5d6-5b184d44feff
Nguyenngoembedded/moderncpp
Pointer/pointer.cpp
#include<iostream> using namespace std; int main() { // khai bao bien binh thuong int x = 10; // con tro ip tro toi bien x int *ip = &x; cout << " Value of x: " << x << endl; cout << " Address of x: " << &x << endl; cout << " Value of ip: " << ip << endl; cout << " Value pointed to by ip: " ...
ALGO
0.906098
3.590254
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-07-19T03:50: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": "c499b511fe...
9596cae5-fb68-4072-af80-d092bb9d96c5
Lim-YongKwan/BOJ
BOJ_1707/BOJ_1707/BOJ_1707.cpp
#include<iostream> #include<vector> #include<queue> using namespace std; bool visit[20001]; void binary_bfs(vector<vector<bool>>& component, int n, queue<int>& graph) { int temp = graph.front(); graph.pop(); component[temp][temp] = 0; for (int i = 1; i <= n; i++) { if (visit[i - 1] == 0 and component[temp]...
ALGO
0.999962
5.055125
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2021-12-23T07:52: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": "87afaa2db9d...
9d2054ab-9a1b-42a2-861e-8cde0826f835
thabumi/test3
ICPC & OLP/ICPC/ICPC National 2020/B (sai).cpp
#include <bits/stdc++.h> using namespace std; void run_case() { int r, c; while (cin >> r >> c) { if (r == 0 && c == 0) { break; } char a[r][c]; for (int i = 0; i < r; i++) { for (int j = 0; j < c; j++) { cin >> a[i][j]; } } int res = 1e9; vector<int> cnt(r + c - 1); for (int i = 0; i ...
ALGO
0.999752
3.583878
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-03-01T00:41: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": "6789fd846152...
f53cc6ab-36b7-4887-bf6d-3625f0987055
REXWindW/ACM_CODES
codeforces/Codeforces Round #688 (Div. 2)/C.cpp
#include<iostream> #include<cstring> #include<cstdio> #include<algorithm> #include<vector> using namespace std; int cansel_sync=(ios::sync_with_stdio(0),cin.tie(0),0); #define ll long long typedef pair<int,int> pii; #define rep(i,a,b) for(int i=(a);i<=(b);i++) #define INF 0x3f3f3f3f #define mkp make_pair #define ft fir...
ALGO
0.999549
3.252804
{ "github_metadata": { "branch": "master", "commit_count": 133, "repo_created_at": "2020-05-31T02:16:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "93a02563...
cd80bdd1-086f-4d93-a9df-16300a99cb2a
oicatalana/solucions_oicat_2018
concurs_entrenament1/pb2.cpp
#include <iostream> #include <vector> using namespace std; bool valid(int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10) { vector<int> quantitat{0, 0, 0}; ++quantitat[i1]; ++quantitat[i2]; ++quantitat[i3]; ++quantitat[i4]; ++quantitat[i5]; ++quantitat[i6]; ...
ALGO
0.998589
4.155364
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-03-25T22:08:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e91d4454bb...
105c1203-8cbb-407e-b677-4fa2bb2278a4
gh4abhi/Data-Structures-and-Algorithms
Pepcoding/Level-1/Dynamic Programming and Greedy/Paint House - Many Colors.cpp
// Problem Link - https://nados.io/question/paint-house-many-colors #include <iostream> #include <bits/stdc++.h> #define ll int using namespace std ; int main() { int n ; cin>>n ; int k ; cin>>k ; vector<vector<ll>> vect(n,vector<ll>(k,0)); for(ll i=0;i<n;i++) { for(ll j=0;j<k;j++)...
ALGO
0.999948
4.345607
{ "github_metadata": { "branch": "main", "commit_count": 303, "repo_created_at": "2021-01-16T22:16:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d07a58af6...
0aee20fa-cf97-4bed-866c-63e2a4bdc6e4
wangqinghe95/Code-Leetcode
Q070_Climbing Stairs.cpp
/* 动态规划 边界添加:dp[1] = 1, dp[2] = 1(一次上一个或两个台阶) 转移公式:dp[i] = dp[i-1] + dp[i-2] (i >= 2) */ class Solution { public: int climbStairs(int n) { vector<int> dp(n+1); dp[ 0 ] = 1; dp[ 1 ] = 1; for (int i = 2; i < n+1; ++i){ dp[ i ] = dp[ i-1 ] + dp[ i - 2 ]; } ...
ALGO
0.999998
4.985673
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2020-06-25T01: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": "7b1c0020f...
be079bf0-5da8-4e2d-867d-27981a62595f
Gerardo-Huerta-Esc/Algorithms
Lore/C++/Exercises/Condicionales/Ejercicio_004.cpp
/*En MegaPlaza se hace un 20% de descuento a los clientes cuya compra supere los $300. Diseña un programa que solicite al usuario el total de su compra y determine la cantidad que debe pagar Si la compra es elegible para el descuento, muestra el monto total con el descuento aplicado. Si no es elegible para el descue...
TOOL
0.986329
4.080554
{ "github_metadata": { "branch": "main", "commit_count": 113, "repo_created_at": "2024-04-27T18:34: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": "81a1d86245...
03d8a503-6057-4f91-bcb9-caa4e987c276
EucliTs0/Advance-Algorithms-Project
LCS-Divide-and-Conquer/lcsdc - copia.cpp
#define DEBUG 0 #define DEBUG_SPACE_EFF_LCS 0 #define TEST_SPACE_EFF_LCS 0 #define DEBUB_BW_SPACE_EFF_LCS 0 #define TEST_BW_SPACE_EFF_LCS 0 #define DEBUG_LCS_D_C 0 #include <windows.h> #include <iostream> #include <string> #include <math.h> #include <set> #include <utility> /** * Author: <NAME> * Project: Plagiarism ...
ALGO
0.998865
4.26053
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2016-10-28T17:51:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba4e5d74d...
c6108900-f45f-4a4c-a616-8f9e395799df
Abhi3685/DS-ALGO
LinkedList/implementation.cpp
#include <iostream> using namespace std; class Node { public: int data = 0; Node *next = nullptr; Node(int data) { this->data = data; } }; class LinkedList { private: Node *head = nullptr; Node *tail = nullptr; int size = 0; public: int getSize() { return size...
ALGO
0.998253
5.440672
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2020-04-08T07:35: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": "98053da33...
4ed92019-4337-4149-a4cb-8844da506fe5
mrogleva/oop_proj
oop_project1/Library.cpp
#include "Library.hpp" Library::Library(std::string file_path) : filePath(file_path) {} Library::Library() {} void Library::save(Book book) { lib.push_back(book); writeToFile(); } void Library::writeToFile() { std::fstream file(filePath, std::ios::out); if(!file.is_open()) { throw std::logic_error("File ...
TOOL
0.977508
4.301725
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2022-05-12T17:09: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": "4c4bb97e9...
bd7dfdb7-d1a3-4c50-a685-481cbff6f93e
AndreasDL/Tiwi-Algoritmen1
algoritmen-sam/labo/reeks09/boom.h
/* * Binaire boom inlezen via regelnummers * Binaire boom inlezen via sleutels (kan enkel indien er geen dubbele sleutels * zijn) * Binaire boom uitschrijven (in,pre,post,...) */ #include <iostream> #include <fstream> #include <vector> using namespace std; template <class ...
ALGO
0.973771
3.61874
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-08-27T11:26:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3af0a0a951...
074d7ad5-b855-48c7-9062-b0480e1c3e92
wtracy/geodesic
mathOptimizations.h
/**************************************************************************** * * mathOptimizations.h: Math aproximations to speed up things * This is part of the yafray package * Copyright (C) 2009 <NAME> (DarkTide) * Creation date: 2009-03-26 * * fPow() based on the polynomials approach form J...
ALGO
0.98864
4.237029
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2015-06-20T21:19: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": "1a6284bc1...
f8c2f0cb-7748-47ee-b5e9-c44715434896
delislesim/Laval-Virtual-2014
Prototype/kinectPower/algos/contour_walk.cc
#include "algos/contour_walk.h" #include "base/logging.h" #include "algos/maths.h" namespace algos { void ContourWalk(double step, const std::vector<cv::Point>& contour, std::vector<cv::Point>* walk) { assert(walk); assert(walk->empty()); double remaining_distance_to_next_step = 0.0; for (...
ALGO
0.999669
5.577322
{ "github_metadata": { "branch": "master", "commit_count": 659, "repo_created_at": "2014-01-15T19:14:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "5bc338e1...
d4c9b7b2-6762-4312-a793-1c8527d65b5c
santosantonio1/ALEST
hash/tries/main.cc
#include "Trie.hpp" #include "TST.hpp" #include<iostream> #include<vector> using namespace std; void trie_main() { Trie t; vector<string> v = { "she", "sells", "shells", "by", "the", "sea", "shore" }; for(size_t i=0; i<v.size(); i++) { ...
TEST
0.985734
4.057977
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2023-08-25T00:23: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": "bd91c8e3f7a...
9b6ee2df-c274-463c-b926-2567060e0487
gkpande/gkpande
Rotten Oranges - GFG/rotten-oranges.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find minimum time required to rot all oranges. int orangesRotting(vector<vector<int>>& grid) { int row=grid.size(); int col=grid[0].size(); int t=0; ...
ALGO
0.999858
5.937736
{ "github_metadata": { "branch": "main", "commit_count": 1055, "repo_created_at": "2021-09-19T03:36: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": "15473d9bc...
3f149f14-6c00-4c49-8ee5-adfa6bda82d4
Dimon228322228/Algorithms
A/main.cpp
#include <iostream> #include <string> int main() { size_t n, prev, cur, max_len = 1, cur_len = 1, first_index = 0; int reps = 1; std::cin >> n >> prev; for (size_t i = 1; i < n; ++i){ std::cin >> cur; ++cur_len; if (...
ALGO
0.999978
3.771197
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2023-02-22T20:19: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": "f0681f009...
e2cf6e6a-7144-4daa-b62a-80629c02e71c
GadeevDmitry/ALGO
2_half/contest/1/d.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <math.h> //#include "../../../lib/logs/log.h" //================================================================================================================================ // STRUCT //==========================================...
ALGO
0.999586
4.189767
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2023-02-18T15:18:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 12 }, "file_meta": { "content_id": "93205fd7...
4a3e7014-179a-465a-83be-1e56beb92e50
marjanhasan/CP-PREP
Extra_leetcode/Arrays/find_middle_index.cpp
class Solution { public: int findMiddleIndex(vector<int> &nums) { int sum, tmp; sum = tmp = 0; for (int v : nums) sum += v; for (int i = 0; i < nums.size(); i++) { sum -= nums[i]; if (sum == tmp) return i; tm...
ALGO
0.999936
5.675023
{ "github_metadata": { "branch": "main", "commit_count": 597, "repo_created_at": "2023-09-28T09:17:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7be6bb83dc...
9bcd4439-3344-4ed6-b4c9-f9ce0e666021
cheerconi/online-judge
atcoder/AtCoder Beginner Contest 175/C - Walking Takahashi/main.cpp
#include <algorithm> #include <bitset> #include <cassert> #include <climits> #include <cmath> #include <ctime> #include <deque> #include <iostream> #include <list> #include <map> #include <memory.h> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <vector> #include <unordere...
ALGO
0.99997
3.906817
{ "github_metadata": { "branch": "master", "commit_count": 407, "repo_created_at": "2017-07-19T16:20: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": "bbb17fcd...
18bdbf34-9d8f-4ecc-93ba-fe86f15b6c75
IHR57/Competitive-Programming
UVA/437 (The Tower of Babylon).cpp
#include <bits/stdc++.h> #define MAX 105 using namespace std; const int inf = 1e9; struct block{ int a, b, c; block(int t1, int t2, int t3) { a = t1; b = t2; c = t3; } }; vector<block> v; int dp[MAX]; int solve(int i, int n) { int Max = 0; if(dp[i] != -1) re...
ALGO
0.999913
4.038043
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2018-12-28T07:37:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d7866531...
c114e2cb-eb82-4e21-8189-11c3dd3c9d83
su2umaru/competitive_programming
SponsoredTournament/codeFlyer2018/b.cpp
#include <iostream> using namespace std; using ll = long long; #define FOR(i, a, b) for(int i=(a);i<(b);++i) #define REP(i, n) for(int i=0;i<(n);++i) #define ALL(v) (v).begin(),(v).end() int main(void) { cin.tie(0); ios::sync_with_stdio(false); int a, b, n; string x; cin >> a >> b >> n >> x; ...
ALGO
0.999944
3.869087
{ "github_metadata": { "branch": "master", "commit_count": 115, "repo_created_at": "2018-10-25T13:31:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a530b30...
933da32e-4619-4dea-96f3-b746d3c432fd
ICRAR/jacal
apps/askap/factory/SolveNE.h
/// @file SolveNE.h /// @brief Solve an Normal Equation provided by a Daliuge Drop /// @details We will simply load in a NormalEquation from /// a daliuge drop and solve it via a minor cycle deconvolution. #ifndef ASKAP_FACTORY_SolveNE_H #define ASKAP_FACTORY_SolveNE_H #include "rename.h" #include <daliuge/Daliug...
ALGO
0.998884
5.910413
{ "github_metadata": { "branch": "master", "commit_count": 684, "repo_created_at": "2017-06-20T07:27:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "909976b7b...
5f885f09-5ffd-437c-9331-203671b8342c
DIE4Rmk/C_plus_plus_Algorithms_tasks
Cont-4_Dynamic/TaskE.cpp
#include <iostream> #include <vector> #include <algorithm> // Supported by https://peltorator.ru/posts/prefix_sums/ int main() { std::cin.tie(nullptr); std::cout.tie(nullptr); std::ios_base::sync_with_stdio(false); int16_t n, m; int k; std::cin >> n >> m >> k; std::vector<std::vector<int>>...
ALGO
0.999775
5.20699
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-02-07T15:46: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": "a6b00bbf1e6e...
85aaa38c-c618-4d75-8069-18d71c244212
penguin1642011/-dynamic-programming
NKTICK.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define fi first #define se second #define MOD 1000000007 const int MAXN = 5e5; vector<ll> adj[10007]; vector<ll> topo; bool visited[107][107]; static ll in[1000]; ll dx[8] = {-1,0,0,1,-1,-1,1,1}; ll dy[8] = {0,-1,1,0,-1,1,-1,1}; static ll Hash,base = 13...
ALGO
0.999973
3.192102
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2024-02-25T08:56: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": "8ae7d26653e...
dd4ea8b5-f03b-4600-917c-3f2130c156c8
Hyski/PoL1.62.002
src/external/boost/boost/mpl/find_if.hpp
//----------------------------------------------------------------------------- // boost mpl/find_if.hpp header file // See http://www.boost.org for updates, documentation, and revision history. //----------------------------------------------------------------------------- // // Copyright (c) 2000-02 // <NAME> // // P...
ALGO
0.9772
6.594471
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-03-19T08:30:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b97b8ef2f...
04cf719c-acbf-461c-8333-adfb8001726f
NitkarshChourasia/pro-b_lang_master_private
downloaded_completely/C++/very_hard/[1455] Newton-Raphson method [VH].cpp
/* #### Newton-Raphson method #### Create a function that finds a root of a polynomial curve. Do this using the Newton-Raphson method. ___ *) Your input will be an array of coefficients for a 3rd order polynomial: c(0)*x^3 + c(1)*x^2 + c(2)*x + c(3) *) Round your answer to three decimal places (nearest 0.001). Choos...
ALGO
0.999964
3.26151
{ "github_metadata": { "branch": "main", "commit_count": 153, "repo_created_at": "2022-12-11T14:53:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c66dd96dd3...
fc1920c6-ad22-49e7-afa7-6a35990810dc
quartzcream/tartu_icpc
Library/Data Structures/lazyst.cpp
//---------------------------------------------------------------- //OMLBEGIN: Segment Trees with Lazy Propagation #include<vector> using namespace std; //T needs functions add, multiply, combine and operator() template<class T> struct LazySegmentTree { struct Node { Node *lch, *rch; T value; T *lazyAdd, *lazyS...
ALGO
0.999962
5.525845
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2017-10-28T14:16:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60e597d9e...
9a6c0ed1-ce24-495f-9735-296aeccdb140
pranavsindura/CompetitiveProgramming
codeforces/C/495c.cpp
#include <bits/stdc++.h> #define all(x) x.begin(), x.end() #define allr(x) x.rbegin(), x.rend() #define sz(x) ((int)x.size()) #define ln(x) ((int)x.length()) #define mp make_pair #define pb push_back #define ff first #define ss second #define endl '\n' #define dbg(x) cou...
ALGO
0.999521
3.764482
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2021-01-26T05:15:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2aac0d83...
5aec70e5-4c75-4713-948a-2c2afb5d997c
nenoganchev/advent-of-code-2020
day17/part2.cpp
#include <iostream> #include <fstream> #include <string> #include <vector> #include <set> class pocket_dimension { public: void activate(int x, int y, int z, int w); pocket_dimension simulate_cycle() const; int active_count() const; private: int active_neighbours_count(int x, int y, int z, int w) con...
ALGO
0.999345
5.577495
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-12-10T23:29: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": "aedc51e90...
b778cc8c-7981-4186-934e-0a7b0b23323a
Atlasadnan/6company30daychallenge
day1-5/printAnagram.cpp
// { Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> #include <unordered_map> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: vector<vector<string> > Anagrams(vector<string>& str) { vector<vector<string>>ans; vector<str...
ALGO
0.999987
5.457874
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-01-04T14:05: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": "c8309588dbe6...
0a1f4c99-883f-4833-90d0-01011642e477
HuiYeLing/thinking-about-what
gogogo/新建文件夹/刷题日记/新建文件夹/未命名---1.cpp
#include <stdio.h> #include <stdlib.h> // 比较函数,用于排序 int cmp(const void *a, const void *b) { return *(char *)b - *(char *)a; } // 删除数字函数 void deleteDigits(int n, int k) { char num[n + 1]; // 存储数字的字符数组 int len = n - k; // 删除k个数字后的新数字长度 for (int i = 0; i < n; i++) { num[...
ALGO
0.999892
4.107445
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-02-14T13:56: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": "28eeb0f7633...
b37272f4-e0c0-4ae3-ad4a-573ad4c1210d
KhoaTranNguyen/tinyProject1_Programming-2
LinearRegressionCPU/cpu_prediction.cpp
#include <iostream> #include <fstream> #include <sstream> #include <vector> #include <random> #include <algorithm> #include <cmath> #include "../LinearSystem/Vector.hpp" #include "../LinearSystem/Matrix.hpp" #include "../LinearSystem/LeastSquaresSystem.hpp" // Load CSV data with comma separation void loadData(const st...
DATA
0.902617
6.653495
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2025-05-23T11:53:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "d1be37043e5...
b746ebbe-89d7-47d5-8693-0d3009222a6d
tenk28/SashaLearning
KP4/CppSolution/example_1.cpp
#include <iostream> #include <vector> using namespace std; int main() { int n; cout << "Enter the array size: "; cin >> n; vector<int> A(n); cout << "Enter the elements of the array: "; for (int i = 0; i < n; ++i) { cin >> A[i]; } int minIndex = 0; int maxIndex = 0; ...
ALGO
0.999968
5.061291
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2023-11-30T18:57: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": "67cd83a8b0a...
116f3b45-cd8e-4db6-9fb6-84cfa8d57053
Gaaaamma/LeetCode
practice/insertSort.cpp
#include <iostream> #include <vector> using namespace std; void show(vector<int>& input) { for (int i = 0; i < input.size(); i++) { cout << input[i] << " "; } cout << "\n"; } void insert(vector<int>& nums) { for (int i = 1; i < nums.size(); i++) { int insertNum = nums[i]; int sea...
ALGO
0.999873
5.372522
{ "github_metadata": { "branch": "main", "commit_count": 244, "repo_created_at": "2023-01-21T15: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": "f99c328e9b...
6590c59c-4ab1-4a76-aee6-6529b241dcd2
BrunoJpng/uri-solutions
1495.cpp
#include <iostream> using namespace std; void printArray(int* a, int n){ for(int i=0; i<n; i++){ cout << a[i] << " "; } cout <<"\n"; } int cmp(const void* a, const void* b){ return (*(int*)a - *(int*)b); } int main(){ int N,G; while(cin >> N >> G){ int pontos = 0, cont =...
ALGO
0.999894
3.538644
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-07-11T20:27: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": "67aee3a06a...
17c5ed8e-b26f-4a19-affb-35ebb66a55ce
matt-morris/oosd-bioinformatics
Substitution_Matrix.cpp
/* * Substitution_Matrix.cpp * * Created on: May 3, 2011 * Author: doubleemms */ #include "Substitution_Matrix.h" #include <iostream> using namespace std; Substitution_Matrix::Substitution_Matrix(char orderIn[4], int matrixIn[4][4])// int **matrixIn)12//vector<vector<int> > *matrixIn) //Substitution_Matri...
ALGO
0.974478
3.596165
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2015-06-01T19:02: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": "5757b3327...
cbc44bf4-8c6c-4cae-b189-3de8a0fcbd7d
kaspiotr/WDI-intro-to-CS
Ex1_collRep_20170203/Ex1_collRep_20170203.cpp
//author: @kaspiotr (<NAME>) /* 1.Dana jest tablica int t[N][N] zawierająca liczby naturalne. Dokładnie w jednym wierszu, bądź kolumnie znajduje się fragmentu ciągu arytmetycznego o długości większej niż 2, którego elementy są liczbami pierwszymi. Proszę napisać funkcję która zwróci długość tego ciągu. */ #include <i...
ALGO
0.999042
4.102483
{ "github_metadata": { "branch": "master", "commit_count": 380, "repo_created_at": "2017-10-14T08:11:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e8b62055...
4380bec6-4dc8-4d8b-9517-29134f99ceb1
IagoGMacedo/IMD0029-Estrutura-De-Dados-Basicas-I
2_sorting/exercicios/ordenacao/aula04-ordenacao/src/main.cpp
// // main.cpp // // Created by <NAME> // #include <chrono> #include <iostream> #include <string> #include <cassert> #include <fstream> #include "../include/ordenar.h" using namespace std; void ler_entrada(const string, string[], int); void testar_ordenacao(string[], int); const string ARQUIVO_DADOS_ENTRADA = "./...
ALGO
0.989586
5.217991
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2023-03-09T20:30: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": "e91f93bab...
734daf5a-f792-4057-a855-5067a2fd45d5
Lightieey/Graceful-Bronzes
minji/week3/Math2/no2581.cpp
// // Created by 김민지 on 2022/10/08. // #include "iostream" #include "cmath" using namespace std; int main() { int m, n, sum = 0, min; cin >> m >> n; for (int i = n; i >= m; i--) { if (i == 1) break; else if (i == 2) { sum += 2; min = 2; } else { ...
ALGO
0.999914
4.647311
{ "github_metadata": { "branch": "main", "commit_count": 428, "repo_created_at": "2022-09-16T11:28:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab9a18efcc...
e3dc58e8-6900-40cc-9082-2b0c7410447c
lucianovr/competitive-programming
URI/1898.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i(a); i < (b); i++) #define all(c) c.begin(), c.end() #define UNIQUE(c) \ { ...
ALGO
0.991694
3.521867
{ "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": "9b52b5aa60...
cebcbe86-aeca-4eb8-97d4-4a225fa9520b
talentspsp/audio_analysis
plca2d.h
#ifndef _PLCA_2D_H #define _PLCA_2D_H /* This function implement plca2d algorithm Input: data: a lent* lenf. each elememt must be nonnegative, each row is distribution in frequency domain lenf: length in frequency domain lent: length in time domain K: number of components max_iter: max number of iteratio...
ALGO
0.996575
4.946233
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2011-05-17T07:15:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fc918833c...
42fa5549-f76b-4c14-890f-bbc919536ba5
RizwanFatmi/Data_Structure_In_Cpp
08.BinaryTree.cpp
/**********************************************************************BINARY TREE ********************************************************************/ #include <iostream> using namespace std; // CREATING BINARY TREE : struct Node { int data; struct Node *left; struct Node *right; }; /*****************...
ALGO
0.999961
3.343619
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-12-17T17:10: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": "50bf557dd298...
008a4b9c-8415-4fe9-a277-23ff2ebe4154
Imranansari8795/Coding_Ninja
ARRAY/26_waterTraping.cpp
// #include<iostream> #include<bits/stdc++.h> using namespace std; int waterTraping(int *arr,int n) { int leftMax[n]; int rightMax[n]; leftMax[0] = arr[0]; for(int i = 1; i < n; i++) { leftMax[i] = max(leftMax[i - 1],arr[i]); } rightMax[n -1] = arr[n - 1]; for(int i = n...
ALGO
0.999962
5.092298
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-01-14T17:20:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c9dcd2a7dcb6...
c6ae5715-5342-40f1-bcab-ac36ec0d2c19
raincross7/code-similarity
codes/train_code/problem099/problem099_357.cpp
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> p( N ); for( int i = 0; i < N; i++ ) { cin >> p[i]; p[i]--; } vector<int> a( N ); vector<int> b( N ); for( int i = 0; i < N; i++ ) { if( i == 0 ) { a[ p[i] ] = 1000000000 / 2; b[ p[i] ] = 1000000000 / 2; } ...
ALGO
0.999964
3.20498
{ "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": "b779260e3098...
7e459045-e11b-4f06-8a09-56baedd8c979
py100/University
ACM/Codes/Codeforces/368_2/E.cpp
#include <bits/stdc++.h> #define X first #define Y second using namespace std; typedef long long ll; const int maxn = 2220; struct bit { ll b[maxn][maxn]; int nx, ny; void add(int x,int y,int z) { for (int i=x;i<=nx;i+=(i&-i)) for (int j=y;j<=ny;j+=(j&-j)) b[i][j]+=z; } ll ask(int x, int y) { ll t...
ALGO
0.999115
3.991254
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2016-03-10T05:13:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b4cae46e...
ab255bf8-8a96-4c5e-a542-4f5162da4fca
arnabnandikgp/cp-algo
graphs/dfs.cpp
#include "bits/stdc++.h" using namespace std; using ll = long long; #define endl '\n' // // s.#.. int n, m; vector<string> arr; vector<vector<int>> vis; int dx[] = {0, 1, 0, -1}; int dy[] = {1, 0, -1, 0}; bool valid(int x, int y) { if (x < 0 || y < 0 || x > n || y > m || arr[x][y] == '#') { return ...
ALGO
0.999765
5.126232
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2023-05-02T13:30: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": "9d4c38d10d1...
8cfd016e-8996-4479-93eb-967c52214a76
dliu888/hw1
compare.cpp
// CONTAINS IMPLEMENTATION OF THREE FUNCTIONS: whichIsBigger, makeBothSame, makeFirstBigger #include "compare.h" int whichIsBigger (int x, int y, bool& same) //takes 2 ints, x,y and a reference to bool, same { if( x > y ) { same = false; return x; } else if( x < y ) { ...
TOOL
0.997843
4.132743
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-02-19T04:36: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": "65dee0e7d3b9...
62bb71e9-15e7-40d1-bdce-76f08a8eb06f
mar-celine/spectre
src/Evolution/Systems/NewtonianEuler/Sources/IsentropicVortexSource.hpp
// Distributed under the MIT License. // See LICENSE.txt for details. #pragma once #include <cstddef> #include <string> #include "DataStructures/Tensor/TypeAliases.hpp" #include "Utilities/TMPL.hpp" // IWYU pragma: no_forward_declare Tensor /// \cond namespace gsl { template <typename T> class not_null; } // name...
ALGO
0.9708
7.786217
{ "github_metadata": { "branch": "develop", "commit_count": 2830, "repo_created_at": "2017-06-20T16:16:01.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "sxs-collaboration/spectre", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { ...
fcd3302d-b444-4a65-8ae4-2dddf6c572ab
spidycoder/DSA
Stack and Queue/Dynamic_stack.cpp
#include <bits/stdc++.h> using namespace std; class StackUsingArray { int *data; int nextIndex; int capacity; public: // constructor StackUsingArray() { data = new int[4]; nextIndex = 0; capacity = 4; } // size() function int size() { return next...
ALGO
0.998255
4.405523
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2022-08-27T05:32: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": "ac3a2ec8f5e...
06045621-e2a4-47a4-b7c7-30c7ab0da574
Jay9011/Study_DataStructure
03_LinkedList/03_LinkedList/LinkedList.cpp
#include <iostream> #include "LinkedList.h" using namespace std; Node* Create(DataType data) { Node* node = new Node(); node->Data = data; node->NextNode = nullptr; return node; } void Destroy(Node* node) { delete node; node = nullptr; } void Push(Node** head, Node* node) { if (*head !=...
ALGO
0.995946
4.242002
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2023-01-03T14:28: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": "ff1787282...
73f4d3c4-ac7f-43fb-99a8-856d9e569292
itsoulos/RbfCon
METHODS/hybridmethod.cpp
#include <METHODS/hybridmethod.h> Data HybridMethod::makeChild(Data &parent1,Data &parent2) { Data child; child.resize(dimension); for(int i=0;i<dimension;i++) { double alpha = rand() *1.0/RAND_MAX; //alpha = -0.5 + 2.0 * alpha;//[-0.5,1.5] double r = rDouble(0.0, 1.0); ...
ALGO
0.999997
5.487552
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2024-11-03T12:17: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": "9b22c62f4...
557e2a82-5611-41b5-8bdd-fa2eafbe9b64
AGGDEBNAM/base_estructura-de-datos
BaseDeDatos/Burbuja/xd.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; bool elementoRepetido(vector<int> arreglo, int i, int element) { vector<int>::iterator it; it = find(arreglo.begin(), arreglo.begin() + i, elemen...
ALGO
0.993922
3.898659
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-02-20T04:18: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": "6a4d893c2321...
a642f1c6-1edd-4fdd-9728-9a5edd5f4486
luctivud/Coding-Trash
cc-ENGXOR.cpp
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <NAME> @luctivud 神 | LIGHT | GREED | CIPHER | XAYN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ** ** ******* * * ****** ** ** ** ** *** ** ** ** ** ...
ALGO
0.999732
3.440343
{ "github_metadata": { "branch": "master", "commit_count": 172, "repo_created_at": "2020-02-17T02:05: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": "bb997a9f...
af091f13-d83f-4e9c-948b-19917806a05e
Camithilwen/Code-Cloning-Analysis
src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p00740/s057377025.cpp
//include //------------------------------------------ #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <...
ALGO
0.999804
3.320128
{ "github_metadata": { "branch": "main", "commit_count": 243, "repo_created_at": "2025-06-06T16:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "9e5012ead4...
3bd89284-2a0e-4d01-9bec-5e12eb9ed1ef
Kaustubh73/DSA-from-scratch
Algorithms/Mathematical Algorithms/modulo_arithmetic.cpp
#include <bits/stdc++.h> using namespace std; int factmod(int n, int p) { vector<int> f(p); f[0] = 1; for (int i = 1; i < p ; i++) { f[i] = f[i-1] * i % p; } int res = 1; while (n > 1) { if ((n/p) % 2) res = p - res; res = res * f[n%p] % p; n /= p...
ALGO
0.999925
4.710821
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-06-16T17:07: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": "af885015056...
bb314a3c-e09e-4608-84f3-e7f341dce836
dmitriyteteruk/ITMO.CPP-course
ITMO.CPP-Course.Practice_05.Control_Tasks.01_ArrayToFun/ITMO.CPP-Course.Practice_05.Control_Tasks.01_ArrayToFun.cpp
#include <Windows.h> // руссификация консоли #include <iostream> int* max_vect(int, int*, int*); int main() { // руссификация консоли SetConsoleOutputCP(1251); SetConsoleCP(1251); int a[] = { 1,2,3,4,5,6,7,2 }; int b[] = { 7,6,5,4,3,2,1,3 }; int kc = sizeof(a) / sizeof(a[0]); //Ко...
ALGO
0.998743
3.222899
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2022-06-17T14:05: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": "91ab5563a...
5499dd5e-503c-46a7-a44e-7170d857ec6a
zerolxf/zero
tiaozhan/2.4/f.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <string> #include <queue> #include <cstdlib> #include <algorithm> #include <stack> #include <map> #include <queue> #include <vector> using namespace std; const int maxn = 3e5+100; const int INF = 0x3f3f3f3f; #define pr(x) cout << ...
ALGO
0.999897
4.040196
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2015-12-31T07:38:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f6d06b6...
80648e4b-7269-4140-94cb-bf3d7e95b93d
basvandorst/cryptography-archive
range/range/eigen.cpp
#define main_program #include <fstream.h> #include "range.h" #include "complex.h" #include "vector.h" #include "cvector.h" #include "ivector.h" #include "poly.h" /* This program finds eigenvalues and, if desired, eigenvector components of a real square matrix of size n by n. First the matrix is transformed ...
ALGO
0.999042
3.93201
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-12-15T21:46: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": "a3d6db520580...
2d99c0b7-18a0-4dc2-a37f-30bfda3c77c3
andresmunozb/Numericos-Lab2
Integracion/interpolacion/interpolation.h
#ifndef INTERPOLATION_H #define INTERPOLATION_H #include <vector> #include <string> using namespace std; class Interpolation { public: virtual vector<long double> differenceFinite (vector<long double> vectorXi, vector<long double> vectorYi, vector<long double> vectorXi_005); virtual vector<lon...
ALGO
0.907416
5.396465
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2018-06-13T20:12: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": "13b465e20...
cb02499a-fec8-4cf7-ba6b-3fc39a812ba9
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/03/0316/personal_submission/cf263d_k423.cpp
/** * Created by 5cm/s on 2024/03/16 09:36:21. * 诸天神佛,佑我上分! **/ #include <bits/stdc++.h> using namespace std; #define itr(it) begin(it), end(it) #define endl '\n' #define YES() void(cout << "YES\n") #define NO() void(cout << "NO\n") void elysia() { int n, m, k; cin >> n >> m >> k; vector<vector<int>> ...
ALGO
0.999996
5.167223
{ "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": "eea5...
87f85f99-1a2f-4d34-82fa-fa82c5ffd2bd
0x1Shub/45-Days-ReviseWithArsh-Challenge
Day 12/45_Text Justification.cpp
class Solution { public: vector<string> fullJustify(vector<string> &words, int maxWidth) { int n = words.size(); vector<vector<string>> lines; vector<int> spaces; vector<string> temp = {words[0]}; int i = 1, prevLen = words[0].length(); while (i < n) { ...
ALGO
0.999961
6.111662
{ "github_metadata": { "branch": "main", "commit_count": 203, "repo_created_at": "2023-07-06T15:44: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": "77b11f3ccd...
488a410f-b00a-4091-9a4e-1142f8f9fe08
bgoose99/cpruitt-utils
C/CppUtils/CppUtils/CoordConversions.cpp
// system includes #include <cmath> // local includes #include "CoordConversions.h" #ifndef M_PI #define M_PI 3.14159265359 #endif namespace CoordConversions { const double RAD_2_DEG = 180.0 / M_PI; const double DEG_2_RAD = M_PI / 180.0; const double A = 6378137.0; // Earth semi-major axis co...
ALGO
0.990768
4.225369
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2015-03-17T13:50:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "263095bf5...
0063f40f-c177-4e10-9412-21e7c8282022
2005HAK/Terra
software/raspberry_pi/src/navigation/navigation_5.1/src/thrustersctrl.h
#ifndef THRUSTERSCTRL_H #define THRUSTERSCTRL_H #include <iostream> #include <array> #include <vector> #include <string> #include <chrono> #include <wiringPi.h> #include "sensors.h" #include "auverror.h" // Defines the power maximum that thrusters can receive (in %) const double POWER_MAX = 25; //Frequency used for ...
TOOL
0.914936
6.347861
{ "github_metadata": { "branch": "master", "commit_count": 380, "repo_created_at": "2024-01-19T17:53:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 11, "pull_requests": 0 }, "file_meta": { "content_id": "658ddbf...
0a452112-4ba2-400f-ae9d-547e8c07172c
akinelden/cmpe250-project3
Mahir.cpp
#include "Mahir.h" MAHIR::MAHIR() { CurrentRoot = 0; } MAHIR::MAHIR(vector<Piggy>*& p) : mybanks(p), CurrentRoot(0) { real_roots.clear(); cycle_roots.clear(); roots.clear(); opened.clear(); } MAHIR::~MAHIR() { if (mybanks) mybanks->clear(); roots.clear(); opened.clear(); real_roots.clear(); cycle_roots.c...
ALGO
0.989856
3.123528
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-02-08T22:25:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "17a09bb03c...
029f77c0-8593-4cf4-9605-5c344be10b25
geckods/CodeForces
646/e.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; // THINGS TO REMEMBER // ENDL is slow, '\n' is fast // Clear everything (including graphs) between test cases // use anti-anti-hash: https://codeforces.com/blog/entry/62393 // pb-ds: https://codeforces.com/blog/entry/11080 // check when to use LLONG_M...
ALGO
0.999497
3.900969
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-03-24T04:23: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": "9c7cea6831...
eb87e15f-250f-4551-b1f0-02652ca53e79
Omhedau/dsa
array.cpp
// four sum : // 1. sort the array // 2. fix the two pointers i,j and move the k & l two get the target sum // k-----> greater lesser <-----l // same approach for the three sum #include <bits/stdc++.h> using namespace std; vector<vector<int>> fourSum(vector<int>& nums, int target) { int n = nums.size()...
ALGO
0.999718
5.441464
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-06-28T08:55:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f249e6c35e19...
2927e900-1f64-42b1-8299-26a51974c7c5
Malatawy15/Algorithms-Library
Regionals/GNY 2008/Joe's Triangular Gardens.cpp
#include <stdio.h> #include <complex> #include <math.h> using namespace std; int main(){ complex<double> z1,z2,z3,ans1,ans2,a,b,avg; double x,y,rl,rl1; int t; scanf("%d", &t); for (int k=1;k<=t;k++){ scanf("%lf %lf",&x,&y); z1 = complex<double>(x,y); scanf("%lf %lf",&x,&y); z2 ...
ALGO
0.999637
3.668715
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2013-05-30T23:38:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 21, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d755cf...
9f96e5d5-8d25-4ad5-a973-44333edbbe2e
zfind/masters-thesis
Scratchpad/GPTreeEvaluator/main.cpp
#include <iostream> #include <vector> #include <stack> #include <cstdlib> #include <ctime> #include <cmath> #include <fstream> #include <cuda_runtime_api.h> #include <cuda.h> #include <chrono> using namespace std; #define ADD 0xFFFFFFF0 #define SUB 0xFFFFFFF1 #define MUL 0xFFFFFFF2 #define DIV 0xFFFFFFF3 #define SQR ...
ALGO
0.999284
4.209583
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2018-03-27T19:45: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": "de20ec24d...
f193056b-234e-45eb-a832-54dec35f75e3
qrbs/pytorch_source
pytorch/third_party/ideep/mkl-dnn/src/pm/nested_matcher.hpp
/******************************************************************************* * Copyright 2021 Intel Corporation * * 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.o...
TOOL
0.908568
3.690032
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-12-26T08:56:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "8ac8b2b348...
9842a4cc-318e-4a7c-86d2-012351e6122a
aman-chaddha/SDE-Sheet
01_Set_Zero.cpp
#include <vector> #include <iostream> using namespace std; void setZeroes(vector<vector<int>>& matrix) { int n = matrix.size(); // Number of rows if (n == 0) return; // Handle empty matrix int m = matrix[0].size(); // Number of columns // Create arrays with dynamic memory ...
ALGO
0.999698
7.271748
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-07-14T16:37: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": "9774fa04baf...
96abe1bb-3408-474f-bcf5-90a1b8d4cf01
Kanhakhatri065/competitive_programming
codeforces/1292A-NEKOsMazeGame.cpp
/*** I came, I saw, I conquered. ***/ #include <bits/stdc++.h> using namespace std; #define FAST_IO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); typedef long long ll;typedef unsigned long long ull; /*** Input Output ***/ #define sc(a) cin >> a #define pf(a) cout << a << endl /*** Loops ***/ #define f(i, p, num) fo...
ALGO
0.999918
4.767501
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2020-05-12T22: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": "397bf53fa...
524f43d3-3618-4266-abd1-7920fe23e56e
fishy15/competitive_programming
online/cf/ed_79/stack.cpp
// :pray: :steph: // :pray: :bakekaga: #include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <array> #include <algorithm> #include <utility> #include <map> #include <queue> #include <set> #include <stack> #include <cmath> #define ll long long #define eps 1e-8 #define MOD 1000000007 #de...
ALGO
0.999946
3.909577
{ "github_metadata": { "branch": "master", "commit_count": 1058, "repo_created_at": "2019-02-21T11:46:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6cecd...
22c5e833-ae7d-4fa7-a087-3252836a725d
MinumCoklatPanas/CF-Repo
codeforces/872/B.cpp
#include <bits/stdc++.h> using namespace std; //Made with <3 by MinumCoklatPanas typedef long long ll; #define int long long const int INF = 1e9; const ll INFF = 1e18; const int MAXN = 510; const int MOD = 1e9 + 7; const double PI = acos(-1.0); const double INFD = 1E9; const double EPS = 1e-9; mt19937 rng(chrono::stea...
ALGO
0.999991
4.810091
{ "github_metadata": { "branch": "master", "commit_count": 1426, "repo_created_at": "2020-12-20T23:27: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": "23d1c96...
ca575377-d182-4cb5-ae9e-46ff6c0d787a
AK0561/Data-Structure-and-Algorithms
Binary Search/Searchin2DMatrix_2.cpp
#include<iostream> using namespace std; bool searchElement(vector<vector<int> > &MATRIX, int target) { int n=MATRIX.size(); int m=MATRIX[0].size(); int row=0,col=m-1; while(row<n && col>=0){ if (MATRIX[row][col] == target) { return true; } else if (MATRIX[row][col] < target) ...
ALGO
0.999919
4.742233
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2024-01-08T05:51:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "87fb7f5dc10...
a0c6c6dc-c8ad-4929-ab31-773e1755169d
ApolloAuto/apollo
modules/perception/common/algorithm/i_lib/core/i_blas.h
/****************************************************************************** * Copyright 2018 The Apollo Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at ...
TOOL
0.934763
6.291937
{ "github_metadata": { "branch": "master", "commit_count": 19341, "repo_created_at": "2017-07-04T19:03:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 25847, "forks": 9793, "issues": 895, "pull_requests": 104 }, "file_meta": { "content_id...
0e72c1a3-42aa-4e5d-a074-3bd4a5f82c21
yiluqingtai/leetcode
Tree/leetcode145.cpp
/** * * File: leetcode145.cpp * 二叉树的后序遍历 * * Author: yiluqingtai(<EMAIL>) * Created on 21/4/20 * **/ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(n...
ALGO
0.999944
6.111006
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2021-04-16T14:34: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": "7941e4b22...
1437b2c6-28d0-4158-a1f3-8aff6083f452
chosanglyul/PS
BOJ/2263.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<int, pii> piii; typedef pair<ll, ll> pll; typedef pair<ll, pll> plll; #define fi first #define se second const int INF = 1e9+1; const int P = 1000000007; const ll LLINF = (ll)1e18+1; template <typename T> istrea...
ALGO
0.999993
3.582155
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2021-02-15T09:25: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": "4b056a55794...
f4bdc173-9aa0-48d0-a4cf-b3f45835ff6f
ishandutta2007/codeforces-f
flashmt/normal/853/A.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(NULL); int n, k, c[300300]; cin >> n >> k; for (int i = 1; i <= n; i++) cin >> c[i]; priority_queue < pair<int, int> > q; long long cost = 0, ans[300300]; for (int i = 1; i <= n + k; i++) { if (i <= ...
ALGO
0.999986
3.28543
{ "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": "443b96ef8f0c...
2e58978b-a325-42b4-8caf-5a11cf0a9244
qitanda/RMUA
drone_ws/src/critical_nn_deploy/circle_detection/first_detection.cpp
#include "first_detection.hpp" FirstDetector::FirstDetector() { aamed->SetParameters(CV_PI / 3, 3.4, 0.8); } // FirstDetector::FirstDetector(ros::NodeHandle *nh,bool debug1) : first_nh(*nh) ,debug(debug1) // { // aamed->SetParameters(CV_PI / 3, 3.4, 0.81); // } void FirstDetector::drawresult_max(cv::Mat &image,...
ALGO
0.992517
4.46256
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-11-22T07:20: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": "c01d3493df...
8a08b9ff-5baa-46cf-850d-fe103d3892d2
mayanklakkewar/LeetCode75
11_Is_Subsequence.cpp
/* Problem Statement - Given two strings s and t, return true if s is a subsequence of t, or false otherwise. A subsequence of a string is a new string that is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (i.e....
ALGO
0.999965
6.006678
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2024-08-03T08:06: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": "a5a641202ff...
54b5c01f-f2e0-432e-9999-24151d531ced
wverbeke/GraphAlgorithms
dungeonProblem.cc
#include <vector> #include <iostream> #include <utility> #include <random> #include <algorithm> #include "Graph.h" #include "BreadthFirstSearch.h" std::vector< std::vector< char > > testGrid(){ std::vector< std::vector< char > > grid; grid.push_back( { 'S', '.', '.', '#', '.', '.', '.' } ); grid.push_...
ALGO
0.999945
5.417135
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2020-09-06T20:13: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": "41a40f09c...
4dcf377b-a1ad-4c50-b3d7-177d73953db0
mxmxmx/O_C
software/o_c_REV/streams_lorenz_generator.cpp
// Copyright 2014 <NAME>. // Copyright 2016 <NAME> // // Original Author: <NAME> (<EMAIL>) // Modifications for use of this code in firmare for the Ornament and Crime module: // <NAME> (<EMAIL>) // // Idea for using Rössler generator attributable to Hotlblack Desiato // (see http://forbinthesynthesizer.blogspot.com.au/...
ALGO
0.998864
5.747157
{ "github_metadata": { "branch": "master", "commit_count": 1234, "repo_created_at": "2014-09-01T23:28:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 490, "forks": 123, "issues": 17, "pull_requests": 3 }, "file_meta": { "content_id": "6a...
7d0b253e-3e96-4780-bd51-36f69883ae11
gnuchessmen/linegebra
Matrix.h
/* * Matrix.h * * Created on: 18-Dec-2021 * Author: gnuchessmen */ #include <vector> #ifndef MATRIX_H_ #define MATRIX_H_ namespace mat { class Matrix { protected: std:: vector<std:: vector<double> > matrix; public: // Is the vector-in-vector a valid matrix? bool is_matrix(std:: vector<std:: vector<dou...
ALGO
0.993046
5.546376
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-12-18T16: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": "7653e810505c...
519bb538-badb-42d5-b878-1a4ef830fbf8
mwegrzyn2311/ListAndMorphs
Morphs.cpp
#include "Morphs.hpp" void inline morphs::swap(int& a, int& b) { int tmp = a; a = b; b = tmp; } void inline morphs::insertMinFront(std::array<int, 4>& indices, const std::vector<float>& weights) { int min = 0; for(size_t i = 1; i < 4; ++i) { if(weights[indices[i]] < weights[indices[min]]) { min = i; } } ...
ALGO
0.998964
5.925862
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-05-06T16:42: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": "c8d479e735...
e24e7bee-4bf0-4d4c-af7e-4289956fd813
ambrusc/mikktpy
mikktpy.cpp
// // Copyright (c) 2013 <NAME> // #include <iostream> #include <vector> #include "mikktspace.h" using namespace std; static const int components_per_vert = 3 + 3 + 2; // xyz, normal-xyz, uv static const int components_per_tangent = 3 + 3 + 1 + 1; // tangent-xyz, bitangent-xyz, tangent-mag, bitangent-mag static cons...
TOOL
0.98004
5.107131
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2013-11-16T00:48:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8920cecd1b...
81458142-35e3-4f45-8de2-4e00a1c1da95
VarfolomeevaAleksandra/spbu
2020.10.10 - homework4/task1/Source.cpp
#include<iostream> #include<ctime> #include"ArrayList.h" using namespace std; void printMenu() { cout << "МЕНЮ" << endl; cout << "0 - Выход из программы" << endl; cout << "1 - Вывести массив на экран" << endl; cout << "2 - Добавить элемент" << endl; cout << "3 - Добавить элемент в позицию" << endl; cout << "4 -...
TOOL
0.920779
3.589534
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2021-10-21T09:21: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": "aa3fd2887...
2c34fe15-0241-4cb2-aefb-3bcf0a96f2ed
TheGhulam/CS202
HW3/tests/tests/Creature.cpp
/** * Author : <NAME> * ID: 22101001 * Section : 2 * Homework : 3 * Description : Homework 3 - Heaps and Priority Queues */ #include<iostream> #include <cmath> #include"Creature.h" #include"Food.h" using namespace std; Creature::Creature(int id, double x, double y, int health) { this -> id = id; point.moveTo(x...
ALGO
0.972832
3.894092
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2023-03-24T08:10: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": "f11230583...
49b61cdf-2066-49be-ad77-db21880904dd
shivankar-p/codeforces
45_grass.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, k, s, dest; cin >> n >> k; char arr[n]; for(int i=0; i<n; i++) { cin >> arr[i]; if(arr[i] == 'G') s = i; if(arr[i] == 'T') dest = i; } if(s < dest) { while(s != dest) { ...
ALGO
0.999977
3.628775
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-04-13T18:26: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": "969cd00762...
6f7f55e2-076c-418e-b163-ff762ad5b8b6
xyzyzl/compprog
probs/usaco/dec2021/plat/1.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; const int MAXN = 300005; const ll INF = 1e18; struct Tt { int c, p, a, b; Tt(int c, int p, int a, int b) { this->c = c; this->p = p; this->a = a; this->b = b; } bool operator<(Tt other) { ...
ALGO
0.99981
4.204921
{ "github_metadata": { "branch": "master", "commit_count": 364, "repo_created_at": "2019-06-11T03:19:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "8649c8d8...
fc5e4792-db71-44fb-8dd6-cf4761fcb2b8
he1kor/dune-map-api
include/util.h
/** * \file * \brief Contains all util functions in d2kmapapi namespace which used in the library. * */ #pragma once #include <vector> #include <set> #include "map.h" namespace d2kmapapi{ /** * \brief Used for pointing directiong from a tile. */ enum Direction { UP = 0, LEFT = 1, ...
TOOL
0.91538
4.58972
{ "github_metadata": { "branch": "main", "commit_count": 274, "repo_created_at": "2024-02-19T09:22: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": "2b8617c469...
19b272da-c71b-4bc8-b054-45c6552e792d
D-veloper/DS_CircularQueueTut
DS_CircularQueueTut/DS_CircularQueueTut.cpp
#include <iostream> using namespace std; class CircularQueue { private: int arr[5]; int n = sizeof(arr)/sizeof(arr[0]); int front{}; int rear{}; int itemCount{0}; public: CircularQueue() { front = -1; rear = -1; for (int i{ 0 }; i < n; i++) { ar...
ALGO
0.992181
5.848604
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2022-04-05T11:53: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": "53506e82ed...
7ed1d294-2693-4471-966b-6864719fed75
ishandutta2007/codeforces-i
ilya_msu/normal/645/C.cpp
#define _CRT_SECURE_NO_WARNINGS #pragma comment(linker, "/STACK:256000000") #define _USE_MATH_DEFINES #include<iostream> #include<vector> #include<string> #include<stack> #include<algorithm> #include<cmath> #include<set> #include<queue> #include<sstream> #include<utility> #include<map> #include<ctime> #include<cstdio> ...
ALGO
0.999949
3.718817
{ "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": "ce8561d0cc53...
30d873d4-fd1b-4e7b-956d-b1ff3d79c742
Sidharth-Agarwal/Coding-Ninjas
24. Hashmaps/3MaximunFrequencyNumber.cpp
/* Code : Maximum Frequency Number Send Feedback You are given an array of integers that contain numbers in random order. Write a program to find and return the number which occurs the maximum times in the given input. If two or more elements contend for the maximum frequency, return the element which occurs in the a...
ALGO
0.999925
4.312076
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-03-02T15:55: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": "7e6997550170...
efa7376e-072b-43f3-a168-185822370df7
mahmoodqasim/object_tracking
TemplateFinder/main1.cpp
// Visual and Autonomous Exploration Systems Research Laboratory // Version 1.0 by <NAME> on 12/30/18 // email-adress: <EMAIL> #include <iostream> #include <opencv2/opencv.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/highgui.hpp> #include <opencv2/imgcodecs.hpp> #include <opencv2/core/utility.hpp> #include <o...
ALGO
0.996669
5.440517
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-12-31T18:04: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": "715af94ed0...