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
81a1214c-7474-4ce6-a26e-94b33f0ba524
pulsar-chem/Pulsar-SCF
pulsar_scf/SCF.cpp
#include "pulsar_scf/SCF.hpp" #include "pulsar_scf/helpers/DIIS.hpp" #include "pulsar_scf/HelperFunctions.hpp" #include <pulsar/modulebase/MatrixBuilder.hpp> #include <numeric> using namespace pulsar; //Typedef to save me from writing this out everytime using matrix_type=EigenMatrixImpl::matrix_type; //Computes the ...
ALGO
0.992863
6.495628
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2017-05-10T19:21:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a339bef3fb...
57a8de8f-38f0-4b52-af53-da3733b61e58
Ascalon01/Particle-Filter-Kidnapped-Vehicle
src/particle_filter.cpp
/* * particle_filter.cpp * */ #include <math.h> #include <algorithm> #include <iostream> #include <iterator> #include <numeric> #include <random> #include <string> #include <vector> #include "helper_functions.h" #include "particle_filter.h" using std::string; using std::vector; using namespace std; void ParticleF...
ALGO
0.978554
6.033802
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-11-08T18:17: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": "e9559c8689...
de649d9d-b338-4d05-b88f-c7adc8298415
doriansecula/ACLabs18
EmilDianaTeam/Hide_Seek/Hide_Seek_anterioare/Hide_Seek_v4/Hide_Seek_v4.ino
#include <MovingAverageFilter.h> #include <boarddefs.h> #include <IRremote.h> #include <IRremoteInt.h> #include <ir_Lego_PF_BitStreamEncoder.h> #include "Types.h" #include "Motors.h" #include "Ultrasonic.h" #define MAX_SPEED 115 #define RED 41 #define GREEN 39 #define BLUE 43 #define K 10 #define DIST_WALL 6.0 #def...
TOOL
0.994032
4.4097
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-06-04T12:31:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1596750403...
74b781ef-4ba5-444d-bae7-76444701b2ae
facebook/react-native
packages/react-native/ReactCommon/react/renderer/components/view/primitives.h
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <react/renderer/graphics/Color.h> #include <react/renderer/graphics/RectangleCorners.h> #include <react/re...
TOOL
0.90611
6.604102
{ "github_metadata": { "branch": "main", "commit_count": 37707, "repo_created_at": "2015-01-09T18:10:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 123068, "forks": 24762, "issues": 639, "pull_requests": 401 }, "file_meta": { "content_id...
f6729bf7-b8c7-493b-a8ae-d08e2603b2cd
Masud-Abdullah/Phitron
Phitron/Semester2/Basic_Data_Structures/Module 11.5/1_PP.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* re...
ALGO
0.99995
5.313933
{ "github_metadata": { "branch": "main", "commit_count": 172, "repo_created_at": "2023-06-30T17:26: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": "84fed3e69f...
2392292e-caf2-4992-9139-f076ced87ade
letractien/Sorts
UngDungSo4.cpp
#include <iostream> using namespace std; struct Record{ int SucManhCuaRong; int SucManhTangThem; }; void oneWay_QuickSort(Record R[], int N){ int I, J; Record P; for(int L = 0; L < N; ++L){ while(R[L].SucManhCuaRong > 0){ I = L; J = L; P = R[L]; while(R[J].SucManhCuaRong > 0){ ++J; w...
ALGO
0.999954
3.123253
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-12-26T17:39: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": "7046141e9df...
9b3db0a8-0355-44e8-b70e-2363e0bfd36a
0-jij-0/CompetitiveProgramming
Problems Archive/1000 - 1999/1431 - Close Group.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; typedef long long ll; int weight(int n) { int res = 0; while (n) { res++; n &= n - 1; } return res; } int CTZ(int n) { int res = 0; while ((n & 1) == 0) { res++; n >>= 1; } return res; } int ChromaticNumber(const vector<int>& g) { ...
ALGO
0.999905
4.389328
{ "github_metadata": { "branch": "main", "commit_count": 256, "repo_created_at": "2021-02-01T07:57:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a69b13982...
189b866d-a682-4ed1-b3e7-06fe771da99b
shubham7stark/DSA_G4G
DSA/Binary Tree/printallLeaf2Top.cpp
#include<stdio.h> #include<stdlib.h> struct node{ int data; struct node *left; struct node* right; }; struct node* newNode(int data){ struct node* nnode = (struct node*) malloc(sizeof(struct node*)); nnode->data = data; nnode->left = NULL; nnode->right = NULL; return (nnode); }; void printArray(int ar...
ALGO
0.999862
3.40588
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2014-10-21T11:15:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "237790489...
86695eeb-0625-423a-a84f-25641f5b7ffb
hirotaka-iino/Atcoder
atcoder143E.cpp
#include"bits/stdc++.h" // #include "prettyprint.hpp" typedef long long ll; // #define INF 10000000000; ll INF = 10000000000; using namespace std; #define rep(i, n) for(ll i=0; i<n; i++) #define repr(i, n) for(ll i=n; i>=0; i--) #define reps(i, s, e) for(ll i=s; i<e; i++) #define all(x) x.begin(),x.end() typedef ...
ALGO
0.999972
4.138752
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-08-07T11:43: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": "cb0022fba6...
b02bd4a4-a076-49ed-9f24-0c7c298ac47a
FRC1410/infiniterecharge2020
Zappin' Kraken v1.0.6/src/main/cpp/Util/Controller.cpp
#include "Util/Controller.h" Controller::Controller() {} double Controller::ApplyDeadzone(int controller, int axis, double joystick_deadzone, double trigger_threshold) { if (axis == 1 || axis == 5) { raw_magnitude = sqrt(pow(frc::Joystick{controller}.GetRawAxis(axis), 2) + pow(frc::Joystick{controller}.GetRawAx...
ALGO
0.976545
6.246811
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2020-02-10T23:32:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "398ec987ba...
405bd49f-8538-4674-8fca-19ee18cfd637
mangoqwq/competitive-programming
Atcoder/abc214/abc214f.cpp
#include <bits/stdc++.h> using namespace std; #define ms(x, a) memset(x, a, sizeof x) typedef long long ll; const int mod = 1e9 + 7, inf = 0x3f3f3f3f; const int MN = 2e5 + 1; ll dp[MN], last[26]; int main(){ cin.tie(0)->sync_with_stdio(0); string s; cin >> s; int n = s.size(); s = " " + s; dp[0] = 1...
ALGO
0.999985
3.891922
{ "github_metadata": { "branch": "master", "commit_count": 540, "repo_created_at": "2020-08-28T16:37:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0900583b...
eaa6f925-f8b2-4c95-b60d-b33cc47c59d0
littlecaca/algorithms
hot100/invert-binary-tree.cpp
#include <climits> #include <stack> #include <queue> #include <vector> using namespace std; typedef pair<int, int> pii; typedef vector<pii> vpii; typedef vector<vpii> vvpii; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<vvi> vvvi; typedef long long ll; template <typename T> bool chmin(T &x, const T...
ALGO
0.999982
5.543427
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2024-04-24T09:13: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": "aa1b1899a...
00e0c018-05da-4987-844c-f60399049501
goucejia/openGL-Projects
walking figure/spline.hpp
#ifndef SPLINE_HPP #define SPLINE_HPP #include <glm/glm.hpp> #include <vector> using glm::vec3; class SplinePoint3 { public: float t; // time vec3 p, dp; // value and derivative SplinePoint3(float t, vec3 p, vec3 dp): t(t), p(p), dp(dp) {} }; class Spline3 { public: // list of spline control point...
ALGO
0.998405
6.973506
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-09-27T22:45: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": "9eb6a33333...
927f0b3c-8668-4dd5-a00d-1e3e8adcde59
Lycanthrope92/Cracking-The-Coding-Interview
Chapter 1 - Arrays and Strings/Cracking the coding interview - Q1.5.cpp
#include <stdio.h> #include <iostream> #include <string> #include <vector> #include <iomanip> #include <cmath> #include <limits> #include <algorithm> #include <cstdlib> #include <fstream> #include <sstream> #include <signal.h> #include <utility> using namespace std; char* compress (char* a) { if ( a == NULL ) return...
ALGO
0.999937
3.671234
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2014-06-14T01:26: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": "230ef95ba...
b03df2da-b785-4d12-b47c-90c1f1aca66e
cyp0922/Algorithm-Code
게리맨더링(2번째)_17471번.cpp
#include<iostream> #include<queue> #include<vector> #include<algorithm> #include<cstring> using namespace std; int N; int arr[11]; bool check[11]; bool visited[11]; vector<int> order; vector<vector<int>> sector; int MIN = 1e9; int bfs(int x, int cnt) { queue<int> q; visited[x] = true; q.push({ x }); int sum = ar...
ALGO
0.999954
3.509856
{ "github_metadata": { "branch": "master", "commit_count": 308, "repo_created_at": "2020-08-10T07:45: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": "d50ac284...
4313952f-6232-405e-955b-b1e6e3000f4c
ANCuber/Competitive_Programming
tioj/1826.cpp
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; #define int long long #define pii pair<int,int> #define p_q priority_queue #define endl '\n' #define pb push_back int mp[5][5] = {0}; int dx[4] = {1,-1,0,0}; int dy[4] = {0,0,1,-1}; char mrk[4] = {'D','U','R','L'}; void dfs(int x, int y, int...
ALGO
0.999499
3.794432
{ "github_metadata": { "branch": "main", "commit_count": 542, "repo_created_at": "2022-03-27T14:48: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": "7765d6f8bf...
b977eaf1-9c4f-4cb3-99d5-a62ef95f2d88
tawfik-s/proplemSolving
recusion/subsequnceIntArrayusing(sumItUp).cpp
// Author : <NAME> //link:https://codeforces.com/group/gA8A93jony/contest/269931/problem/O #include <vector> #include <list> #include <map> #include <math.h> #include <cmath> #include <set> #include <queue> #include <deque> #include <string> #include <stack> #include <bitset> #include <algorithm> #include <utility> #in...
ALGO
0.99981
4.296237
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2021-01-04T19:30: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": "d0435fb45...
f50973ca-dfca-475b-bce6-783741b8bb75
luisfelipe-gds/CPP_progr
Advanced/word_manager/WordCatVec.cpp
/* *************************************************************************** * * Please check the ReadMe file for the detailed description of all classes * and how they interact. * * *************************************************************************** * Class Description: WordCatVec class is a containe...
TOOL
0.940487
5.025675
{ "github_metadata": { "branch": "main", "commit_count": 112, "repo_created_at": "2023-05-19T17:12: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": "3fb7954358...
80ee30cd-43dc-4054-8723-597307402e9d
amity874/DsaInteviewPrep
CsesProblemSet/RangeQueries/ForestQueries.cpp
#include<bits/stdc++.h> //#include<ext/pb_ds/assoc_container.hpp> //using namespace __gnu_pbds; using namespace std; #define ll long long int #define ld long double #define mod 1000000007 #define inf 1e18 #define endl "\n" #define pb emplace_back #define vi vector<ll> #...
ALGO
0.999965
3.981887
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2021-11-28T12:12: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": "7943e71d5...
6d5b67ec-dcba-45d0-ab95-4aab7bb90376
jjn7702/SECJ2013-DSA
Submission/sec04/PAS/Assignment1/assignment1.cpp
#include <iostream> #include <fstream> #include <iomanip> #define N 10 using namespace std; void header() { cout << "List of Books in the Library:\n" << endl; cout << left << setw(9) << "ID" << setw(31) << "BOOK TITLE" << setw(29) << "BOOK AUTHOR" << setw(9) << "YEAR" << setw(8) << "GENRE" << ...
TOOL
0.99586
4.179514
{ "github_metadata": { "branch": "main", "commit_count": 4021, "repo_created_at": "2023-08-08T07:04:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 14, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ce9f51c...
9b01d21f-13a9-401c-b88d-025cb1dc4da5
TheSadMuffinMan/muffinman_academia
4.0 CS3 Algorithms Sherine CPP/1. Lecture/13.0 Priority Queues and Heap Sort/main.cpp
/* Priority Queues use a binary heap data structure. Our goal is to insert items, and then remove either the largest or smallest item. EXAMPLE: *insert "P"* *insert "Q"* *insert "E"* return max; *returns "Q"* etc... Client Example Problem: "Find the largest M items in a stream of n items." */ /* Usin...
ALGO
0.999985
6.231896
{ "github_metadata": { "branch": "main", "commit_count": 1292, "repo_created_at": "2023-01-25T16:11: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": "a956487d2...
e661dccd-8cbe-437e-8e4f-c8a98dc4b6a5
jsarthak/LeetCode
word_ladder.cpp
// A transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words beginWord -> s1 -> s2 -> ... -> sk such that: // Every adjacent pair of words differs by a single letter. // Every si for 1 <= i <= k is in wordList. Note that beginWord does not need to be in wordList. ...
ALGO
0.99997
5.736202
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2021-07-08T16:34:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "39f9e4c5b...
f265289d-1b0a-449c-b2b1-cc68f075b994
JulioMelo-Classes/lista-1-pablodamascenoo
ponto_em_retangulo_2/src/function.cpp
#include "function.h" /*! * Verifica se um ponto está dentro de um retângulo. */ location_t pt_in_rect( const Ponto &IE, const Ponto &SD, const Ponto &P ) { int lado = (SD.x)-(IE.x); int altura = (SD.y)-(IE.y); location_t resposta = OUTSIDE; if(((IE.x) == (SD.x)) ||((IE.y) == (SD.y))){ ...
ALGO
0.994501
5.447813
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2021-06-08T18:08:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ed7150f8c5...
9710c3a2-2f06-443b-bdf7-2d2ba092e2af
yz3138/trans-neut-for-BOUT-v3.1
div_ops.cxx
/* Copyright B.Dudson, J.Leddy, University of York, September 2016 email: <EMAIL> This file is part of Hermes. Hermes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either vers...
ALGO
0.987786
4.056547
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-12-19T14:39:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f81d7b685c...
ad7641d0-5cd4-40b1-8ea8-e305042971a7
XXXStanislavXXX/-plus
практички/14.6 Практическая работа/task7.cpp
#include <iostream> #include <vector> /* Нам предстоит сделать некое подобие «Майнкрафта». Миллионов не обещаю, но это интересная задача на пространственное мышление. У нас есть небольшой квадратный ландшафт, размером 5 × 5 секторов. В каждом секторе располагается блок (столбик) ландшафта, максимальная высота которого...
ALGO
0.95583
4.910406
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2025-04-28T07:05:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "049bca097...
9d6e99f6-a949-49e4-a884-9bd6bd8236c4
nethojs29/AnalisisNumerico
secante.cpp
/* Nombre: Secante Autor: <NAME> Fecha: Octubre 8 2014 Descripción: Programa que calculará una aproximación a la raíz de f(x)=arcsen(x)-e^-2x con el método de Secante */ #include <iostream> #include <cstdlib> #include <windows.h> #include <conio.h> #include <conio2.h> #include <cmath> using namespace ...
ALGO
0.999986
4.285508
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-02-24T08:32: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": "28872913bb...
e32939bf-2297-4d45-a064-3a7cfba08a36
Hunterdii/GeeksforGeeks-POTD
May 2024 GFG SOLUTION/May-29.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int findWinner(int n, int x, int y) { std::vector<int> dp(n + 1, 0); dp[1] = 1; for (int i = 2; i <= n; ++i) { if (i >= 1 && dp[i - 1] == 0) dp[i] =...
ALGO
0.999959
5.274245
{ "github_metadata": { "branch": "main", "commit_count": 3732, "repo_created_at": "2024-03-09T09:48:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 202, "forks": 54, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "907218...
39497e18-fea6-44de-8a7d-0e5ce8521e16
guipingxie1/book_problems
book_chap4.4/UVA924.cpp
#include <bits/stdc++.h> using namespace std; int n, m, k, t; vector<int> a[2505]; bool v[2505]; int day[2505]; pair<int, int> p; int main() { scanf("%d", &n); for (int i = 0; i < n; ++i) { scanf("%d", &m); for (int j = 0; j < m; ++j) { scanf("%d", &k); a[i].pu...
ALGO
0.999925
3.563001
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2016-08-16T00:54: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": "ae641acfe...
9ef01736-a373-4b8b-a088-5fdf0c1ecf67
peterMingzhuoZhang/NFGE
NFGE/VGP332/HelloPerception/PTEditablePolygon2D.h
//==================================================================================================== // Filename: PTEditablePolygon2D.h // Created by: <NAME> // Description: It contain a structure <PTEditablePolygon2D> which can build and store a polygon of any shape // It contains : --- Info of all vertices of po...
ALGO
0.942943
4.672309
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2020-07-28T23:17: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": "5561d4cc1...
2cb249d1-35c1-43aa-867d-acee8dfebb6c
cmiyachi/CygWinAlgorithms
Leetcode/productExceptSelf.cpp
#include <bits/stdc++.h> using namespace std; class Solution2 { public: vector<int> productExceptSelf(vector<int>& nums) { int n = nums.size(); vector<int> result(n); for (int i = 0; i < n; i++) { int product = 1; for (int j = 0; j < n; j++) if (i != j) product *= nums[j]; result[i]...
ALGO
0.999989
6.184844
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2019-03-09T23:53: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": "d70fca34e...
f3751141-be18-4fc3-b1c2-2e06234b3295
LoDesFire/basics-of-programming
second_term/LW5/LW5_1/myQueue.cpp
#include "queue.h" #include "Shared_ptr.h" class MyQueue : public Queue { public: explicit MyQueue(long long _data) : Queue(_data) {} MyQueue() : Queue() {} void make_task() { auto uniqueElements = new long long[size()][2]; auto count = 0; Shared_ptr<Node> _tmp = front; wh...
ALGO
0.982982
3.867409
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-10-15T09:25: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": "51a897ab5adb...
6cfe5c73-3171-45ef-bcce-25d9f97765e3
mishi-a/Network-OS-Lab-Assignment
Operating System Lab/Assignment-12/Q1.cpp
/************* Author - am10 ******************/ #include<bits/stdc++.h> #define sync ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(0); #define endl '\n' #define ll long long #define pb push_back #define PI acos(-1) #define pii pair <int,int> #define FI first #define SE second /* //D-S-U in...
ALGO
0.99988
3.966568
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-01-26T07:46:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd827f1ef9...
25c8446b-fe8a-4e0e-a318-01eba431949f
oliv-ia/snakes-and-ladders
code/main.cpp
/* Snakes and Ladders in C++ by <NAME> 11/05/2020 Game played by either two players or one player and a computer generated opponent game prints a colured chequred board, with snake and ladder obstacles for the player to navigate players move by rolling a dice game is won when a player reaches the end of the board */ ...
TOOL
0.918424
4.222686
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2020-11-14T15:41: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": "e59c4458763f...
547ac870-fe91-488e-823f-94c9136f3197
NobleWolf42/CSC-Homework
Programming w Data Structures CSC 211-B1/CH11HW - AVL Tree/Original Code/AVL_Tree.h
#ifndef AVL_TREE_H #define AVL_TREE_H #include "BST_With_Rotate.h" #include "AVLNode.h" /** Definition of the AVL Binary Search Tree class. @param Item_Type The type of item to be stored in the tree Note: Item_Type must define the less-than operator as a total ordering. */ template<typename Item_Type> cl...
ALGO
0.938517
6.300874
{ "github_metadata": { "branch": "main", "commit_count": 215, "repo_created_at": "2023-09-10T04:44:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "74002d9eca...
b07af0a8-0085-44e8-9422-9963617f7623
knst/Competitive-programming
codeforces/11/b.cpp
/***************************************************************************** * codeforces: knst * topcoder: knstqq * projecteuler: knstqq * **************************************************************************/ #include <algorithm> #include <iostream> #include <limits> #include <map> #include <set> #i...
ALGO
0.999825
3.622447
{ "github_metadata": { "branch": "master", "commit_count": 200, "repo_created_at": "2015-03-06T16:13:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "159cf79a...
4274b827-7ba7-401f-ba55-d1b5fdb0d687
hubery05/rrt_star_global_planner
rrt_star_global_planner/include/rrt_star_global_planner/RRTstar_ros.h
/** * <NAME>, 2019 * */ /** include ROS libraries **/ #include <ros/ros.h> #include <move_base_msgs/MoveBaseAction.h> /** for global path planner interface **/ #include <costmap_2d/costmap_2d_ros.h> #include <costmap_2d/costmap_2d.h> #include <nav_core/base_global_planner.h> #include <geometry_msgs/PoseStamped....
ALGO
0.989922
3.556124
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2020-12-14T11:20:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 19, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f3bf6c3cbce...
2e2c74f8-d4bd-4ce6-be4a-402e721e736e
spupyrev/gmap
external/mapsets/src/visibility.cpp
#include "common/geometry/geometry_utils.h" #include "common/geometry/rtree.h" #include "visibility.h" #include "graph_algorithms.h" #include "closest_point.h" #include <memory> typedef RNode<Segment> SegNode; typedef RTree<Segment> SegTree; bool IsVisible(const VisibilityVertex& s, const VisibilityVertex& t, const...
ALGO
0.999914
5.77999
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2014-01-29T01:53:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 9, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "d60c585e...
bcf8719a-93d8-412f-ac1c-69bb4faae8d2
Ampermetr123/otus-cpp
part2/ip_filter.cpp
#include <cassert> #include <cstdlib> #include <iostream> #include <string> #include <vector> #include <array> #include <exception> #include <algorithm> #include <cstdlib> #include <cstdint> #include "trim.h" // ("", '.') -> [""] // ("11", '.') -> ["11"] // ("..", '.') -> ["", "", ""] // ("11.", '.') -> ["11", ""] /...
ALGO
0.992816
4.753052
{ "github_metadata": { "branch": "hw1", "commit_count": 25, "repo_created_at": "2020-10-01T16:14: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": "ab165752f2a8...
9c9e4fed-d779-4b90-942c-df9518ecb91a
xuyifangreeneyes/spmm-denseblock
block_density_dist.cpp
#include <iostream> #include <fstream> #include <vector> #include <string> #include <array> #include <algorithm> #include <assert.h> typedef long long ll; std::vector<std::vector<int>> csr2adj(const std::string& indptr_file, const std::string& indices_file, int n, int nnz) { ...
DATA
0.989216
4.09125
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2020-07-06T07:54:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba37cd82b...
78d57f79-190c-4911-9a22-cc524aebb1a0
AkshayAnil1080/DSA
Longest Repeating Subsequence - GFG/longest-repeating-subsequence.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int LongestRepeatingSubsequence(string str){ // Code here string s1 = str; string s2 = str; int n = str.length() + 1; vector<vector<int>> lcs(n, vector<int>(n, 0)); ...
ALGO
0.999764
5.622075
{ "github_metadata": { "branch": "main", "commit_count": 2038, "repo_created_at": "2022-06-04T17:25:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 92, "forks": 27, "issues": 1, "pull_requests": 5 }, "file_meta": { "content_id": "968be08...
39503a44-f9c8-4d82-8b96-c274dd50723c
duzx16/Connect4AI
src/uct.cpp
#include "uct.h" #include "Judge.h" #include <cmath> #include <cstdlib> #include <iostream> #include <fstream> #include <ctime> #include <sys/time.h> using std::cout; #if FILE_OUTPUT && !NO_OUTPUT std::ostream &output = std::ofstream("log.txt"); #else std::ostream &output = cout; #endif const int max_search_num = 50...
ALGO
0.999963
3.868507
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2018-05-02T13:18:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0930d194...
328bdb48-8826-4352-8752-1e906078e06d
jeongyeonkim/Algorithm__cpp
baekjoon/b_10610.cpp
//30 #include <iostream> #include <algorithm> #include <string> #include <vector> using namespace std; string input; int sum, check0; vector<int> arr; bool asc(int a, int b){ return a > b; } int main(){ ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> input; for(int i=0; i<input.length()...
ALGO
0.999841
3.953127
{ "github_metadata": { "branch": "master", "commit_count": 245, "repo_created_at": "2018-12-29T12:11:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "1a62c7de...
6069953b-c630-4a6c-ba46-7103305ea0a9
vxl/vxl
contrib/brl/bbas/bpgl/bpgl_camera_estimator.h
//This is brl/bbas/bpgl/bpgl_camera_estimator.h #ifndef bpgl_camera_estimator_h_ #define bpgl_camera_estimator_h_ //: // \file // \brief A class for estimating perspective camera models // // \author <NAME> // \date March 15, 2010 // \verbatim // Modifications // \endverbatim #include <iostream> #include <vector> #i...
ALGO
0.999017
6.865699
{ "github_metadata": { "branch": "master", "commit_count": 42154, "repo_created_at": "2013-05-02T18:32:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 250, "forks": 157, "issues": 49, "pull_requests": 0 }, "file_meta": { "content_id": "fd...
21adeb41-aafb-42fa-a285-f29d8d5d24fa
abhayishere/Codes
codeforces/903/B.cpp
/* []__________[][][][]____[][][][][]__{}__[][][][]____[][][][][]__[][][][] []__________[]______________[]__________[]__________[]__________[]____[] []__________[][][][]________[]__________[][][][]____[]__________[]____[] []__________[]______________[]________________[]____[]__[][][]__[]____[] []_______...
ALGO
0.999926
3.442503
{ "github_metadata": { "branch": "master", "commit_count": 160, "repo_created_at": "2021-01-15T09:16: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": "4bea624f...
91a6b2bb-51b7-449d-bf62-8e3a6e795d85
adityapranavbhuvanapalli/leetcodes
2012-process-tasks-using-servers/process-tasks-using-servers.cpp
class Solution { public: vector<int> assignTasks(vector<int>& servers, vector<int>& tasks) { int i = 0, nServers = servers.size(), nTasks = tasks.size(), time = 0; vector<int> res; priority_queue<vector<int>, vector<vector<int>>, greater<vector<int>>> busyServers; //{busyTime, idx} ...
ALGO
0.999971
6.363
{ "github_metadata": { "branch": "main", "commit_count": 1829, "repo_created_at": "2024-01-01T16:06:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5156069f9...
ba40f1ce-ff6c-4be3-8a4d-d2f88f4a5b81
h0nkz/open_kattis
a-classy-problem/ClassyProblem.cpp
#include <iostream> #include <stack> #include <string> #include <cmath> #include <unordered_map> #include <map> #include <vector> #include <sstream> /* https://open.kattis.com/problems/classy */ std::unordered_map<std::string, long> classValueMap{}; struct Person { std::string name; long value; /* ...
ALGO
0.998184
4.470178
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2023-12-03T14:08: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": "47c7f143c3f...
a82a90fb-785c-4829-9467-e829e0195aab
Hyp3R0d/AlgorithmCompetition
基础 杂项/双指针 离散化 差分 前缀和/双指针 离散化 区间合并/LC881.cpp
#include<bits/extc++.h> using i8 = signed char; using u8 = unsigned char; using i16 = signed short int; using u16 = unsigned short int; using i32 = signed int; using u32 = unsigned int; using f32 = float; using i64 = signed long long; using u64 = unsigned long long; using f64 = double; using i128 = __int128_t; using u...
ALGO
0.999975
5.663579
{ "github_metadata": { "branch": "main", "commit_count": 146, "repo_created_at": "2024-03-29T09:41: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": "613ce5958d...
8feb800d-9c6c-4306-ba26-6867d956652f
palilo815/ps
baekjoon/1000/1913.cpp
#include<bits/stdc++.h> using namespace std; #define loop(i,n) for(int i=0;i<n;++i) int arr[1000][1000]; int main() { cin.tie(NULL), cout.tie(NULL); ios::sync_with_stdio(false); int n, key, x = 1, len; cin >> n >> key; int r = n / 2, c = r; arr[r][c] = x++; loop(i, n / 2) { len = 2...
ALGO
0.999977
3.131476
{ "github_metadata": { "branch": "master", "commit_count": 6725, "repo_created_at": "2020-01-12T04:58: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": "8818e3b...
6c74f036-7aef-43ff-9419-6b28bf3f3028
mohsenzakeri/Sailfish-VBNG
include/FragmentLengthDistribution.hpp
/** * lengthdistribution.h * express * * Created by <NAME> on 1/30/13. * Copyright 2013 <NAME>. All rights reserved. */ // Modifications by <NAME>; 2014 #ifndef FRAGMENT_LENGTH_DISTRIBUTION #define FRAGMENT_LENGTH_DISTRIBUTION #include "tbb/atomic.h" #include <atomic> #include <vector> #include <string> #in...
TEST
0.905925
5.966136
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-05-11T04:29: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": "4200c1725b...
0dcbc9be-a191-4fc2-a249-2dad9c73a480
bjfoster1690/cpp_minesweeper
minesweeper_gameboard.cpp
#include <iostream> #include <math.h> #include <vector> #include <algorithm> #include <random> #include "minesweeper_gameboard.h" // constructor minesweeper_gameboard::minesweeper_gameboard(int side_length, std::string difficulty) { _side_length = side_length; _gameboard.resize(_side_length); for (i...
ALGO
0.936655
4.316931
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-05-17T20:33:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "7657a2efd4...
a4da6559-724b-4023-a242-c84125f6c1ff
jarus9350/leetmycodes
92-reverse-linked-list-ii/reverse-linked-list-ii.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* reverseBetw...
ALGO
0.999999
5.812819
{ "github_metadata": { "branch": "main", "commit_count": 606, "repo_created_at": "2024-11-29T23:04: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": "687bfbe572...
08be845a-1e52-4408-9105-b03b8d266d8e
UbaidBinWaris/c-
Fininte Autometa/assignment_3.cpp
#include <iostream> using namespace std; class State { public: State *nextA; State *nextB; bool output; State() { nextA = nullptr; nextB = nullptr; output = 0; } void setTransitions(State *a, State *b, bool out) { nextA = a; nextB = b; output = ...
ALGO
0.997544
4.17577
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-04-28T18:21: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": "88f51868b73...
bcf53e70-a9e4-438f-9520-6bd3723e92e6
dnr2/maratona
topcoder/old/MagicalSquare.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <cfloat> #include <climits> #include <cctype> #include <cmath> #include <cassert> #include <ctime> #include <iostream> #include <iomanip> #include <algorithm> #include <sstream> #include <string> #include <vector> #include <deque> #include <list> #includ...
ALGO
0.999804
4.829626
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2013-08-18T19:15:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9856d4c8...
95b26b91-ae7a-4e9e-9ff8-2760d81c2378
dengtesla/acm
acm模板/求解二次剩余.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int prime[7600000]; bool isprime[76000000]; ll poww(ll a,ll b,ll p) { ll ans = 1,base = a; while(b) { if(b&1) { ans*=base; ans %= p; } base*= base; base %= p; b>>=1; ...
ALGO
0.999976
4.507525
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2017-07-11T14:02:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 15, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0d1c9bd...
406c1d9f-f75e-48d3-8305-dc21244b4908
Noman-Ahmed-Khan/DS-lab-stuff
Some_Stuff/DS LAB 07/TASK03.cpp
#include <iostream> #include <climits> using namespace std; void merge(int* arr, int l, int mid, int r,bool ascending){ int n1=mid-l+1; int n2=r-mid; int left[n1]; int right[n2]; for (int i=0; i<n1; i++) left[i]=arr[l+i]; for (int j=0; j<n2; j++) right[j]=arr[mid+1+j]; int i=0,j=0,k=l...
ALGO
0.999632
4.629903
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-12-30T17:48: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": "cd4519e800bf...
8ef54b01-ff43-4476-9c86-36e132fa3a79
febiosoftware/FEBio
FEBioMix/FEMultiphasicSolver.h
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2021 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining a...
ALGO
0.976954
5.968362
{ "github_metadata": { "branch": "develop", "commit_count": 8010, "repo_created_at": "2020-06-15T23:52:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 217, "forks": 75, "issues": 28, "pull_requests": 3 }, "file_meta": { "content_id": "a70...
eb7ed0ba-b993-4580-985c-d849a76fc1f9
euphoo-01/labs_1_course
ОАиП/1_sem/№13/oaip.lab13.project/oaip.lab13.dops/dops.cpp
#include <iostream> #include <stdio.h> #include <string> using namespace std; // 1. В заданной последовательности слов найти все слова, имеющие заданное окончание. int dop1() { char input[128]; char ending[128]; cout << "Введите последовательность слов: "; gets_s(input, sizeof(input)); cout << "В...
ALGO
0.999582
4.430116
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2024-12-11T23:59: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": "d5bac72e276...
804b4b73-d583-4959-9583-db50a9af6273
dhjp123/gfg
Medium/Assembly Line Scheduling/assembly-line-scheduling.cpp
//{ Driver Code Starts //Initial Template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: int carAssembly(vector<vector<int>>& a, vector<vector<int>>& T, vector<int>& e, vector<int>& x){ //Code Here int up= e[0]+...
ALGO
0.999724
6.402295
{ "github_metadata": { "branch": "main", "commit_count": 1347, "repo_created_at": "2022-12-07T17:30: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": "1ecb9b05a...
d473b5c0-a101-497c-838d-40f0d1994ccc
ninthDevilHAUNSTER/UnrestrainedGamblingWithSurreptitiousLuna
PAT/A1052 Linked List Sorting.cpp
// // Created by shaob on 2020/3/3. // #include <iostream> #include <cstdio> #include <map> #include <stack> #include <vector> #include <set> #include <string> #include <cstring> #include <vector> #include <stack> #include <algorithm> using namespace std; #define MaxSize 0x3fffffff struct node { int add = 0; ...
ALGO
0.999836
3.594672
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2020-02-29T12:15:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "43e273eb7...
59e34048-f273-499f-8d84-32e526ef86c0
wanglei-web/ant_driver
driverless/src/path_tracking.cpp
#include "driverless/path_tracking.h" #define __NAME__ "path_tracking" PathTracking::PathTracking(): AutoDriveBase(__NAME__) { } bool PathTracking::init(ros::NodeHandle nh, ros::NodeHandle nh_private) { nh_ = nh; nh_private_ = nh_private; nh_private_.param<float>("min_foresight_distance_for_drive", min_foresigh...
TOOL
0.944495
3.931401
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-09-23T07:06:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9258c7bfd1...
03ee9c9c-7ea0-4d9a-987a-3dd13be7e3a4
Romelai28/competitive-programming
notebook/graph/succesor_graph.cpp
enum ESTADO { VISITADO_AHORA, VISITADO_ANTES, NO_VISITADO }; struct SuccesorGraph{ vi succesors; BinaryJumping BJ; vector<ESTADO> visited; vi representantOfVertex; vi rootOfTree; vi distanceFromRoot; vi distanceFromRepresentant; vi lengthOfCycleAt; vector<vi> adjList; SuccesorGraph(vi &succ) : succeso...
ALGO
0.999879
4.215272
{ "github_metadata": { "branch": "main", "commit_count": 150, "repo_created_at": "2024-07-12T22:49:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "641dcdde9a...
c5455657-6f19-4400-9b4e-7bc34a644b5a
CQCL/tket
libs/tkwsm/src/GraphTheoretic/DomainInitialiser.cpp
// Copyright Quantinuum // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writin...
ALGO
0.998674
6.49981
{ "github_metadata": { "branch": "main", "commit_count": 1453, "repo_created_at": "2021-09-13T12:46:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 282, "forks": 51, "issues": 73, "pull_requests": 3 }, "file_meta": { "content_id": "3c5cad...
788b9ef0-d9fd-489d-9ff6-269f0a5fc39a
harshalp1911/data_structure_cpp
string12.cpp
#include <iostream> #include <algorithm> #include <string> #include <vector> // #include<s> using namespace std; // Function to check character is valid or not bool valid(char ch){ if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch<= 'Z') || (ch >= '0' && ch <= '9')){ return true; } else return ...
ALGO
0.999658
4.888361
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-06-16T07:48: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": "2cd9b9c37ca...
c57917db-66d5-4653-9eb1-d2e5ef9187c4
rgroshanrg/bigint
Big Integer Library in Single file/bigint.h
/* bigint.h bigint Library for C++ MIT License Created by <NAME> on 16-10-2020 Copyright (c) 2020 <NAME> 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 ...
ALGO
0.942656
4.928546
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2020-10-16T09:00:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 76, "forks": 31, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "a4d48930b...
36d01a30-8df5-43b5-a103-f088f5dab049
edisonhello/competitive_programming
TIOJ/AC/18/1887_2.cpp
#include<bits/stdc++.h> using namespace std; #define ull unsigned long long #define db double /*struct val{ ull v,s; db lv,ls; val(){ v=s=0; lv=ls=0; } void update(){ lv=log((db)v); ls=log((db)s); return; } };*/ const ull MOD = 1e9+7; /*val operator + (con...
ALGO
0.998809
3.754598
{ "github_metadata": { "branch": "master", "commit_count": 843, "repo_created_at": "2016-03-15T14:58:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a21691f3...
4066939b-cf9b-416e-a416-039181dd46be
t0mmie/cplusplus-exercises
02-cola-machine/main.cpp
#include <iostream> /* Write a program that presents the user w/ a choice of your 5 favorite beverages (Coke, Water, Sprite, ... , Whatever). Then allow the user to choose a beverage by entering a number 1-5. Output which beverage they chose. ⭐ If you program uses if statements instead of a switch statement, modify i...
TOOL
0.917719
3.311322
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2022-08-19T13:33: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": "314da9ef3...
15c94b8e-5767-4c47-b88f-2384d5a4e3f3
yushijiao101/DCT
DCT/Core.cpp
#include <stdio.h> #include <stdlib.h> #include <math.h> #define STB_IMAGE_IMPLEMENTATION #include <stb_image.h> #include <stb_image.h> #include <stb_image_write.h> #define PI 3.14159265358979323846 // 定义图像结构体 typedef struct { int width; int height; int depth; int channel; unsigned char* data; } I...
DATA
0.972781
4.781399
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-24T14:34: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": "dc0328787ca7...
9a52adf3-f3eb-4891-9181-4978220fa5ea
ishandutta2007/codeforces-a
abc864197532/normal/811/C.cpp
#include <bits/stdc++.h> using namespace std; #define lli long long int #define fop(i,m,n) for (int i=(m);i<(n);i++) #define FOP(i,m,n) for (int i=(m)-1;i>=(n);--i) #define test(x) cout << #x << ' ' << x << endl; #define printv(a) {\ for (auto i : a) cout << i << ' ';\ cout << '\n';\ } #define eb emplace_back #...
ALGO
0.999993
4.392345
{ "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": "b7c92555c941...
eca61db7-31a5-4166-adda-fdd8c081a3d3
georgerapeanu/c-sources
cf1446/D.cpp
#include <bits/stdc++.h> using namespace std; const int NMAX = 2e5; const int BUCK = 400; int n; int a[NMAX + 5]; vector<int> pos[NMAX + 5]; int nxt[NMAX + 5]; int ant[NMAX + 5]; int where[2 * NMAX + 5]; int brute(const vector<pair<int,int> > &v){ where[NMAX + 0] = 0; int sum = NMAX; int ans = 0; ...
ALGO
0.999877
3.43695
{ "github_metadata": { "branch": "master", "commit_count": 177, "repo_created_at": "2018-08-15T14:37:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8cd1c07e...
e6c58ae3-61c6-4c86-8fcd-f5247b585041
martinr89/BiosignalPI
src/HRV/hist.cpp
// // Academic License - for use in teaching, academic research, and meeting // course requirements at degree granting institutions only. Not for // government, commercial, or other organizational use. // File: hist.cpp // // MATLAB Coder version : 3.0 // C/C++ source code generated on : 18-Nov-2015 10:29:...
ALGO
0.998713
4.555649
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2016-02-04T10:27:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 5, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "076bdd5007...
bf110d13-444d-4daa-9bae-382242ff6bfd
kyrile/DataStruct-And-Algorithms
数据结构和算法/双链表.cpp
#ifdef WIN32 #define _CRT_SECURE_NO_WARNINGS #endif #include <stdio.h> #include <memory> #define OK 1 #define ERROR 0 typedef int ElemType; typedef int Status; typedef struct DouNode { struct DouNode* prior; ElemType data; struct DouNode* next; }DouNode, * DouLinkList; DouLinkList InitList(); int ListLength(DouLin...
ALGO
0.999115
4.056138
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-02-20T15:20: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": "cfef2475c9...
0037560d-d780-40d9-8ada-864169ca6eae
kyamagu/mexopencv
src/+cv/find4QuadCornerSubpix.cpp
/** * @file find4QuadCornerSubpix.cpp * @brief mex interface for cv::find4QuadCornerSubpix * @ingroup calib3d * @author Amro * @date 2015 */ #include "mexopencv.hpp" #include "opencv2/calib3d.hpp" using namespace std; using namespace cv; /** * Main entry called from Matlab * @param nlhs number of left-hand-sid...
ALGO
0.995078
6.256701
{ "github_metadata": { "branch": "master", "commit_count": 1445, "repo_created_at": "2011-12-26T01:59:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 664, "forks": 319, "issues": 37, "pull_requests": 2 }, "file_meta": { "content_id": "3d...
f6b1b728-6856-460c-aaae-f65ba3bf6c38
WilliamHGray/AdventOfCode2022
AdventOfCode9/Source.cpp
#include <iostream> #include <fstream> #include <vector> #include <string> #include <set> using namespace std; int checkDistance(vector<int>tPos, vector<int>hPos) { int q = tPos[0] - hPos[0]; int p = tPos[1] - hPos[1]; //cout << q << ", " << p << endl; int distance = (q * q) + (p * p); //cout << distance << endl;...
ALGO
0.999752
4.70792
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2022-12-04T11:36: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": "6d90002291f...
93195933-e896-4473-8adb-3ab11e6a99e6
DanielEQM/USM-Codes
Algoritmo_y_Complejidad_2024-2/Listado_N°1/E.cpp
#include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; int main(){ int n, m, x, s, c, r; string type, t; cin >> n; while(n--){ cin >> m; vector <vector <int> > a, b; s = 0; while(m--){ cin >> type >> x >> t >> t >> c...
ALGO
0.99898
3.158228
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2025-03-16T20:02: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": "a4d87c4f4c...
900517d0-fd7e-415c-9261-6362100564a5
TanKaiYi0220/CSES-Solutions
src/Introductory Problems/Chessboard and Queens.cpp
#include <bits/stdc++.h> using namespace std; int main() { string board[8]; for ( int i = 0 ; i < 8 ; i++ ) cin >> board[i]; int perm[8], ans = 0; bool bool_diagonal[16]; for ( int i = 0 ; i < 8 ; i++ ) perm[i] = i; do { bool ok = 1; for ( int i = 0 ; i < 8 ; i++ ) if ( board[i][perm[i]] != '.' ) ok = 0; ...
ALGO
0.999642
3.914063
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2021-09-14T07:44: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": "a4210d3067f...
c56e94c8-447a-40a9-a371-84141546a0ff
jiny0x01/ps
boj/11279.cpp
#include <iostream> #include <array> using namespace std; template<typename type> class max_heap{ public: max_heap(); void insert(type); void remove(int ); void print(); void heapify(int); type operator[](const int); size_t size() const; int get_left_child_idx(int); int get_right_child_idx(int); int get_par...
ALGO
0.999932
4.226729
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-08-17T16:03: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": "9712255746c0...
994ee9cb-9815-4045-9e51-d2789a213ebc
abhikumr7248/CodeInCpp
A_Coins.cpp
#include <iostream> #include <vector> #include <string> #include <cstdio> #include <algorithm> #include <cmath> #include <bits/stdc++.h> using namespace std; #define ull unsigned long long #define ll signed long long #define ld long double #define to_low(s) transform(s.begin(), s.end(), s.begin(), ::tolower); // conver...
ALGO
0.999916
3.754084
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2023-04-15T11:52: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": "763cb0783...
92447d2b-a926-410b-93a1-4879649302d3
111116/shfft
gpu_k3/generator/fourierseries.hpp
#pragma once #include <complex> #include <iosfwd> typedef std::complex<double> complex; template <int n> struct FourierSeries { complex a[2*n-1][2*n-1] = {{0}}; FourierSeries(){} FourierSeries(complex c) { a[0][0] = c; } FourierSeries(int i, int j, complex c) { if (abs(i)>=n || abs(j)>=n) throw "out of ra...
ALGO
0.983136
5.343738
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2021-05-22T06:24:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 24, "forks": 5, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "0bd6bafd...
b24684db-96ad-40f4-838e-32d06c520458
ishandutta2007/codeforces-m
miraclefafa/normal/1325/F.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,a,n) for (int i=a;i<n;i++) #define per(i,a,n) for (int i=n-1;i>=a;i--) #define pb push_back #define mp make_pair #define all(x) (x).begin(),(x).end() #define fi first #define se second #define SZ(x) ((int)(x).size()) typedef vector<int> VI; typedef long long l...
ALGO
0.999932
3.659958
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03: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": "b90a4be9f133...
e19291a5-996a-47ba-9fe7-83e8f49da509
facebookarchive/BOLT
libc/src/string/memory_utils/bcmp_implementations.h
//===-- Implementation of bcmp --------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
TOOL
0.929903
6.346251
{ "github_metadata": { "branch": "main", "commit_count": 410387, "repo_created_at": "2018-04-24T23:40:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2530, "forks": 183, "issues": 66, "pull_requests": 2 }, "file_meta": { "content_id": "16...
981105f2-7e76-4c04-bfd8-47b9de7b99b8
GOPIS28/c_plus0522
pro (44).cpp
#include <iostream> #include <vector> class Matrix { private: std::vector<std::vector<int>> mat; int rows; int cols; public: Matrix(int r, int c, const std::vector<std::vector<int>>& values) : rows(r), cols(c), mat(values) {} Matrix operator*(const Matrix& other) const { if (cols !=...
ALGO
0.999777
6.076178
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-05-14T07:41: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": "75e92ef16c0d...
57be777b-951e-47dd-a386-0a5c85af5f14
pandeyankit123/CP-Solutions-by-Laidback
D_Divisibility_by_2_n.cpp
/* __ ___ _______ _______ ______ ___ _______ _ __ / / / \ \ |__ __| | | \ \ | | \ \ / \ \ | _____| | | / / / / / / \ \ | | | | | | | | / / / / \ \ | | | | / / / / / /---\ \ | | | | | | | |-...
ALGO
0.999757
3.669323
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2023-05-11T19:08:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d218d37632...
de701547-dc49-4789-9efa-22cedf27b55e
HananiJia/bit
领扣--Z字型转换/领扣--Z字型转换/源.cpp
#define _CRT_SECURE_NO_WARNINGS 1 #include<iostream> #include<string> #include<vector> using namespace std; //class Solution { //public: // string convert(string s, int numRows) { // if (s.size() <= 1 || numRows == 1) // return s; // int num = numRows * 2 - 2; // int index = 0; // int size = s.size(); // string ...
ALGO
0.999998
4.700683
{ "github_metadata": { "branch": "Hanani", "commit_count": 340, "repo_created_at": "2017-11-26T03:15: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": "d6415d9d...
29e19e75-beaf-46e2-bbbf-41ae402d021e
mrNkeng/CPP_Projects
hashMap_proj4/dnadb.h
#ifndef DNADB_H #define DNADB_H #include <string> #include <vector> #include <iostream> #include <functional> namespace dna_db_config { const int ALPHA_SIZE = 4; // For DNA (A, C, G, T) const std::string ALPHA = "ACGT"; const int MINLOCID = 1000; const int MAXLOCID = 9999; const int MINPRIME = 101...
TOOL
0.943601
5.903441
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2023-08-23T21:46: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": "0f1241b9f...
da99dd39-7480-4a7e-9a1d-4cdedb3a6ccc
ginami0129/my-problem-solving
src/baekjoon/BOJ_1517.cpp
#include <bits/stdc++.h> #define MAX 500000 using namespace std; int N, A[MAX], help[MAX]; long long result; void merge(int start, int mid, int end) { int left = start, cur = start; int right = mid + 1; while (left <= mid && right <= end) { if (A[right] < A[left]) { help[cur++] = A[right++]; res...
ALGO
0.99992
4.560601
{ "github_metadata": { "branch": "master", "commit_count": 362, "repo_created_at": "2020-05-30T05:42:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c65fa87d...
a8d2409d-79f0-4333-b8a5-ab05cede59f0
88pramodbhat/solivita-city
Heapsort.cpp
#include <iostream> #include <vector> using namespace std; // Function to build the max-heap by heapifying downwards void heapify(vector<int>& H, int n, int i) { int k = i; // Current node int v = H[k]; // Value at current node bool heap = false; while (!heap && 2 * k <= n) { // While ...
ALGO
0.999986
4.653314
{ "github_metadata": { "branch": "main", "commit_count": 422, "repo_created_at": "2024-12-08T04:07:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eebc821634...
47632ac0-a911-405b-beaf-da645729eeda
Macw07/Macw07
Algorithm/DynamicProgramming/Linear Dynamic Programming/P7074-方格取数.cpp
#include <iostream> #include <algorithm> using namespace std; const int MAXN = 1e3+15; int n, m, ans = -0x7f7f7f7f; int arr[MAXN][MAXN]; int vis[MAXN][MAXN]; int dx[] = {1, 0, -1}; int dy[] = {0, 1, 0}; void dfs(int x, int y, int sum){ if (x == n && y == m){ ans = max(sum, ans); return ; } ...
ALGO
0.999952
3.857288
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-11-26T07:30: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": "37bc49fdf78d...
37012020-097b-4f32-949b-de451e37f58d
rajeevpodar/leetCodeSolutions
173. Binary Search Tree Iterator.cpp
// https://leetcode.com/problems/binary-search-tree-iterator/ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class BSTIterator { stack<TreeNode*> _myStack; void up...
ALGO
0.999981
6.587348
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2019-10-15T11:27: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": "e3ff96a0b...
916b8b8b-3a5d-4c95-a65f-a5ba90fc9dd2
kaloronahuang/KaloronaCodebase
Practices/Luogu/P3748.cpp
// P3748.cpp #include <bits/stdc++.h> using namespace std; const int MAX_N = 1e5 + 200; int T, tx, n, p[2][2], head[MAX_N], current, deg[MAX_N], ans, dp[MAX_N][4]; struct edge { int to, nxt; } edges[MAX_N << 1]; void addpath(int src, int dst) { edges[current].to = dst, edges[current].nxt = head[src]; h...
ALGO
0.999743
4.244568
{ "github_metadata": { "branch": "master", "commit_count": 554, "repo_created_at": "2018-11-02T01:32:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d1044f5...
51d3eb66-2a3a-4e8f-b8c4-4e7021df84f6
hafsawaseem14/DSA-LAB
DSA lab 3.cpp
#include <iostream> using namespace std; //class Node { //public: // int data; // Node* next; // Node(int val) : data(val), next(nullptr) {} //}; // //int main() { // // Node* head = new Node(10); // head->next = new Node(20); // // if (head != nullptr) { // cout << "First node data: " << h...
TOOL
0.972291
4.268431
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2025-02-03T06:53: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": "2b2a808fc98...
a260b7e8-d6d2-4c43-84cc-f3b92e8e7741
Avafly/LeetCodeSolution
058.Length_of_Last_Word/Q58.cpp
// LeetCode Problem: // Title: Length of Last Word // URL: https://leetcode.com/problems/length-of-last-word/ #include <iostream> #include <vector> #include <string> using namespace std; class Solution { public: int lengthOfLastWord(string s) { int n = s.size(); int prevSpace = n; int i; ...
ALGO
0.99535
6.117143
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-07-06T00:29: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": "950edfca512...
618a98a5-f3ab-4585-b359-c06cdc2c812a
drinkwish/leetcode
3sum.cpp
//simple solution //56ms, 83.19% class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { sort(nums.begin(), nums.end(), less<int>()); int len = nums.size(); vector<vector<int>> ret; for(int i_ = 0; i_ < len; ++i_){ twoSum(nums, i_, -nums[i_], ...
ALGO
0.99997
5.782879
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-08-12T16:48: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": "e73fb35ec5...
8f8dd490-84bb-4c4f-9fc6-38b95e403465
KhoyaniChetan2224/DSA-all-Concept-Code-DSA-C-
C++ With Data Structures and Algorithams/71 Pointer Part-2.cpp
#include<iostream> using namespace std; void update (int **p2){ p2 = p2 + 1; *p2 = *p2 + 1; **p2 = **p2 + 1; } int main (){ int i = 5; int *p = &i; int **p2 = &p; // cout << i << endl; // cout << *p << endl; // cout << **p2 << endl; // cout << &i << endl; // cout << p <<...
ALGO
0.998212
3.112775
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-09-06T03:02:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3c7f1a8b7859...
2cfae2e9-be9f-46b4-8368-66fcbd74b421
ishandutta2007/codeforces-u
um_nik/normal/1637/G.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <cmath> #include <vector> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <queue> #include <ctime> #include <cassert> #include <complex> #include <string> #include <cstring> #include <chrono> ...
ALGO
0.998179
3.761028
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:31: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": "c123d1fecfeb...
881b5645-cadc-4843-a156-05b04afe50d8
kunnapatt/Competitive
Problem/382/382.cpp
#include <bits/stdc++.h> using namespace std ; #define FOR(i, a, b) for(int i = a ; i < b ; i++) #define vi vector<int> #define long long long int main() { int n ; //freopen("../test.in", "r", stdin) ; //freopen("../output.txt", "w", stdout) ; puts("PERFECTION OUTPUT") ; while ( cin >> n && n != ...
ALGO
0.979591
3.889251
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-05-19T17:04: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": "f6ebab5a67...
6c7bc82d-908e-4e67-bfcc-ab50828c5278
sdseepaul/robobulls
strategy/normalgamestrategy.cpp
#include "include/config/team.h" #include "behavior/genericmovementbehavior.h" #include "behavior/goalie.h" #include "behavior/attackmain.h" #include "behavior/attacksupport.h" #include "behavior/defendbehavior.h" #include "behavior/refstop.h" #include "behavior/wall.h" #include "behavior/markbot.h" #include "behavior/...
ALGO
0.998933
5.480496
{ "github_metadata": { "branch": "master", "commit_count": 829, "repo_created_at": "2017-11-19T00:08:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b5e45f23...
4d66a4eb-662c-4d50-bf8b-4d05c7af9f7b
dhzdhd/DSE
Year 2/Semester 4/DAA lab/Week 4/w4q1.cpp
// Knapsack #include <iostream> using namespace std; struct Item { int weight; int value; }; int N; int W; Item items[100]; int bestValue = 0; bool bestItems[100]; void generateSubsets(int depth, int currentWeight, int currentValue, bool currentItems[]) { if (depth == N) { if (currentValue >...
ALGO
0.999976
4.183969
{ "github_metadata": { "branch": "master", "commit_count": 231, "repo_created_at": "2022-08-31T10:50:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca1f293e...
d5d621a1-7c30-4475-b727-ea81a5d6d502
phonism/notes
AlgorithmQuestions/cses/Chessboard-and-Queens.cpp
#include <bits/stdc++.h> using namespace std; string s; string b[8]; int ans = 0; bool already[8]; bool zuoxie[128]; bool youxie[128]; void dfs(int num) { if (num == 8) { ans++; return ; } for (int i = 0; i < 8; ++i) { if (b[num][i] == '.') { if (already[i]) { ...
ALGO
0.999673
4.345744
{ "github_metadata": { "branch": "master", "commit_count": 240, "repo_created_at": "2014-09-17T14:46:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 15, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb0ff0f...
75495f2e-3ec4-49d7-9d55-f137c3254bcc
PointCloudLibrary/pcl
search/include/pcl/search/flann_search.h
/* * Software License Agreement (BSD License) * * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2010-2011, <NAME>, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * ...
ALGO
0.991515
7.128207
{ "github_metadata": { "branch": "master", "commit_count": 14566, "repo_created_at": "2013-02-12T16:40:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10495, "forks": 4656, "issues": 432, "pull_requests": 147 }, "file_meta": { "content_id...
6ad9cc2b-88e5-4abe-806f-078fccb6d0f0
ishandutta2007/codeforces-c
cerberus97/normal/1204/E.cpp
/* cerberus97 - <NAME> */ #include <iostream> #include <iomanip> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <cstdlib> #include <map> #include <set> #include <queue> #include <stack> #include <vector> #include <algorithm> using namespace std; #define pb push_back #define fast_ci...
ALGO
0.999975
4.23178
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:17:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f11e962dbb6a...