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
3fda5262-1f25-47b9-8aaa-51b03fd6f52b
shubham21699/My-LeetCode-Solutions
1647-minimum-deletions-to-make-character-frequencies-unique/1647-minimum-deletions-to-make-character-frequencies-unique.cpp
class Solution { public: int minDeletions(string s) { int n = s.length(); unordered_map<char, int> freq; // Counting frequency of all characters. for(int i=0 ; i<n ; i++) { freq[s[i]]++; } // Store pairwise character with its fre...
ALGO
0.999952
5.62209
{ "github_metadata": { "branch": "master", "commit_count": 3720, "repo_created_at": "2022-01-07T07:56:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "056486e...
11ee92e2-7b06-4456-af80-6b29ad8c1dac
coreyFuller/Recursive-Conversions
Fibonacci/fibonacci.cpp
#include <iostream> #include <vector> #include <fstream> using namespace std; /*Parameters: reference to a vector, two integers, an output file pointer) return: none This recursive function creates the series for a fibonacci sequence. */ void fibo(vector<int> &vec, int i, int series, ofstream &out); int main(int argc...
ALGO
0.999143
4.302129
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-11-13T06:36:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "547c34ce2e...
8305aba7-8a1e-4023-9acf-66946b7815a2
MrChrisFix/Advent-Of-Code-2017
Advent-Of-Code-2017/Days/Day21.cpp
#include "../general.h" #include <set> #include <map> set<string> permutate(string input) { set<string> res; if (input.size() == 5) //2x2 { string seg1 = input.substr(0, 2), seg2 = input.substr(3, 2); res.insert(seg1 + seg2); res.insert(seg2 + seg1); swap(seg1[0], seg2[1]); res.insert(seg1 + seg2); r...
ALGO
0.999884
5.177559
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2024-11-19T21:04: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": "2f39a1bcb0b...
a1ac3a1f-348b-4ab3-8135-6d94e67833da
wangzheng0822/algo
c-cpp/17_skiplist/skiplist.hpp
/** * Created by <NAME> (Liam0205) on 2018/10/29. */ #ifndef SKIPLIST_SKIPLIST_HPP_ #define SKIPLIST_SKIPLIST_HPP_ #include <functional> #include <type_traits> #include <vector> #include <chrono> #include <random> #include <initializer_list> #include <limits> #include <iostream> template <typename Value> class ski...
ALGO
0.995784
6.020259
{ "github_metadata": { "branch": "master", "commit_count": 1065, "repo_created_at": "2018-09-24T05:33:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23122, "forks": 7051, "issues": 104, "pull_requests": 54 }, "file_meta": { "content_id"...
79c32c7d-cfc1-4f01-bfd0-6f8971cf1444
sddyates/mars-cpp
src/problem.cpp
#include "globals.cpp" #include "grid.hpp" #include "problem.hpp" void Problem::Problem(){ this->initilise_parameters(); } void Problem::initilise_parameters() { parameter->name = "shock tube"; parameter->dimensions = "1D"; parameter->x1_min = 0.0; parameter->x2_min = 1.0; parameter->x1_res...
ALGO
0.990932
4.01122
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-02-12T11:05:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "8ead41b96f...
fd241fab-3570-49ba-9640-1b8755a1df5a
SeungHoons/algorithm_Hoons
algorithm_Hoons/algorithm_Hoons/BackJoon/Dynamic/11055.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> using namespace std; int main() { int input; int dy[1001] = { 0 }; int num[1001] = { 0 }; int result = 0; scanf("%d", &input); for (int i = 1; i <= input; i++) { scanf("%d", &num[i]); } int temp; for (int i = 1;...
ALGO
0.999979
3.294077
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2018-12-26T10:19: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": "51992b152...
f77767dc-cd04-4c5b-9a9d-2403fe834835
victorsenam/treinos
ojs/codejam/2017-d1/C/C.cpp
#include "weird_editor.h" #include <message.h> #include <bits/stdc++.h> //#define ONLINE_JUDGE #ifndef ONLINE_JUDGE #define debug(...) {fprintf(stdout, __VA_ARGS__);} #else #define debug(...) {} #endif using namespace std; typedef long long int ll; typedef pair<ll,ll> pii; #define pb push_back const int N = 1e7+2; c...
ALGO
0.999949
3.561358
{ "github_metadata": { "branch": "master", "commit_count": 844, "repo_created_at": "2015-08-23T22:27:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "91261eb9...
15cbbc56-081f-4f07-8a07-96158b2648ab
hellohello77/algorithms-homework
CycleBreaking/main.cpp
#include<stdio.h> #include<iostream> #include<fstream> using namespace std; int const Minkey=-200; struct EDGE { int start; int end_; int weight; }; struct vertex { int key; int pi; int v; }; bool DFS(int **dedge,int *color,int start,int vnum) { bool cycle=0; color[start]=2; for(int ...
ALGO
0.999705
3.998442
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2021-02-02T07:32: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": "76e1da24066...
371a47ae-5948-4198-9316-7125ed74b1ad
LizaPyalova/game
Source.cpp
#include <iostream> #include <vector> #include "Player.h" #include "Team.h" #include "Arsenal.h" using namespace std; void Fight(Team t1, Team t2) { int k = 0; int l = 0; int sh = 0; while (l != 5 && k != 5) { sh++; int power1 = 1; int power2 = 1; power1 = t1.the_team[k]->power * t1.the_team[k]->arsenal.po...
TOOL
0.985393
3.686799
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-04-06T13:07: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": "7a78a9e9cbdd...
b24cd3ea-2e1a-4aa4-af8d-72cf626ff230
KendrickAng/competitive-programming
kickstart/trashbins.cpp
#include <bits/stdc++.h> using namespace std; void solve(int t) { string s; int n; cin >> n >> s; vector<long> mid(n); vector<long> left(n); vector<long> right(n); for (int i = 0; i < s.size(); i++) mid[i] = s[i] - '0'; // create left arr int dist = 1e9; for (int i = 0; i < n;...
ALGO
0.999919
4.107543
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2022-01-11T01:32: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": "d8313d50f...
85d60b0e-e76e-4dc1-807a-ce54ca764812
jowonju/Baekjoon
16918_bomberman.cpp
#include<iostream> #include<queue> #include<vector> using namespace std; pair<int, int> movement[4] = { {1,0}, {-1,0}, {0,1}, {0,-1} }; int h; int w; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> h; cin >> w; int sec = 0; cin >> sec; vector<vector<char>> board(h, vect...
ALGO
0.999965
3.852568
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-03-13T08:11:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "83ebe74315c8...
db2fbd3e-1e10-4a97-8fde-45e030fde522
kamyu104/LeetCode-Solutions
C++/serialize-and-deserialize-bst.cpp
// Time: O(n) // Space: O(h) /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Codec { public: // Encodes a tree to a single string. string serialize(TreeNod...
ALGO
0.999536
6.203601
{ "github_metadata": { "branch": "master", "commit_count": 19395, "repo_created_at": "2018-10-11T17:38:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4939, "forks": 1616, "issues": 1, "pull_requests": 55 }, "file_meta": { "content_id": ...
21e4ff53-96b6-42a0-9072-7ad4925c0c2c
jmavis/CodingChallenges
C++ and C/Hard/wordSearch.cpp
#include <iostream> // cout #include <stdlib.h> // std namespace #include <string> // string #include <fstream> // file io using namespace std; struct CharNode{ public: bool locked; char character; CharNode(){} CharNode(char _character){ character = _character; locked = false; } }; class CharGrid{ private...
ALGO
0.998852
4.396658
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2013-07-20T04:24:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1904b15ca...
fc4d68bc-df43-4275-9a00-905431426a83
rehan13/Treasure-Map-Decoder
treasureMap.cpp
#include "treasureMap.h" #include "queue.h" using namespace std; treasureMap::treasureMap(const PNG & baseim, const PNG & mazeim, pair<int,int> s) { /* YOUR CODE HERE */ base = baseim; maze = mazeim; start = s; } void treasureMap::setGrey(PNG & im, pair<int,int> loc){ /* YOUR CODE HERE */ RGBAPixe...
ALGO
0.972441
4.728889
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-09-18T22:18:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5a6ba7f4cd47...
7324a84d-d5d4-4184-b1a5-9bf90c1b6e86
Prinom2000/Algorithm-implementations
Algorithm implementations/Sieve method.cpp
#include <iostream> void sieveOfEratosthenes(int n) { // Create a boolean array "prime[0..n]" and initialize all entries it as true. // A value in prime[i] will finally be false if i is not a prime, else true. bool prime[n+1]; for(int i = 0; i <= n; i++) prime[i] = true; for (int p = 2; p ...
ALGO
0.99996
5.323418
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-12-06T18:29:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26f34ed911c...
58fdadf4-e0ff-40f9-b128-999f90a1e263
AseemBaranwal/Neetcode-250-DSA
Set/1930.unique-length-3-palindromic-subsequences.cpp
/* * @lc app=leetcode id=1930 lang=cpp * * [1930] Unique Length-3 Palindromic Subsequences */ #include<bits/stdc++.h> using namespace std; // @lc code=start class Solution { public: int countPalindromicSubsequence(string s) { // The idea is to consider every element as the middle from the beginning an...
ALGO
0.999901
6.869438
{ "github_metadata": { "branch": "main", "commit_count": 81, "repo_created_at": "2023-06-22T04:18:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "566fab48983...
f857d924-0c20-43f3-aea9-4fb4e97817c2
Jatin-Saini664/Foundation-Course
lec0023/generictree.cpp
#include <bits/stdc++.h> using namespace std; // class GenericTree // { class Node { public: int data; vector<Node *> child; Node(int data) { this->data = data; } }; // public: Node *root; void construct(vector<int> &data) { vector<Node *> cplist; // int size = sizeof(data) / size...
ALGO
0.999793
4.248381
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-05-24T05:27: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": "3b24e6c0f4...
4048e35d-b2d2-4a83-8b2a-8a1869b4843f
thegamer1907/Codechef
MGCH3D.cpp
#include<bits/stdc++.h> #define ll long long int //#define mod 25*(1<<22) + 1 #define pb push_back #define mp make_pair #define ff first #define ss second #define all(v) v.begin(),v.end() #define rep(i, n) for(long long int i = 0; i < (n); ++i) using namespace std; ll pp = 25*(1<<22) + 1; ll p1 = pp; ll m...
ALGO
0.999672
4.377641
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-04-12T06:31: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": "2bce6191b9...
0b334683-fdbb-41c4-a867-83344580b027
shong1/BlobDetectionForFiber
itkBlurred3DLineSegmentation.hxx
#ifndef __itkBlurred3DLineSegmentation_hxx #define __itkBlurred3DLineSegmentation_hxx #include "itkBlurred3DLineSegmentation.h" namespace itk { template< class TIndexArray > template< class TIterator > typename Blurred3DLineSegmentation< TIndexArray > ::MaxDiscreteSegmentContainerType Blurred3DLineSegmentation< TInd...
ALGO
0.983755
4.92616
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2014-10-12T23:45: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": "e527da5c4...
baad7587-54e4-4122-886f-2fea534c6d8a
lucascpm/russianmountain
TestesIniciais/Filter2.cpp
class Filter { int[] level; int[] victim; public Filter(int n) { level = new int[n]; victim = new int[n]; // use 1..n-1 for (int i = 0; i < n; i++) { level[i] = 0; } } public void lock() { int me = ThreadID.get(); for (int i = 1; i < n; i++) { //attempt level 1 ...
ALGO
0.995911
3.324887
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-11-07T00:18: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": "44a59c981b...
f9e128b0-58c4-4ca0-b340-e3d3ea9e6dec
npatel37/dmrgornl
src/Engine/ApplyOperatorLocal.h
/* Copyright (c) 2009, UT-Battelle, LLC All rights reserved [DMRG++, Version 2.0.0] [by G.A., Oak Ridge National Laboratory] UT Battelle Open Source Software License 11242008 OPEN SOURCE LICENSE Subject to the conditions of this License, each contributor to this software hereby grants, free of charge, to any person...
ALGO
0.993621
6.309548
{ "github_metadata": { "branch": "master", "commit_count": 2367, "repo_created_at": "2018-01-24T18:56:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d051fe4...
758396c7-cbd2-4e61-9309-6bc499145a6f
live-clones/gmsh
contrib/hxt/Combine/src/candidate_cell.cpp
#include "candidate_cell.h" #include <cassert> #include <fstream> #include <map> #include <set> #include <sstream> #include <vector> #include "basic_types.h" #include "cell_types.h" #include "hxt_combine_cell.h" /** * \author <NAME> */ namespace HXTCombine { static void computeOrderedVertices(const HXTCombineCell&...
ALGO
0.996082
6.571627
{ "github_metadata": { "branch": "master", "commit_count": 21787, "repo_created_at": "2017-03-24T07:32:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 107, "forks": 44, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ec9...
56870766-9b6f-4b16-b417-0f9a4dc26830
ayub2/Term-Project
Term Project/fcfs.cpp
/* Simple C++ program for implementation of FCFS scheduling */ #include<iostream> using namespace std; struct Process { int ccode; int duration; int priority; int arrival_time; }; Process proc[] = {{2201,3,2,1}, {3401,2,3,2}, {1103,1,1,3}}; // function to find the waiting time for all processes void findWaiti...
ALGO
0.999716
4.948861
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-08-17T03:02: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": "5526ea7c47...
e81fc17b-2d3f-4499-a667-dda2b127b56f
dyna-bytes/ProblemSolving
백준/Silver/9461. 파도반 수열/파도반 수열.cc
#include <bits/stdc++.h> using namespace std; #define debug(x) std::cout << "[Debug] " << #x << " is " << x << '\n' #define debugVec(v) do { \ std::cout << "[Debug] ["; \ for(int i = 0; i < ((v.size())-1); i++) std::cout << v[i] << "|"; \ std::cout << v[((v.size())-1)] << "]\n"; \ } while(0) #define debugV...
ALGO
0.999955
4.710011
{ "github_metadata": { "branch": "main", "commit_count": 516, "repo_created_at": "2022-05-16T17:29:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a8bc0e556...
fdbd6ead-f5c2-409e-89c9-47fb8499def9
AliRaza-10/Labs-Projects
DSA/Daily codes practice/LinkedList/LinkedList/LinkedList.cpp
#include <iostream> #include "LinkedList.h" using namespace std; LinkedList::LinkedList() { head = nullptr; } LinkedList::~LinkedList() { //cout << "Destructor Call." << this << endl; //int i = 1; while (head) { //cout << "Destructor Call for " << i << " time : " << " \n"; Node* temp = head->next; delete hea...
TOOL
0.998766
3.384216
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2023-06-02T13:26:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "830ee3444...
83e3ec11-9090-473b-a619-95f2e242c29f
YXblank/test_line_fitting
ori/circle.h
#pragma once #include <list> #include <cmath> #include <cassert> #include "point.h" #include "segment.h" namespace obstacle_detector { class Circle { public: Circle(const Point& p = Point(), const double r = 0.0) : center_(p), radius_(r) { //assert(radius_ >= 0.0); } /* * This creates a circle by tak...
ALGO
0.997185
6.017979
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-09-03T07:38: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": "fba85a3479f9...
9d004cfa-607c-4889-b8cc-2042e0031743
zjy-dev/algorithm
LeetCode/76-最小覆盖子串.cpp
#include "LeetCode.h" class Solution { public: string minWindow(string s, string t) { // 维护t中的某字符还差几个才够覆盖t unordered_map<char, int> hash; // 维护剩余t中多少个字符未覆盖 int cnt = t.size(); int n = s.size(); // 初始化哈希表 for (const auto &c : t) { hash[c]++; } // 快慢双指针, 每次强制以fast结尾去覆盖t ...
ALGO
0.999977
6.64826
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2021-11-29T14:17:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f17abd169...
2ca51c4d-d1a3-4f88-b7d9-bd6f082a4e6b
snap-stanford/snap
snap-exp/circles/circles.h
#pragma once #include "stdafx.h" class TGraphAttributes { public: /** * @param G the graph on which to run community detection * @param nodeFeaturePath the path of the file containing node attributes */ TGraphAttributes(PUNGraph G, const char* nodeFeaturePath); ~TGraphAttributes() { } PUNGraph G; ...
ALGO
0.986645
6.524151
{ "github_metadata": { "branch": "master", "commit_count": 1991, "repo_created_at": "2012-05-10T18:43:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2233, "forks": 803, "issues": 83, "pull_requests": 11 }, "file_meta": { "content_id": "1...
ecc5f789-e68d-40a1-b421-2f3a248a4a9c
ishandutta2007/codeforces-nonalphabetic
__zmf__/normal/1697/E.cpp
/* ever17 */ /* */ //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native") #include <bits/stdc++.h> using namespace std; #define int long long inline int read() { int sum = 0, nega = 1; char ch = getchar(); while (ch > '9'||ch < '0') ...
ALGO
0.999865
4.672672
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:49:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7982a1a1ed19...
ed73308e-66df-4f68-a6a1-7da42eba5075
cnyali-czy/code
others/noi.ac/2019-11-09/B.cpp
/* * File Name: B.cpp * Author : CraZYali * Year : 2019.11.09 21:01 * Email : <EMAIL> */ #define DREP(i, s, e) for (register int i(s), end_##i(e); i >= end_##i; i--) #define REP(i, s, e) for (register int i(s), end_##i(e); i <= end_##i; i++) #define DEBUG fprintf(stderr, "Passing [%s] in Line %d\n", __FUNCTION_...
ALGO
0.999995
3.235873
{ "github_metadata": { "branch": "master", "commit_count": 1593, "repo_created_at": "2018-02-24T06:16: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": "62d37c4...
d9833738-f113-40c1-af8c-9325425a17c1
mariusmni/qpms9
qpms9/src/utils.h
/* * utils.h * * Created on: Jun 9, 2012 * Author: marius */ #ifndef UTILS_H_ #define UTILS_H_ typedef unsigned char uint8; typedef unsigned short uint16; typedef unsigned int uint32; typedef unsigned long uint64; typedef unsigned int uint; typedef char int8; typedef short int16; typedef int int32; typede...
TOOL
0.980314
5.500798
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2015-03-13T23:22:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ae41d5ae...
80b0a9d8-75fb-4762-8f27-1ec4c8d585fd
shridharGits/LeetCode
1669-merge-in-between-linked-lists/1669-merge-in-between-linked-lists.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* mergeInBetw...
ALGO
0.999927
4.86627
{ "github_metadata": { "branch": "main", "commit_count": 128, "repo_created_at": "2024-03-06T17: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": "74159e11ee...
d8cc056b-1d74-43d5-96c9-edce61fa8227
Hardyy00/Codeforces
1400-rating/fighting_tournament.cpp
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define PB push_back #define MP make_pair #define REP(i, a, b) for(int i=a;i<=b;i++) #define all(a) (a).begin(), (a).end() #define fauto(i,v) for(auto i : (v)) #define REPD(i,a,b) for(int i=a;i>=b;i--) typedef long long ll; typedef long ...
ALGO
0.999951
3.76183
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2023-11-25T07:31: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": "60927b29054...
1b17770c-651b-4da3-856f-4562feeddec3
JpDeathBlade/HighSchool_RPG
HighSchool_RPG/OriginalSource/UtilityLib.h
/* Ben's Library Created: 2/7/06 Modified 2/7/06 Functions included: DrawBox() DrawBar() PromptInt() PromptDouble() YesNo() Uppercase() Lowercase() FirstCap() ReverseString() IntToString() StringToInt() DisplayCenter() */ #include <iostream> using namespace std; void DrawBox( int, char); //DrawBar() pr...
TOOL
0.959777
4.723166
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-01-14T05:40: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": "00e73fce7d...
443d0176-5149-417c-ad28-6f88810ab2c1
sy460129/PS
백준/Gold/1600. 말이 되고픈 원숭이/말이 되고픈 원숭이.cc
#include<iostream> #include<queue> #include<tuple> using namespace std; int dx[] = { 1,-1,0,0,2,2,-2,-2,1,1,-1,-1 }; int dy[] = { 0,0,1,-1,1,-1,1,-1,2,-2,2,-2 }; int w, h, n; int arr[201][201]; int dp[201][201]; bool visit[201][201][31]; bool check; queue<tuple<int, int, int>>q; void bfs() { while (!q.empty()) { aut...
ALGO
0.999945
3.942915
{ "github_metadata": { "branch": "main", "commit_count": 1013, "repo_created_at": "2023-03-27T05:13: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": "e70f8a511...
0a862afe-fbe6-4d35-a7a6-c1c281cec856
NullAwe/competitive-programming
codeforces/combined/Deltix Round, Autumn 2021 (Div. 1 + Div. 2)/WilliamTheVigilant.cpp
#include <bits/stdc++.h> using namespace std; string str; bool isABC(int lastInd) { return lastInd > 1 && lastInd < str.size() && str[lastInd - 2] == 'a' && str[lastInd - 1] == 'b' && str[lastInd] == 'c'; } void solve() { int n, q; cin >> n >> q; cin >> str; int abc = 0; for (int i = 2; i < n; ++i) if ...
ALGO
0.999824
3.886254
{ "github_metadata": { "branch": "master", "commit_count": 893, "repo_created_at": "2021-08-19T17:09:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8c2d2802...
33a45b90-c960-4eea-be77-8bcbb2cb8801
zukun/rcc
vxl/vxl-1.13.0/contrib/gel/mrc/vpgl/algo/vpgl_invmap_cost_function.cxx
#include "vpgl_invmap_cost_function.h" //: // \file #include <vcl_cmath.h> #include <vcl_iostream.h> #include <vcl_deprecated.h> vpgl_invmap_cost_function:: vpgl_invmap_cost_function(vnl_vector_fixed<double, 2> const& image_point, vnl_vector_fixed<double, 4> const& plane, ...
ALGO
0.986399
6.533239
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2013-02-21T15:10:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 16, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "71db915...
afee6849-968a-45a2-af89-93cbd68c55eb
Kei18/mapf-IR
mapf/src/plan.cpp
#include "../include/plan.hpp" Config Plan::get(const int t) const { const int configs_size = configs.size(); if (!(0 <= t && t < configs_size)) halt("invalid timestep"); return configs[t]; } Node* Plan::get(const int t, const int i) const { if (empty()) halt("invalid operation"); if (!(0 <= t && t < (int)c...
ALGO
0.974034
5.58971
{ "github_metadata": { "branch": "public", "commit_count": 219, "repo_created_at": "2020-06-19T06:17:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 135, "forks": 21, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90b9c...
2460d534-887c-48ae-bb45-82ac218da5f0
HypeRRu/labs-PA-23
0303_Sologub_Nickolai/lb2/src/matrix.cpp
#include "matrix.h" Matrix::Matrix(){}; Matrix::Matrix(int N, int M) { std::random_device seed; std::mt19937 generator(seed()); std::uniform_int_distribution<> distrib(0, 9); matrix = std::vector<std::vector<int>> (N); // std::cout << "|||||Начало создания|||||" <<std::endl; for (int i = 0; i ...
TOOL
0.975052
3.60214
{ "github_metadata": { "branch": "main", "commit_count": 236, "repo_created_at": "2023-09-17T12:55:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 20, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11e5d609b...
36c0dea8-6875-41dd-94d5-cf9868b44ec2
ThisIsGagan19/daily_code_challenge
leetcode/2024_4_april/c++/03_word_search.cpp
// CODE class Solution { public: bool dfs(vector<vector<char>>& board, string& word, int index, int i, int j) { if(index >= word.size()) { return true; } if(i >= board.size() || i < 0 || j < 0 || j >= board[0].size() || board[i][j] != word[index]) { retu...
ALGO
0.999921
6.337924
{ "github_metadata": { "branch": "master", "commit_count": 319, "repo_created_at": "2024-01-16T03:03: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": "11c369ea...
c43acfa4-002f-4126-adcc-736a6e4a4948
dbxxx-ac/problem-solutions
luogu/luogu-p3246.cpp
#include<iostream> #include<algorithm> #include<cstdio> #include<cmath> #include<cstring> #define maxn 100010 using namespace std; int n,m; int val[maxn],f[maxn][30],front[maxn],nxt[maxn]; long long ans[maxn],maxl[maxn],maxr[maxn]; struct node{ int l,r,id; }que[maxn]; struct Stack { int value[maxn],numtop; Sta...
ALGO
0.999956
3.511891
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2021-02-15T05:02:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "9e62347cb...
f32b7133-3429-4df7-8a73-0b0abb261cc4
veselina-velkova/demo-repo
C++ Fundamentals/garbage_sorting.cpp
/** * @file garbage_sorting.cpp * @author <NAME> (<EMAIL>) * @brief * @version 0.1 * @date 2023-06-02 * * @copyright Copyright (c) 2023 * ****************************************************/ /* *We are going to use string for the types of garbage and for the position in the collection. *We are going to us...
ALGO
0.998019
5.909128
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2023-04-12T11:56: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": "48c8c422f...
01c2eb52-8d87-4c74-bd4f-7a2405872e20
jyurkanin/auvsl_rrt
src/OctoTerrainMap.cpp
#include "OctoTerrainMap.h" #include <pcl/filters/extract_indices.h> #include <pcl/point_types.h> #include <pcl/io/pcd_io.h> #include <pcl/search/organized.h> #include <pcl/search/kdtree.h> #include <pcl/search/search.h> #include <pcl/features/normal_3d.h> #include <pcl/visualization/cloud_viewer.h> #include <pcl/filt...
ALGO
0.982346
5.101618
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-04-24T20:30: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": "fc3824cce5e7...
58a67725-f81e-45d1-8ade-093d9e24ff90
The-Ashwani-Kumar/CSES-Sheet-Solutions
Introductory Problems/17. Chessboard and Queens.cpp
#include<bits/stdc++.h> #define ll long long #define f(i,a,b) for(ll i=a;i<=b;i++) #define rf(i,a,b) for(ll i=a;i>=b;i--) #define fg(i,a,b,gap) for(ll i=a;i<=b;i+=gap) #define v(dataType) vector<dataType> #define vv(dataType) vector<vector<dataType>> #define vp(dataType1,dataType2) vector<pair<dataType1,dataType2>> #de...
ALGO
0.999744
4.416248
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-03-28T12:07:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de3b04b6d648...
2bb11762-cc21-4503-996b-e75a6127a02d
shivam-singh20/dsa-in-cpp
Important_Problems/Repeated_String_Match.cpp
#include <bits/stdc++.h> using namespace std; // Longest prefix suffix void lps_find(vector<int> &lps, string s) { int prefix = 0, suffix = 1; while (suffix < s.size()) { if (s[prefix] == s[suffix]) { lps[suffix] = prefix + 1; prefix++, suffix++; } el...
ALGO
0.999938
4.973232
{ "github_metadata": { "branch": "main", "commit_count": 200, "repo_created_at": "2024-12-13T18:07:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "881b5b9104...
74b9bb92-ce46-4740-b1c9-fcaf6f368868
ishandutta2007/codeforces-t
timmyfeng/normal/1626/E.cpp
#include <bits/stdc++.h> using namespace std; const int N = 300000; bool ans[N], black[N], special[N]; vector<int> adj[N]; int sub[N], goals; bool reachable(int u) { return special[u] && sub[u] >= 2; } void dfs_pull(int u, int p = -1) { sub[u] = black[u]; for (auto c : adj[u]) { if (c != p) { ...
ALGO
0.999775
4.801191
{ "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": "34e048acca70...
21d29843-3f7d-4ccf-b96c-c494e34a6ced
stonne-simulator/stonne
pytorch-frontend/caffe2/operators/softmax_utils.cc
#include "caffe2/operators/softmax_utils.h" #include "caffe2/core/context.h" #include "caffe2/utils/eigen_utils.h" #include "caffe2/utils/math.h" namespace caffe2 { namespace softmax_utils { #define CAFFE2_SPECIALIZED_SOFTMAX_CPU(T) \ template <> ...
TOOL
0.965245
7.454873
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2020-12-01T17:24:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 134, "forks": 30, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b61ecb...
9368a8bb-8dab-473f-a290-372f61d3c3d7
kshivamiitk/Codeforces
codeforces_div2/1600RatingQuestions/C_Array_Game.cpp
#include<iostream> #include<vector> #include<algorithm> #include<cmath> #include<climits> #include<map> #include<set> #include<queue> #include<stack> #include<unordered_map> #include<unordered_set> #include<numeric> using namespace std; typedef long long int ll; #define mod 1000000007 #define int long long #define end...
ALGO
0.999925
4.460138
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-07-05T18:11: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": "2530dc717203...
ca8ec680-3792-4be1-8b2b-2cf892e1ab1f
TrynkinMike/CPP_Learning
лаб 5/lab5-2.cpp
#include <iostream> #include <strings.h> #define rand_max 0x7fff #include <time.h> #include <math.h> #define NONTYPE 30 using namespace std; struct Vec2 { float x = 0, y = 0; // перегрузка для = Vec2& operator=(float value) { x = y = value; return *this; } // перегрузка для == bool operator == (Vec...
ALGO
0.993755
3.049439
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-07-05T15:47: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": "0f5b3469c3cc...
dca9adbe-1d7b-4343-ad6f-1bb658cb7185
Kibiandkimi/stu
Problem/Luogu/P7771.cpp
// // Created by kibi on 2021/10/21. // #include <bits/stdc++.h> using namespace std; int n, m, S = 1, cnt[2]; bool flag = 1; int del[100005]; int du[100005][2]; stack<int> st; vector<int> a[100005]; void f(int x){ int sa = a[x].size(); for(int i = del[x]; i < sa; i=del[x]){ del[x] = i+1; f(a[x]...
ALGO
0.999995
4.625073
{ "github_metadata": { "branch": "master", "commit_count": 250, "repo_created_at": "2022-08-17T09:51: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": "39d013c2...
08d12668-6451-44bd-9477-dbf2ff194c6d
engrsakib/code-forces-daily-stack
2025/january/30/A_Beautiful_Year.cpp
#include <bits/stdc++.h> #define br "\n" #define ll long long #define yes cout << "YES\n" #define no cout << "NO\n" using namespace std; class Solution { public: void solve() { ll n; cin >> n; while (true) { n++; string s = to_string(n); set<...
ALGO
0.999698
4.499953
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2025-01-27T20:24:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e62820b7b5a...
d4415344-35d5-478e-a807-6b7f6c028ecf
marqueswill/beecrowd
iniciante/BEE 1094.cpp
#include <iostream> using namespace std; int main() { int range, num; char tipo; int total = 0, c = 0, r = 0, s = 0; cin >> range; for (int i = 0; i < range; i++) { cin >> num >> tipo; total += num; if (tipo == 'C') { c += num; } else if (tipo...
ALGO
0.995275
3.877604
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-04-27T11: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": "50b33ffaa331...
24293470-7d44-445e-b1e8-64331dbff697
latys/leetcodeSolution
22.generate-parentheses.cpp
/* * @lc app=leetcode id=22 lang=cpp * * [22] Generate Parentheses * * https://leetcode.com/problems/generate-parentheses/description/ * * algorithms * Medium (53.10%) * Total Accepted: 301K * Total Submissions: 566.8K * Testcase Example: '3' * * * Given n pairs of parentheses, write a function to ge...
ALGO
0.999325
5.961873
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-06-24T08:42: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": "9540221351...
6c223974-522b-4efd-b074-4a4838e292e0
rohitwithcode/CPP_DSA_COURSE
Chapter_5_Array/Painters_Partition_Problem_in_Array.cpp
#include<iostream> using namespace std; bool isPossibleSolution(int arr[],int size,int no_Of_Partition,int mid) { int partition_Number=1; int partition_sum=0; for (int i = 0; i < size; i++) { if (partition_sum + arr[i] <= mid) { partition_sum = partition_sum+arr[i]; ...
ALGO
0.999987
4.815732
{ "github_metadata": { "branch": "main", "commit_count": 148, "repo_created_at": "2023-09-26T10:16: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": "70497f0e26...
7cee8dde-392f-4a86-b2f3-45cc940221c9
1694479496/AMD-Xilinx_SummerSchool-27_1
solution3/src/dft3.cpp
#include"dft.h" #include"ap_int.h" void dft(DTYPE real_sample[SIZE], DTYPE imag_sample[SIZE],DTYPE real_op[SIZE], DTYPE imag_op[SIZE]) { #pragma HLS INTERFACE m_axi port=imag_op bundle=out depth=1024 #pragma HLS INTERFACE m_axi port=real_op bundle=out depth=1024 #pragma HLS INTERFACE m_axi port=imag_sample bundle=in de...
ALGO
0.999367
5.11818
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-08-09T08:18: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": "770bce09ed3...
a276c1c0-50f8-4f77-825e-b590e54de053
tschulen/C-Plus-Projects
MagicSquares/MagicSquares/MagicSquares.cpp
/* MagicSquares.cpp Comsc 140 -> C++ <NAME> May 8, 2013 The program computes a magic square matrix and then displays it to the console default matrix sizes are hardcoded as 5 and 15 */ #include "stdafx.h" using namespace std; #include <cmath> #include <vector> #include <iostream> #include <stdi...
ALGO
0.999163
5.367907
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-08-08T22:27: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": "092b6df14c...
96a9e9b9-033f-4c68-a6ce-e71f72d772a0
Haziq739/PDC-Final
src/main_hybrid.cpp
#include "../include/hybrid_engine.hpp" #include "../include/mpi_distributor.hpp" #include <mpi.h> #include <iostream> #include <chrono> #include <limits> #include <vector> #include <map> int main(int argc, char** argv) { // Initialize MPI with thread support int provided; MPI_Init_thread(&argc, &argv, MPI...
ALGO
0.999941
6.51656
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-05-06T16:50: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": "70cef215b5b4...
ac65f765-8a83-4c8d-a275-0e6b6a7f70e1
braidwords/basicC-ExerciseQuestions
loopTypes/rangeBasedForLoop.cpp
/*10. Write an example demonstrating range-based for loop in C++*/ /* Range based for loops have specific usage which is to iterate through collections. * * */ #include<iostream> #include <vector> class rangeBasedForLoop { int sumOfNumbers = 0; public: void addNumbers(std::vector<int> &numbers) { ...
ALGO
0.971936
5.351613
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2020-11-15T21:18: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": "faed82d5c...
fdef1965-00fd-407c-8d0e-92dd9c488730
nic-cs150-master/lecture
week09/code4_2.cpp
#include <iostream> using namespace std; void displayIntArray(const int arr[], int sizeOfArray); // sumArray int sumArrayInt(const int arr[], int sizeOfArray); // getHighest // two ways of what value should be returned int getHighest(const int arr[], int sizeOfArray); // getLowest int main() { const int NUM_WORKE...
ALGO
0.986314
4.7536
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2020-08-26T23:19:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60d3d07631...
0615165c-5119-4f42-8043-4c0722fbdd0f
gzshawnliang/competitive-programming
myCpps/divingForGold_UVA990.cpp
#include <bits/stdc++.h> using namespace std; ifstream fin("divingForGold_UVA990.in"); ofstream fout("divingForGold_UVA990.out"); const int inf = INT_MAX / 2; struct treasure { int d; int v; }; treasure _treasure(int d, int v) { treasure temp{d, v}; return temp; } struct pos { int i; int j; }; ...
ALGO
0.999981
3.2901
{ "github_metadata": { "branch": "master", "commit_count": 1963, "repo_created_at": "2019-01-17T06:33: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": "98ba6bf...
2b417365-1dcc-4103-abe0-d8578a82ca6d
Tanishq0505/String
28_Group_Anagrams.cpp
// 28 49. Group Anagrams (gfg & Leetcode ) // Given an array of strings strs, group the anagrams together. You can return the answer in any order. // An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. // Example 1: // ...
ALGO
0.999948
6.608902
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2024-01-18T19:10:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d005d63a580...
2c2c628f-2a35-4471-a32f-e7cf3fa4ebdf
Zlin0509/Zlin_ACM
_CF/CONTEST/2000-2499/2074/C.cpp
// // Created by 27682 on 2025/3/11. // #include "bits/stdc++.h" #define endl '\n' using namespace std; typedef double db; typedef long double ldb; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<long long> vll; typedef pair<int, int> pii; typedef pair<long long, long long...
ALGO
0.999871
4.418758
{ "github_metadata": { "branch": "main", "commit_count": 170, "repo_created_at": "2024-08-16T08:10:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f071ac7ee0...
1efb1138-5d9e-4aa5-b8a0-219c260820fe
JonathanBeals/cs1-jrbeals
Bitwise practicum/Bitwise practicum/Bitwise practicum.cpp
#include <iostream> int main() { //Exercise 1 /* int a = 12; int b = 10; int result = a & b; std::cout << result; */ //Exercise 2 /* int a = 14; int b = 9; int result = a | b; std::cout << result; */ //Exercise 3 /* int a = 15; int b = 6; int result = a ^ b; std::cout << result; */ //Exerc...
ALGO
0.996171
3.761638
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-09-29T19:06: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": "aacacebe1c4...
12733e0d-bd7b-49d8-8b9c-41dfc56bfc41
sahilkhan03/CF-Solutions
codeforces/1000/C.cpp
// Problem : C. Covered Points Count // Contest : Codeforces - Educational Codeforces Round 46 (Rated for Div. 2) // URL : https://codeforces.com/contest/1000/problem/C // Memory Limit : 256 MB // Time Limit : 3000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) /* “Whether you think you can or you ...
ALGO
0.999962
3.913018
{ "github_metadata": { "branch": "master", "commit_count": 2194, "repo_created_at": "2021-01-27T11:51: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": "e9465c4...
50616572-1b57-47d5-a447-a40850f39db4
SalahAbotaleb/Competitive-Programming
CodeForces/1474B/37298199_AC_46ms_4976kB.cpp
#include <iostream> #include <vector> #include <algorithm> #include <map> #include <unordered_map> #include <queue> #include <string> #include <cmath> #include <set> #define ll long long using namespace std; const int N = 1e6+5; int arr[N]; void primes() { arr[0] = arr[1] = 1; for (int i = 2; i * i < N; i++) { if ...
ALGO
0.999882
4.793025
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2022-07-05T22:28: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": "ed81a23c822...
9f39a4d3-d0c8-4597-a810-7935b6cecab5
utec-cs-aed-2021-1/proyecto-de-curso-team-duros-de-jalar
Graph/Algorithms/dfs.h
#include <stack> #include <unordered_set> #include "../DirectedGraph.h" #include "../UndirectedGraph.h" using namespace std; template<typename TV, typename TE> class dfs{ private: DirectedGraph<TV,TE>* G; public: dfs() = default; dfs(Graph<TV,TE>* &grafo, string vertexid) { std::unordered_set<stri...
ALGO
0.999298
5.088445
{ "github_metadata": { "branch": "main", "commit_count": 173, "repo_created_at": "2021-06-15T17:44:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "fb2d584ff43...
0ae5a7d6-5f6d-49de-87c9-879fd78de37f
athusv/ILS-PRVP
Route.cpp
#include "Route.h" #include "Utils.h" Route::Route(const Instance &instance, int id, int vehicleType) { // cout << "Iniciando a construção do objeto Caminho..." << endl; this->id = id; this->protectionTime = instance.protectionTime; this->stopTime = instance.stopTime; this->vehicleType = vehicleTyp...
ALGO
0.941679
4.887708
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-09-23T23:51: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": "2a81cb8deb5...
bff84553-1fb0-4552-b6e3-abd82a563194
SajibTalukder2k16/Lightoj_UVA
lightoj1129.cpp
#include<bits/stdc++.h> using namespace std; struct node { node *next[10]; bool endpoint; node() { endpoint = false; for(int i=0;i<10;i++) { next[i]=NULL; } } } *root; bool insert_word(string str) { node *cur = root; int len = str.length(); for...
ALGO
0.999866
4.426881
{ "github_metadata": { "branch": "master", "commit_count": 109, "repo_created_at": "2019-11-22T20:49:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7622345...
5e8a0c1a-0411-49d1-9d2b-e278bca52820
krishrahul98/DSA-Library
Project_Euler/4-Largest_Palindrome_Product/4-Largest_Palindrome_Product.cpp
#include <bits/stdc++.h> using namespace std; bool isPal(long int n) { int a = n, b = 0, c = 1; while (n >= c * 10) { c *= 10; } while (n >= 1) { b += (n % 10) * c; n /= 10; c /= 10; } return (a == b); } int main() { int T, j; long int N, i; ...
ALGO
0.999281
4.723739
{ "github_metadata": { "branch": "main", "commit_count": 793, "repo_created_at": "2020-10-08T03:00:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 50, "forks": 102, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f96754...
e1c2b106-b1c8-424f-9577-e52f09b0cd52
valdiviasharon/EDA
EDA Lab 3/Ejer2.cpp
#include <iostream> #include <time.h> #include <vector> #include <math.h> using namespace std; int random(int n) { return rand()%n; } vector<int> generar_punto(int dim, int n) { vector<int> punto(dim); for(int i=0; i<dim; i++) punto[i]=random(n); return punto; } int distancia(vector<int> A, vector<int>...
ALGO
0.981109
4.102794
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2022-08-27T01:05: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": "f819105750d...
e796e447-69b4-410e-8852-0586e2e7c7ac
tranner/dune-evolving-domains
src/source/heatscheme.hh
/************************************************************************** The dune-fem module is a module of DUNE (see www.dune-project.org). It is based on the dune-grid interface library extending the grid interface by a number of discretization algorithms for solving non-linear systems of partial differ...
ALGO
0.980038
5.301857
{ "github_metadata": { "branch": "master", "commit_count": 146, "repo_created_at": "2016-09-30T13:52: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": "a33df5ee...
85c0cda8-e039-47e9-b986-1c54ef367f62
ejdam87/leetcode-hub
medium/jump.cpp
#include <vector> #include <iostream> class Solution { public: bool canJump(std::vector<int>& nums) { int n = nums.size(); std::vector<bool> can = std::vector(n, false); can[n - 1] = true; for (int i = n - 2; i >= 0; i--) { for (int j = 0; j <= nums[i]; j++)...
ALGO
0.999983
5.663561
{ "github_metadata": { "branch": "main", "commit_count": 148, "repo_created_at": "2024-09-18T14:08: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": "e0ad451326...
03a30299-909e-405a-89bb-d82a2083240d
Aditya5991/ExpenseManager
EM/Utils.cpp
#include "pch.h" #include "Utils.h" #include <filesystem> #include <windows.h> namespace em::utils { std::filesystem::path GetExecutableDirPath() { TCHAR buffer[MAX_PATH] = { 0 }; GetModuleFileName(NULL, buffer, MAX_PATH); std::wstring::size_type pos = std::wstring(buffer).find_last_of...
TOOL
0.911561
6.249048
{ "github_metadata": { "branch": "master", "commit_count": 105, "repo_created_at": "2022-12-07T07:58:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "fee06955...
b14bbcd5-8939-4798-8956-62eac7422e1c
Arslanarsal/Leet-Code
0108-convert-sorted-array-to-binary-search-tree/0108-convert-sorted-array-to-binary-search-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.999989
6.247324
{ "github_metadata": { "branch": "main", "commit_count": 191, "repo_created_at": "2023-09-02T12:57: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": "2e4706df58...
3bf8c205-a573-4eec-bf27-f8bfce43d8b2
mejibyte/competitive_programming
USACO/Training Gateway/crypt1/crypt1.cpp
/* LANG: C++ PROB: crypt1 */ using namespace std; #include <algorithm> #include <iostream> #include <iterator> #include <numeric> #include <sstream> #include <fstream> #include <cassert> #include <climits> #include <cstdlib> #include <cstring> #include <string> #include <cstdio> #include <vector> #include <cmath> #...
ALGO
0.998656
4.457448
{ "github_metadata": { "branch": "master", "commit_count": 355, "repo_created_at": "2011-10-27T01:25:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 196, "forks": 66, "issues": 1, "pull_requests": 2 }, "file_meta": { "content_id": "50f8f...
2e239da2-0b84-4beb-b404-d8b9bcd4cf2c
theDreamBear/algorithmn
leetcode2/面试题 02.06.palindrome-linked-list-lcci.cpp
/* * @lc app=leetcode.cn id=面试题 02.06 lang=cpp * @lcpr version=30204 * * [面试题 02.06] 回文链表 */ // @lcpr-template-start using namespace std; #include <algorithm> #include <array> #include <bitset> #include <climits> #include <deque> #include <functional> #include <iostream> #include <list> #include <queue> #include...
ALGO
0.999903
6.104704
{ "github_metadata": { "branch": "master", "commit_count": 1074, "repo_created_at": "2019-02-24T04:03: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": "b03b011...
b989f0a0-53ae-4116-8af2-7ee49584f6c0
demerzel1/ACM-code
spoj/spoj_QTREE(树链剖分).cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' typedef pair<int, int> pii; typedef long double ld; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; const int INF = 0x3f3f3f3f; const double pi = acos(-1.0); const double eps = 1e-9; const int maxn = 10010; struct Edge...
ALGO
0.999938
4.518621
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-03-06T12:47:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3c411a782d...
bf355211-e8ab-4e16-b861-0222f3421828
marzam/HPC-Aula
exemplos/cuda/11-Game-of-life-on-GPU/opengl/main-glut.cpp
/* * File Main * Traffic Cellular Automata simulation TCA-S */ #include <GL/glut.h> #include <GL/glu.h> #include <GL/gl.h> #include <cstdlib> #include <cstring> #include <CellularAutomata.hpp> #include <App.hpp> extern "C" { #include <ModelTypes.h> #include <Tools.h> } Stopwatch stopwatch; float elaps...
ALGO
0.937697
5.39571
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2020-10-27T09:30:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7865c8aa84bf...
341ffb2c-f7b7-40ad-8017-b1ac716ee78c
HwangChanho/CPP_CodingTest
프로그래머스/2/131127. 할인 행사/할인 행사.cpp
#include <string> #include <vector> #include <map> #include <iostream> using namespace std; int solution(vector<string> want, vector<int> number, vector<string> discount) { int answer = 0; int days = 0; map<string, int> wantValue; for (int i = 0; i < want.size(); i++) { wantValue[want...
ALGO
0.999628
5.212398
{ "github_metadata": { "branch": "main", "commit_count": 134, "repo_created_at": "2024-12-26T01: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": "4566f9a6a6...
c3f38bcf-ead9-47cc-a2d6-9f50925605bf
alexandraback/datacollection
solutions_5731331665297408_0/C++/Tomi/c.cpp
#include <cstdio> #include <cmath> #include <vector> #include <algorithm> #include <set> #include <map> #include <queue> using namespace std; int N, M; vector<int> zip; vector<vector<int> > sus; vector<int> sled; long long visited; string mystr; string beststr; void backtrack() { if (sled.empty()) { if (visit...
ALGO
0.999942
4.389049
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f47ec172...
e1645e2e-fdff-4772-bbc6-515326292b92
yymin1022/Algorithm_Study
BOJ/5725.cpp
#include <bits/stdc++.h> using namespace std; int main(){ cin.tie(NULL); cout.tie(NULL); ios_base::sync_with_stdio(false); while(true){ int N; cin >> N; if(N == 0){ break; } vector<int> C, P; for(int i = 0; i < N; i++){ int c, p...
ALGO
0.999881
4.461138
{ "github_metadata": { "branch": "master", "commit_count": 1933, "repo_created_at": "2021-03-04T06:27: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": "9001133...
0bf6b630-fa92-445d-933d-443c1f783ebd
ariloc/CompetitiveProgrammingCodes
CodeForces/361752B.cpp
// Range Minimum Queries // https://ibero1.contest.codeforces.com/group/BXJ6xt3tnH/contest/361752/problem/B #include <bits/stdc++.h> //#pragma GCC optimize("Ofast,unroll-loops") //#pragma GCC target("avx,avx2,fma") #define forn(i,n) for(int i = 0; i < int(n); i++) #define forsn(i,s,n) for(int i = int(s); i < int(n); ...
ALGO
0.999892
4.613364
{ "github_metadata": { "branch": "master", "commit_count": 183, "repo_created_at": "2020-08-19T01:48:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55fb64de...
afd3c0a7-d653-4af4-abdc-72088d329fd6
RobotLocomotion/drake
geometry/optimization/intersection.h
#pragma once #include <memory> #include <optional> #include <utility> #include <vector> #include "drake/geometry/optimization/convex_set.h" namespace drake { namespace geometry { namespace optimization { /** A convex set that represents the intersection of multiple sets: S = X₁ ∩ X₂ ∩ ... ∩ Xₙ = {x | x ∈ X₁, x ...
ALGO
0.971202
7.933809
{ "github_metadata": { "branch": "master", "commit_count": 33726, "repo_created_at": "2014-01-26T16:11:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3630, "forks": 1305, "issues": 690, "pull_requests": 46 }, "file_meta": { "content_id":...
c876d11f-c2d0-4547-8652-cfcb85361150
GuessEver/ACMICPCSolutions
HDU/5245/J.cpp
#include <stdio.h> using namespace std; int m,n,k; inline double get(int x, int y) { return 1.0*(2.0*x*(n - x + 1) - 1.0) * ( 2.0 * y * (m - y + 1) - 1.0); } double tot; inline double getAns(int x, int y) { double q = get(x, y)/tot; q = 1.0 - q; double ans = 1.0; for(int i = 0; i < k; i++) ans *= q; ret...
ALGO
0.999562
3.557311
{ "github_metadata": { "branch": "master", "commit_count": 186, "repo_created_at": "2015-01-23T06:34:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f6671ff...
2e3a5983-66e8-4a87-8656-64e4b0bfe421
shah-anurag/Competitive-programming
CodeForces/825E.cpp
#include<iostream> #include<vector> using namespace std; int main() { int n,m; cin >> n >> m; vector<int> v[n]; int node,edge; for(int i = 0; i < m; i++) { cin >> node >> edge; v[node-1].push_back(edge-1); } int ans[n] = {0}; int pos = 0; bool check[n] = {false}; ...
ALGO
0.999997
3.628588
{ "github_metadata": { "branch": "master", "commit_count": 111, "repo_created_at": "2018-08-14T19:47:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9173c0df...
65f40de2-8f17-4646-ad33-f4c0366ef700
Mohammad-Yasser/harwest
codeforces/687/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; set<int> st; const int K = 1000006; int main() { ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); #ifndef ONLINE_JUDGE freopen("test.in", "r", stdin); #endif int n, k; cin >> n >> k; for (int i = 0; i < n; ++i) { int tmp; cin >> tmp...
ALGO
0.999988
4.208574
{ "github_metadata": { "branch": "master", "commit_count": 1412, "repo_created_at": "2020-12-21T04:47:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f787ff2...
fc750380-1937-4697-8de2-07192223a141
hzy9819/ICPC-Problem-Code-Solution
Codeforces Round #457 (Div. 2)/C/cpp.cpp
#include <bits/stdc++.h> #define LL long long #define db double #define Hzy(o) freopen(o".in", "r", stdin), freopen(o".out", "w", stdout) using namespace std; const int INF = 1 << 30; const LL inf = 1LL << 60; const int N = 100100; bool b[N]; int p[N], sz; int n, m; void Prime() { for(int i = 2; i <= 100050; ++i) { ...
ALGO
0.99991
3.178039
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-04-10T09:02:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "113de55d1ead...
ecd740c7-c6b2-407e-a6b3-01d29bfbd0f6
LeksiDor/JaraboTransientRendering
src/Material/FresnelDielectric.h
/* * Copyright (C) 2015, <NAME> (http://giga.cps.unizar.es/~ajarabo/) * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights t...
ALGO
0.963381
5.82485
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-01-13T08:42:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d65b619405...
91da98e9-489f-43c5-a811-ea19f5113472
DebugMind/Algorithm
Algorithm/cf_797_2.c++
#include<iostream> #include<vector> using namespace std; void solve() { int n; cin >> n; vector<int> A(n,0), B(n,0); for (int i = 0; i < n; i++) cin >> A[i]; for (int i = 0; i < n; i++) cin >> B[i]; int ck = false; for (int i = 0; i < n; i++) { if (B[i] != 0) ck = true; } i...
ALGO
0.999967
4.18198
{ "github_metadata": { "branch": "main", "commit_count": 319, "repo_created_at": "2021-12-07T03:04:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8fac15bcf7...
832ac545-f5c7-4293-9f92-b7c061519077
ishandutta2007/codeforces-h
heart_blue/normal/124/B.cpp
#include <cstdlib> #include <cctype> #include <cstring> #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <iostream> #include <sstream> #include <map> #include <set> #include <queue> #include <stack> #include <fstream> #include <numeric> #include <iomanip> #include <bi...
ALGO
0.999737
3.689027
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc8b252d6765...
cfb9299c-381a-49c8-ab0f-9a2d488b233f
AnkitVlekhak/myCODESPACE
DSA/DYNAMIC PROGRAMMING/knapsack_2.cpp
#include <bits/stdc++.h> #include <climits> using namespace std; const int N = 100005; long long int dp[105][N]; int n; long long int w; vector<pair<int, int>> arr; long long int knapsack2(int ind, int value) { if (value == 0) return 0; if (ind < 0) return 1e15; if (dp[ind][value] != -1) ...
ALGO
0.999997
4.216386
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-04-05T05:31:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "406869d4f97...
b7c9a3d5-b1e9-489d-939b-cb63152fae70
jasonxiong/ServerFramework
001_ServerLib/3RdParty/botan-1.10.5/botan/skein_512.h
/* * The Skein-512 hash function * (C) 2009 <NAME> * * Distributed under the terms of the Botan license */ #ifndef BOTAN_SKEIN_512_H__ #define BOTAN_SKEIN_512_H__ #include <botan/secmem.h> #include <botan/hash.h> #include <string> namespace Botan { /** * Skein-512, a SHA-3 candidate */ class BOTAN_DLL Skein_512 : p...
ALGO
0.933934
7.617095
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2014-05-12T03:58:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 19, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d88076d...
16a9319d-efb3-478b-b08b-3302614255b6
jvazquez96/KWIC
CircularShifter.cpp
#include <algorithm> #include <functional> #include <vector> using namespace std; typedef vector<string> vs; // CircularShifter class. // Performs a circular shift of a series of line. // The constructor takes a vector of vectors (matrix) of strings // and for each line it performs the rotation and it stores it //...
ALGO
0.999496
5.459535
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2018-04-19T19:57: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": "abb1f9c5b...
d5b3b2e7-f623-44ba-bcf3-dc0daa7cb7c2
leomaurodesenv/contest-codes
contests/uva/uva-10420.cpp
/* * Problema: 10420 - List of Conquests * https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1361 */ #include <iostream> #include <iomanip> #include <cstdio> #include <cstdlib> #include <numeric> #include <string> #include <sstream> #include <iomanip> #include <locale> #include <bitset>...
ALGO
0.999103
3.546158
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-03-20T12:38: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": "4b63e5f1b3...
7b6a3275-c5e7-4461-8b26-98f2008bc306
qwaker00/Olymp
Trains/13112013/I/hax.cpp
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <ctime> #include <memory.h> #include <cmath> #include <string> #include <cstring> #include <queue> #include <vector> #include <set> #include <deque> #include <map> #include <functional> #inc...
ALGO
0.999847
3.267959
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2012-09-04T15:56:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "92b8570b6...
35e53d85-a0c5-483e-85d2-7e5f5b2f8b28
yuya-onozuka/ardrone
ardrone_operator/src/estimate_marker_pose.cpp
#include <ardrone_operator/estimate_marker_pose.h> #include <opencv2/aruco.hpp> EstimateMarkerPose::EstimateMarkerPose() { } EstimateMarkerPose::~EstimateMarkerPose() { } std::vector<Eigen::Matrix4d> EstimateMarkerPose::estimateMarkersPose(cv::Mat& input_image, ...
ALGO
0.965951
5.837077
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2019-08-22T11:54: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": "56b4aa638...
f4c6fa7d-6da3-4ef1-a60c-7b1e5d6f6aca
priincce/competitiveProgramming
codechef contest/176/b.cpp
#include<bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; string s1,s2,s3; cin >> s1>>s2>>s3; int c1=count(s1.begin(), s1.end(),'1'); int c2=count(s2.begin(), s2.end(),'1'); int c3=count(s3.begin(), s3.end(),'1'); int z1=n-c1, z2=n-c2, z3 = n-c3; c1%=n; c2%=n; ...
ALGO
0.999893
3.797333
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2024-10-11T07:56:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b834f9673...
b449107c-4d1b-4e1d-ba76-4bd888c9f6e9
DominikHorn/hashing-benchmark
include/join/utils/math.h
#pragma once /* Common math and hashing utils adapted from ETH (https://systems.ethz.ch/research/data-processing-on-modern-hardware/projects/parallel-and-distributed-joins.html) and Stanford (http://graphics.stanford.edu/~seander/bithacks.html) */ #include <stdlib.h> /* posix_memalign */ #include <mat...
ALGO
0.989463
5.297822
{ "github_metadata": { "branch": "main", "commit_count": 328, "repo_created_at": "2021-08-02T16:22:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3eac5e477...
c70e8345-b305-48c1-afb2-11be32e642bd
FazeelUsmani/Scaler-Academy
047 Graphs 4/A2_batches.cpp
#include<bits/stdc++.h> using namespace std; int find(int parent[], int node){ if (parent[node] == node) return node; parent[node] = find(parent, parent[node]); return parent[node]; } void unionNodes(int a, int b, int parent[], int size[]){ int c = find(parent, a); int d = find(parent,...
ALGO
0.999908
4.782129
{ "github_metadata": { "branch": "master", "commit_count": 795, "repo_created_at": "2020-01-28T18:13:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 252, "forks": 172, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c1c...
4ab7e0b2-1f10-4e44-834d-c7cd07f272ed
KingShivamX/OpenGL-CG-Lab
6_bresenhemCircle.cpp
#include <GL/glut.h> #include <cmath> void plotPoints(int xc, int yc, int x, int y) { glBegin(GL_POINTS); glVertex2i(xc + y, yc + x); glVertex2i(xc - y, yc + x); glVertex2i(xc + y, yc - x); glVertex2i(xc - y, yc - x); glVertex2i(xc + x, yc + y); glVertex2i(xc - x, yc + y); glVertex2i(xc...
ALGO
0.948259
6.312231
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-11-21T02:57: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": "b7ea63c53be4...