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
2b5d45cc-fc43-4ac2-8e01-8146439eefe4
madhav-bits/Coding_Practice
leetNodeWithHighEdgeScore.cpp
/* * //******************************************************2374. Node With Highest Edge Score.****************************************************** https://leetcode.com/problems/node-with-highest-edge-score/ *******************************************************************TEST CASES:**************************...
ALGO
0.999988
5.720813
{ "github_metadata": { "branch": "master", "commit_count": 1813, "repo_created_at": "2017-10-08T23:36:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fdb3d07...
d29efe64-d733-48ba-8960-7ef124e51d84
dreyus95/AVSP_SourceQualityPrediction
CodeJamCrawler/dataset/14_19388_20.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <iostream> #include <algorithm> #include <vector> #include <string> #include <map> using namespace std; bool check(vector <long long> &v, vector <int> &perm) { int stat = 0; int maxid = -1; for (int i = 0; i < v.size(); i++) { if ...
ALGO
0.999852
4.072937
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2017-06-08T21:00: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": "7054380ba...
b7214b62-9daf-4ce3-ae33-6d98a10c1090
erebuswolf/IGVC-Code
planning/src/BugPlanner.cpp
/** * BugPlanner.cpp * Author: <NAME> * * bug planner * */ #include "BugPlanner.h" #include <math.h> #include "simplesteering.h" #include <stdio.h> BugPlanner::BugPlanner(double left_wall_dist, double left_wall_leeway,WorldModel* model, Network* network): WallCrawler (left_wall_dist, left_wall_leeway, model, network...
ALGO
0.96984
3.750973
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2012-09-18T00:23: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": "e8b2a39586...
507eaa77-9ee5-4551-a86b-12047d2753f0
luliyucoordinate/Leetcode
src/1067-Digit-Count-in-Range/1067.cpp
class Solution { public: int digitsCount(int d, int low, int high) { return digitCounts(d, high) - digitCounts(d, low-1); } private: int digitCounts(int k, int n) { int base = 1, cnt = 0; while (n / base >= 1) { int cur = n / base % 10; int ...
ALGO
0.998697
5.339371
{ "github_metadata": { "branch": "master", "commit_count": 1055, "repo_created_at": "2018-05-09T12:30:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1490, "forks": 481, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "72...
4a205897-4687-4769-8463-087a72979ce0
songminkyu/CppSutudy
CPP_TEST/소스260.cpp
#include <iostream> #include <vector> #include <algorithm> #include <ranges> template<class T, class Container> class Index_iterator { protected: Container* container = nullptr; T delimiter = {}; std::size_t cnt = 0; public: using iterator_category = std::output_iterator_tag; using ...
ALGO
0.992576
4.844779
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-23T11:07: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": "bbbbc6e68ea9...
2c5b7c8f-1bcc-4bea-86c6-dccdcdf98204
mctools/ncrystal
ncrystal_core/src/utils/NCRandUtils.cc
//////////////////////////////////////////////////////////////////////////////// // // // This file is part of NCrystal (see https://mctools.github.io/ncrystal/) // // ...
ALGO
0.995967
5.962769
{ "github_metadata": { "branch": "main", "commit_count": 1256, "repo_created_at": "2017-08-29T11:40:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 46, "forks": 21, "issues": 88, "pull_requests": 1 }, "file_meta": { "content_id": "3426ae1...
3d4b511a-ecfc-4ba8-8f54-b9b8d5cf281f
rcasey74/coursera
data_struct_algo/week2/4_lcm.cpp
#include <iostream> long long lcm_naive(int a, int b) { for (long l = 1; l <= (long long) a * b; ++l) if (l % a == 0 && l % b == 0) return l; return (long long) a * b; } int gcd_fast(int a, int b) { // Euclidean algorithm if (b == 0) { return a; } else { int a_prime = a % b; return gcd_fast...
ALGO
0.999923
4.710416
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2018-06-07T14:51: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": "eefbc955c...
62988a80-f73c-4993-80ac-ac7c22363f7a
permin/Olymp
topcoder/srm624/500/problem.cpp
#include <iostream> #include <cstring> #include <cstdlib> #include <cstdio> #include <string> #include <vector> #include <set> #include <map> #include <list> #include <stack> #include <deque> #include <queue> #include <algorithm> #include <cassert> #include <cmath> #include <ctime> #include <sstream> #include <unordere...
ALGO
0.999851
3.562037
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2014-08-29T08:32: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": "d13f1f2e8...
c1898d54-8cd7-467b-9282-e7028e4d961b
the-illusionist/practice_code
codechef/Jan LONg 2014/MAGIC.cpp
#include <bits/stdc++.h> using namespace std; int main() { int T, N,i,k,l,m,p,q,r; unsigned long long A, B, C,temp; unsigned long long L[1000]; string S; cin >> T; while (T--) { cin >> N; i=1; while (i<=N) { cin >> L[i]; i++; } cin >> A >>B>>C; cin>> S; for(i=0; i<S.length(); ...
ALGO
0.999892
3.361013
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-08-19T11:34: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": "39ff78fa5f...
7516296a-5445-4059-b436-c962e86475bf
show981111/algorithms
map/2905)indexDifference.cpp
/** * Important thing is finding an invariant! * * Since we need indexDifference, sort will be complicated. * Can we solve this without using sorting? -> MAP * * Since we are looking for |X - nums[i]| >= valueDifference, we only need to know * !!max X or min X!! within the index range. * * Then, how do we know...
ALGO
0.999995
6.044441
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2022-01-30T21:13: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": "ea44bc13072...
3a88ecda-23ed-45f7-bab7-6b56b55ea40f
leverimmy/Codes
比赛/学校/2019-10-26测试/source/PC33_HB-黄越/light.cpp
#include <cstdio> #include <cctype> #include <map> using namespace std; int read() { int x, c; while (!isdigit(c = getchar())); x = c - 48; while (isdigit(c = getchar())) x = x * 10 + c - 48; return x; } namespace f { int a[100010]; int solve(int n, int m) { for (int i = 1; i <= n; ++i) a[i] = read(); ...
ALGO
0.999738
3.504707
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2019-11-04T09:43:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6cfa7f645...
f4fa2af8-24a6-4bf9-a538-cc717c24512e
NandiSoham/Leetcode-POTD-Daily-Coding-Challenge
Year 2024/07_July/day06_2582. Pass the Pillow.cpp
// Problem Link -> https://leetcode.com/problems/pass-the-pillow/description/ // -------------------------------- Approach - 1 ------------------------------ class Solution { public: int passThePillow(int n, int time) { int idx = 1, direction = 1; while(time > 0){ if(idx + direction >...
ALGO
0.999993
6.009331
{ "github_metadata": { "branch": "main", "commit_count": 727, "repo_created_at": "2024-02-03T00:34: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": "e86a828f27...
8490de8d-359a-4da9-ae6f-d993b1766b84
DoqueDB/doquedb
sydney/Driver/FullText2/OrderedDistanceLeafNode.cpp
// -*-Mode: C++; tab-width: 4; c-basic-offset: 4;-*- // vi:set ts=4 sw=4: // // OrderedDistanceLeafNode.cpp -- // // Copyright (c) 2010, 2011, 2012, 2023 Ricoh Company, Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You...
ALGO
0.993391
7.333079
{ "github_metadata": { "branch": "master", "commit_count": 102, "repo_created_at": "2024-02-14T02:47:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 19, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ef0bf3f2...
8b167edf-3514-49eb-8699-a14b20a89c03
zhuzhenping/its-1
src/datalib/Func.cpp
#include "datalib/Func.h" #include <stdlib.h> #include <math.h> #ifndef WIN32 #include <algorithm> using namespace std; #endif double Average(NumericSeries prices, int length) { return Summation(prices, length) / min(length, prices.Size()); } double AverageFC(NumericSeries avgs, NumericSeries prices, int length) { ...
ALGO
0.99414
5.073706
{ "github_metadata": { "branch": "master", "commit_count": 151, "repo_created_at": "2020-09-05T08:49:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bff6c9ee...
9cb0958f-fd03-4d3e-ad29-ec553e499c20
Mubshr07/Q4
q4.cpp
#include "q4.h" #include <iostream> #include <iomanip> using namespace std; q4::q4() { } q4::q4(int anum, int adenom){ int * reduced = reducedForm(anum, adenom); numerator = reduced[0]; denominator = reduced[1]; delete reduced; //delete the array that was on the heap (garbage collect) ...
TOOL
0.901446
4.192872
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-11-03T05:46:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5006d3a9eb...
a655f874-c47a-4c76-a04c-96e82c8e3724
trbabb/geomc
geomc/shape/BinLatticePartition.h
/* * BinLatticePartition.h * * Implements an N-dimensional, gridded, non-hierarchical spatial partition of cells. * Put another way, objects are kept in a grid of "buckets". * * Good for promximity/neighbor searches, when the density of objects * is roughly known. * * Spatial searches over many bins are likely...
ALGO
0.992047
7.186196
{ "github_metadata": { "branch": "master", "commit_count": 338, "repo_created_at": "2013-07-22T05:47:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 33, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bffad1f...
28ab57bb-a3e3-4ed4-954c-c53d1e1c40d8
abhishekmishra25/Codeforces_C_and_D
contest 808 deiv 2/d.cpp
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "algo/debug.h" #else #define debug(...) 42 #endif #define ins(i, a, n) for (int i = a; i < n; i++) #define des(i, a, n) for (int i = n - 1; i >= a; i--) #define pb push_back #define mp make_pair #define ll long long #define all(v) v.begin(), v.end() #d...
ALGO
0.999916
3.59367
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2022-07-12T17: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": "6cc5e6bd4fa...
228029da-7b07-4c29-bfa5-85d0045ada7e
yuyilei/LeetCode
conTest/193-week/1481_Least-Number-of-Unique-Integers-after-K-Removals.cpp
/* Given an array of integers arr and an integer k. Find the least number of unique integers after removing exactly k elements.   Example 1: Input: arr = [5,5,4], k = 1 Output: 1 Explanation: Remove the single 4, only 5 is left. Example 2: Input: arr = [4,3,1,1,3,3,2], k = 3 Output: 2 Explanation: Remove 4, 2 and ei...
ALGO
0.999933
6.099548
{ "github_metadata": { "branch": "master", "commit_count": 372, "repo_created_at": "2017-08-24T07:13:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e878e9bf...
c44a0b7d-8347-4433-8fe0-c7d2b62f3c84
studian/Codingtest_HW
Codingtest_HW/LetCode/Learn/Introduction to Data Structure/Binary Tree/03. Binary Tree Postorder Traversal(145, medium).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.999975
6.382453
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2021-01-10T11:52:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8afbe1a14...
f18d814a-8507-4b4d-83d6-59c5a5aa0cce
shikharbhardwaj/algorithm
kickstart/2021round1A/C.cpp
#include <bits/stdc++.h> // #define ONLINE_JUDGE #ifndef ONLINE_JUDGE #include <prettyprint/prettyprint.hpp> #endif #define FOR(i, n) for(int i = 0; i < n; ++i) #define FOR1(i, n) for(int i = 1; i <= n; ++i) #define TEST int T; std::cin >> T; while(T--) #define CASE int C; std::cin >> C; FOR1(case_num, C) #define AL...
ALGO
0.999851
4.812392
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2020-09-17T19:05:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "8d2806c86...
77026e35-41bb-462c-a341-687b92e45cf6
EliozGeller/CacheSimulation
CacheSimulation/src/Host.cc
// // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it wil...
ALGO
0.951386
3.680924
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2022-08-07T14:56: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": "69466e95cef...
4d019322-3b58-4045-94a7-d3a8c362ac6e
adbajh/CodeTemplate
Graph/Euler.cpp
#include <bits/stdc++.h> #define N (int)5e3 + 1 using namespace std; struct Graph { int n, m; multiset<int> adj[N]; int degree[N]; void clear() { m = 0; memset(degree,0,sizeof(degree)); for (int i = 0; i < N; i++) adj[i].clear(); } void add_edge(int u, int v) { ...
ALGO
0.999951
3.920541
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-21T12:20:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4d2bc2e8afc4...
15c804f4-2d94-409e-9ccc-ffc4c4315e25
cpviolator/LaptopLanczos
include/arpack_interface.h
#ifndef ARP_INT_H #define ARP_INT_H void arpackErrorHelpSAUPD(int *iparam_); void arpackErrorHelpSEUPD(int *iparam_); #define ARPACK(s) s ## _ #ifdef __cplusplus extern "C" { #endif // Interface functions to the external ARPACK library. These functions utilize // ARPACK's implemntation of the Implicitly Restarte...
TOOL
0.934322
5.530138
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2018-10-23T21:53: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": "53f5c0c07...
9dd6068d-4a1b-4982-966d-e1fe65f9eb46
nadimnesar/Online-Judges-Accepted-Solutions
UVA/10006/29403572_AC_300ms_0kB.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define llu long long unsigned int #define pb push_back #define inst insert #define mp make_pair #define dot(x) fixed << setprecision(x) #define full(x) x.begi...
ALGO
0.999542
3.882714
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2023-05-30T19:43: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": "9e96ef11d7...
ba19c959-83bf-4d37-97e3-65d2b7e35edf
SUREENASLAWI/141-ku-1
class4.3.cpp
//<NAME> //2221189157 //class 4.3 #include <iostream> using namespace std; int main(){ int x=0; int y=0; int z=0; cout << "input three different integers: " << endl; cin >> x >> y >> z; cout << "sum is " << (x + y + z) << endl; cout << "average is " << ( (x + y + z) / 3) <<endl; cout << "product is " <...
TOOL
0.994276
4.000503
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-10-20T16:05: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": "fe5abf1c3b51...
959e279e-b071-4674-a0ef-8d218cb5528f
pokaa3a/leetcoding
problems/1257. Smallest Common Region.cc
#include <iostream> #include <vector> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <string> #include <queue> #include <stack> #include <sstream> #include <cmath> using namespace std; struct TreeNode { int val; TreeNode* left; TreeNode* right; TreeNode(int x) : val(x), le...
ALGO
0.999848
5.076497
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2020-03-15T08:11:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "816117ca6...
b6655aac-34ca-4d5c-9f50-7db760dc0764
jajhall/rgda
HMatrix.cpp
#include "HMatrix.h" #include "HConst.h" #include <cmath> void HMatrix::setup(int numCol, int numRow, const int *Astart, const int *Aindex, const double *Avalue) { // Copy A numCol_ = numCol; numRow_ = numRow; Astart_.assig...
ALGO
0.994696
4.19381
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-11-14T11:13: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": "27a6d56d7f...
bb55d6c4-a64f-4dd9-8c87-b5676faedde0
mattya-lab/Qualification
Kihon_information/H27/H27Spring-8.cpp
#include<bits/stdc++.h> using namespace std; void print_array(int x[]) { printf("x: "); for (int i = 1; i < 8; i++) { printf("%2d ", x[i]); } printf("\n"); } int select(int x[], int n, int k) { int top = 1; int last = n; //int cnt_a = 0, cnt_c = 0; while (top < last) { int pivot = x[k]; int i = top; ...
ALGO
0.999931
4.303143
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2020-05-19T04:50:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c645e3b18...
860c6e56-601b-4159-b0c3-0a7070941393
enderquestral/Reed-CS221-Cplusplus
ALTTSPHomework2/cities.cc
/* * Implementation for Travelling-Salesperson Cities class and utilities */ #include <algorithm> #include <fstream> #include <numeric> #include <random> #include "cities.hh" ////////////////////////////////////////////////////////////////////////////// Cities::Cities(const std::string& filename) : cities_() { ...
ALGO
0.996372
6.632668
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2018-10-02T02:22:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "862e240cd...
b87d4164-e86f-4a13-a079-5e398abf2b8c
Ziklon/algorithms
tc/testprograms/FireSimulation.cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
ALGO
0.999936
4.583315
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2012-12-28T20:25:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "849f20cc5...
0bb6c402-6970-4a2a-bf73-cf1076022d36
ishandutta2007/codeforces-g
gediminas/normal/911/E.cpp
/*input 5 2 3 4 */ #include <bits/stdc++.h> using namespace std; int main () { ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); int n, k; cin >> n >> k; int a[n]; bool eg[n] = {}; for (int i = 0; i < k; i++) { cin >> a[i]; a[i]--; eg[a[i]] = true; } stack<int> s; int kit = 0; for (int i ...
ALGO
0.999978
3.534764
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:55: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": "f14c39cc2fb7...
cb9f371e-96f5-46c8-8639-d689003b5876
Muhammad-Shaya/Informatica_3AI
Minori e maggiori - File/main.cpp
#include <iostream> #include <fstream> using namespace std; /* * Dato un file numeri.txt contenente valori interi e un valore intero N dato dall'utente, memorizzo i valori minori di N in un file minori.txt e quelli maggiori in un file maggiori.txt */ int main() { ifstream in("../numeri.txt"); if (!in) { ...
ALGO
0.992386
4.199231
{ "github_metadata": { "branch": "master", "commit_count": 85, "repo_created_at": "2023-06-11T15:29: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": "27f7aa07e...
3bf483c5-25d3-40ea-9283-908457f7a8be
intel/xFasterTransformer
src/common/transformer_ctx.h
// Copyright (c) 2023 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.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
CONFIG
0.924827
5.505746
{ "github_metadata": { "branch": "main", "commit_count": 474, "repo_created_at": "2023-06-14T09:52:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 429, "forks": 73, "issues": 20, "pull_requests": 9 }, "file_meta": { "content_id": "ded9ac3...
f2b3e05e-17a2-4cde-939b-7918c18a5de2
MultivacX/leetcode2020
algorithms/medium/0079. Word Search.h
// 79. Word Search // Runtime: 20 ms, faster than 96.46% of C++ online submissions for Word Search. // Memory Usage: 10.1 MB, less than 98.53% of C++ online submissions for Word Search. class Solution { public: bool exist(vector<vector<char>>& board, string word) { if (word.empty()) return false; ...
ALGO
0.999841
6.342197
{ "github_metadata": { "branch": "master", "commit_count": 1856, "repo_created_at": "2019-12-31T13:19:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f9cdcf...
e171423e-6404-4976-838b-51cd039942e1
viren-sureja/Love-Babbar-450
04_searching_and_sorting/05_max_min_with_min_comparison.cpp
/* link: https://practice.geeksforgeeks.org/problems/middle-of-three2926/1 */ // ----------------------------------------------------------------------------------------------------------------------- // /* TC: O(1) */ int middle(int A, int B, int C) { //code here//Position this line where user code w...
ALGO
0.99806
5.621634
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2021-03-21T14:17:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 356, "forks": 169, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "1b8a9...
6b346691-dce1-46cd-9c87-0dfbc30e764a
pedroctag/Exercicios-CPP
entegra6.2/complex.cpp
#include <iostream> #include "complex.h" #include <iomanip> using namespace std; using std::ostream; using std::istream; complex::complex(double a,double b) :real(a), imag(b){} complex:: complex() :real(0), imag (0){} double complex::Getreal(){ return real; } double complex::Geti...
ALGO
0.963646
4.268396
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-01-09T13:56:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7b3c012cfee...
7acbe3ed-201f-4c27-8d1d-3ecd5f859feb
arrayfire/arrayfire
src/backend/opencl/nearest_neighbour.cpp
/******************************************************* * Copyright (c) 2014, ArrayFire * All rights reserved. * * This file is distributed under 3-clause BSD license. * The complete license agreement can be obtained at: * http://arrayfire.com/licenses/BSD-3-Clause **********************************************...
ALGO
0.996874
6.399834
{ "github_metadata": { "branch": "master", "commit_count": 6246, "repo_created_at": "2014-10-28T20:58:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4739, "forks": 546, "issues": 277, "pull_requests": 18 }, "file_meta": { "content_id": "...
54439afe-47f4-4a8c-a5ae-7a4a7cccac2d
ishandutta2007/codeforces-a
andreasyan/normal/1521/A.cpp
#include <bits/stdc++.h> using namespace std; #define m_p make_pair #define all(x) (x).begin(),(x).end() #define sz(x) ((int)(x).size()) #define fi first #define se second typedef long long ll; mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count()); mt19937 rnf(2106); void solv() { ll a, b; cin >>...
ALGO
0.999718
3.931519
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd161ae4ebbc...
9d40a85c-2d04-4340-b5ac-c0c3e845b3e5
Shahriar-Kabir-Sajib/beecrowdSolutions
b1131.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; int main() { int t1, t2, n = 1, match = 0, inter = 0, gremio = 0, draw = 0; while (n == 1) { if (n == 1) { cout << "Novo grenal (1-sim 2-nao)" << endl; } match++; cin >> t1 >> t2; ...
ALGO
0.999887
3.820067
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2023-09-17T14:01:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eba28b2f77a...
2eef6b67-7e55-47ce-a495-5d7fc098dc46
SadiqVali786/DSA
09. Char Arrays & Strings/22.stringCompression.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; // int compress_the_string (vector<char> &s) { // int index=0, count=1, start; // char prev = s[0]; // for (int i=1; i<s.size(); i++) { // if (s[i] == prev) // count++; // else { // s[in...
ALGO
0.999965
3.805126
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2023-08-31T03: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": "21b1fb05a25...
3cd8413f-9c96-4bab-a433-f1f9aeb551c5
Anit8096/C_PlusPlus
09_DSA/13_BinarySearch.cpp
#include <iostream> using namespace std; int BinarySearch (int arr[], int start, int end, int find) { while (start <= end) { int mid = start + (end - start) / 2; if (arr[mid] == find) { return mid; } (arr[mid] < find) ? start = mid + 1 ...
ALGO
0.999812
5.406343
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-07-05T18:08: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": "c8c1d8b9b34...
6e0a04fa-1ef4-4bb0-8f15-1c671e904ccd
YzlCoder/Easy3D
Matrix.h
#pragma once #include "MathDefine.h" #include "Vector.h" namespace easym { class Matrix { public: union { real m[4][4]; struct { real _11; real _12; real _13; real _14; real _21; real _22; real _23; real _24; real _31; real _32; real _33; real _34; real _41; real _42; real _43; real _44...
ALGO
0.977509
3.385012
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2017-11-04T08:42:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50d694b69b...
ae040038-8fcf-4afb-b53c-459f0711e44c
OneFourth/aoc2024
aoc2024/day06.cpp
import std; #include "day06.hpp" #include "log.hpp" void Day06::input(const std::string_view input) { this->tiles = input; this->width = input.find("\n"); this->height = std::ranges::count(input, '\n'); std::erase(this->tiles, '\n'); } static Point find_start(const auto span) { for (auto i = 0; ...
ALGO
0.999607
6.204865
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-11-30T01:40: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": "aaccc245f41...
ea33258f-5175-4d18-a894-749bf00fa062
SUBHAJITMONDAL-03/Leetcode_Question_Solving
Make the array beautiful - GFG/make-the-array-beautiful.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ //User function Template for C++ // User function Template for C++ class Solution { public: vector<int> makeBeautiful(vector<int> arr) { vector<int...
ALGO
0.999942
6.129755
{ "github_metadata": { "branch": "main", "commit_count": 491, "repo_created_at": "2022-10-15T08:22: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": "d4a6455538...
3f967c2f-38ca-49bf-9983-de525174557e
ldx123000/Tugraph_Tarjan
procedures/algo_cpp/tarjan_core.cpp
#include "./algo.h" #include "lgraph/olap_base.h" using namespace std; using namespace lgraph_api; using namespace lgraph_api::olap; void TARJANCore(OlapBase<Empty> &graph, size_t u, tar_pack &pack) { pack.dfn[u] = ++pack.para_datas[DEEP]; pack.low[u] = pack.para_datas[DEEP]; pack.flag[u] = 1; pack.a[...
ALGO
0.99931
4.24539
{ "github_metadata": { "branch": "main", "commit_count": 389, "repo_created_at": "2023-10-24T06:38:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "02650e955d...
5c5ef342-494f-45fc-a1f2-c46d3f636f17
SOUMYA-PANJA/Coding
Data_Structures/Programs/5_Sorting/7_Intersection_Of_Two_Sorted_Array/efficient.c++
#include <iostream> using namespace std; void printIntersection(int arr1[], int size1, int arr2[], int size2) { int i = 0, j = 0; while (i < size1 && j < size2) { if(i > 0 && arr1[i - 1] == arr1[i]){ i++; continue; } if(arr1[i] < arr2[j]){ i++; ...
ALGO
0.999279
4.740026
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2022-08-23T13:41: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": "08bdba3f3...
9060bcc6-2b04-40a3-9011-879172bcd6d3
Altu-Bitu-2/AltuBitu-2
#14 0503_최단경로/Sample_commented/BOJ_10282_sample.cpp
/* 해킹 : Sample */ #include <iostream> #include <vector> #include <queue> using namespace std; typedef pair<int, int> ci; const int INF = 1e7; // 최대 n-1개의 연결관계 있으므로 -> n * (가중치 최대값) // 다익스트라 ci dijkstra(int start, int v, vector<vector<ci>> &graph) { priority_queue<ci, vector<ci>, greater<>> pq; vector<int> di...
ALGO
0.999848
4.428652
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2022-03-04T09:39:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "6df25acff384...
239d5d4f-ae2f-42d7-992e-e4dd27fa08b5
igoralberte/cosim-gres
sims/include/arboretum/stVPTree.h
/* Copyright 2003-2017 GBDI-ICMC-USP <<EMAIL>> * * 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 agr...
ALGO
0.975167
3.83327
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-01-13T01:03:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "80b71f70b42...
ce92d118-65d2-4a8c-b0af-8282e821a446
JairZhu/Backup-of-undergraduate-study-materials
算法设计与应用基础/算法设计课件/code/优先队列和堆/TestBinaryHeap.cpp
#include <iostream> #include "BinaryHeap.h" using namespace std; // Test program int main( ) { int numItems = 99999; BinaryHeap<int> h; int i = 37; int x; cout << "Begin test... " << endl; for( i = 37; i != 0; i = ( i + 37 ) % numItems ) h.insert( i ); for( i = 1; i < numItems...
TEST
0.918076
3.876574
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-06-11T13:18:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5c99da54...
24ecbf01-86e6-4d5f-a3c8-078bc7dbd52c
mdacrim97/neural_net_framework
neural_network.cpp
#include "neural_network.hpp" NeuralNetwork::NeuralNetwork(int layers[], int layersCount, ActivationFunction layerActivations[], std::string name){ for(int i=0; i < layersCount; i++){ this->layerSizes.push_back(layers[i]); if(i < layersCount-1) this->layerActivations.push_back(layerActivations[i]); } this...
ALGO
0.912329
4.188214
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2020-08-21T13:04:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b93eb02a0...
f5c9b5ab-92bc-4a18-a2ef-c0560cb2855f
KolawatInpan/Intro-to-Computer-Engineering
Work/Work3/35_0039_0429_work3/35_0039_0429_work3.ino
#define b1 2 #define b2 3 #define delayTime 70 int number; // number to display int bitPattern[11] = {B00111111,B00000110,B01011011,B01001111,B01100110,B01101101,B01111101,B00000111,B01111111,B01101111}; const byte numPins = 8; const int segmentPins[8] = {12,11,10,9,7,6,5,4}; bool reading[2] ; bool lastbuttonState[2] =...
ALGO
0.951694
4.889628
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-08-08T06:11: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": "7c91abe5246...
571eb462-582e-4c0c-8091-4703874d4d1e
NJrslv/algorithms-and-cpp
optimization/Job_Shop_approximation/Solution.cpp
#include <iostream> #include <vector> #include <algorithm> #include <limits> using namespace std; const size_t N = 3001, M = 301; struct Detail { int id; int k; array < pair < int, int64_t >, M > steps; }; int n, m; array < Detail, N > ds; array < int64_t, M > load; array < array < int64_t, N >, M > res...
ALGO
0.999954
3.902143
{ "github_metadata": { "branch": "main", "commit_count": 117, "repo_created_at": "2023-01-21T09:06:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3fc8b222db...
db0a480a-bd2b-4b46-aeb7-5f40a04b8052
Aqudi/Today_ps
Programmers/완주하지못한선수/완주하지못한선수_hash2.cpp
#include <algorithm> #include <iostream> #include <list> #include <string> #include <vector> using namespace std; string solution(vector<string> participant, vector<string> completion); int main() { vector<string> p, c; int n; string s; cin >> n; for (int i = 0; i < n; i++) { cin >> s; p.push_back(...
ALGO
0.999928
4.803889
{ "github_metadata": { "branch": "main", "commit_count": 183, "repo_created_at": "2018-12-18T12:14:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "611d172d91...
434d662d-e3b1-4c03-b7e7-c54b28409f42
andreidurdun/Faculty-Projects
Graph Theory Algorithms/DFS/Ciclu_afisare.cpp
#include <iostream> #include <vector> #include <stack> using namespace std; bool dfs(int node, int parent, vector<vector<int>>& adj, vector<int>& visited, vector<int>& parentNode, vector<int>& cycle) { visited[node] = 1; // Marcam nodul ca vizitat for (int neighbor : adj[node]) { if (!visited[neighbo...
ALGO
0.99992
5.950681
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2024-10-04T15:46: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": "bf1e97f1d74...
60b2266b-f018-49df-a215-e55e0327fe82
Amanhacker/Aman-Barnwal-Leetcode-Solutions
1261-find-elements-in-a-contaminated-binary-tree/1261-find-elements-in-a-contaminated-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.999763
6.05676
{ "github_metadata": { "branch": "master", "commit_count": 2521, "repo_created_at": "2021-12-24T16:13:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 441, "forks": 140, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6fb...
3da862c4-a31d-4870-b514-bff6229da92e
Kuril-Rybkin/avl
AVL.cpp
#ifndef __PROGTEST__ #include <cassert> #include <iostream> #include <memory> #include <limits> #include <optional> #include <algorithm> #include <bitset> #include <list> #include <array> #include <vector> #include <deque> #include <unordered_set> #include <unordered_map> #include <stack> #include <queue> #include <ra...
ALGO
0.995904
6.378835
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2024-04-01T18:36: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": "5dbbd49b86...
94633f7c-8fff-4f19-9222-a777057986a2
pwxcoo/accept
2018-12/2018-12-17/hihocoder1475.cpp
#include <cstdio> #include <cstring> #include <algorithm> #include <iostream> #include <string> #include <vector> #include <stack> #include <bitset> #include <cstdlib> #include <cmath> #include <set> #include <list> #include <deque> #include <map> #include <queue> #include <unordered_map> #include <unordered_set> usin...
ALGO
0.999954
3.998382
{ "github_metadata": { "branch": "master", "commit_count": 213, "repo_created_at": "2017-12-01T09:10:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "87af799c...
910f64e8-5ffd-418d-9aa8-cde5bf680491
TomEwbank/StereoVision
plane/Plane.cpp
// // Created by dallas on 14.02.17. // #include "Plane.h" #include <linear-system-solving/CramerTheorem.h> #include <vector> #include <iostream> #include <boost/date_time/posix_time/posix_time.hpp> using namespace std; using namespace boost; using namespace boost::posix_time; Plane::Plane() { a = 0; b = 0; ...
ALGO
0.983276
5.280557
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2017-02-16T21:13:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "281c447a8...
a946ea72-25ec-4b0d-83d1-d5184ec30d77
FatimaTasnim/Algorithms
ArticulationPoint.cpp
#include<bits/stdc++.h> using namespace std; int Time=0; int low[1001], discovery[1001],parent[1001]; bool track[10001],mark[1001]; vector < int > graph[1001]; vector < int > ap; void ArticulationPoint(int node){ mark[node] = true; int child=0,temp; discovery[node] = low[node] = Time++; for(int i=0;i<gr...
ALGO
0.999973
4.090712
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-09-03T16:07:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ed1d3f4215...
e7705787-ee45-4636-8b34-cb0f908a0be0
jiangzhongshi/bichon
src/prism/local_operations/local_mesh_edit.cpp
#include "local_mesh_edit.hpp" #include "triangle_tuple.h" #include <spdlog/spdlog.h> #include <algorithm> #define IGL_COLLAPSE_EDGE_NULL 0 // helper template <typename DerivedF> inline std::array<int, 13> init_e00_f00(const DerivedF& F, const DerivedF& FF, const DerivedF& FFi,...
ALGO
0.987031
4.889631
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2021-04-28T02:31:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 36, "forks": 6, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "186e91e7c9...
4ac4a4ca-62f9-4055-89bd-55e0be27c7da
ishandutta2007/codeforces-f
foreverlasting/normal/1654/D.cpp
//2022.3.20 by ljz //email <EMAIL> //if you find any bug in my code //please tell me #include<bits/stdc++.h> //#include<ext/pb_ds/tree_policy.hpp> //#include<ext/pb_ds/assoc_container.hpp> using namespace std; //using namespace __gnu_pbds; //using namespace __gnu_cxx; #define res int #define LL long long #define Inf 0x...
ALGO
0.999772
4.415373
{ "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": "d555d427f932...
ad66bd61-ea31-4069-ac44-a2743c196cae
Ahlamkohli/code.cpp
main.cpp
#include <iostream> using namespace std; struct maliste { int x; struct maliste* next; }; maliste* ajoute(maliste* tete, int val) { maliste* elem = new maliste; if (elem == NULL) { exit(0); } elem->x = val; elem->next = tete; tete = elem; return tete; } void affiche(ma...
ALGO
0.999153
3.760197
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-11-21T17:49: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": "634d633603ac...
9d4eca68-66eb-4132-a308-6341dc37b581
kalimero76/geocam
Subsystems/Solvers/Newtons_method/Pipelined_Newtons_Method.cpp
#include <iostream> #include <fstream> #include <sstream> #include <iomanip> #include <cmath> #include <ctime> #include <cstdio> #include <cerrno> #include "triangulation/triangulation.h" #include "Pipelined_Newtons_Method.h" #include "utilities.h" /********** Quantities we explicitly use **********/ #include "radius...
ALGO
0.999646
3.111396
{ "github_metadata": { "branch": "master", "commit_count": 637, "repo_created_at": "2015-03-14T01:07:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c73e92d6...
036861ed-6425-4ef2-b61a-525de4066003
pigypigypigy/Auxo
sourceCode/ComAuxo.cpp
#include "querysupportstruct.h" using namespace std; ComAuxo::ComAuxo(int width, int range, int p_num, int f_num){ mpq=new Blizzard_MPQ(); valueCou=1; insertNum=0; memoryAllocated=0; w = width; r = range; /* r x r mapped baskets */ p = p_num; /*candidate buckets*/ f = f_num; /*finger print length*/...
ALGO
0.98878
3.395845
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-03-21T06:31:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "678ccba0d50e...
e3f23219-bf04-4d76-9a1f-1a57c6beac5e
pdollar/toolbox
classify/private/binaryTreeTrain1.cpp
/******************************************************************************* * Piotr's Computer Vision Matlab Toolbox Version 3.50 * Copyright 2014 <NAME>. [pdollar-at-gmail.com] * Licensed under the Simplified BSD License [see external/bsd.txt] ****************************************************************...
ALGO
0.999819
6.320177
{ "github_metadata": { "branch": "master", "commit_count": 1691, "repo_created_at": "2014-10-24T21:32:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 858, "forks": 497, "issues": 32, "pull_requests": 7 }, "file_meta": { "content_id": "ab...
0de4e988-240e-4a35-aaae-f8d29508fff8
dchandran/evolvenetworks
simulation/sbml_sim.cpp
#include <stdio.h> #include <stdlib.h> #include <iostream> #include <vector> #include "sbml_sim.h" using namespace std; void sbml_rates_function(double t, double * y, double * rates, void * data) { int i; SBML_sim * u = (SBML_sim*)data; for (i=0; i < u->variableValues.size(); ++i) { u->variableValues[i] = y[i...
ALGO
0.999909
4.656291
{ "github_metadata": { "branch": "master", "commit_count": 248, "repo_created_at": "2016-03-09T20:54:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "983a08c6...
8f87ac3b-c877-40c9-a1db-61fa8302f908
vijaymanikantareddy/LeetCode_GFG_solved
Difficulty: Medium/Search in Rotated Sorted Array/search-in-rotated-sorted-array.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int search(vector<int>& arr, int key) { // complete the function here int l = 0, r = arr.size()-1; while(l <= r){ int mid = l + (r - l)/2; if(arr[mi...
ALGO
0.999772
5.701405
{ "github_metadata": { "branch": "main", "commit_count": 3564, "repo_created_at": "2022-08-18T16:14:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "24628754f...
aeffd0f4-7f18-43b8-9b95-a11199c4a3e6
Sabeelk/advanced-cpp
Proj_2_Kazi/Main.cpp
//Project 2 | <NAME> | CS-780 #include <iostream> #include <fstream> #include <sstream> #include <list> #include <iterator> #include <stdio.h> #include <vector> using namespace std; //open output file stream globally so all functions can acess it ofstream myfile; vector<list<pair<int, int>>> store; //function to st...
ALGO
0.998465
4.353663
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-01-14T00:02: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": "cd6346fdcf...
279ab8ce-14c2-45ad-8388-a94ea684fc70
G1Joshi/DataStructuresAndAlgorithmsMadeEasy
Trees/Problem-5.cpp
#include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node *left; struct Node *right; Node(int data = 0) { this->data = data; left = right = NULL; } }; void insert(Node *root, int data) { Node *node = new Node(data); if (!root) { root ...
ALGO
0.999641
3.268224
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2020-12-01T01:00:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1455c3b80d8...
0701d688-a898-4d7c-8f92-ec69a78315de
maksonchik20/Algorithms
Графы/Find_max_click.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; // кол-во вершин cin >> n; vector<int> neightbor(n, 0); int m; // кол-во ребер cin >> m; // вводит ребра графа for (int i = 0; i < m; ++i) { int u, v; // от [0...n-1]; cin >> u >> v; neightbor[u] += (...
ALGO
0.999851
3.994989
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-06-01T19:57: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": "b05e298275d...
86c14960-5b87-44f7-a59e-16edb31bb2ec
descrip/competitive-programming
ecoo/ECOOCS_2012/Round 2/Round 2/2.cpp
//#include <bits/stdc++.h> #include <iostream> using namespace std; #define NUM_TESTS 10 bool symbol(char c) { return !( ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') ); } int main() { ios_base::sync_with_stdio(0); cin.tie(0); //freopen("data/DATA21.txt", "r",...
ALGO
0.996445
3.33975
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-01-19T05:35:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b76430e71c...
c0e34331-3aaf-4cad-9911-db64a2d360ce
KhoiBui16/28Tech_Code_Online
Data structure algorithm/Source Code DSA Contest/Graph-DoThi/B34_HopMat.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int MOD = 1e9 + 7; vector<int>v[10001]; int visited[10001]; map<int ,int>mp; void BFS(int s) { queue<int>q; q.push(s); visited[s] = 1; mp[s]++; while(!q.empty()) { int u = q.front(); q.pop(); ...
ALGO
0.999977
3.609278
{ "github_metadata": { "branch": "main", "commit_count": 104, "repo_created_at": "2024-01-13T13:33:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c6bc5410a...
131fffa8-506a-41bd-a2d2-2a9a568d33fa
Grce47/cp_workspace
StdQuetionSolns/closest_point.cpp
/* Fri Nov 05 19:58:45 2021 File : A.cpp CodeForce : Gr47 CodeChef : gr47ace HackerRank : gracesharma47 */ #include <bits/stdc++.h> using namespace std; // #define GR47 #define fastio() \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.t...
ALGO
0.999908
4.546888
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2022-05-18T16:38:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4bccc18dd4c...
082ed684-0f56-413f-a5de-4ab5ea5ffa03
PratikKapoor/Leetcode-Challenge
20-04/recursive-impl.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: TreeNode* construct(vector<int>& preorder, int start, int end) { if(start>end) { ...
ALGO
0.999969
6.540397
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2020-04-04T12:03: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": "5cea75c2f...
77bc8c49-c318-4dbd-860e-f8385507c3f2
joaogui1/Competitive-Programming
URI/2005.cpp
#include <bits/stdc++.h> using namespace std; multiset <int> ratos; vector<int> v; int main(){ int n, m, aux, ans; multiset<int>::iterator it, aux_it; while(scanf("%d %d", &n, &m) != EOF){ ans = 0; v.clear(); ratos.clear(); for(int i = 0; i < n; ++i){ scanf("%d", &aux); ratos.inser...
ALGO
0.999768
3.191931
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2018-06-15T16:37:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "85542691a...
df3d4c21-6c6e-42e3-9541-b7ab291d4229
neurosim/MLP_NeuroSim_V3.0
Mapping.cpp
/******************************************************************************* * Copyright (c) 2015-2017 * School of Electrical, Computer and Energy Engineering, Arizona State University * PI: Prof. <NAME> * All rights reserved. * * This source code is part of NeuroSim - a device-circuit-algorithm framework to ben...
ALGO
0.998263
4.090176
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2019-02-25T15:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 208, "forks": 94, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "6fec7c...
17502aae-269b-487b-a03a-6e1c429fab04
sweethoneybee/baekjoon
스터디/12주차/2668번 숫자고르기.cpp
#include <iostream> #include <vector> using namespace std; int N; int num1[51] = {0}; int num2[51] = {0}; bool visited[51] = {0}; int main(void) { cin >> N; for(int i = 0; i < N; i++) { int temp; cin >> temp; num1[temp] = 1; num2[i+1] = temp; } for(int i = 1; i <= 5...
ALGO
0.999962
3.402494
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2020-03-16T07:26: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": "a0f3727f0...
2e5dccd0-59c9-499b-a4c8-a3239d7e8996
WenjieSun1996/LeetCode
Cpp/401~500/489. Robot Room Cleaner.cpp
/** * // This is the robot's control interface. * // You should not implement it, or speculate about its implementation * class Robot { * public: * // Returns true if the cell in front is open and robot moves into the cell. * // Returns false if the cell in front is blocked and robot stays in the curren...
ALGO
0.99641
6.068354
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2019-11-28T06:06:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d7cde4b03...
d111c4ab-87e4-4ff6-825c-0e449106e241
Freym4n/Problemas-resueltos
Codeforces/freymanlozanoq/1372/b/86575215.cpp
#include <bits/stdc++.h> using namespace std; void solve() { long long n; cin >> n; long long x = 1,y = n-1,t1,t2; long long gcd = n-1; for(long long i = 2; i*i <= n; i++) { if (n%i == 0) { t1 = i*((n/i)-1); t2 = i; long long temp = (t1*t2)/(__gcd(t1,...
ALGO
0.999962
4.465565
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-08-01T03:24: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": "40a1238bc2...
7bd45dfd-ad0a-42b0-9e71-c6775a13df24
ishandutta2007/codeforces-k
kiyoshi0205/normal/1333/D.cpp
#pragma GCC optimize("Ofast") #include<bits/stdc++.h> // #include<ext/pb_ds/assoc_container.hpp> // #include<ext/pb_ds/tree_policy.hpp> // #include<ext/pb_ds/tag_and_trait.hpp> // using namespace __gnu_pbds; using namespace std; using ll=long long; #define double long double using datas=pair<ll,ll>; using ddatas=pair<d...
ALGO
0.999897
3.589424
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06: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": "53a9ea680820...
ae92d643-2858-4534-8c6d-b4ab9d490498
xpewa/vkrm
EllipseRecognizeLibrary/src/detectEllipse.cpp
#include "detectEllipse.h" Ellipse DetectEllipse::__mnk(std::vector<Point> const& pts) { Ellipse ellipse; int numPoints = pts.size(); Eigen::MatrixXd matA(numPoints, 5); Eigen::VectorXd vecb(numPoints); for (int i = 0; i < numPoints; ++i) { matA(i, 0) = pts[i].x * pts[i].x; // x^2 ...
ALGO
0.999154
5.943768
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-04-16T09:32: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": "c69dc3baac3...
cd189203-4472-4982-87eb-8f49f311090f
paneerpyaz/InterviewBit-DP-Solutions
Knapsack/Tushar's Birthday Party.cpp
int Solution::solve(const vector<int> &a, const vector<int> &b, const vector<int> &c) { //so i have to find for every possible capacity //the min cost req to fill from the given dishes //them finally add the cost int n = b.size(); int maxcap = 0; for(auto &x : a){ maxcap = max(x,maxcap);...
ALGO
0.999949
4.720239
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2024-06-03T17:56: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": "3a24d445915...
76395485-2a93-4d38-93c6-65d467603b75
XiaoXiaoLui/CodeForces
33/B.cpp
#include <cstdio> #include <algorithm> #include <cstring> using namespace std; const int N = 1e5 + 5; const int MAX = 1e7; char s1[N]; char s2[N]; char ans[N]; int cost[130][130]; int w[130][130]; char to[130][130]; int main() { int len, i, n, v, j, k, sum; char c1, c2; bool ok = true; scanf("%s%s%d", s1, s2, &...
ALGO
0.999979
3.120596
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-10-13T16:21: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": "a233cf2da9...
590ee1a5-1488-4227-8a29-13681de42321
gmclachlan45/coding-challenge-solutions
daily-coding-problem/0023/cpp/gm-rev-00.cpp
#include <iostream> #include <vector> #include <queue> #include <utility> #include <unordered_set> struct pair_hash { inline std::size_t operator()(const std::pair<int,int> & v) const { return v.first*31+v.second; } }; int minSteps(std::vector<std::vector<bool>> maze, std::vector<int> start, std::vect...
ALGO
0.999908
4.821498
{ "github_metadata": { "branch": "main", "commit_count": 466, "repo_created_at": "2023-03-14T19:05:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6209165507...
f92e30a0-d348-4ede-ab4d-ac362f601b8e
cusplibrary/cusplibrary
cusp/system/cuda/detail/multiply/csr_scalar.h
/* * Copyright 2008-2014 NVIDIA 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.org/licenses/LICENSE-2.0 * * Unless required by applicable...
TOOL
0.926961
6.334722
{ "github_metadata": { "branch": "main", "commit_count": 1316, "repo_created_at": "2012-08-24T01:13:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 415, "forks": 134, "issues": 33, "pull_requests": 6 }, "file_meta": { "content_id": "6f03f...
7220efe4-143e-4850-8925-0c9bf538b7e5
ishandutta2007/codeforces-t
tiwairoao/normal/1155/F.cpp
#include <cstdio> #include <iostream> using namespace std; #define fi first #define se second #define mp make_pair #define rep(s, p, x) for(p = s, x = lg[lowbit(s)];p;p ^= lowbit(p), x = lg[lowbit(p)]) // rep(s, p, x) : get "1" from s typedef pair<int, int> pii; const int INF = int(1E9); int lg[1<<14], bts[1<<14]; in...
ALGO
0.9999
3.541813
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "378f5190e4f9...
3e9d0583-1e74-4a0c-8c93-f7552b17845c
paulwong16/ECE650-Methods_Tools_for_SE
a4/graph.cpp
// // Created by <NAME> on 2020/10/5. // #include "graph.h" #include <iostream> #include <limits> #include <algorithm> /*! * Default constructor. */ graph::graph() { graph_size = -1; } /*! * Constructor with vertex num (only used in debugging) * @param v vertex number */ graph::graph(int v) { graph_size...
ALGO
0.999879
4.981732
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-05-10T17:31:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a52325a73...
ea90429f-8554-4243-ae57-572d1774c8f4
x2c3z4/recipes
leetcode/wildcard-matching.cc
#include "thirdparty/gtest/gtest.h" class Solution { public: bool isRegural(char ch) { if(ch == '?' || ch == '*') { return false; } return true; } bool isMatch(const char *s, const char *p) { if(s == NULL || p == NULL) { return false; } if(strlen(p) == 1 && *p == '*'...
ALGO
0.995835
5.914373
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2014-07-02T07:55:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "feaeb3b80...
611ff42f-3d7a-4d8d-b235-979c15c1f28a
sangeet123/Mesh-Smoothing-Serial-cuda-version
New_angle_smoothing/main.cpp
#include"header.h" #include<time.h> #include"my_setup_3D.h" vertex_buffer* d_vb=NULL; index_buffer* d_ib=NULL; vertex_buffer* output=NULL; int count=0; int *test; int v_count;//stores total no of vertex for mesh int f_count;//stores faces count for mesh int size; void display_func() { glClear(GL_COLOR_BUFFER_BIT); ...
ALGO
0.989014
3.738983
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2014-06-25T02:26: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": "86b428720f...
b1fee0b6-a3d3-4e98-958b-6d045b6b8bfd
showmanlee/HowCanISolveThisQuestion
BOJ/11000/11051.cpp
// 이항 계수 2 // https://www.acmicpc.net/problem/11051 #include <iostream> #include <vector> #include <algorithm> using namespace std; int main(void) { cin.tie(NULL); ios_base::sync_with_stdio(false); int n, k; cin >> n >> k; vector<vector<long long>> dp(n + 1, vector<long long>(n + 1, 1)); for (int i = 2; i <= n...
ALGO
0.999987
4.962162
{ "github_metadata": { "branch": "master", "commit_count": 1741, "repo_created_at": "2020-09-16T11:55:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da544f6...
3207f3ea-da03-445b-81e4-02d85db49703
mgrandolfi/EDA-FIB
Exam problems/P31389.cc
#include <iostream> #include <vector> using namespace std; typedef vector<char> VC; typedef vector<VC> VCC; void imprime(const VCC& t) { for (int i = 0; i < t.size(); ++i) { for (int j = 0; j < t[0].size(); ++j) cout << t[i][j]; cout << endl; } cout << endl; } bool puedo_poner(const VCC& ...
ALGO
0.998901
3.751633
{ "github_metadata": { "branch": "main", "commit_count": 129, "repo_created_at": "2024-04-27T20:57: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": "a0b4449334...
9e4df087-2e67-4065-8181-fdbd57f822ff
shreyasXV/Algorithms
OptBST_DP.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int add(int freq[],int i,int j){ int s=0; for(int k1=i;k1<=j;k1++){ s=s+freq[k1]; } return s; } int opt(int keys [],int freq[],int n){ int cost[n][n]; for(int i=0;i<n;i++){ cost[i][i]=freq[i]; //WE ASSUME SORTED KEYS FUNCTION,IF NOT THE...
ALGO
0.999898
4.833622
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2018-03-27T19:36: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": "d60b371e4...
21540752-0960-4e98-948e-51b24a90fe0f
natsu1211/D2D-RVO2-Visualizer
examples/DensityMap.cpp
#include "DensityMap.h" #include "RVO.h" #include <cmath> #include <algorithm> // std::max #include "Vector2.h" extern RVO::RVOSimulator *sim; using namespace RVO; void DensityMap::VelFromDensity(std::function<float(float)> velFunc) { for (size_t i = 0; i < sim->getNumAgents(); ++i) { int tempY = static_cast...
ALGO
0.987051
4.150917
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2014-06-27T12:04:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f99d14b9...
351cd32e-69b3-4012-94c8-5836ad30d1d5
ZeroWen/ACM
poj/3781.cc
/* * ===================================================================================== * * Filename: 3781.cc * * Description: * For this problem, you will write a program that prints the Nth largest value in a fixed sized array of integers. To make things simple, N will be 3 and the array will ...
ALGO
0.998289
3.413539
{ "github_metadata": { "branch": "master", "commit_count": 547, "repo_created_at": "2015-06-19T08:28:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf21ab3d...
f6b7f89b-f7c9-44cf-af6f-aac472a7b9fe
MDNoorUddin/Uri-Onlinejudge-Solutions
1081.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; #define pf(n) cout << n << endl #define ps(n) cout << n<<" "; #define sf(n) cin >> n #define in(n) for (int i = 0; i < n; i++) //#define vi vector<ll> #define vp vector<pair<int, int>> #define graph vector<vector<int>> #def...
ALGO
0.999296
3.907539
{ "github_metadata": { "branch": "master", "commit_count": 432, "repo_created_at": "2017-08-20T18:58:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "63487b...
f18855f0-5784-474b-830b-51f493731a29
ASASauqui/Numerical-Calculus
C++/Lagrange polynomial/Lagrange_polynomial.cpp
#include <bits/stdc++.h> using namespace std; //Funciones //Esta función es la F(x), se modifica manualmente float F(float x){ // return sqrt(1+(1/x)); return log(x); } //Esta función evalúa el Polinomio de Lagrange void Lagrange(); //Esta función calcula la...
ALGO
0.999793
3.815054
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-06-20T00:20:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4c55d3d06aff...
40251f2f-1826-4275-a35d-63c15f94c765
EunsuSeo01/2-2_Algorithm
homework_3.cpp
/* 202035340 ¼­Àº¼ö. Algorithm Homework 03. */ #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <string.h> /* [subsequenceCount] description: Return the number of distinct sub-sequences in sequence string. input: X -> Sequence string. Z -> sub-sequence string. output: The number ...
ALGO
0.999448
4.075131
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2021-09-05T18:06: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": "39ca413b629...
26844684-6a7d-4195-9a8b-efbbb00460bd
dh-gntr/sosdsa
kthsmallest.cpp
class Solution{ public: // arr : given array // l : starting index of the array i.e 0 // r : ending index of the array i.e size-1 // k : find kth smallest element and return using this function void Merge(int* arr, int l, int r, int mid) { int i=0,j=0,k=0; int temp1[mid-...
ALGO
0.999996
5.765736
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2023-05-24T20:47: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": "16ad9c10ad0...
d14abcac-f5be-4175-9bb3-a401fe24e4dc
ImtiazAhmedAkash/Problem-Solving
codechef/TRANCHAIN.cpp
/* In the Name of ALLAH, the most gracious, the most merciful */ // TRANCHAIN - Transfusion Chain #include <bits/stdc++.h> using namespace std; #define ll long long #define nl '\n' #define INF (1 << 30) #define mod 998244353 #define N 300005 #define deb(x) cerr << #x << " = " << x << nl void solve() { int n; ...
ALGO
0.999925
5.068153
{ "github_metadata": { "branch": "main", "commit_count": 475, "repo_created_at": "2022-11-19T14:05: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": "92383f3b67...
081dd3a4-fb3d-4a69-a11d-49a4df6822f8
PauHPMCBR/problemesJutge
secondShortestPath.cc
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll n,m; vector<vector<pair<ll,ll>>>v; vector<vector<pair<ll,ll>>>v2; vector<ll>d; vector<ll>d2; void dijkstra1(ll x){ d[x]=0; priority_queue<pair<ll,ll>>pq; pq.push({0,x}); while (!pq.empty()){ ll node=pq.top().second; ll pes=-pq.top().first; ...
ALGO
0.999944
3.786819
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2020-09-04T13:36:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c22c15bee...