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
e29569cb-628e-4f84-b436-d4998aa1f76e
clamtian/VSCode
LeetCode/752.打开转盘锁.cpp
// @before-stub-for-debug-begin #include <vector> #include <string> #include <unordered_set> #include "commoncppproblem752.h" using namespace std; // @before-stub-for-debug-end /* * @lc app=leetcode.cn id=752 lang=cpp * * [752] 打开转盘锁 */ // @lc code=start class Solution { public: int openLock(vector<string>& ...
ALGO
0.999901
5.901197
{ "github_metadata": { "branch": "master", "commit_count": 273, "repo_created_at": "2021-05-07T03:01: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": "2e0f31be...
b75fb01c-4571-4a7a-960f-975e07fc7622
ShibinaPS/EvgenyOnegin
OneginProcessing.cpp
#include "OneginProcessing.h" #include "OneginSorting.h" //============================================================================================================= int onegin_ctor(Onegin* onegin, const char* filename) { if(file_open(onegin, filename)) { return ERROR_MAINFILE_OPEN; }...
TOOL
0.974412
4.186687
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2023-07-03T18:42: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": "4147b18afe...
f0b292f9-8679-4b1a-9320-751418eae579
kaafivikrant/One-day-Before-Interview
Coding Rounds/Graphs/Bipartite BFS.cpp
#include <iostream> #include <utility> #include <vector> #include <numeric> #include <queue> #include <cmath> #include <map> #include <string> #include <cstring> #include <algorithm> #include <fstream> #include <unordered_map> #include <unordered_set> #include <set> #include <list> #include <stack> #define ll long long...
ALGO
0.999981
5.334653
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2020-07-19T09:22:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 11, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "13fc404...
403163dc-cabc-4df8-b093-b05bfcfd969d
Thuan256/CPP
HSG_UNKOWN/students/huynh_minh_thuan/BOMCHUM.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; vector<bool> eratosthenes(int n) { vector<bool> primes(n + 1, true); primes[0] = primes[1] = false; for (int p = 2; p * p <= n; p++) if (primes[p]) for (int i = p * p; i <= n; i += p) primes[i] = false...
ALGO
0.999869
3.83525
{ "github_metadata": { "branch": "main", "commit_count": 101, "repo_created_at": "2024-11-14T00:08: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": "b11f3ba120...
bb745412-68f5-48a4-87f2-00d967faa890
dvosahlik/RC_Car
Transfer_function.cpp
// // // #include "Transfer_function.h" #include "Types.h" typedef struct { z_function* fce; double* old_inputs; double* old_outputs; } tf_data_t; /************************************************************************/ /* function the returns the result of a*b which are polynomials ...
ALGO
0.97952
4.302945
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-05-20T08:44:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad01cbe4ba...
f963950d-e943-40e9-ac3d-9fc23fc71667
dillonhuff/clockwork
soda_codes/blurx7_1_opt_d32/our_code/blurx7_1_opt_d32_sw_bmp_test_harness.cpp
#include <algorithm> #include <fstream> #include <vector> #include "blurx7_1_opt_d32.h" #include "bitmap_image.hpp" #include <cstdlib> int main(int argc, char **argv) { bitmap_image input("./images/taxi_slice_256.bmp"); HWStream<hw_uint<16> > input_update_0_sm8_012_read_channel; HWStream<hw_uint<16> > blurx7_1_u...
ALGO
0.960387
4.602014
{ "github_metadata": { "branch": "master", "commit_count": 6305, "repo_created_at": "2020-03-02T23:33:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 59, "forks": 12, "issues": 20, "pull_requests": 3 }, "file_meta": { "content_id": "4d3e...
4a6961cf-0638-484a-983a-fe59d089e292
logolemon/Leetcode_notes
Hard/动态规划/174.地下城游戏.cpp
// 数组、动态规划、矩阵 // 解法1: class Solution { public: int calculateMinimumHP(vector<vector<int>>& dungeon) { if(dungeon.size() == 0){ return 0; } int row = dungeon.size(); int column = dungeon[0].size(); std::vector<std::vector<int>> dp(row, std::vector<int>(...
ALGO
0.999839
4.841233
{ "github_metadata": { "branch": "main", "commit_count": 136, "repo_created_at": "2022-05-18T05:06: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": "550cf2f928...
f49e38f0-38b6-479d-8a28-8474fec1e128
Albin0208/Advent-of-code
2023/Day6/Day6.cpp
#include <fstream> #include <iostream> #include <sstream> #include <vector> int main() { std::ifstream file("input.txt"); std::stringstream buffer; buffer << file.rdbuf(); file.close(); std::istringstream iss(buffer.str()); std::string line; std::vector<long long> in_table; iss >> line; // Read out the Time:...
ALGO
0.999918
4.711893
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-12-01T12:12: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": "86cbba99992...
4067ed18-8542-46d1-99d7-b23fab316914
andymic/algos
c++/CtCi/chapter_1/matrix_ops.cc
#include<iostream> #include<vector> using namespace std; void print(const vector<vector<int>> matrix){ int n = matrix.size(); for(int i=0; i<n; i++){ for(int j=0; j<n; j++){ cout<<matrix[i][j]<<" "; } cout<<endl; } cout<<endl; } //Rotate NxN matrix 90 degrees void ...
ALGO
0.999659
5.425876
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2014-06-24T00:08: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": "c37a6a476...
6c9d55c2-1076-405a-b10b-14d3373e511c
Dongmins11/PsycoNauts2
Client/private/Attack_Judge_UA.cpp
#include "stdafx.h" #include "..\public\Attack_Judge_UA.h" #include "Judge_Book.h" CAttack_Judge_UA::CAttack_Judge_UA(CJudge * _pJudge) :m_pJudge(_pJudge) { } _bool CAttack_Judge_UA::Invoke(_double TimeDelta, CModel * _pModel, CTransform * _pTransform, CCharacterController* _pController) { if (0 >= m_pJudge->Get_Hp...
ALGO
0.991292
4.452436
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-08-07T15:17: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": "f08d0c024781...
d81c23c7-6eea-48be-a647-70caf94fc06d
Anamika1-cpu/151-Days-of-Learning-DSA
LinkedList/copyLLthroughRandom pointer.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node *next; Node *random; Node(int _val) { val = _val; next = NULL; random = NULL; } }; Node *copyRandomList(Node *head) { if (!head) return head; // step 1: Clone A to A' No...
ALGO
0.999824
4.335851
{ "github_metadata": { "branch": "master", "commit_count": 183, "repo_created_at": "2023-09-12T19:14:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d1fb8b5d...
ce7b9f34-2a47-4516-b757-7339f2329908
TheDev05/CARDIO
CPP Language/Topics/Switch/Project01.cpp
//**C++ Program For Temperature Conversion Celcius To Fahrenheit And Vice Versa Using Switch Case #include <iostream> int main() { int temp, key; std::cout << "ENTER TEMPRETURE: " << std::endl; std::cin >> temp; std::cout << "ENTER 1 FOR C TO F CONVERSION AND 0 FOR F TO C CONVERSION: " << std::endl;...
TOOL
0.948954
4.510057
{ "github_metadata": { "branch": "master", "commit_count": 975, "repo_created_at": "2021-06-04T20:37:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ea04382...
213acb62-a705-4a48-bbec-d090e2b61041
Hriman-Mahanta/LeetCode
Lucky Numbers - GFG/lucky-numbers.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User-function template for C++ // Complete the function // n: Input n // Return True if the given number is a lucky number else return False class Solution{ public: bool isLucky(int n) { ...
ALGO
0.999914
5.156507
{ "github_metadata": { "branch": "main", "commit_count": 178, "repo_created_at": "2022-04-28T16:08:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2b06940aaf...
2139a11f-b052-4ce8-bd31-b186b418f6ce
peterhyun/ClothSimulation
Glitter/Headers/EulerStepSolver.h
// // EulerStepSolver.h // ClothingSimulation // // Created by <NAME> on 30/03/2019. // Copyright © 2019 <NAME>. All rights reserved. // #ifndef EulerStepSolver_h #define EulerStepSolver_h #include "ParticleSystem.h" #define GLM_ENABLE_EXPERIMENTAL #include <glm/gtx/string_cast.hpp> class EulerStepSolver{ priva...
ALGO
0.998519
3.480278
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2019-04-01T01:05: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": "1a910a0ff...
21db7ba2-89fe-422e-9fd5-8f75107f36f1
jhasudhakar/leetcode
124_tree_max_sum_path.cpp
#include<stdlib.h> /** * * 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) {} * ...
ALGO
0.999956
5.564076
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2020-09-08T14:05: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": "5d459b879...
8afaa1b0-a983-41c2-921e-15fcb744c61a
lvb2104/Docs
Data-Structures-and-Algorithms/linked_list/sap_xep_dslk.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; struct node{ int data; node *next; }; node *makeNode(int x){ node *newNode = new node; newNode->data = x; newNode->next = NULL; return newNode; } void pushBack(node *&head, int x){ node *newNode = makeNode(x); if (he...
ALGO
0.999989
4.882133
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-01-11T01:49: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": "b88936155f93...
5ea19b8a-8b83-4fb6-9209-8524a2a9ea84
libgdx/libgdx
extensions/gdx-bullet/jni/src/bullet/BulletSoftBody/btDefaultSoftBodySolver.cpp
/* Bullet Continuous Collision Detection and Physics Library Copyright (c) 2003-2006 <NAME> http://continuousphysics.com/Bullet/ This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is ...
ALGO
0.947241
6.589796
{ "github_metadata": { "branch": "master", "commit_count": 15526, "repo_created_at": "2012-08-10T19:34:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 24195, "forks": 6492, "issues": 240, "pull_requests": 81 }, "file_meta": { "content_id"...
cdf50488-8e91-48e4-8c4e-7cb631e3f4af
kotwani2883/Dsa-Daily-Practice
DP/MCM/eggdropping.cpp
/*Author-:Palak*/ /* * Only write code when you are sure of the approach .Remember of penalties!! * Do optimized thinking (Think which technique/observation can be used,deep drive into the problem!!). * Do post analysis after the contest./Upsolving is much more important than giving contest * Learn a technique and ...
ALGO
0.999291
3.651864
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2020-12-19T13:57:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d89f901b5...
21e20c40-5b80-4413-9e4d-6343ef20dc12
coldsteelpope/baekjoon
4485/main.cpp
#include <iostream> #include <queue> #include <vector> #include <utility> #define INF (~0U >> 2) using namespace std; vector<vector<int>> map; vector<vector<int>> dist; void PrintDist(int N) { cout << endl; for (int y = 0; y < N; ++y) { for (int x = 0; x < N; ++x) { cout << dist[y][x] << " "; } cout <<...
ALGO
0.999892
4.293339
{ "github_metadata": { "branch": "master", "commit_count": 87, "repo_created_at": "2023-10-31T14:49:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "073d4df8b...
20c1d5cf-3b94-4de8-8465-fc73bf5bcd9d
bd878/cpp-coursera
white/reversedfunction.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; class FunctionPart { private: char operation; int value; public: FunctionPart(char op, int v): operation{op}, value{v} {}; double Apply(double v) const; void Invert(); }; double FunctionPart::Apply(double v) const { if (opera...
ALGO
0.999531
4.945556
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-09-27T19:46:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6234536f88...
cc499b58-0d69-4719-a081-102b8989aa5e
lunatic-7/Cp
Luv/course/Number theory and Mathematics/prime_check.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define M 1e9+7 #define PB push_back #define POB pop_back #define F first #define S second #define wasif() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); // Brute Force Method to check prime. // Time Complexity O(N) bool primeChk(int n) { ...
ALGO
0.999691
4.279063
{ "github_metadata": { "branch": "main", "commit_count": 199, "repo_created_at": "2022-07-19T16:03: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": "c03ad06f47...
b4d09adf-75ec-4bba-b9aa-cb7b8ec4a147
ComodoSecurity/openedr
edrav2/eprj/boost/boost/geometry/algorithms/detail/equals/point_point.hpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2014 <NAME>, Amsterdam, the Netherlands. // Copyright (c) 2008-2014 <NAME>, Paris, France. // Copyright (c) 2009-2014 <NAME>, London, UK. // Copyright (c) 2013-2014 <NAME>, Lodz, Poland // This file was modified by Oracle on 2013-2018. // Mod...
ALGO
0.963646
6.912045
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2020-10-28T20:51:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2476, "forks": 474, "issues": 30, "pull_requests": 0 }, "file_meta": { "content_id": "221247...
df996071-eb94-4e27-a87c-ed46cfea62a1
SubhayanDas08/techgig
1D Arrays/Leader.cpp
//Write a program to print all the LEADERS in the array. An element is leader if it is greater than all the elements to its right side. And the rightmost element is always a leader. For example int the array {16, 17, 4, 3, 5, 2}, leaders are 17, 5 and 2 /*Enter your code here. Read input from STDIN. Print your output ...
ALGO
0.99998
3.253597
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2020-12-23T12:46: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": "7a75a920e4a...
6054c36c-39f2-4f08-8a93-5f32e0374706
mansi104-ai/Leetcode_interview_ques
Interview_Easy/sorting_techniques/bubble_sort.cpp
#include <iostream> #include <vector> using namespace std; class Solution{ public: void swapElements(vector<int>& arr, int n) { for (int i = 0; i < n - 1; ++i) { for (int j = 0; j < n - i - 1; ++j) { if (arr[j] > arr[j + 1]) { int temp = arr[j]; ...
ALGO
0.999968
5.992309
{ "github_metadata": { "branch": "main", "commit_count": 156, "repo_created_at": "2024-01-11T09:58:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "a1d50ea483...
1604ab98-1722-452b-99ee-caf0d4856ed4
dingodb/dingofs
src/mdsv2/common/helper.h
// Copyright (c) 2023 dingodb.com, Inc. All Rights Reserved // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by a...
TOOL
0.939227
7.104935
{ "github_metadata": { "branch": "main", "commit_count": 3464, "repo_created_at": "2025-01-02T07:11:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 28, "forks": 15, "issues": 2, "pull_requests": 5 }, "file_meta": { "content_id": "6a7a73e0...
d15322e0-2e6d-4f7d-8492-d2c38120e2ef
usaidahmed01/DSA-algorithms
Trees/heapTree.cpp
// maxheap #include <iostream> #include <vector> using namespace std; void print(vector<int> &heap) { for (int i = 0; i < heap.size(); i++) { cout << heap[i] << " \n"; } } void insert(int value, vector<int> &heap) { heap.push_back(value); int j = heap.size() - 1; while (j > 0) { ...
ALGO
0.999719
4.16897
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2025-05-03T19:15:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c74991251f...
d307a8a0-f4c5-4dca-ac1f-0b6a31548b91
Mystic1412/OOP-Classes
Cpp_Lecture/HW/Nichole_Lin.cpp
#include <iostream> #include <cmath> using namespace std; bool ok(int q[], int c) { // Reuse the ok function from your 1D 8 queens program. for(int i=0; i<c; i++){ if(q[c]==q[i] || (c-i)==abs(q[c]-q[i])){ return false; } } return true; } // This function should return the numb...
ALGO
0.999699
4.665503
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2024-01-28T19:58: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": "9fc77ca8ccb...
76978729-1cea-46a8-b299-62e23443f067
Edu175/Competitive_Programming
oia/nacionales/2023/codigos-nacional-oia-2023/n2/U03N2/tec/15660.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; vector<vector<int>> grafo; void tablero(int N, vector<int> &A, vector<int> &B) { grafo.resize(N + 1); for(int i = 0; i < A.size(); i++){ grafo[A[i]].push_back(B[i]); grafo[B[i]].push_back(A[i]); } } int paisEnc...
ALGO
0.999935
4.109547
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2022-09-14T03:09:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb0f09c8f...
572cce65-9e63-4e4b-b6c3-6041f8387ac0
Khaled-Kamal/ECPC-2024-
ECPC Qualifications 2024 Day 2/i.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define sz(s) (int)(s).size() #define all(s) s.begin(),s.end() void Speed() { ios_base::sync_with_stdio(false); cin.tie(NULL); } const int mod = 1e9 + 7; ll power(ll a , ll n){ if(n == 0) return 1; ll res = power(a , n / 2)...
ALGO
0.999933
4.874265
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2024-08-25T22:03:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "45d0e403...
1b84f0dc-170d-441a-8f4f-e095f8cffb75
SummonY/LeetCode
LeetCode/SingleNumberII/singleNumber.cpp
#include <iostream> #include <vector> #include <map> using namespace std; class Solution { public: int singleNumber1(vector<int>& nums) { map<int, int> imap; int i; for (i = 0; i < nums.size(); ++i) { imap[nums[i]]++; } for (i = ...
ALGO
0.999617
5.30158
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2015-05-16T13: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": "1c83c9550...
23c3878b-112b-4e28-b839-d39c5766dec8
timi-liuliang/echo
thirdparty/mlpack/thirdparty/armadillo/include/armadillo_bits/glue_atan2_meat.hpp
// Copyright 2008-2016 <NAME> (http://conradsanderson.id.au) // Copyright 2008-2016 National ICT Australia (NICTA) // // 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.or...
TOOL
0.904716
6.850692
{ "github_metadata": { "branch": "master", "commit_count": 3016, "repo_created_at": "2018-03-10T04:07:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 971, "forks": 116, "issues": 254, "pull_requests": 0 }, "file_meta": { "content_id": "4...
947ae44f-9f16-414e-86f6-4cac310c6b35
njagdale/code-magic
puzzles/MS_Projects/containers_scratch/main.cpp
#include <iostream> #include <vector> #include <list> #include <map> #include <string> using namespace std; // defines... //#define ITER_VECT #define ITER_LIST //#define ITER_MAP // #define VECT_EXAMPLE //#define MAP_EXAMPLE #ifdef MAP_EXAMPLE int main() { map<string, string> dict; map<string, string>::iter...
TOOL
0.925383
4.048294
{ "github_metadata": { "branch": "master", "commit_count": 180, "repo_created_at": "2015-10-09T18:40:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "233ffacf...
91e1295a-f1ca-4c08-badc-35ae3bf916e3
amitmungare/ccns
hce.cpp
#include<iostream> #include<math.h> using namespace std; float en[3][1], de[3][1], msg[3][1], a[3][3], b[3][3], c[3][3]; void getKeyMatrix() { cout<<"Enter 3x3 matrix for key (should have inverse):\n"; for(int i = 0; i < 3; i++) for(int j = 0; j < 3; j++) { cin>>a[i][j]; c[i][j] = a[i][j]; } ...
ALGO
0.999792
3.300436
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-08-20T00:59: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": "bb90dcd4d73a...
a76bab93-9629-4ced-a309-1c3ce6713955
karthikeya48/Trees
TreeDiameter.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define endl "\n" signed main() { ios_base::sync_with_stdio(false); cin.tie(nullptr);cout.tie(nullptr); int n; cin >> n; vector<vector<int>> adj(n + 1); for(int i = 0; i < n - 1; i++) { int u, v; cin >> u >> v...
ALGO
0.999037
4.104257
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-12-24T04:26: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": "533018320540...
5eb3e9ef-fc65-448e-b16f-792a085bf16e
hieu-ln/IT81-07
CodeC3/ThaoTran_C3_Bai1.cpp
//bai 1 #include <iostream> #include <ctime> #include <stdio.h> using namespace std; #define MAX 5000 //cau 1.1 int a[MAX]; int n; //cau 1.2: nhap danh sach void init (int a[], int &n) { cout << "Nhap vao so luong phan tu cua danh sach: "; cin >> n; for (int i = 0; i < n; i++) a[i] = rand () % 10000 + 1; cout <...
ALGO
0.997783
3.398275
{ "github_metadata": { "branch": "master", "commit_count": 139, "repo_created_at": "2019-06-26T10:00: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": "2b035a5b...
08f0b6d4-ee31-45f6-8322-a39e8f42fda1
dheerujilagam/leetcode
Fraction pairs with sum 1 - GFG/fraction-pairs-with-sum-1.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 countFractions(int n, int num[], int den[]) { map<pair<int, int>, int> mp; int count = 0, x, y; for(int i =...
ALGO
0.999602
5.931664
{ "github_metadata": { "branch": "main", "commit_count": 1998, "repo_created_at": "2022-07-27T09:15: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": "b5421480d...
0f326e0f-00b9-4783-a6f7-29d3b3753c5d
laas/metapod
include/metapod/tools/is_ancestor.hh
// Copyright 2012, // // <NAME> (Aldebaran Robotics) // // This file is part of metapod. // metapod is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your opti...
ALGO
0.924209
6.057721
{ "github_metadata": { "branch": "master", "commit_count": 495, "repo_created_at": "2012-02-28T15:50:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14, "forks": 10, "issues": 9, "pull_requests": 0 }, "file_meta": { "content_id": "6996830...
8390c70f-6961-4ed6-a5af-429d30bc8b32
alps-jbnu/23ALPStudy
2023-1/Basic/dlgustj206/BFS/10026.cpp
#include <iostream> #include <queue> #define X first #define Y second using namespace std; char rgb[101][101]; int vis[101][101]; int n; int dx[4]={1, 0, -1, 0}; int dy[4]={0, 1, 0, -1}; int area(); void bfs(int, int); int main(void) { ios::sync_with_stdio(0); cin.tie(0); cin>>n; for(int i=0; i<n; i...
ALGO
0.997783
3.648759
{ "github_metadata": { "branch": "main", "commit_count": 2930, "repo_created_at": "2023-02-03T06:11:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 59, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4bbe34d8...
f398058d-3b77-4edc-84b7-473b3a0e9856
DrEden33773/LeetCode_Repo
144.二叉树的前序遍历.cpp
/* * @lc app=leetcode.cn id=144 lang=cpp * * [144] 二叉树的前序遍历 */ // @lc code=start /** * 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),...
ALGO
0.99997
6.683956
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2022-10-29T08:45:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d9877c013...
442f2002-6cf0-4193-94f0-12edf5f55fc2
momomorgentau/code
atcoder/arc/arc104/b_dna_sequence.cpp
//diff 410 #include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int n; string s; cin >> n >> s; int ls = s.length(); vector<int> a(ls + 1, 0); vector<int> t(ls + 1, 0); vector<int> g(ls + 1, 0); vector<int> c(ls + 1, 0...
ALGO
0.999954
3.566064
{ "github_metadata": { "branch": "develop", "commit_count": 286, "repo_created_at": "2020-10-01T18:13: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": "b424d7c...
e16baef9-f77f-425f-a6e8-bcc8225be38a
OpenSeesXMU/ReliabilitySoftware
NormalRV.cpp
/* ****************************************************************** ** ** OpenSees - Open System for Earthquake Engineering Simulation ** ** Pacific Earthquake Engineering Research Center ** ** ** ** ...
ALGO
0.985186
5.050187
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-12-26T12:22:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "70181e84f3...
4eea7924-6f4f-44a7-b13e-836472feb288
joannetait/Team-Project
TeensyCode/teensy_code_V4.ino
// Three bytes interface is used between Arduino Due and Teensy on COM serial port: // Byte 1: 255 (sync byte) // Byte 2: <control> - [0:255] // Byte 3: <value MSB> - [0:255] // -------------------------------------------------- #include <MCP492X.h> // Include the library #include <SPI.h> #include <lfo.h> // ...
TOOL
0.919664
5.353465
{ "github_metadata": { "branch": "main", "commit_count": 108, "repo_created_at": "2021-04-20T16:31:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "3222c629e5...
ef92704d-6c2b-4141-85bb-3ea65837847d
saifullah-talukder/Competitive_Programming
Codes/Codeforces/Accepted/CF_1343_E.cpp
#include <bits/stdc++.h> using namespace std; /* #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/detail/standard_policies.hpp> using namespace __gnu_pbds; using namespace __gnu_cxx;*/ #define fi first #define se second #define mp make_pair #define pb push_back #define ...
ALGO
0.999971
4.102029
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-05-10T06:16:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01c59ac27ed1...
794d99d7-e10c-45e3-952d-f8df6865bbe6
ckdals4600/BaekJoon
백준/Gold/1107. 리모컨/리모컨.cc
#include <iostream> #include <set> using namespace std; int main() { int start = 100; int channel; int button[10] = { 0, }; int m; cin >> channel >> m; while (m--) { int b; cin >> b; button[b] = -1; } int min = (channel > start) ? channel - start : start - channel; for (int i = channel; i < 100000...
ALGO
0.999824
3.200755
{ "github_metadata": { "branch": "main", "commit_count": 140, "repo_created_at": "2023-09-01T07:24: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": "7943937d00...
5dd444f0-9a3a-413e-93a0-810d77ba711b
go-skynet/go-llama.cpp
binding.cpp
#include "common.h" #include "llama.h" #include "binding.h" #include "grammar-parser.h" #include <cassert> #include <cinttypes> #include <cmath> #include <cstdio> #include <cstring> #include <fstream> #include <sstream> #include <iostream> #include <string> #include <vector> #include <sstream> #include <regex> #if def...
TOOL
0.965861
6.850957
{ "github_metadata": { "branch": "master", "commit_count": 209, "repo_created_at": "2023-04-03T22:33:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 792, "forks": 91, "issues": 30, "pull_requests": 8 }, "file_meta": { "content_id": "50ad9...
3fd03a5e-8a36-4a1c-8f10-cfd21a621abc
nxp-imx/tensorflow-imx
third_party/xla/xla/service/gpu/ir_emitter_nested.cc
/* Copyright 2017 The OpenXLA Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
TOOL
0.962241
4.848361
{ "github_metadata": { "branch": "lf-6.12.20_2.0.0", "commit_count": 170026, "repo_created_at": "2022-08-04T04:21:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 15, "forks": 6, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_i...
4cd50bc9-8070-471e-83b7-747db3fb0258
siddhant1999/Contest-Programming-Files-C-
USACO Gold 1/USACO Gold 1/main.cpp
// // main.cpp // USACO Gold 1 // // Created by <NAME> on 2016-01-15. // Copyright © 2016 <NAME>. All rights reserved. // #include <iostream> #include <algorithm> #include <stdlib.h> #include <vector> #include <string> #include <queue> #include <math.h> #include <fstream> #include <set> #include <map> #include <bi...
ALGO
0.999995
3.930361
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2016-01-28T15:57: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": "3f7248a1d1...
ad794692-08a9-4e75-a733-326451581ff1
ishandutta2007/codeforces-k
ko_osaga/normal/19/E.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <math.h> #include <limits.h> #include <stack> #include <queue> #include <map> #include <set> #include <algorithm> #include <string> #include <functional> #include <vector> #include <numeric> #include <deque> #include <bitset> #inclu...
ALGO
0.999944
3.745409
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dbfd5c3a3e0e...
d4734764-38f5-405e-88f8-82fea7f4742d
zvant/LeetCodeSolutions
0587.erect_the_fence_H.cpp
/** * https://leetcode.com/problems/erect-the-fence/ * 2018/12 * 36 ms */ /** * Definition for a point. * struct Point { * int x; * int y; * Point() : x(0), y(0) {} * Point(int a, int b) : x(a), y(b) {} * }; */ bool comp(const Point & p1, const Point & p2) { return (p1.x != p2.x) ? (p1...
ALGO
0.999995
5.85489
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2018-07-11T14:13: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": "4e9e6ee1f...
a85e34b2-ac10-4f62-9791-c2d13b9936bf
anzaika/guidance
libs/phylogeny/computeUpAlg.cpp
// $Id: computeUpAlg.cpp 5988 2009-03-18 18:20:05Z itaymay $ #include "definitions.h" #include "computeUpAlg.h" #include "treeIt.h" #include "seqContainerTreeMap.h" #include "logFile.h" #include <iostream> #include <cassert> using namespace std; void computeUpAlg::fillComputeUp(const tree& et, const sequence...
ALGO
0.999734
5.58919
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2016-08-28T12:48:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 3, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "d8f56a99...
ecc0663b-e09b-42cc-a01e-170c6fe19925
gbakkk5951/OI
Test_18.5.16/2018.5.16考试/source/gba/mid.cpp
using namespace std; int main() {} #include <cstdio> namespace OI { typedef long long lld; const int MXN = 5e5 + 10; const lld MOD = 1e9 + 7; struct Node { int s[2], val, size; }node[MXN]; int nxt[MXN], pre[MXN]; struct _Main { int idx; int insert(int v) { int nd = 1, spo; int rk = 1; while (1) { ++node[nd]...
ALGO
0.999982
3.68597
{ "github_metadata": { "branch": "master", "commit_count": 172, "repo_created_at": "2017-12-27T10:35: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": "80547124...
7372ecb3-06fc-4851-ba7c-354486f43afc
LutzGross/esys-escript.github.io
trilinos_source16/packages/kokkos-kernels/batched/dense/impl/KokkosBatched_Trsm_Serial_Impl.hpp
//@HEADER // ************************************************************************ // // Kokkos v. 4.0 // Copyright (2022) National Technology & Engineering // Solutions of Sandia, LLC (NTESS). // // Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Governmen...
ALGO
0.987506
7.225218
{ "github_metadata": { "branch": "master", "commit_count": 5724, "repo_created_at": "2020-08-10T02:31:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 15, "issues": 63, "pull_requests": 0 }, "file_meta": { "content_id": "9935...
698a02a2-4a9f-41ad-9632-9de249c6b186
ishandutta2007/codeforces-d
davidberard/normal/1132/G.cpp
#include <iostream> #include <vector> #include <utility> #include <cmath> #include <set> #include <unordered_set> #include <algorithm> #include <iomanip> #include <map> #include <unordered_map> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; const int N = 1001000; int p...
ALGO
0.999953
3.972951
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:31:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b798fe035977...
4a985786-072e-43b6-823e-a21f84f99cda
adni03/DSA-Program-Files
Linked List/LL_merger.cpp
//MERGER #include<iostream> using namespace std; struct lnode { int data; struct lnode *next; }; typedef struct lnode* LPTR; int count (LPTR L) { if(L == NULL) return 0; else return (1+count(L->next)); } void print(LPTR L) { if(L != NULL) { cout<<L->data<<" "; print(L->next); } } LPTR find(LPTR L...
ALGO
0.999929
3.841495
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-05-20T04:16:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "efc0292339...
1b489f74-4b21-4d53-a9ee-fc6c78e0f22b
trapperdot00/programming_principles_and_practice_using_cpp_3rd_edition_exercises
Chapter03/exercises/05/01.cpp
#include <iostream> #include <string> char ask(const std::string &answers) { char c = '\0'; while (answers.find(c) == std::string::npos) std::cin >> c; return c; } int main() { int beg = 1; int end = 100; int mid = (end + beg) / 2; std::cout << "Think of a number between 1 and 100!\n"; bool found = false; ...
ALGO
0.996519
3.857098
{ "github_metadata": { "branch": "master", "commit_count": 235, "repo_created_at": "2024-12-30T11: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": "619f10e2...
3e49332c-1783-4b21-b5ad-29ef18fe0509
rainwl/GeometryKit
include/igl/circumradius.h
// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2016 <NAME> <<EMAIL>> // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2....
ALGO
0.996363
6.309473
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2024-05-12T10:02:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3349c3bb6...
92b81d27-a62a-4c97-a736-8f78f99ecf10
petite-etoile/AtCoder
Algorithms/Heuristics/sample/annealing_search_v1 2.cpp
/*    ∫ ∫ ∫    ノヽ   (_  )  (_    ) (______ )  ヽ(´・ω・)ノ     |  /    UU */ #include<iostream> #include<fstream> #include<vector> #include<utility> #include<string> #include<cassert> #include<set> #include<tuple> #include<time.h> #include<unistd.h> #include<algorithm> #include<numeric> #include<cmath> #include<cstdlib> #i...
ALGO
0.999735
4.071265
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2019-11-25T17:18: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": "633200189...
e0a714ad-5bda-4c93-a5ac-cdb2864cdf0f
ETU-ADS/1373
Lab 2/Жмуренко В.К/src/taskFunctions.cpp
#include <iostream> #include "taskFunctions.h" #include "sortFunctions.h" #include "listFunctions.h" #include "stackFunctions.h" using namespace std; void fillingArray(int* array, unsigned lenght) // Функция ввода пользователем значений нашего массива { for (int i = 0; i < lenght; i++) { std::cin >> array[i]; } ...
ALGO
0.999432
3.628623
{ "github_metadata": { "branch": "main", "commit_count": 129, "repo_created_at": "2022-09-19T13:54:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 5, "issues": 0, "pull_requests": 5 }, "file_meta": { "content_id": "494da97b013...
e402b64c-bcba-410c-9b40-7d4ac205a7b4
tblock007/euler
euler56.cpp
//DESCRIPTION: Uses the hand multiplication algorithm developed for problem 20 to iterate through all combinations. #include <iostream> using namespace std; int sdm(int* output, int a, int b, int carry) // computes a*b + carry, places the unit value in output and returns the carry { int result = a*b + carry; *outp...
ALGO
0.999936
5.054937
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-03-19T01:38: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": "733fcb07b8...
7c49c5c7-f19d-452a-9b99-5e37608f62d7
azonalon/EvolutionaryCreator
src/render/FlowRender.hpp
#include "render/Render.hpp" #include <array> struct TextureBounds { double x0, y0, x1, y1; }; class ColorMapJet { public: typedef struct { double r, g, b; } COLOUR; static COLOUR GetColour(double v, double vmin, double vmax) { COLOUR c = {1.0, 1.0, 1.0}; // white double dv; if (v < vmin) ...
ALGO
0.918267
4.963197
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2023-05-18T19:55: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": "3152b9fea...
c4765230-0be3-4f9c-afeb-e5deca56c739
baptuDenjer/Competitive-Programming
Kattis/C++/AlphabetAnimals.cpp
#include<iostream> #include<map> #include<vector> #include<set> #include<unordered_set> #include<unordered_map> #include<list> #include<string> #include<algorithm> #include<cmath> #include<iterator> #include<cstring> #include<stack> #include<queue> #include<bitset> #include<climits> #include<sstream> #include<iomanip> ...
ALGO
0.99997
3.472068
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-07-15T17:23:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e18be63fd...
3fa78ae7-63e4-4910-9258-a5f3462e2321
MartinPiloni/CompetitiveProgramming
ICPC/2023-2024-LATAM_REGIONAL/M.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define fst first #define snd second #define sz(x) ((int)x.size()) #define all(x) x.begin(),x.end() using ll = long long; using str = string; const int MAXN = 1e5 + 10; int n, m, p, r; vector<pair<int, ll>> g[MAXN]; ll dist[MAXN]; void dijkstra(int ...
ALGO
0.999996
4.059632
{ "github_metadata": { "branch": "main", "commit_count": 357, "repo_created_at": "2023-01-03T01:54: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": "ebc54e3c79...
fff72516-0f26-4877-b077-b92692aaac62
hummels-jp/program
C++11/lock/RAII_lock/unique_lock.cpp
#include <iostream> #include <thread> #include <mutex> #include <vector> #include <condition_variable> // 共享资源 int counter = 0; std::mutex counter_mutex; std::condition_variable cv; bool ready = false; // 使用unique_lock进行更灵活的锁管理 void worker(int id, int iterations) { for (int i = 0; i < iterations; ++i) { /...
TOOL
0.947226
5.874654
{ "github_metadata": { "branch": "main", "commit_count": 191, "repo_created_at": "2025-03-21T02:30: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": "0c7141b412...
250d680a-1a34-43fe-bedc-2d0964d9aaf3
napatswift/CS231-Data-Structure-2021
lab/185-path.cpp
#include<iostream> #include <list> using namespace std; class Graph{ int V; list<int> *adj; public: Graph(int V); void addEdge(int v, int w); bool isReachable(int s, int d); }; Graph::Graph(int V){ this->V = V; adj = new list<int>[V]; } void Graph::addEdge(int v, int w){ ...
ALGO
0.999975
4.386984
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-10-22T04:04: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": "08068a062bca...
6608106e-cca1-4bdb-ae92-83ec5acafc16
KeithLaiKB/cpp_leetcode_try20220906
clion_leetcode_workspace1/mysrc/daimakuangxianglu/binarytree/constructtree/seq24_t701_InsertintoaBinarySearchTree/t701_InsertintoaBinarySearchTree.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <string> #include <stack> #include <queue> #include <optional> #include <climits> using namespace std; /** * * You are given the root node of a binary search tree (BST) and a value to insert into the tree. * * Return the root node of the BST ...
ALGO
0.999951
5.370601
{ "github_metadata": { "branch": "main", "commit_count": 190, "repo_created_at": "2022-09-06T23:52:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "36ebd0ddf4...
9138465f-0655-432f-aa5d-44d66022e901
sravanth1/interview_bit
spiral_order_matrix_i.cpp
vector<int> Solution::spiralOrder(const vector<vector<int> > &A) { vector<int> res; int t=0;int b=A.size();int l=0;int r=A[0].size(); int dir=0; while(t<=b-1 && l<=r-1) { if(dir==0) { for(int i=l;i<r;i++) { res.push_back(A[t][i]); } t++; } else i...
ALGO
0.999959
5.795584
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2016-12-09T18:04: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": "ea9a1690eb...
4234b509-2103-4e0c-aa6b-cbd5456acb63
April01xxx/LeetCode
range_sum_query_2D.cc
/** * Given a 2D matrix matrix, find the sum of the elements inside the rectangle * defined by its upper left corner (row1, col1) and lower right corner (row2, * col2). * * Example: * Given matrix = [ * [3, 0, 1, 4, 2], * [5, 6, 3, 2, 1], * [1, 2, 0, 1, 5], * [4, 1, 0, 1, 7], * [1, 0, 3, 0, 5] * ]...
ALGO
0.999824
6.297233
{ "github_metadata": { "branch": "master", "commit_count": 398, "repo_created_at": "2018-07-09T01:10: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": "b6192f61...
529f397e-353e-4c75-8155-950c3031817e
entama2000/LeetCode
6.zigzag-conversion.cpp
/* * @lc app=leetcode id=6 lang=cpp * * [6] Zigzag Conversion */ // @lc code=start class Solution { public: string convert(string s, int numRows) { string result = ""; if(numRows == 1 || s.length() < numRows) return s; else { int oneSet = numRows + numRow...
ALGO
0.999998
6.538716
{ "github_metadata": { "branch": "main", "commit_count": 79, "repo_created_at": "2022-08-30T18:32:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "134b72235f4...
aa989d4b-4a50-48a7-8816-07ce5e4eec2b
TutorProgramacion/tutoriales-opencv
track-color/TrackColor.cpp
#include <iostream> #include <string> #include <vector> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> using namespace cv; using namespace std; int main() { Mat img, hsv, binary; VideoCapture cap(0); // verificar si se ha podido acceder a la web cam if (!cap.isOpened(...
TOOL
0.959274
5.165833
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2016-04-04T14:47:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9, "forks": 11, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3cf877156...
172bab39-a2c8-409e-b9fc-90e2c047b021
aarizaq/inetmanet-3.x
src/inet/physicallayer/modulation/QAM256Modulation.cc
// // Copyright (C) 2014 OpenSim Ltd. // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program i...
CONFIG
0.964179
4.752432
{ "github_metadata": { "branch": "inetmanet-3.8.2", "commit_count": 1230, "repo_created_at": "2011-06-05T10:11:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 46, "forks": 74, "issues": 5, "pull_requests": 2 }, "file_meta": { "content_id...
7908a4c1-47d1-41c7-94c3-333c7ca0aa65
italotelly/coding_test
SWEA/D3/1220. [S/W 문제해결 기본] 5일차 - Magnetic/[S/W 문제해결 기본] 5일차 - Magnetic.cpp
#include <iostream> #include <stack> using namespace std; int main() { cin.tie(NULL); ios::sync_with_stdio(false); int len; for (int i = 1; i <= 10; i++) { cin >> len; int ary[100][100] = { 0 }; int cnt = 0; stack<int> s; while (!s.empty()) { s.pop(); } for (int j = 0; j < 100; j++) { for (...
ALGO
0.998351
3.582984
{ "github_metadata": { "branch": "main", "commit_count": 243, "repo_created_at": "2025-03-31T14:36: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": "e413a9a535...
db81c98a-7768-4a1f-80fa-a08901e47ce5
the-algorithms/data-structures-cplusplus
binary-search-tree/working-1.cpp
/* Deleting a node from Binary search tree */ #include<iostream> #include <stdio.h> #include <string.h> using namespace std; struct Node { char data; struct Node *left; struct Node *right; }; //Function to find minimum in a tree. Node* FindMin(Node* root) { while(root->left != NULL) root = root->left; ...
ALGO
0.999969
3.331823
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2017-10-20T16:30:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f57e1bac1c...
2ef4d1e8-09a2-4b65-82fe-bfa38d9ff703
Niserg/cs141
lab_3/lab3_Q63.cpp
#include <iostream> using namespace std; string func(short arg); int main() { long Oct; string st; cout<<"\nProgram to convert Octal to Binary number system."; cout<<"\nEnter an octal number :"; cin >> Oct; for (long oct_C = Oct ; oct_C > 0 ; oct_C /= 10) { if (oct_C%10 > 7) { //Check...
ALGO
0.984929
4.623863
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-01-03T07:35: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": "0bca21c93b4...
071ddb34-362e-4aa3-9a46-db9f37bae239
Forrest-Z/rtv_nav2
rtv_nav2_plan_optimizer/include/rtv_nav2_plan_optimizer/plugins/ceres_costaware_smoother/smoother.hpp
// Copyright (c) 2021 RoboTech Vision // Copyright (c) 2020, Samsung Research America // // 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 ...
ALGO
0.99872
6.402364
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-08-13T07:55:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7bc92031c5a5...
fcb2801c-07ef-4d16-b38c-476c95dfbc32
Akamoha/Competitive-Coding-Solutions
CodeChef/Practice/FIRESC.cpp
#include<stdio.h> #include<iostream> #include<bits/stdc++.h> #define sd(x) scanf("%d", &x); #define slld(x) scanf("%lld", &x); #define print(x) printf("%lld\n", x); #define TYPE int #define MOD 1000000007 using namespace std; struct node { TYPE data; node* parent; TYPE rank; }; map<TYPE, node*> MAP; void makeSe...
ALGO
0.999914
4.203923
{ "github_metadata": { "branch": "master", "commit_count": 144, "repo_created_at": "2015-01-26T14:33:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9f5b22eb...
d3dfe3f7-818c-46c2-afeb-5704e33c2802
kensuke-harada/graspPlugin
PCL/CVFHEstimator.h
#ifndef _PCL_CVFHESTIMATOR_H_ #define _PCL_CVFHESTIMATOR_H_ #include <limits> #include <vector> #include <pcl/features/normal_3d.h> #include <pcl/features/cvfh.h> #include <pcl/filters/filter_indices.h> #include <pcl/features/crh.h> #include "cvfhext.h" #include "crhext.h" #include "PointCloudTypes.h" #define USE_E...
ALGO
0.961951
6.872075
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2018-11-10T13:11:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd6e18452...
0e192cc9-ac72-436e-a9d9-eb5f5adb4d4c
DevRitesh08/DSA
Binary Search/BS on 1D Array/EASY/Binary_Search_to_find_X_in_sorted_array.cpp
#include<bits/stdc++.h> using namespace std; // Iterative Implementation int binarySearch(vector<int>& nums, int target) { int n = nums.size(); //size of the array int low = 0, high = n - 1; // Perform the steps: while (low <= high) { int mid = (low + high) / 2; if (nums[mid] == targ...
ALGO
0.999665
5.574065
{ "github_metadata": { "branch": "main", "commit_count": 101, "repo_created_at": "2024-11-05T16:34: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": "54ed067361...
d244ee30-3d3d-470f-9216-a76cf7c1f770
Geek-prince7/DSA
BST/getLCA.cpp
#include<iostream> #include"BinaryTree.h" using namespace std; /* int getLCA(BinaryTreeNode <int>* root , int a, int b) { // Write your code here if(root==NULL) { return -1; } int ans=-1; if(root->data==a || root->data==b) { ans=root->data; } int leftans=getLCA(root->...
ALGO
0.999997
4.569632
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-04-08T12:48: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": "b465c5b766...
bbd90feb-4ba0-446c-b8fc-3df1c40d9796
joy-mollick/Codeforces-B-C-D-Problem-Solutions
Codeforces: 864 C. Bus.cpp
/// Codeforces: 864 C. Bus /// Category: implementation + math. #include<bits/stdc++.h> using namespace std; int main() { int a,b,f,k; cin>>a>>b>>f>>k; int stoppage=0; bool ox=true; bool xo=false; int dox=a; int dxo=a; int curr_gas=b; while(k) { if(ox) { /...
ALGO
0.999952
3.056846
{ "github_metadata": { "branch": "master", "commit_count": 140, "repo_created_at": "2019-04-18T17:17:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e45bf50...
50de2d8e-d207-406c-8e2c-5fc8ae18c7fe
OpenFOAM/OpenFOAM-dev
src/lagrangian/parcel/submodels/MPPIC/CorrectionLimitingMethods/relative/relative.H
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation \\...
ALGO
0.978956
7.620222
{ "github_metadata": { "branch": "master", "commit_count": 8589, "repo_created_at": "2014-12-10T15:47:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1770, "forks": 642, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "d2...
93cd47a8-0303-4199-b0e5-563bbe8e0393
singh7priyanshu/love_babbar_450_solutions
dynamic_programming/Unbounded Knapsack (Repetition of items allowed)/sol.cpp
/* Unbounded Knapsack (Repetition of items allowed) Given a set of N items, each with a weight and a value, represented by the array w[] and val[] respectively. Also, a knapsack with weight limit W. The task is to fill the knapsack in such a way that we can get the maximum profit. Return the maximum profit. Note: ...
ALGO
0.999998
4.832202
{ "github_metadata": { "branch": "main", "commit_count": 809, "repo_created_at": "2021-10-24T22:33:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a17b62f00...
2082014f-ad9f-469a-bb04-6e0b815a3166
genshen/CplusplusExercise
ex7/9/main.cpp
// // Created by gensh on 2016/12/16. // #include<iostream> #include <cmath> using namespace std; int main() { int value1, value2; cout << "input 2 number\n"; cin >> value1 >> value2; if (value1 > value2) { //交换,保证value1<value2 int temp = value2; value2 = value1; value1 = temp...
ALGO
0.999931
4.393104
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2016-12-16T01:52: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": "484f2ae67...
3cb90d2a-7252-43c9-82fa-54dc59a22f14
schnell-rms/Advent2023
utils/matrix.h
#ifndef ADVENT2023_MATRIX_H #define ADVENT2023_MATRIX_H #include <vector> #include <initializer_list> template <class T> class Matrix { public: Matrix(std::initializer_list<std::vector<T>> list): data_(list) {} Matrix() : data_() {} Matrix(size_t nLines) : data_(nLines) {} Matrix(size_t nLines, size...
ALGO
0.991468
6.335739
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2023-12-01T02:02: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": "cc607d737a2...
8d3f847c-13ba-4bc9-9f57-3b5d94b6639f
anshulontech/Leetcode-Problems
prob304.c++
// https://leetcode.com/problems/range-sum-query-2d-immutable/ // Time Complexity:-O(N^2). For Maintaing matrix and O(1) for calculating sum // Space Complexity:-O(N^2). // Approach:- // We will use a dp table for storing the sum of all the elements starting from the (0,0) index to that index which // uses O...
ALGO
0.999665
7.473075
{ "github_metadata": { "branch": "master", "commit_count": 1016, "repo_created_at": "2020-02-08T16:13:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ad9823...
c78e6e01-3747-4c38-ad17-7270832fb15d
yangjufo/LeetCode
2021/310. Minimum Height Trees.cpp
class Solution { public: vector<int> findMinHeightTrees(int n, vector<vector<int>>& edges) { if (n <= 1) { return { 0 }; } vector<int> res, degrees(n, 0); vector<vector<int>> edgeMap(n); for (vector<int>& edge : edges) { edgeMap[edge[0]].push_b...
ALGO
0.999998
6.270604
{ "github_metadata": { "branch": "master", "commit_count": 1058, "repo_created_at": "2018-03-25T13:07: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": "8850d8f...
1c001141-40e6-4999-acf3-e3179540713e
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/12/04/16.cpp
#include <iostream> #include <cmath> #include <algorithm> using namespace std; typedef long long int LL; const int MAX_S = 30; LL gcd(LL a, LL b) { while (b) { a %= b; swap(a, b); } return a; } struct ratio { LL num, den; ratio(LL num_ = 0, LL den_ = 1) : num(num_), den(den_) { if (den < 0) {...
ALGO
0.999855
4.407611
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-09-30T05:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "76d13c6a...
d1c6252f-6671-4e34-b155-1ed1f39cdb79
Melinda-Ruinan-Chen/Recreate-First-Journale
workfolder/NerdyCardGAME/TheDirtyNERDY.cpp
//dirtyNERDYONE -- This program plays a 2-player version of 31 // <NAME> Comp Sci 30S //Feb.5, 2020 #include <iostream> #include<windows.h> #include"colours.h" #include<time.h> #include<conio.h> #include<stdio.h> using namespace std; //Global identifiers int p1c1, p1s1, p2c1, p2s1, p1c2, p1s2, p2c2, p2s2, p1c3,...
TOOL
0.944432
3.203761
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2021-01-24T09:10:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c845fcccf0...
559cfeb5-ca1f-4bee-8e54-eb82b6005467
TheOneFoxAgo/heapsort
heapsort.h
#ifndef HEAPSORT_H #define HEAPSORT_H #include <functional> #include <iterator> namespace detail { template <class Iterator> using defaultComparator = std::less<typename std::iterator_traits<Iterator>::value_type>; template <class Iterator> Iterator parent(Iterator begin, Iterator current) { return begin + (curr...
ALGO
0.999551
6.489615
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-04-06T17:53: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": "d13df2461924...
e9cc47a0-2a12-49c1-b519-f710cf2cfda7
HOUMOO/Leedcode
Solution_44.cpp
// // Created by houmo on 19-6-9. // #include "Solution_44.h" int length(string p){ int count = 0; for(int i=0; i<p.length(); i++){ if(p[i] != '*'){ count++; } } return count; } bool Match(string s, string p){ if(p.empty()){ return s.empty(); }else{ ...
ALGO
0.999967
4.001986
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2019-03-19T01:14: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": "f9429ff75...
feb0caaf-fd59-43f5-b17d-b8be1497b724
mhwen/competitive-programming
ICPC/Nanjing_2022/E_ColorTheTree.cpp
#include <iostream> #include <vector> #include <algorithm> #include <queue> #include <map> #include <set> #include <stack> #include <functional> #include <cassert> using namespace std; typedef long long ll; constexpr ll INF = 1e16; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define sz(x) (int)(x).size() tem...
ALGO
0.999949
4.710602
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-08-27T00:30:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4dff351148bd...
31e41951-6254-40e0-97a6-b3a8257534d1
17171717171717/CSES
CF/20250225/PA.cpp
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) #define REP1(i, n) for(int i = 1; i <= n; i++) #define vin(v) for( int i = 0 ; i < v.size() ; i++ ) cin >> v[i]; #define vpiiin(v) for( int i = 0 ; i < v.size() ; i++ ) cin >> v[i].f >> v[i].s; #define debugvec(v) for (int i = 0...
ALGO
0.999825
3.845048
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-12-25T13:35: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": "635e8b2d3d3...
e6cad100-7aec-406e-88ff-e8b073cdf1cc
jonperk318/searching-algorithms
cpp-algorithms/ternary_search.h
/* TERNARY SEARCH: repeatedly divide sorted array into equal thirds until the target element is found. Time complexity: best case: O(1) (first element checked matches) average case: O(log3(n)) Space complexity: O(1) */ #ifndef TERNARY_SEARCH_H #define TERNARY_SEARCH_H using namespace std; #include <vector> ...
ALGO
0.999974
5.995715
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2024-06-08T04:49:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5834b46bd5d...
baa0839f-d782-410a-aea5-d172acaffbaf
rjenez/W266-final-project
data/programming-homework-dataset-plagiarism-detection/src/B2017/Z1/Z1/student4280.cpp
/*B 2017/2018, Zadaća 1, Zadatak 1 NAPOMENA: ulaz/izlaz za zadatke je specificiran javnim autotestovima. Zalbe za ne analiziranje testova se ne uvazavaju! NAPOMENA: nece svi (javni) testovi sa zamgera biti dostupni na c9. Za sva ostala pitanja i nedoumice vezane za autotestove javiti se na email: <EMAIL>. */ ...
ALGO
0.998186
4.059524
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2022-02-09T00:45:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "09714fa4e5...
33c89d51-17cd-4843-a59b-b2657970b17a
samnit4/c-c-c
остановки.cpp
#include <iostream> #include<map> #include<vector> #include<string> #include<set> using namespace std; /* //map<nomer, spisok ostanovok>buses //vector<string> bus_seq; void All_buses(map<string, vector<string>>& buses) { if (buses.size()) { for (const auto& i : buses) { cout << "Bus " << i.first << ": "; ...
ALGO
0.976964
4.427117
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-02-25T15:53: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": "703d1e3efc...
fb815c95-d01e-47c4-b9f4-2c0399ff7168
madhuis/Data_Structure_And_Algorithm
Assign5/assign5.cpp
/************************************************************************************************************** PROGRAM: Assignment 5 AUTHOR: <NAME> LOGON ID: z1763923 DUE DATE: October 18, 2015 FUNCTION: This program Uses the binary tree of integers of two classes. *****************************************************...
ALGO
0.994861
5.41196
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-11-10T05:20:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a01dd58217...
fb1729a2-46e7-4455-82e0-171d8e70fa01
yku/Competition
TopCoder/srm493/AmoebaDivTwo.cpp
#include <iostream> #include <sstream> #include <cstring> #include <algorithm> #include <string> #include <vector> using namespace std; class AmoebaDivTwo { public: int count(vector <string> table, int K) { int row = table.size(); int col = table[0].length(); int ret = 0; for(int i = 0; i < row; ...
ALGO
0.998727
4.208246
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2011-10-24T16:25:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7dfa5735...
105c24cc-8ef1-42c5-ac72-0cfa8ef23012
dgerard42/lab_02
05_dgerard.cpp
/* ************************************************************************** */ /* */ /* .--. */ /* 05_dgerard.cpp __/ o ". ...
TOOL
0.923108
4.416519
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2019-09-24T16:23: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": "213252498...
2913f95c-c55f-4d86-b2b8-a3e6b3361631
vfolunin/archives-solutions
Kattis/cartrouble.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <string> using namespace std; void dfs(map<int, set<int>> &graph, int v, set<int> &visited) { visited.insert(v); for (int to : graph[v]) if (!visited.count(to)) dfs(graph, to, visited); } int ...
ALGO
0.999883
4.039724
{ "github_metadata": { "branch": "master", "commit_count": 2367, "repo_created_at": "2017-11-27T10:19:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 5 }, "file_meta": { "content_id": "b092b82...
a93d2a47-6602-4c43-892e-fac97c7604c1
mdmahamudmredha/Problem_Solving_C_and_Cpp
CodeForces/1800B_Count_the_number_of_pairs.cpp
//========“In the name of ALLAH, The Most Gracious and The Most Merciful“===============================| // problem link : https://codeforces.com/problemset/problem/1800/B // Name : .cpp // Author : Md. <NAME> // Version : // Copyright : use it under your responsibility //...
ALGO
0.999827
4.054735
{ "github_metadata": { "branch": "main", "commit_count": 356, "repo_created_at": "2022-06-02T19:46: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": "cb0ef23ba6...
6932b1d2-bd29-448f-bb37-23391637e3e2
Abhi54743/MCPROJ_CDO
CDO_pricing/zero_search.h
#ifndef ZERO_SEARCH_H #define ZERO_SEARCH_H namespace useful { /** * @brief * * @param f * @param l * @param r * @param eps * * @return */ template <typename TRealFunction> double dichotomie(TRealFunction const & f, double y = 0, double l = 0, double r = 1, double eps = 2*s...
ALGO
0.999965
5.796758
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2017-05-18T18:19: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": "108bc6a98...