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
c111608e-fa4b-44de-8ed2-bb3a01570ced
ishandutta2007/codeforces-o
orzdevinwang/normal/576/D.cpp
#include<bits/stdc++.h> #define L(i, j, k) for(int i = j, i##E = k; i <= i##E; i++) #define R(i, j, k) for(int i = j, i##E = k; i >= i##E; i--) #define ll long long #define ull unsigned long long #define db long double #define pii pair<int, int> #define mkp make_pair #define putsl puts("") using namespace std; const in...
ALGO
0.999837
3.794053
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:45: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": "68623963a31f...
038ec44d-cb8c-4183-8871-d992e74423cb
Yawn-Sean/Daily_CF_Problems
daily_problems/2025/05/0528/personal_submission/cf216d_nhirsama.cpp
// <NAME> #include <bits/stdc++.h> using i64 = long long int; using i32 = long long int; constexpr int mod = 1e9 + 7; #define endl '\n' void nhir() { i32 n; std::cin >> n; std::vector v(n, std::vector<i32>()); for (auto &i: v) { i32 t; std::cin >> t; while (t--) { ...
ALGO
0.999538
3.889914
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "9c02...
f0c8632b-4275-4359-90c9-20317e1d71a6
NSkeledzija/AdventOfCode2023
day17/day17.h
#pragma once #include "utils.h" #include <bits/stdc++.h> #include <cstddef> #include <functional> #include <limits> #include <stdexcept> using namespace std::chrono; class Day17 { public: struct State { position p; Direction d; int straight_length; int heatloss; }; struct cmp { bool operat...
ALGO
0.999834
6.14205
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-12-27T12:09: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": "898012a154...
a99b71fd-3171-43a5-b06d-ad3027b2170b
JACazares/Competitive
Codeforces/1706/C/main.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using ull = unsigned long long; using pii = pair<int, int>; using pll = pair<ll, ll>; using vi = vector<int>; using vl = vector<ll>; using vpi = vector<pii>; using vpl = vector<pll>; #define all(x) x.begin(), x.end() #define...
ALGO
0.999804
4.618346
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2022-06-30T18:05:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f115712df...
ccfa8a40-df1f-4690-bfa9-993a9dc73f19
BlazuLyda/cppCompetetiveCoding
Grupa A/Pakowanie (pak)/pakowanie.cpp
#include <bits/stdc++.h> #define neginf = -100000000; using namespace std; int n, m; int DP[101][524288]; vector<int> back; int item[25]; bool cmp(int x, int y) { return x > y; } void countDP(int pref, int mask, int id, int pcount) { int res = neginf; int pom; if (!pcount) { for (int i = 0; i < n; i++) { ...
ALGO
0.999916
3.488782
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-10-25T18:00:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "5552f2f956...
30f822ae-bac3-4023-80ba-eabc1e690e78
IAMSHARIFUL/Templates
Combinatrics.cpp
#include<bits/stdc++.h> using namespace std; #define MAX 100000 #define MOD 1000000007 long long int fact[MAX+1],fact_inv[MAX+1]; long long int gcd(long long int a,long long int b) { if(b==0) return a; else return gcd(b,a%b); } long long int egcd(long long int a, long long int b, long long int & x, long long in...
ALGO
0.999971
4.883421
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2022-05-28T15:58: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": "ed99b17547...
4c65c1a1-2cfb-419f-99f6-aac709804bd2
Sahilamin219/Codeforces
codeforces/445/B.cpp
#include <bits/stdc++.h> #define s(a) long (a.size()) #define f(i,a,b) for(long long int i=a;i<b;i++) #define r(i,a,b) for(long long int i=a;i>b;i--) #define fi first #define se second #define pb push_back #define mkp make_pair #define pi pair<int,int> #define mod 1000000007; #define lcm(a,b) ((a*b)/__gcd(a,b)) #defin...
ALGO
0.999987
3.509439
{ "github_metadata": { "branch": "master", "commit_count": 854, "repo_created_at": "2021-03-07T10:35:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dcfb944f...
c048809b-9889-4091-a708-629c1b0bbc1c
vijayraikar1999/Coding-Ninjas-Data-Structures-and-Algorithms-Course-Completion
02_Stacks_and_Queues/03_queue_using_linked_list.cpp
#include <cstddef> class Node{ public: int data; Node *next; Node() { this->data = 0; next = NULL; } Node(int data) { this->data = data; this->next = NULL; } Node(int data, Node* next) { this->data =...
ALGO
0.9992
4.875745
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2024-01-04T20:37: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": "d90d562d6dc...
bc28ccbe-09e6-4e61-97bd-e2026c1a976c
alexandru-andronache/adventofcode
2018/day24/main.cpp
#include "file.h" #include "utilities.h" #include <iostream> namespace aoc2018_day24 { struct Group { int units; int hitPoints; std::vector<std::string> immune; std::vector<std::string> weak; int attack; std::string attackType; int initiative; int tea...
ALGO
0.99967
4.691577
{ "github_metadata": { "branch": "main", "commit_count": 334, "repo_created_at": "2021-06-08T18:28: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": "50084a19b3...
ceb8aac0-4c0a-4cdc-a008-1c899e6a9925
sayedgkm/ProgrammingContest
Codeforces/Helvetic Coding Contest 2016 online mirror (teams, unrated) - 690/690C2-Brain Network (medium).cpp
//========================================================================== // // Bismillahir-Rahmanir-Rahim // // ========================================================================== #include <bits/stdc++.h> #define ll long long #define f(x,y,z) ...
ALGO
0.999303
3.493773
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2018-02-13T13:42:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "08289566c...
eabc9bf9-d67c-4082-a80f-2b6f896b5c80
tubs-alg/edge_sparsification
code/solver/main.cpp
#include <iostream> #include <chrono> #include <boost/program_options.hpp> #include <boost/filesystem.hpp> #include "solver/Instance.h" #include "solver/Solution.h" #include "angle_tsp/Angle_tsp.h" #include "mpp/Min_perimeter_polygon.h" #include "alpha_mst/Alpha_mst.h" #include "degree_mst/Degree_mst.h" using json = ...
ALGO
0.943666
6.061219
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-07-14T16:05:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "152968e8bd46...
f70287d5-0a3b-413e-a321-d4b7cc2b233c
caochao39/tare_planner
src/tare_planner/or-tools/include/coin/CoinPresolveSubst.hpp
/* $Id$ */ // Copyright (C) 2002, International Business Machines // Corporation and others. All Rights Reserved. // This code is licensed under the terms of the Eclipse Public License (EPL). #ifndef CoinPresolveSubst_H #define CoinPresolveSubst_H /*! \file */ #define SUBST_ROW 21 #include "CoinPresolveMatrix.hp...
ALGO
0.97343
6.92992
{ "github_metadata": { "branch": "melodic-noetic", "commit_count": 189, "repo_created_at": "2021-05-08T14:30:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 544, "forks": 116, "issues": 12, "pull_requests": 0 }, "file_meta": { "content_i...
a8739fc8-5f81-4d14-8f83-a0c07c1b2978
HUSK-321/Algorithm
BaekJoon/2252.cpp
#include <iostream> #include <queue> #include <vector> #include <cstring> using namespace std; int n, m; int from, to; int inCome[32001]; vector<int> node[32001]; void TopologySort(){ queue<int> q; // init queue for(int i = 1; i <= n; i++){ if(inCome[i] == 0){ q.push(i); } ...
ALGO
0.999997
4.703696
{ "github_metadata": { "branch": "main", "commit_count": 384, "repo_created_at": "2021-01-09T05:02:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "2fa8b74960...
73e6745d-e980-43e9-b1d7-ed568bd0decd
NishchayBhokare/DSA_Code_Files
6_Stack/13__maxRectangle.cpp
//Calculate max rectangle area //GFG //Approach 1: Most optimised Approach. I have explained this approach in histogram. //TC-O(n*(m+2m) i.e n*3m) SC-O(m) int getArea(vector<int>&arr, int n){ stack<int>st; st.push(-1); int mArea=0; for(int i=0; i<n; i++){ while(st.size() != 1 && ...
ALGO
0.999949
6.532024
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2022-08-07T09:43: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": "7984f307d...
cef03e08-ad0b-4e68-b5c4-17a2e4616e4d
KamiliArsyad/CPCodes
cpp/CF918E.cpp
#include <algorithm> #include <iostream> #include <functional> #include <vector> #include <bitset> #include <queue> #include <unordered_set> #include <cstring> #include <stack> #include <chrono> #include <map> // Define macro for sync_with_stdio(false) #define fin std::ios::sync_with_stdio(false); std::cin typedef st...
ALGO
0.999953
4.446396
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2022-05-17T14:23: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": "78e69d2c903...
e7f5544f-3bf2-4932-81d9-28d6f98a3a32
wenbowen123/icra20-hand-object-pose
src/perception/include/misc/jacobian_adjust.hpp
/*################################################################################ ## ## Copyright (C) 2016-2018 <NAME> ## ## This file is part of the OptimLib C++ library. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with ...
ALGO
0.998442
6.144412
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-02-07T05:27:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 55, "forks": 6, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "22a52484e...
b9b81aab-4bef-490d-9a8f-8862cbf61288
lowMky/Cpp_code
data_structure/简单二叉树表达式计算.cpp
#include<cstdio> #include<cmath> #include<cstring> #include<iostream> #include<algorithm> using namespace std; class Calculator{ struct Node{ Node *l,*r; char ch; }; private: int tmp; Node *root; public: Calculator(); ~Calculator(); void del(Node...
ALGO
0.999955
3.730943
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2015-12-20T06:15: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": "1a89de550...
6f2e86e6-2e90-421f-b53f-a51af84232c4
jetmuffin/algorithm
hihocoder/1476.cpp
#include <iostream> #include <algorithm> using namespace std; #define ll long long const int maxn = 1010; const int inf = 0x3f3f3f; ll n, m, k; ll r[maxn], c[maxn]; int main() { while(~scanf("%lld%lld%lld", &n, &m, &k)) { for(int i = 0; i < k; i++) { scanf("%lld%lld", &r[i], &c[i]); } ll ans = n * (n + 1) / 2...
ALGO
0.999691
3.331096
{ "github_metadata": { "branch": "master", "commit_count": 100, "repo_created_at": "2016-01-10T15:27:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "665fb737...
d3e279c6-4956-4f38-b04e-6349874a1272
PrinceInScripts/Leetcode-Question
7. September 2024/Problem 5 {Linked List in Binary Tree}/Question.cpp
/* # 1367. Linked List in Binary Tree */ /* Given a binary tree root and a linked list with head as the first node. Return True if all the elements in the linked list starting from the head correspond to some downward path connected in the binary tree otherwise return False. In this context downward path means a ...
ALGO
0.999986
6.122468
{ "github_metadata": { "branch": "main", "commit_count": 367, "repo_created_at": "2024-03-19T10:14:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e147663ba2...
0a8c593d-5d5b-42f3-a21c-bec9f2f265bb
csehaocn/LeetCodeCPP
SortColor.cpp
#include<iostream> using namespace std; class Solution { public: void sortColors(int A[], int n) { if( 0 == n) return; int col[3] = {0, 0, 0}; for(int i = 0; i != n; ++i) { int c = A[i]; A[col[c]] = c; ...
ALGO
0.999963
5.195247
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-03-24T08: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": "4d967962be...
04f5dc30-d88e-4148-a928-a5f9f5e7e2ab
raghavsharma30/DSA
LeetCode_problems/Search_insert_position.cpp
/* Link: https://leetcode.com/problems/search-insert-position/description/ 35. Search Insert Position Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You must write an algorithm with O(log n)...
ALGO
0.999911
6.224553
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-02-01T19:43:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4539ba2e46a...
a114c886-5617-4c92-9765-559e14ac746e
TimDSF/CSE348T
contests/20-21/4_NADC20/I.cc
#include <cstdio> #include <string> #include <vector> #include <cstring> #include <iostream> using namespace std; int n,ans1=0,ans2=0,ans3=0; int t[24][60][60]; string s; int main(){ memset(t,0,sizeof(t)); int i,j,k,l,num,c0,c1,c2,left,right; vector<int> c[3]; bool ast[3],itv; scanf("%d",&n); cin.get(); for...
ALGO
0.995827
3.21429
{ "github_metadata": { "branch": "master", "commit_count": 158, "repo_created_at": "2020-02-18T16:30:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bc57b884...
62c90a9d-2f39-4748-8f04-5537752f6637
mimingucci/Algorithm
Dynamic Programming/Digit DP/MagicNumbers.cpp
/* author: mimingucci created on: 1/10/2024 9:59:05 PM */ #include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define int int64_t const int INF=(int...
ALGO
0.999903
4.839489
{ "github_metadata": { "branch": "main", "commit_count": 172, "repo_created_at": "2023-04-15T13:46:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6dd24c7fb...
85d2a166-3266-472b-a651-8c3d48371e91
Cegax123/Competitive-Programming
contest/Contest by Topic/Easy Number Theory/v.cpp
#include <bits/stdc++.h> using namespace std; #define all(c) (c).begin(), (c).end() #define rall(A) A.rbegin(),A.rend() #define pb push_back #define dbg(x) do {cerr << #x <<" = " << (x) << endl; } while (false) typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ii> vii; //cout << s...
ALGO
0.999831
3.956306
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-09-15T13:50: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": "ad28ccee2fd...
7c1796c1-0edb-42de-811f-6482560e8015
ForritunarkeppniFramhaldsskolanna/Keppnir
2018/problems/formulublad/submissions/accepted/benni_50.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; template <class T> int size(const T &x) { return x.size(); } #define rep(i,a,b) for(int i = (a); i < (b); i++) #define iter(it,c) for(auto it = (c).begin(); it != (c).end();++it) #define pb push_back #define fs first #define sc second typedef pair<int,...
ALGO
0.999987
3.458522
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2017-01-07T21:04:39.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b4bc7ae4e...
d1a695ed-1724-48d5-a5c5-54c7c06b1464
adevgriff/turingMachine
tm.cpp
/* * Name : tm.cpp * Author : <NAME> */ #include <iostream> #include <fstream> #include <deque> #include <vector> #include <cstdlib> #include <string> #include "encodings.h" #define ADDR_BITS 12 #define WORD_CNT (1 << ADDR_BITS) #define BIN_SIZE (WORD_CNT * sizeof(tm_word)) struct letter { bool is...
ALGO
0.969435
4.729388
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-09-23T22:54: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": "c3ccd9c6478c...
e88eb892-50fc-4cff-80c8-1d85ea1c5ac5
tusharmishra069/Cpp-basic-to-advance-
Linkedlist/doubly linkedlist/Insert_at_beginning.cpp
#include<iostream> using namespace std; class Node{ public: int data; Node *next; Node *prev; Node() { data=0; next=NULL; prev=NULL; } Node(int data){ this->data=data; this->next=NULL; this->prev=NULL; } }; class linkedl...
ALGO
0.999962
3.879348
{ "github_metadata": { "branch": "main", "commit_count": 174, "repo_created_at": "2024-08-09T09:31: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": "4c6a248ccc...
e7b5e22e-3f21-43be-a358-01c7582f16df
ishandutta2007/codeforces-f
fruwajacybyk/normal/460/B.cpp
#include<cstdio> #include<iostream> #include<cstdlib> #include<cmath> #include<vector> #include<algorithm> #include<set> #include<map> #include<queue> #include<cstring> #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define FORD(i, a, b) for(int i = (a); i >= (b); --i) #define VAR(v, i) __typeof(i) v=(i) #define FORE(i, ...
ALGO
0.999463
3.003898
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "80ee5d0ced9e...
e852746e-ca8e-491b-926d-f921432ca914
black-shadows/InterviewBit-Topicwise-Solutions
Arrays/Minimum swaps required to bring all elements less than or equal to k together.cpp
int Solution::solve(vector<int> &arr, int k) { // Find count of elements which are // less than equals to k int n = arr.size(); int count = 0; for (int i = 0; i < n; ++i) if (arr[i] <= k) ++count; // Find unwanted elements in current // windo...
ALGO
0.999964
5.843996
{ "github_metadata": { "branch": "master", "commit_count": 141, "repo_created_at": "2018-06-16T10:05:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 363, "forks": 217, "issues": 1, "pull_requests": 2 }, "file_meta": { "content_id": "359b...
14f51829-a758-4dc3-8c04-9bf00c407ae9
pt13762104/code-archive
test_1.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #ifndef yoshi_likes_e4 #define endl '\n' #endif #define problem "" #define multitest 1 #define debug(x) cerr << #x << " = " << x << endl; struct ST { int t[3000]{}; int n = 1500; ST() { } void update(int value, int p) { ...
ALGO
0.999666
4.967213
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-16T08:19: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": "969b6f4c1e8d...
2e59a0fe-18ed-4270-a84a-368ca378b19b
ZryletTC/UCR-U16-CS10v
assignments/program6/main.cpp
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; const int PLAYER1 = 0; const int PLAYER2 = 1; const int WINNING_SCORE = 100; void printIntro(){ cout << "Welcome to the dice game Pig!\nThe objective is to be first to score 100 points.\n"; } int humanTurn(string playerName, int playe...
TOOL
0.976904
4.521821
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-07-28T18:06: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": "08cf4cb4f4...
c248c5d9-2200-4425-878e-9be416bdfa35
WhiZTiM/coliru
Archive/321a8deb80d4c03628881444029c0a57-ce6b7b81d29c30e32c78aebe6e642254/main.cpp
#include <algorithm> #include <cstddef> #include <iostream> #include <iterator> #include <limits> #include <numeric> #include <tuple> #include <vector> template<typename T, template <typename S, typename Alloc> class Collection, typename TAlloc> std::tuple<T, T, T> properties(const Collection<T, TAlloc>& coll) { ...
ALGO
0.999084
5.77506
{ "github_metadata": { "branch": "master", "commit_count": 42630, "repo_created_at": "2016-04-21T16:34:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e34af...
67f785f0-bc6b-416e-9325-146fb8d89d4b
taegon98/PS-Cpp
백준/Gold/6593. 상범 빌딩/상범 빌딩.cc
#include <iostream> #include <queue> #include <cstring> using namespace std; struct coord { int z, y, x; }; coord temp; int L, R, C, sz, sy, sx, az, ay, ax; int dz[] = { 0,0,0,0,-1,1 }, dy[] = { -1,1,0,0,0,0 }, dx[] = { 0,0,-1,1,0,0 }; string str; bool go(int l, int r, int c, int visited[31][31][31], char arr[31][31]...
ALGO
0.99983
4.613473
{ "github_metadata": { "branch": "main", "commit_count": 788, "repo_created_at": "2023-02-15T03:49: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": "28f073317d...
ec52243c-bf9c-484a-b9be-5a307f6da993
Yuri3-xr/ACM
Codeforces/Codeforces Round 923 (Div. 3)/A.cpp
#include <bits/stdc++.h> using i64 = std::int64_t; void solve() { int n; std::cin >> n; std::string s; std::cin >> s; int left = -1, right = -2; for (int i = 0; i < n; i++) { if (s[i] == 'B') { left = i; break; } } for (int i = n - 1; i >= 0; ...
ALGO
0.999876
4.397868
{ "github_metadata": { "branch": "master", "commit_count": 149, "repo_created_at": "2019-12-02T12:23:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19b9df6f...
d5c46120-d30f-4f21-b21d-bf80c63d321f
WadekarPrashant/GeeksForGeeks-Questions
Medium/Largest subsquare surrounded by X/largest-subsquare-surrounded-by-x.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class dist { public: int first=0; int second=0; }; class Solution { public: int largestSubsquare(int n, vector<vector<char>> mat) {...
ALGO
0.999661
5.609269
{ "github_metadata": { "branch": "master", "commit_count": 551, "repo_created_at": "2022-09-24T18:15:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "48a05e4...
239ca88e-3630-432b-8f67-90cac6846db8
stino220802/aoc2024
day19.cpp
#include <cmath> #include <cstddef> #include <iostream> #include <iomanip> #include <queue> #include <string> #include <string_view> #include <ranges> #include <tuple> #include <utility> #include <vector> #include "aocUtils.h" #include <algorithm> #include <regex> #include <unordered_set> #include <ctime> #include <c...
ALGO
0.99687
5.191018
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-10T19:19: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": "84e5df438a01...
62ad33ad-0507-4561-aee4-ec558e15f629
JimmyBao22/Competitive-Programming
Other/Kattis/CatandMice.cpp
#include <iostream> #include <vector> #include <map> #include <cmath> #include <algorithm> #include <deque> #include <queue> #include <stack> #include <set> #include <string> #include <string.h> #include <array> #include <unordered_map> #include <unordered_set> #include <iomanip> using namespace std; typedef long long ...
ALGO
0.999832
3.47218
{ "github_metadata": { "branch": "main", "commit_count": 180, "repo_created_at": "2021-03-26T21:46:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "99b22dcc61...
afd89d56-cbd5-410c-a75c-e51772f9ad95
pengsenmao/problems
acio/shame/solutions/tunan-shame-mo.cpp
#include <cstdio> #include <vector> #include <algorithm> #include <queue> #include <functional> using namespace std; int n,m; const int max_k = 500; int cm = 0; int a[200005]; struct range{ int l; int r; long long w; }; vector<range> rv; priority_queue<int,vector<int>,great...
ALGO
0.999968
3.991822
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2020-12-12T07:56: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": "ef9294755...
b1b729b0-c2b6-46bd-9fb4-8cb615f69851
alexandraback/datacollection
solutions_5686313294495744_1/C++/dragonic/c.cpp
#include <bits/stdc++.h> #define all(v) (v).begin(), (v).end() using namespace std; vector<int> match; vector<vector<int>> edges; vector<char> used; bool kuhn(int v) { if (used[v]) return false; used[v] = true; for (int u: edges[v]) if (match[u] == -1 || kuhn(match[u])) { ...
ALGO
0.999958
3.937954
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f87c1c2f4...
9995a899-50bf-4a51-b974-3ef33c10b589
B-R-A-I-N-L-A-G/ACM
week-13/d-a-wide-wide-graph/main.cpp
//region Template #include <algorithm> #include <array> #include <bitset> #include <concepts> #include <ctime> #include <functional> #include <filesystem> #include <iomanip> #include <iostream> #include <iostream> #include <map> #include <memory> #include <numeric> #include <optional> #include <queue> #include <random>...
ALGO
0.999929
4.453107
{ "github_metadata": { "branch": "main", "commit_count": 91, "repo_created_at": "2023-02-27T01:07:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ff441058a19...
02336277-4158-4ac6-a407-4f756998a9d0
whytreatme/data_structure_learning
sorting/src/radix_sort_implement.cpp
#include<cstdio> #include<cstdlib> #include"sort_test.h" #define K 65536 void radix_sort(int* arr, int l, int r){ int* cnt = (int*)malloc(sizeof(int) * K); int* temp = (int*)malloc(sizeof(int) * (r - l)); //round 1 memset(cnt, 0, sizeof(int) * K); for(int i = l; i < r; i++) cnt[arr[i] % K] += 1; ...
ALGO
0.999616
4.023582
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2025-03-13T08:50: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": "dc3b4142a4d...
8e684aa9-6cf7-40c8-8b84-d4f3a6568c82
authuir/leetcode
algorithm/cpp/sort.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <map> #include <cmath> using namespace std; template<typename T> void QuickSort(vector<T>& arr, int left, int right) { if (left >= right) return; int i = left, j = right; T tempValue = arr[left]; while (i < j...
ALGO
0.999912
4.963813
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2017-05-08T12:10:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30a87628...
bee03930-5dc0-481b-9c72-1b6b28787905
EvAn-HuAngBiu/GPLT
L2_026.cpp
#include <cstdio> #include <vector> using namespace std; vector<vector<int>> graph; vector<int> cur; bool visit[100001] = {false}; int maxLevel = 1; unsigned long n; void dfs(int p, int level) { if (!visit[p]) { visit[p] = true; if (level > maxLevel) { maxLevel = level; cu...
ALGO
0.999984
3.93016
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-03-27T23:08: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": "a90d780477...
29c10495-3472-4a45-882e-d1e38cbcbb2f
dreyus95/AVSP_SourceQualityPrediction
CodeJamCrawler/dataset/14_22752_80.cpp
#include<algorithm> #include<bitset> #include<cassert> #include<complex> #include<cstdio> #include<cstring> #include<iomanip> #include<iostream> #include<map> #include<queue> #include<set> #include<stack> #include<string> #include<vector> #define FOR(i, a, b) for(int i =(a); i <=(b); ++i) #define FORD(i, a, b) for(int ...
ALGO
0.998807
3.740235
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2017-06-08T21:00:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d46d72361...
df2f1189-3f5f-452c-ac42-0714eb3d6320
Rajeesh5/letsCode
code_ex_hcl/TestProject/MaxSumArray.cpp
#include<iostream> #include<vector> #include<limits> using namespace std; struct Window { int start; int end; Window() :start(0), end(0) {} }; int findsubarray(const int k, const std::vector<int> arr) { Window w; int maxsum=0, sum =0, start = 0; for (int index = 0, i = 0; index < arr.size(); index++) { ...
ALGO
0.999406
4.601137
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2023-09-02T17:13: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": "4389fa581...
7fd9d4dc-9ac6-4837-900c-2a0895b25cdf
Tooo/Arrays-Linked-Lists
Menu.cpp
//Menu.cpp #include <stdio.h> #include <stdlib.h> #include "Array.h" #include "Classes.h" void PrintMenu (int num) { if (num == 0) { printf("\nMain Menu\n"); printf(" 0 - Array\n"); printf(" 1 - Linked List\n"); printf(" 2 - Stack\n"); printf(" 3 - Queue\n"); printf(...
TOOL
0.978015
3.394931
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2020-11-23T02:13: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": "a65d9d1e7654...
561ac33d-7c32-4bc0-a62a-25171e018241
ishandutta2007/codeforces-b
bohdanpastuschak/normal/958/D1.cpp
#include <bits/stdc++.h> using namespace std; #pragma GCC optimize("O3") #pragma GCC target("sse4") typedef long double LD; typedef long long LL; typedef pair<int, int> PII; typedef pair<LD, LD> PDD; typedef pair<LL, LL> PLL; typedef vector<int> VI; typedef vector<LL> VLL; typedef vector<LD> VLD; typedef vector<string...
ALGO
0.999937
3.872398
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da6f57098ac1...
52d57206-d303-4ccf-9365-25618b2c9823
IBM/ode
ODE/3rdParty/src/bin/jikes/lookup.cpp
// $Id: lookup.cpp,v 1.27 2000/07/25 11:32:33 mdejong Exp $ // // This software is subject to the terms of the IBM Jikes Compiler // License Agreement available at the following URL: // http://www.ibm.com/research/jikes. // Copyright (C) 1996, 1998, International Business Machines Corporation // and others. All Rights...
TOOL
0.904078
5.321237
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2020-02-24T14:14:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e15e0174df...
4a685c93-d2d4-4409-a232-cbe4509ce176
TimeDA/TimeDA
dataset/cpp_12_18/gcj2014/v.haralampiev/2984486_5766201229705216_v.haralampiev_b.cpp
#ifdef _WIN32 # define LL "%I64d" #else # define LL "%Ld" #endif #include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #include <ctime> #include <vector> #include <deque> #include <set> #include <map> #include <queue> #include <stack> #include <bitset> #inclu...
ALGO
0.998469
3.459203
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2022-10-24T06:47: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": "dbc05c9681a...
80e4d38e-39f6-4548-a686-87149842dafd
atubo/online-judge
leetcode/P0297.cpp
// https://leetcode.com/problems/serialize-and-deserialize-binary-tree/ // 297. Serialize and Deserialize Binary Tree #include <bits/stdc++.h> using namespace std; #include "../utils/BinaryTree.h" #include "../utils/Graph.h" #include "../utils/LinkedList.h" #include "../utils/Util.h" class Codec { public: string ...
ALGO
0.999348
6.265782
{ "github_metadata": { "branch": "master", "commit_count": 2295, "repo_created_at": "2013-10-03T04: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": "c042757...
557b0918-1cd2-4417-9600-24f82fc7968a
NinaLazarevic/C-plus-plus-projects
DinamickoStablo/DinamickoStablo/Tree.cpp
#include "Tree.h" #include <math.h> void Tree::deleteTree(Node * p) { if (p != NULL) { deleteTree(p->left); deleteTree(p->right); delete p; } } void Tree::Insert(int el) { Node* p=root, *prev=NULL; while (p != NULL) { prev = p; if (p->isLS(el)) p = p->right; else p = p->left; } if (root == N...
ALGO
0.997428
3.064628
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-11-11T18:47:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9407a34ee4...
74d6ee96-bc4a-4d91-90b6-96206fc4bd0b
mpzadmin/yuc
KhaleqiYekta/pattern_printer_extended.cpp
/* * Copyright © 2021 <NAME>, All Rights Reserved. * * Author: <NAME> [YektaDev] * Website: https://Yekta.Dev * Email: <EMAIL> */ #include <iostream> #include <string> using namespace std; int main() { int n; system("cls"); cout << "Enter the count of pattern lines: "; cin >> n; if (n < ...
ALGO
0.998648
4.578307
{ "github_metadata": { "branch": "master", "commit_count": 1161, "repo_created_at": "2020-12-15T07:51:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b099e36...
203f79ac-5d09-41c5-9180-c163a097bf1c
SuyashBirar/dsalpr
8_D1_OBST.cpp
#include <iostream> using namespace std; class obst { int a[10], r[10][10], n; float p[10], q[10], w[10][10], c[10][10]; public: void accept(); void cons_obst(); int find_min(int, int); void tree(int i, int j); }; void obst::accept() { int i; cout << "\nHow many elements are there in ...
ALGO
0.999934
3.678373
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-05-06T12:55: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": "742f7f4e317d...
23dff911-e9f5-4e68-9052-ce16d6f1ee32
MaybeBio/C_plus_plus
G12201_XXH_code/20201119_2.cpp
#include <iostream> using namespace std; int main() { int x, y, z; cin >> x >> y >> z; if (x < y && x < z) { cout << x << ' '; y < z ? cout << y << ' ' << z << endl : cout << z << ' ' << y << endl; } else if (y < x && y < z) { cout << y << ' '; x < z ? cout <...
ALGO
0.999956
3.988533
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2025-03-16T08:49: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": "263ee9a7f55...
0f8ab250-cb18-4656-92b2-a9190c045b96
Mihai11235/Ordered_Dictionary_using_BST
OrderedDictionary.h
#pragma once typedef int TCheie; typedef int TValoare; #define NULL_TVALOARE -1 #include <utility> typedef std::pair<TCheie, TValoare> TElem; class Iterator; typedef bool(*Relatie)(TCheie, TCheie); class DO { friend class Iterator; private: class Node{ public: TElem e; int left; ...
TOOL
0.923984
4.40485
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-09-11T16:13: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": "5503e88781...
0d7fe274-0e03-4e12-a2d1-36b875cc3ce8
Hariharaan2k2/Simple_LR_parser
main.cpp
#include<iostream> #include<string.h> #include<stdlib.h> #include<stdio.h> using namespace std; char terminals[100]={};int no_t; char non_terminals[100]={};int no_nt; char goto_table[100][100]; char reduce[20][20]; char follow[20][20];char fo_co[20][20]; char first[20][20]; struct state{ int prod_count; char prod[100][...
ALGO
0.999844
3.124124
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-05-02T17:01:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a6762ac834b7...
a18746af-aabe-492a-bc6f-f4a103a98aca
Djeldes75/Datos-Algoritmos1
Laboratorio/7-RelojAtrasado/7-RelojAtrasado.cpp
/* ----------------------------------------------------------------------------------------- TAREA: El reloj que atrasa (LABORATORIO) Materia: IDS343L-01-LABORATORIO ESTRUCTURAS DE DATOS Y ALGORITMOS I ----------------------------------------------------------------------------------------- Descripción: Un reloj ...
ALGO
0.999419
5.144643
{ "github_metadata": { "branch": "main", "commit_count": 156, "repo_created_at": "2025-01-16T18:05:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d90e79f531...
451dfb71-6e02-4575-b585-c24dd65e6594
Laura-Mora/PC-2016-03
Polinomios/Polinomios/main.cpp
// // main.cpp // Polinomios // // Created by <NAME> on 15/09/16. // Copyright © 2016 <NAME>. All rights reserved. // #include <iostream> #include <math.h> #include "Funciones.hpp" using namespace std; int main() { Lista <int> *lista, *lista2,*listafinal; char continuar; int nume=0,expone=0,resul=0; ...
ALGO
0.991237
4.019581
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-11-18T19:10: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": "5843c5ffb9...
0a834eff-102d-4956-b62a-a3cd525ddde9
noobie7/CodeBank
AtCoder/abc127/D.cpp
/* "Won't stop until I'm phenomenal." - <NAME> */ #include<bits/stdc++.h> using namespace std; typedef long long int ll; #define ff first #define Shazam ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define ss second #define all(c) c.begin(),c.end() #define endl "\n" #define test() int t; cin>>t; ...
ALGO
0.99998
3.278014
{ "github_metadata": { "branch": "main", "commit_count": 156, "repo_created_at": "2021-09-12T05:11:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1a8fcd80ff...
9eb2b5d2-921f-496a-85f9-75394a2c30ff
Sabrina-Akter/All-My-Codes
Codeforces/Contests/Codeforces Round #757 (Div. 2)/A_Divan_and_a_Store.cpp
#include <bits/stdc++.h> using namespace std; #define fastt ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define ll long long int #define vll vector <ll> #define pb push_back #define ff first #define ss second #define lb lower_bound #define ub upper_bound #define all(x) x.begin(), x.end() #define ms(x) memset(x, ...
ALGO
0.999953
3.927016
{ "github_metadata": { "branch": "main", "commit_count": 786, "repo_created_at": "2023-06-28T07:43: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": "d2b78e5b03...
95bffb62-75f8-4906-bdb4-9e9bea36ee66
cheon-yong/algorithm
programmers/Lv2/메뉴리뉴얼.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; unordered_map<string, int> combination[11]; int maxMenu[11] = {0,}; void dfs(string order, string partial, int index) { if(index >= order.length()) return; dfs(order, partial, index+1); partial += order[index]; c...
ALGO
0.999903
5.576175
{ "github_metadata": { "branch": "main", "commit_count": 197, "repo_created_at": "2021-01-28T12: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": "e92469455c...
aeffbdf5-0649-483f-bc1a-b70142efe60d
nadenggansrgr/Bubble-Sort
bubble sort.cpp
#include <iostream> using namespace std; int main() { int jmlh,angka[100],temp; cout << "==========================================" << endl; cout << "\t PROGRAM BUBBLE SORT" << endl; cout << "==========================================" << endl; cout << " Masukkan jumlah angka : "; cin>> jmlh; ...
ALGO
0.99972
4.216102
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-06-26T02:27: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": "c55660d6384f...
943891ce-8a0f-490f-ba23-89c346477e8b
codercly/estrutura_dados_trabalho
provaEstruturaDeDados/trabalho_estrutura_dados/BuscaLinear.cpp
#include <iostream> #include <time.h> #include <stdlib.h> #include <bits/stdc++.h> #include <chrono> using namespace std; bool Existe(int valores[], int tam, int valor) { for (int i = 0; i < tam; i++) { if (valores[i] == valor) return true; } return false; } void GeraAleatorios(int...
ALGO
0.989993
3.724677
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-01-21T15:48: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": "417ce6f0c2...
4b9e9b37-7866-4476-bb49-03decaadb182
Kody851/algorithom
code/26_recursion_nQueen.cpp
#include<iostream> #include<queue> #include<stack> #include<unordered_set> #include<algorithm>//max #include<cmath>//abs using namespace std; //N皇后问题是指在N*N的棋盘上要摆N个皇后,要求任何两个皇后不同行、不同列, 也不在同一条斜线上。 //给定一个整数n,返回n皇后的摆法有多少种。 //n=1,返回1。 n=2或3,2皇后和3皇后问题无论怎么摆都不行,返回0。 n=8,返回92。 class Solution{ public: int num(int...
ALGO
0.999945
4.064376
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2020-06-20T11:44:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f533c4a16...
823a5ec1-b439-41a9-9e12-c29e2b7265ed
iamslash/learntocode
leetcode/CanIWin/a.cpp
/* Copyright (C) 2019 by iamslash */ #include <cstdio> #include <vector> // 24ms 79.58% class Solution { private: std::vector<int> m_C; // 0: false, 1: true int play(int M, int T, int U) { // base condition if (T <= 0) return 0; // memoization if (m_C[U] != -1) return m_C[U]; //...
ALGO
0.999854
5.226777
{ "github_metadata": { "branch": "master", "commit_count": 2102, "repo_created_at": "2020-11-23T21:43:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "86991d4...
4bb23e8f-f2c1-4aed-bd4d-032331c11314
palewalker/GitHubTest-cocos-
Classes/CPathFinder.cpp
// // CPathFinder.cpp // exam_findpath_0 // // Created by pokpoongryu on 2016. 7. 17.. // // #include "CPathFinder.h" CPathFinder::CPathFinder() { Clear(); } CPathFinder::~CPathFinder() { } void CPathFinder::Clear() { m_OpenList.Clear(); m_ClosedList.Clear(); mpStart = NULL; mpNew = NULL; m_StartNodeC...
ALGO
0.999575
3.090102
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-08-25T07:49: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": "54d16b4ebb...
95930c90-62ec-4f43-a9a7-d18d91cb5c08
marcs77/MuonEngine_legacy
core/math/mat4.h
#ifndef MAT4_H #define MAT4_H #include "vec3.h" #include "vec4.h" #include "quaternion.h" #include <ostream> /* MATRIX */ // [ 0 4 8 12 ] // [ 1 5 9 13 ] // [ 2 6 10 14 ] // [ 3 7 11 15 ] // m[y+x*4] //column major namespace muon { namespace math { struct Mat4 { union { float m[4 * 4]; struct { ...
TOOL
0.928806
5.165818
{ "github_metadata": { "branch": "master", "commit_count": 62, "repo_created_at": "2016-09-10T12:21:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0e33b550...
100ec166-ac29-41e1-802c-620f0bfc418d
fishy15/competitive_programming
oi/usaco/contest/2016/dec/plat/cardgame.cpp
#include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <array> #include <algorithm> #include <utility> #include <map> #include <queue> #include <set> #include <cmath> #define ll long long #define eps 1e-8 #define MOD 1000000007 #define INF 0x3f3f3f3f #define INFLL 0x3f3f3f3f3f3f3f3f // ...
ALGO
0.999746
3.677623
{ "github_metadata": { "branch": "master", "commit_count": 1058, "repo_created_at": "2019-02-21T11:46:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f99060...
411d1930-fea0-47a4-b646-9830336b0510
cofenberg/pixellight
Plugins/PLVolume/include/PLVolume/TransferFunctionControl/CubicSpline.inl
/*********************************************************\ * File: CubicSpline.inl * * * Copyright (C) 2002-2013 The PixelLight Team (http://www.pixellight.org/) * * This file is part of PixelLight. * * Permission is hereby granted, free of charge, to any person obtaining a co...
ALGO
0.912396
6.570729
{ "github_metadata": { "branch": "master", "commit_count": 2905, "repo_created_at": "2024-05-03T10:05:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2868205...
c363517e-bd98-49e6-ade2-d1e07c94a985
abdullxhsalim/cp-archive
contests/Codeforces/1920/1920A.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int n, x, a; cin >> n; priority_queue <int> a1; priority_queue <int, vector<int>, greater<int>> a2; unordered_set<int> a3; while(n--) { cin>> a >> x; if(a == 1) a1.push(x); else if(a == 2) a2.push(x); ...
ALGO
0.999707
4.545919
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-12-30T04:04: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": "173219388aa3...
0d4f33df-5d27-425c-8b3d-9e77ab55a68f
lg641135360/lc_cpp
code/61.旋转链表.cpp
/* * @lc app=leetcode.cn id=61 lang=cpp * * [61] 旋转链表 */ // @lc code=start /** * 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) : va...
ALGO
0.999978
6.462602
{ "github_metadata": { "branch": "main", "commit_count": 292, "repo_created_at": "2021-04-20T12:40:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "078348129e...
6052c460-6860-485c-9350-ffe0d9255a97
toilakhiem/Code-PTIT-CTDL-v-GT
Lop CTDL/Thuc_hanh_2/3.cpp
#include<bits/stdc++.h> using namespace std; string xoa1(string s){ string ans, res, tmp; for (int i = 0; i < s.size();i++){ if(!isspace(s[i])) tmp += s[i]; } s = tmp; return s; } string xoa2(string s){ stack<char> st; stack<int> index; int d[300] = {0}; for (int ...
ALGO
0.999769
4.175843
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-03-27T03:56: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": "18832c6e95e5...
40fcc8ab-2873-41b9-8321-c9fb4bb6f8d7
ycdzj/OJSolutions
other/2018wannaflywinter/day1_F.cpp
#include <cstdio> #include <vector> #include <queue> #include <algorithm> using namespace std; typedef long long ll; const int MAXN = 1e5 + 5; const ll INF = 1e18; int n, m, k; ll h[MAXN], w[MAXN]; vector<pair<int, ll>> adj[MAXN]; ll dis[MAXN]; int main() { scanf("%d%d%d", &n, &m, &k); for(int i = 1; i <= n;...
ALGO
0.999923
3.643766
{ "github_metadata": { "branch": "master", "commit_count": 195, "repo_created_at": "2018-11-22T04:24: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": "1946f48c...
807a9a62-234f-4274-90a7-5371664d4b98
lxl66566/OJ
codeforces/Codeforces Round #828 (Div. 3)/1744B.cpp
#include <iostream> using namespace std; #define ll long long int t,n,q,odd,even,temp,ope; ll total; int main() { cin >> t; while (t--) { cin >> n >> q; odd = even = 0; total = 0; for (int i = 0; i < n; i++) { cin >> temp; total += temp; ...
ALGO
0.999799
3.747823
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2022-12-12T05:42:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b478ee18f80...
b6aa447f-50e9-4828-be64-4b9be35896c7
LuoshuiTianyi/Code
HihoCoder/P1496/1496.cpp
#include <cstdio> #include <iostream> using namespace std; #define LL long long #define go(G, x, i, v) \ for (int i = G.hd[x], v = G.to[i]; i; v = G.to[i = G.nx[i]]) #define inline __inline__ __attribute__((always_inline)) inline LL read() { LL x = 0, w = 1; char ch = getchar(); while (!isdigit(ch)) { if (c...
ALGO
0.999945
3.865552
{ "github_metadata": { "branch": "master", "commit_count": 971, "repo_created_at": "2019-09-09T08:42: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": "77d968ee...
674440b3-1568-4c68-aa71-ee73c9bd6968
jovibor/DWFontChoose
DWFontChoose/DXUtility.ixx
module; #include <d2d1.h> #include <d2d1_1.h> #include <d3d11_1.h> #include <dxgi1_2.h> #include <dwrite_3.h> #include <cassert> #include <cmath> #include <string> #include <vector> export module DXUtility; #pragma comment(lib, "d2d1") #pragma comment (lib, "d3d11") #pragma comment(lib, "dwrite") export namespace DX...
TOOL
0.925597
4.503366
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2025-06-07T23:19:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1633c8bfb...
fcfd7134-216c-443b-8197-5bbf5a47cdbf
kocherginakaterina/WordTriangles.cpp
WordTriangles.cpp
#include <iostream> #include <string> #include <vector> #include <random> std::vector<std::string> words = { "word1", "word2", "word3", "word4", "word5" }; std::random_device rd; std::mt19937 rng(rd()); void printTriangle(int size, bool isFlipped) { for (int i = 0; i < size; i++) { for (int j = 0; j < siz...
ALGO
0.996849
5.691259
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-01-23T18:59: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": "c46bfafa5cd6...
18a0306a-164b-4d82-b35b-6f80574a8f70
mrakib007/DSA_WITH_CPP
Problems/Array/Hard/18FourSum.cpp
#include<bits/stdc++.h> using namespace std; //Optimized Approach. Time complexity is O(n^3) and space complexity is O(number of quadruplets). It's not used for //solving the problem, rather returning the answer. vector<vector<int>> fourSumOptimized(vector<int>& nums, int target) { int n=nums.size(); ...
ALGO
0.99997
5.16605
{ "github_metadata": { "branch": "main", "commit_count": 149, "repo_created_at": "2024-11-05T14:09:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f74e65c1ec...
83ea850d-7222-4721-b3fe-56b16d420be0
akamya997/PracticeCode
201908_practice/nowcoder8/zgy.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> PII; #ifndef ONLINE_JUDGE #define dbg(x...) do{cout << "\033[32;1m" << #x << "->" ; err(x);} while(0) void err(){cout << "\033[39;0m" << endl;} template<template<typename...> class T,typename t,typename... A> void err(T<t> a,A... ...
ALGO
0.99988
4.497249
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2019-11-06T07:30:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15857fcd2...
b377ec5b-c903-4f8f-81d1-ba476b79b200
tejus0/Leetcode-solutions
maximum-length-of-a-concatenated-string-with-unique-characters/Accepted/12-22-2022, 6_21_19 PM/Solution.cpp
// https://leetcode.com/problems/maximum-length-of-a-concatenated-string-with-unique-characters class Solution { public: int maxi = 0; // function for checking uniqueness of the string bool is_unique(string& str, vector<int>& prev) { int n = str.size(); // mp wil...
ALGO
0.999956
5.891782
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-01-25T09:33: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": "bbe3a1e71c...
3544c896-e8ab-4fed-b6b3-60069cc8148f
fangchun007/TestForMPC
src_friend_failed/MPC.h
#ifndef MPC_H #define MPC_H #include <vector> #include "Eigen-3.3/Eigen/Core" using namespace std; class FG_eval; // declare the FG_eval class in advance. class MPC { public: friend class FG_eval; public: size_t N = 10; double dt = 0.1; double Lf = 2.67; double ref_v = 50; size_t x_start = 0; size_t y...
ALGO
0.989454
6.023232
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2017-08-05T05:50: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": "5195131d2...
d9998b97-be10-43a0-8a45-dc242582359c
sha443/UVa
424.cpp
#include<iostream> #include<stdio.h> #include<string.h> using namespace std; char res[201]; void stringAdd(char s1[],char s2[]) { int i,j,k=0; char sum[201],str1[201],str2[201],temp[201]; for(int i=0;i<201;i++) { sum[i] = 0; str1[i] = 0; str2[i] = 0; temp[i] = 0; } ...
ALGO
0.999935
3.451291
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-10-07T15:03: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": "fed59cf4d2...
77704939-a3bd-4412-b691-cd78956a7c77
chichuyun/LeetCode
0444/main.cpp
class Solution { public: bool sequenceReconstruction(vector<int>& org, vector<vector<int>>& seqs) { if(seqs.empty()) return false; int N = org.size(); vector<unordered_set<int>> adjs(N); vector<int> indegrees(N, 0); for(int i=0; i<seqs.size(); ++i) { if(seqs[i][0]...
ALGO
0.999966
5.486977
{ "github_metadata": { "branch": "master", "commit_count": 613, "repo_created_at": "2018-09-12T07:36:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f27a42bc...
7d500f32-7790-4beb-abbf-fc884f1f9607
Gabox2k/Hudlle
Huddle/GPS.c++
#include <iostream> #include <vector> #include <cstdlib> //funcion para rand #include <ctime> //para time y que sea aleatorio #include <cmath> // para calcular el abs using namespace std; /* g= costo del nodo , h= heuristica y f = g+h */ struct Nodo { int x, y; int g, h, f; Nodo(int x = 0, int y = 0, in...
ALGO
0.999569
4.305606
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-07-01T13:21: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": "b956bb49d2ab...
163f01b8-eb3c-4a98-a485-c0a8581a4cfe
LutzGross/esys-escript.github.io
trilinos_source16/packages/rol/adapters/belos/test/vector/test_01.cpp
// @HEADER // ************************************************************************ // // Rapid Optimization Library (ROL) Package // Copyright (2014) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for use of this work by or on be...
ALGO
0.93223
5.39875
{ "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": "585c...
3adf43ad-2e64-46ae-ab61-9a93e70aeaa3
helixlang/lib-helix
core/include/runtime/__memory/platform_memory.hh
///--- The Helix Project ------------------------------------------------------------------------/// /// /// /// Part of the Helix Project, under the Attribution 4.0 International license (CC BY 4.0). /// /// You are all...
TOOL
0.954307
5.522423
{ "github_metadata": { "branch": "main", "commit_count": 160, "repo_created_at": "2024-09-07T16:45:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "bc7cf35eaf2...
88632c87-993b-4b16-b00b-33f7e490e883
JayStevency/Algorithm-BOJ
1149/src/main.cpp
// // Created by jay on 2017. 3. 21.. // #include <iostream> #define MAX_N 1001 using namespace std; int cost[MAX_N][3]; int dp[MAX_N][3]; int n; int solve(int N, int k){ if(N == n) return 0; if(dp[N][k] != 0) return dp[N][k]; else if(k == 0){ return dp[N][k] = min(solve(N+1,k + 1),solve(N+1,...
ALGO
0.9999
3.619565
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2017-01-16T05:43: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": "1ffb4c468...
f84760d6-afa6-430d-986a-f1d8852aa40e
ChrisMStump/ITCS-3145-Intro-To-Parallel-Programming
dynamic_sched.cpp
#include <iostream> #include <cmath> #include <cstdlib> #include <chrono> #include <pthread.h> #include <math.h> #include <string.h> #include <tuple> #ifdef __cplusplus extern "C" { #endif float f1(float x, int intensity); float f2(float x, int intensity); float f3(float x, int intensity); float f4(float x, int inten...
ALGO
0.998678
4.701385
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-10-17T03:22:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8aee302747...
19a7d32d-7242-420f-86b7-db507df8764f
johannesgerer/jburkardt-cpp
fem2d_heat/fem2d_heat.cpp
# include <cstdlib> # include <iostream> # include <iomanip> # include <fstream> # include <ctime> # include <cmath> # include <cstring> using namespace std; int main ( int argc, char *argv[] ); void assemble_backward_euler ( int node_num, double node_xy[], int element_order, int element_num, int element_node[], in...
ALGO
0.999072
4.269136
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2012-12-02T14:18:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 53, "forks": 41, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9429b460...
dac52b51-ca42-4945-90b7-773f6d25c248
wangqian1992511/LeetCode
179 Largest Number/001.cpp
struct Comp { bool operator () (string &a, string &b) { string sa = a + b, sb = b + a; int l = sa.size(); for (int i = 0; i < l; i++) if (sa[i] > sb[i]) return true; else if (sa[i] < sb[i]) return false; return false; } };...
ALGO
0.999959
5.355614
{ "github_metadata": { "branch": "master", "commit_count": 264, "repo_created_at": "2015-04-17T20:42:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da90fe61...
3a9ae107-3c07-494f-b670-6c5f8fcf094f
smilefacehh/VSLAM-Course
Lec7/src/vo/stereo.cpp
#include "stereo.h" #include <limits.h> #include <omp.h> #include "util/math_util.h" namespace mango { Stereo::Stereo() {} Stereo::~Stereo() {} cv::Mat Stereo::match(const cv::Mat& left_img, const cv::Mat& right_img, float patch_radius, float min_disp, float max_disp) { cv::Mat disp_img = cv::Mat::zeros(left_i...
ALGO
0.983551
5.642457
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2021-06-25T13:58:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 37, "forks": 10, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "aa3601bc8...
45a0e6c0-cd69-472a-a733-a405d8240511
lynx-family/lynx
core/animation/utils/cubic_bezier.h
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Copyright 2021 The Lynx Authors. All rights reserved. // Licensed under the Apache License Version 2.0 that can be found in the // LICENSE file in ...
ALGO
0.982557
7.371664
{ "github_metadata": { "branch": "develop", "commit_count": 1251, "repo_created_at": "2025-03-04T07:41:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12847, "forks": 465, "issues": 123, "pull_requests": 231 }, "file_meta": { "content_id"...
0e557264-bebd-4698-a4c6-f19214aec25f
hasan-kamal/Competitive-Programming
codeforces/cf_559/b.cpp
#include <iostream> #include <vector> #include <string> #include <cmath> #include <algorithm> #define INF 1000000000 using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; int bsearch(vi &a, int s, int e, int p){ int lo = s; int hi = e; while(lo < hi){ int mid = lo + (hi - lo) / 2; if(a[mid] >= p...
ALGO
0.999984
3.702462
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2018-07-05T16:41: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": "fdcd60c80...
82ef7c1b-00d5-4993-af89-65f2a7e19766
Mitesh12ehd/DSA
3. Arrays/q13_3_sum.cpp
#include<iostream> #include<vector> #include<algorithm> #include<set> #include<unordered_map> using namespace std; //read notes //leetcode 15 //3Sum //brute force vector<vector<int>> threeSum(vector<int>& nums) { set<vector<int>> st; for(int i=0; i<nums.size(); i++){ for(int j= i+1; j<nums.size(); j++...
ALGO
0.99963
5.782611
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2024-01-11T11:07: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": "4711388597a...
fecb3413-5e35-4487-8efb-ea9c60eeebab
akhilkammila/leetcode-screenshotter
editorial_code/1-999/949. Largest Time for Given Digits/cpp-0.cpp
class Solution { public: string largestTimeFromDigits(vector<int>& A) { int max_time = -1; // prepare for the generation of permutations next. std::sort(A.begin(), A.end()); do { int hour = A[0] * 10 + A[1]; int minute = A[2] * 10 + A[3]; if (ho...
ALGO
0.999655
5.925919
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2023-06-02T16:24:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 912, "forks": 294, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "3086b22...
5c28914d-e72c-4d75-8ca7-b4f86dd85d70
lemonxy/Marker-based-SLAM
src/optimization/weigthed_ba.h
#ifndef _UCOSLAM_WeightedBAH_ #define _UCOSLAM_WeightedBAH #include <opencv2/core.hpp> #include "stuff/se3.h" #include "imageparams.h" namespace ucoslam{ //Implements a bundle adjustment for position estimation using a different weighth for each point //The idea is to weight the influence of the points according to t...
ALGO
0.998451
6.144682
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2021-10-21T03:34:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 14, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "79c42d55...
de1adf89-54c9-4c96-83e0-853765ce9598
gcc4p/tictactoe
ttt-functions.cpp
#include <iostream> #include <vector> void display_board(char board[9]) { std::cout << " | | \n"; std::cout << " " << board[0] << " | " << board[1] << " | " << board[2] << "\n"; std::cout << "_____|_____|_____ \n"; std::cout << " | | \n"; std::cout << " " << board[3] << " |...
ALGO
0.943439
4.821069
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-01-22T01:43: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": "fff74b5f7c29...
46628def-fdb9-4869-91d8-7be8d040ac95
mukang/The-program-design-and-algorithm
53-配对碱基链/53-配对碱基链/main.cpp
// // main.cpp // 53-配对碱基链 // // Created by 穆康 on 2017/12/12. // Copyright © 2017年 杭州部落公社科技有限公司. All rights reserved. // /* 描述 脱氧核糖核酸(DNA)由两条互补的碱基链以双螺旋的方式结合而成。而构成DNA的碱基共有4种,分别为腺瞟呤(A)、鸟嘌呤(G)、胸腺嘧啶(T)和胞嘧啶(C)。我们知道,在两条互补碱基链的对应位置上,腺瞟呤总是和胸腺嘧啶配对,鸟嘌呤总是和胞嘧啶配对。你的任务就是根据一条单链上的碱基序列,给出对应的互补链上的碱基序列。 输入 第一行是一个正整数n,表明共有n条...
ALGO
0.999145
4.743865
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2017-07-16T10:11: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": "f3ec2f8ac...
d92f953a-1293-43ea-ad79-5b4084068311
roy-lau/learning_cpp
cpp_base/2-10.unordered_map.cpp
/** * @file 2-10.unordered_map.cpp * @author RoyLau (<EMAIL>) * @brief 无序映射的使用 * @version 0.1 * @date 2022-07-24 * * @copyright Copyright (c) 2022 * */ #include <iostream> #include <unordered_map> #include <string> using namespace std; int main(){ unordered_map<int,string> um; um[99] = ">_<"; um[66] =...
TOOL
0.916552
4.452827
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2022-05-24T03:21:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "077a578a51e...
6c843414-a335-411f-b88c-da60c250147e
snap-stanford/snap
snap-exp/bfs-dev/bfs-vector.h
#include <stdio.h> //#////////////////////////////////////////////// /// Breath-First-Search class. /// The class is meant for executing many BFSs over a fixed graph. This means that the class can keep the hash tables and queues initialized between different calls of the DoBfs() function. template<class PGraph> class ...
ALGO
0.998469
4.150718
{ "github_metadata": { "branch": "master", "commit_count": 1991, "repo_created_at": "2012-05-10T18:43:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2233, "forks": 803, "issues": 83, "pull_requests": 11 }, "file_meta": { "content_id": "3...