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
e8ab0905-8758-4166-b1e1-0e99f185875f
alexandraback/datacollection
solutions_5753053697277952_1/C++/Aergyl/1.cpp
#include <iostream> #include <sstream> #include <fstream> #include <string> #include <vector> #include <map> #include <queue> using namespace std; const bool OUTPUT_TO_FILE = true; //Constants: map<int, char> char_map; //IO variables: int t_in; int n_in; int nn[26]; string s_in; stringstream out; //Other glob...
ALGO
0.999992
3.726022
{ "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": "7711e2922...
c0bfbb4d-c427-4f63-a2d4-49e27993c94a
SnoozeTime/c--training
graph.hpp
#ifndef GRAPH_HPP #define GRAPH_HPP #include <list> #include <vector> #include <string> #include <stdexcept> /* Implementation with adjacent lists. This time, I will be using the stl containers vector and list. In SGraph. vertice and edges have values. in SGraph2, only edges have value. SGraph<s...
ALGO
0.982887
5.256745
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-05-20T08:03: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": "3557cbd832...
b17b10d4-e8fa-428f-8469-1e048d3dfbba
PaawanAngra/DS-Algo-Practice
optimal_scheduling.cpp
#include <bits/stdc++.h> using namespace std; bool comp (vector <double> &a, vector <double> &b) { return (a [0] > b [0]); } bool comp1 (vector <double> &a, vector <double> &b) { return (a [1] > b [1]); } int main () { double a, b, c; int n; ifstream file ("data.txt"); string line; getl...
ALGO
0.999595
3.852165
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-05-03T18:14: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": "ea4d147a697c...
9bb5f9b0-1006-4465-8a16-f4015ae4f652
heyfaraday/CMBcpp2
lib/utils.cpp
#include <cmath> #include <limits> #include "utils.hpp" long double* n_vector_generator(unsigned int dim) { long double* ptr = new long double [dim](); // for (unsigned int i = 0; i < dim; ++i) { // ptr[i] = 0.0L; // } return ptr; } int* n_int_vector_generator(unsigned int dim) { int* ptr ...
TOOL
0.995659
3.739722
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2017-04-15T23:12:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5b2adce0...
1e4a023e-7e35-4aa9-957f-85f427e5e5f4
SebastianBran/Competitive-Programming-Problems-Solved
Codeforces/Dense Array.cpp
#include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl "\n" #define fore(i,x,n) for(int i=x;i<n;i++) #define forell(i,x,n) for(long long i=x;i<n;i++) #define all(a) a.begin(),a.end() #define pb push_back #define ordenar(a) sort(all(a)) #define sz(x) (in...
ALGO
0.999794
4.050326
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-08-05T23:29: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": "7720f81d99...
0402e21f-b961-4142-9ef0-eab499301a1d
gilsaia/college-study
algorithm/poj3233/poj3233.cpp
//一样是矩阵的幂···这种题的难点在于怎么能看出题能够用这种方式做并且找到正确的矩阵 #include<cstdio> #include<vector> using namespace std; typedef vector<int> vec; typedef vector<vec> mat; typedef long long ll; int M; mat mul(mat &A,mat &B) { mat C(A.size(),vec(B[0].size())); for(int i=0;i<A.size();i++) { for(int k=0;k<B.size();k++) ...
ALGO
0.999994
3.471307
{ "github_metadata": { "branch": "master", "commit_count": 531, "repo_created_at": "2018-06-26T08:25:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b7a53cad...
bfcd12db-8742-42b9-b6c9-cb9171c8ed11
sakshamjain-wgd/dsa
Array/binsrch.cpp
#include<iostream> using namespace std; int binsrch(int* arr, int l, int h, int key){ int mid; while(l <= h){ mid = l + (h - l)/2; if(arr[mid] == key){ return mid; } else if(arr[mid] > key){ h = mid - 1; } else{ l = mid + 1; ...
ALGO
0.999981
4.664851
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-06-23T21:03: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": "7620b96fc2ea...
977ed999-4f5c-479a-bd16-6a0d97dcfa9b
phoenixx1/Algorithms-Course
Trees/LevelOrder.cpp
//author @Nishant #include<bits/stdc++.h> using namespace std; class Node{ public: int data; Node *left, *right; }; void append(Node **root, int data); void printLevelOrder(Node *root); void printGivenLevel(Node *root, int level); int maxDepth(Node *node); int main(){ Node *root = NULL; ...
ALGO
0.999955
4.406258
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2020-01-03T19:10:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "049a7b20e...
795ec519-bfd4-421c-93f5-096cc7857dc7
Cyy0818/ComputerGraphic
ComputerGraphic/MyPoly.h
#define SHOW_CONSOLE #include<iostream> #include <algorithm> #include"ApplicationRoot.h" #include<vector> #include<stack> #include <bitset> #include<queue> using namespace std; class MyPoly: public ObjWrapper { public: MyPoly() :vertex_(), color_(0) {}; MyPoly(std::vector<std::pair<double, double>> vertex, int ...
ALGO
0.998102
4.466209
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2023-10-12T02:26:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "81741c461...
26da8f84-9b55-4823-b96f-0d05d58a9c05
BingoNate/Cells_Other
OldCellAnalysis/backup/vel_field.cpp
//+++++++++++++++ //++ Data analysis with postprocessing for velocity field calculation //+++++++++++++++ #include <iostream> #include <fstream> #include <iomanip> #include <string> #include <sstream> #include <vector> #include <cstdlib> #include <cmath> #include <map> #include <set> #include <stack> #include <algori...
ALGO
0.998589
3.940744
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2017-09-25T14:03: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": "6c107625a...
0c840ce1-df44-4943-ab9a-0d0334ac943a
ImtiazAhmedAkash/Problem-Solving
codeforces/1765/N.cpp
/* In the Name of ALLAH, the most gracious, the most merciful */ // Number Reduction #include <bits/stdc++.h> using namespace std; #define ll long long #define nl '\n' #define deb(x) cerr << #x << " = " << x << nl const int inf = 1e9; const ll INF = 1e18; const int mod = 998244353; const int N = 2e5 + 5; void so...
ALGO
0.999959
5.452606
{ "github_metadata": { "branch": "main", "commit_count": 475, "repo_created_at": "2022-11-19T14:05:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a43ecf2de2...
200c01ca-122a-4e76-b46d-22e43ce864a9
tsuyokuro/TCad
external/carve/include/carve/heap.hpp
// Begin License: // Copyright (C) 2006-2008 <NAME> (<EMAIL>). // All rights reserved. // // This file is part of the Carve CSG Library (http://carve-csg.com/) // // This file may be used under the terms of the GNU General Public // License version 2.0 as published by the Free Software Foundation // and appearing in th...
ALGO
0.998514
5.390728
{ "github_metadata": { "branch": "master", "commit_count": 355, "repo_created_at": "2021-11-20T00:17:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "013ed392...
4521c8ad-4679-480a-8a57-6bb8b6da09fa
b-paul/advent-of-code-2020
12.cpp
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; typedef vector<int> vi; typedef pair<int,int> pi; #define FOR(i,a) for (i = 0; i < (a); i++) #define SQ(a) (a)*(a) #define F first #define S second #define PB push_back #define MP make_pair // Real modulo that fix...
ALGO
0.999345
3.378729
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2020-12-02T07:31:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0af7b028d7d...
e2bb42c3-f9e8-4ee8-a951-0b4701249733
huaxiufeng/leetcode
src/algorithm/cpp/rotate-list/main.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; template <typename T> void display(vector<T> array) { for (int i = 0; i < array.size(); i++) { cout<<array[i]<<" "; } cout<<endl; } struct ListNode { int val; ListNode *next; ListNode(int ...
ALGO
0.999901
5.255515
{ "github_metadata": { "branch": "master", "commit_count": 492, "repo_created_at": "2014-12-10T13:59: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": "625d656e...
a91a49ca-11e1-49b5-8ffa-5cfef35c74a0
Itisben/Parallel-CoreMaint
core-maint-source/gadget/disjoint.cc
#include "disjoint.h" #include "defs.h" namespace gadget { DisjointSets::DisjointSets(const int n) { ASSERT((n_ = n) >= 0); nl_child_ = std::vector<int>(n_); nl_prev_ = std::vector<int>(n_ + 1); nl_next_ = std::vector<int>(n_ + 1); child_ = std::vector<int>(n_); prev_ = std::vector<int>(n_ + 1); ...
ALGO
0.999485
5.135223
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2022-11-07T14:21:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "74b61d0125d...
24e5e60f-9298-42b8-80ec-5497fdc1e2ef
ravi122004/DsaWithCpp
find_common_elements.cpp
// Problem: Find common elements between two datasets (arrays) // Input: // n - number of elements in the first dataset // n integers - elements of the first dataset // m - number of elements in the second dataset // m integers - elements of the second dataset // Output: // Print "Common Elements: " followed ...
ALGO
0.999898
5.637383
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2025-05-14T09:02: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": "39175c9b46b...
0b1e1541-2204-4279-af1a-f615077e5a3f
Valanaz/Snake
Astar.cpp
#include "Astar.h" AstarPoint::AstarPoint(const Point& p):x{p.first},y{p.second}{ ; } std::shared_ptr<AstarPoint>& AstarPoint::parent(){ return m_parent; } int& AstarPoint::F(){ return m_F; } int& AstarPoint::G(){ return m_G; } int& AstarPoint::H(){ return m_H; } AstarPoint::operator Point(){...
ALGO
0.999594
4.155814
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-01-25T04:12: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": "f81a1b8e2a...
e4041a78-d96e-4284-b1ae-13550484b3a9
falcaoanderson/CompetitiveProgramming
OBI/obi-2013-lencol.cpp
// 12/06/20 // 7:55 PM // #include <bits/stdc++.h> using namespace std; #define endl "\n" int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int a1, b1, a2, b2, a, b; cin >> a1 >> b1 >> a2 >> b2 >> a >> b; int x[5], y[5]; x[1] = b1+a2; y[1] = min(a1, b2); x[2] = b1+b2;...
ALGO
0.999799
3.839397
{ "github_metadata": { "branch": "main", "commit_count": 337, "repo_created_at": "2023-03-08T11:51:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6b01620c14...
f20f434c-723f-4de8-bca8-26bad3c4b887
Yukariko/study
12_dp2/4811.cpp
#include <bits/stdc++.h> #ifdef ONLINE_JUDGE #define endl '\n' #endif using ll = long long; using ld = long double; using namespace std; ll cache[31][31]; ll solve(int w, int h) { if (h < 0) { return 0; } if (w == 0) { return 1; } ll& ret = cache[w][h]; if (ret != -1) { ...
ALGO
0.999968
4.349208
{ "github_metadata": { "branch": "main", "commit_count": 85, "repo_created_at": "2021-08-13T14:27:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "563627c0a51...
959b4bdd-2121-499f-b282-ed5f3973e06c
CE-Automaton/Codes
2024年/1-21/CQYCG讲溶解嘞/dazzling/dazzling.cpp
#include <bits/stdc++.h> #define mod 998244353 #define File(xxx) freopen(xxx".in","r",stdin),freopen(xxx".out","w",stdout) using namespace std; typedef long long LL; const int N = 2e3+5; int n, w, zhan[N], ans; template <typename T> inline void debug(T x) { cerr<<x; } template <typename T, typename ...T_> inline void ...
ALGO
0.999992
4.058535
{ "github_metadata": { "branch": "main", "commit_count": 276, "repo_created_at": "2021-10-07T08:27:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b7aa4f769...
0c43bcb1-c561-482b-bcc0-385831fda6c1
Rajveer100/CSES-ProblemSet
DynamicProgramming/ElevatorRides.cpp
// // main.cpp // CPWorkSpace // // Created by <NAME> on 23/09/21. // #include <algorithm> #include <array> #include <chrono> #include <cstring> #include <ctime> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <string> #include <tim...
ALGO
0.999981
5.187756
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-08-22T10:04: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": "c9eb93d629c9...
d4ade1ab-089c-4b15-8bbe-43127c9ada3c
Rajat-web-server/Competetive-Programming-Practice
Patterns/Pattern.cpp
#include <iostream> using namespace std; void Pattern_1() { for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { cout << "*" << " "; } cout << endl; } } void p2() { for (int i = 0; i < 4; i++) { // space for (int m = i; m < 4; m++) { cout << " "; } /...
ALGO
0.999941
3.395958
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2025-04-23T17:59:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1970cd243b4...
09d80d74-d9f5-40a9-9616-867ed13bc1ba
llvm/llvm-project
lldb/source/Core/DynamicLoader.cpp
//===-- DynamicLoader.cpp -------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
TOOL
0.908531
7.293148
{ "github_metadata": { "branch": "main", "commit_count": 545188, "repo_created_at": "2016-12-07T09:39:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 33545, "forks": 14484, "issues": 5000, "pull_requests": 5000 }, "file_meta": { "content_...
0fa04191-0d64-492f-8ba1-4ce76dff76a7
0xdsyx/Asteroid-PC
helpers/utils.cpp
#include "utils.h" using namespace IL2CPP::Class::Utils; bool hook(void* address, void* new_func, void** old_func, std::string id) { if (MH_CreateHook(address, new_func, old_func) != MH_OK) { fslog::error(OBF("Create Hook Failed at: {} | ID: {}"), address, id); return false; } if (MH_EnableHook(address) != MH_O...
TOOL
0.97286
4.308916
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-01-01T17:36:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "724c19756aa0...
b9dc8fbc-2e08-4c31-8151-b52214d3eca2
handsomem1n/Cpp
hw5/merge(iterative).cpp
// merge(강의노트 참고) // merge 과정 후 핵심연산자(비교연산자)의 실행 횟수 출력 /* idea : 더 이상 분할할 수 없을 때까지 두 개의 부분 배열로 분할 분할된 부분 배열들을 배열의 원소를 순서대로 비교하면서 결과 배열에 차례로 삽입 merge 함수에서 원소를 비교할 때마다 count를 1씩 증가 */ #include <iostream> #include <vector> using namespace std; const int MAX_SIZE = 100; #define MIN(a, b) ((a) < (b) ? (a) : ...
ALGO
0.99998
5.417051
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-10-06T04:38: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": "ad9d54e7b07e...
95c4e362-8378-47dc-809c-c9fe18061c6e
sugawara5110/3DRPG
Function.cpp
//*****************************************************************************************// //** **// //**     関数, データ型 **// //** ...
ALGO
0.903456
3.38998
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2015-11-21T14:55:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cfae89d237...
9ce3a959-646c-4df8-a8b8-83fc61a9ce63
RiccardoBravin/Collection-of-exercises
C++ exercises/linked_list/linked_list.cpp
#include <iostream> #include <string> using namespace std; struct Link { string value; Link* prev; Link* succ; Link(const string& v, Link* p = nullptr, Link* s = nullptr) : value{v}, prev{p}, succ{s} {} }; class LinkedList{ private: Link* head; Link* tail; public: Lin...
TOOL
0.996456
4.582064
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-03-19T09:28: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": "d14a7997c76a...
fc5a5503-f429-414c-bb40-6fb6c162377f
bfazeli/Lab3_YourChancesDon-tLookGood
lab3_Fazeli/Main.cpp
/* <NAME> Lab 03 */ #include <iostream> #include <iomanip> using namespace std; void askUser(double& well, double& ill, double& dead, int& week); void askUser(double& well, double& ill, double& dead, int& week) { cout << "Enter the initial probability of being well: "; cin >> well; cout << "Enter the initial pr...
ALGO
0.997098
3.923877
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-10-18T02:35: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": "741093928a...
1b9177dd-a30c-474e-8b6a-2b582e511c09
noel7781/Algorithm
SDS/day6/1516.cpp
#include <iostream> #include <vector> #include <cstring> #include <algorithm> using namespace std; int n; vector<vector<int> > adj; int cache[502]; int solve(int i) { int& ret = cache[i]; if(ret != -1) return ret; if(adj[i].size() == 1) { return ret = adj[i][0]; } else { int max_c...
ALGO
0.999859
3.748941
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2021-07-20T12:36: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": "5b20798b9...
a8afeb7a-0eeb-466d-ad6f-15df7b88fb68
hi-ogawa/practice
codeforces/contest/1454/c/main.cpp
// CONTEST, AC #include <bits/stdc++.h> using namespace std; #define ALL(X) (X).begin(), (X).end() #define FOR(I, X, Y) for (auto I = decltype(Y)(X); I < (Y); ++I) using ll = int64_t; using ull = uint64_t; namespace std { template<class ...Ts> istream& operator>>(istream& i, tuple<Ts...>& x) { apply([&](...
ALGO
0.999856
4.83758
{ "github_metadata": { "branch": "main", "commit_count": 888, "repo_created_at": "2020-07-14T04:24:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0944150dd3...
db86c1a7-bd60-459f-a474-93e104aea088
i80287/algorithms
geometry_classes/segment.h
#ifndef GEOMETRYCLASSES__SEGMENT_H_ #define GEOMETRYCLASSES__SEGMENT_H_ #include "i_shape.h" #include "point.h" #include "vector.h" namespace geometry { class Segment : public IShape { protected: Point start_; Point end_; public: Segment() noexcept : start_{0, 0}, end_{0, 0} {} Segment(const Point& ...
TOOL
0.956853
7.231889
{ "github_metadata": { "branch": "main", "commit_count": 707, "repo_created_at": "2023-08-15T12:57: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": "6ae1db1a96...
ecbcce77-5c02-4527-a6f3-95f221de68f8
panIMP/AlgCode
first/josephRing.cpp
#include <stdio.h> #include <stdlib.h> typedef struct DLIST { int value; struct DLIST* next; struct DLIST* pre; }dList, *pDList; int josephRing(int argc, char* argv[]) { int n, k, m; scanf("%d %d %d", &n, &k, &m); dList* list = (dList*)calloc(n, sizeof(dList)); list[0].value = 1; list[0].next = &list[1]; ...
ALGO
0.999989
3.13637
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2014-07-11T06:19:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4093c1d02...
567de727-5ba8-4f13-998c-d95f1dbee59e
waajones/project3
matAverager.cpp
//<NAME> project3 #include <thread> #include <chrono> #include <fstream> #include <iostream> #include <omp.h> #include <sstream> #include <string> using namespace std; // a class to get more accurate time class stopwatch{ private: std::chrono::high_resolution_clock::time_point t1; std::chrono::high_resolution_cl...
ALGO
0.999311
4.044397
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-05-02T21:04:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4d980e7ba1d8...
370a63dd-0205-43cf-b9e7-2f73395077dd
speedbyte/MotionFlowPriorityGraphSensors
tutorials/opencv_tutorials/video_operations.cpp
#include <boost/filesystem/path.hpp> #include <boost/filesystem/operations.hpp> #include <iostream> #include "opencv2/video/tracking.hpp" #include "opencv2/imgproc.hpp" #include "opencv2/videoio.hpp" #include "opencv2/highgui.hpp" #include <iostream> #include <ctype.h> #define KITTI_RAW_DATASET_PATH "../../../kit...
TOOL
0.900625
4.877475
{ "github_metadata": { "branch": "master", "commit_count": 1264, "repo_created_at": "2019-06-06T21:55:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9a47f9...
2ea28ba8-3b7b-432e-a4dd-531a799abda4
FazeelUsmani/Scaler-Academy
019 Stack 1/A2 Sort Stack using another stack.cpp
/* Sort stack using another stack Given a stack of integers A, sort it using another stack. Return the array of integers after sorting the stack using another stack. Input Format The only argument given is the integer array A. Output Format Return the array of integers after sorting the stack using another stack. Cons...
ALGO
0.999995
5.61598
{ "github_metadata": { "branch": "master", "commit_count": 795, "repo_created_at": "2020-01-28T18:13:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 252, "forks": 172, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2b25...
1cc30e1e-ba60-4efd-8fa7-c83603a60f8a
ChaoticCross12/CodeForces
1327A_SumOfOddInts.cpp
/* Function description */ #include <iostream> // #include <cmath> REMOVE IF NOT USED // #include <cstdlib> REMOVE IF NOT USED // #include <string> REMOVE IF NOT USED // #include <iomanip> ...
ALGO
0.99983
5.162588
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2020-09-01T22:54:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c09a036f...
35e534be-9d77-461a-8881-3aab991db447
Popsonikk/uczelnia
Algorytmika i złożoność/fibonacci/main.cpp
#include <iostream> #include <vector> #include <list> #include <algorithm> #include <cmath> struct Graf{ std::vector<int> neibour; std::vector<int> wag; bool visited=false; }; struct Edge{ int start; int end; int wag; }; struct Node{ std::pair<int,int> value; int degree; Node* paren...
ALGO
0.999994
4.063359
{ "github_metadata": { "branch": "main", "commit_count": 80, "repo_created_at": "2024-02-23T18:53: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": "e57352efb38...
b624106a-5e54-46fa-bbe3-2bbc1c7354b8
goofynugtz/algorithms
Dynamic Programming/revised/mincoins.cpp
#include <bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define MOD int(1e9+7) typedef long long ll; void setIO(){ fast; #ifndef ONLINE_JUDGE freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); #endif } ll f(vector<ll>& coins, ll tar...
ALGO
0.999978
4.558077
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2021-05-23T15:54:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dfa89f89b...
e915c19a-7a18-4f75-9efc-024e6f8c8e73
IEIAuto/AutoDRRT
src/autodrrt.application/perception/autoware.perception/traffic_light_ssd_fine_detector/lib/include/gather_topk_kernel.hpp
// Copyright 2023 TIER IV, Inc. // // 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 i...
ALGO
0.991802
7.325032
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2023-08-11T02:20:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 14, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "3ea43b59d...
90e867d3-bf45-462e-bb3c-5a803a6f0699
TCtobychen/IntrotoAlgorithm
C++Implementation/LuoguP1462.cpp
#include <iostream> #include <cstring> #include <algorithm> #include <fstream> #include <queue> #define For(x,y) for(int i=x;i<y;i++) #define INF 1e9 using namespace std; int N,M,cnt=0,head[10010],vis[10010],num=0; long long int f[10010],B=0,d[10010]; struct Edge{int u,v,next;long long int w; Edge() {} Edge(int _u...
ALGO
0.999977
3.734489
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2017-11-27T15:32:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e15c413b3...
4ab71eb1-ba9d-4f9b-bdbf-c9220439042b
kaikpdy9/My-C-learning
C++面向对象的程序设计(推荐阅读)/2.1类和对象的基本概念.cpp
/* 结构化程序设计 c语言使用结构化程序设计 程序=数据结构+算法 程序由全局变量及众多相互调用的函数组成 算法以函数形式实现,用于对数据结构进行操作 程序设计的不足也是很明显的 结构化程序设计没有封装和隐藏的概念,要访问 某个数据结构中的某个变量,就可以直接访问,那 么当变量的定义有改动的时候,就哟啊吧有访问该变量的语句找出来 修改,不利于程序的维护和扩充 难以差错,当某个数据结构的值不正确的时候,难以找到是哪个函数 把值出错了 重用:把我写过的函数调用出来重新使用 但是在结构化程序设计中,随着程序规模的增大,又有程序大量函数,变量之间的 ...
TOOL
0.96086
3.906019
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2019-01-07T05:41:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d24d418da...
ac76f95c-b601-4da7-8e46-d8b26b505a96
THeZoNE-007/Sem-6-College-Repo
OOPuCpp/2025-03-24 - Asg#2 soln/2_1.cpp
#include <iostream> #include <string> using namespace std; class BankAccount { private: string depositorName; // Name of the depositor int accountNumber; // Account number string accountType; // Type of account (savings or current) double balance; // Balance amount in the account pub...
TOOL
0.950742
5.948981
{ "github_metadata": { "branch": "main", "commit_count": 110, "repo_created_at": "2025-01-23T13:18:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7fd2285b7c...
c127f127-fcf5-4c61-8349-4f4a6d5981be
mrinmoyxb/Data-Structures-and-Algorithms
Recursion/06_Recursion.cpp
#include <iostream> void displayNumbers(int num){ if(num<1){ return; } displayNumbers(num-1); std::cout<<num<<std::endl; } void displayReverse(int num){ if(num<1){ return; } std::cout<<num<<std::endl; displayReverse(num-1); } void displayArray(int *arr, int size){ ...
ALGO
0.991782
5.354866
{ "github_metadata": { "branch": "main", "commit_count": 207, "repo_created_at": "2024-02-08T02:17: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": "9da09dbfe0...
a3118edf-175a-40d6-b4cd-914f1be8d660
tenstorrent/tt-buda
pybuda/csrc/placer/evaluator.cpp
// SPDX-FileCopyrightText: © 2024 Tenstorrent AI ULC // // SPDX-License-Identifier: Apache-2.0 #include "placer/evaluator.hpp" namespace tt::placer { EpochPlacement::EpochPlacement( std::shared_ptr<balancer::BalancerSolution> solution, scheduler::InteractiveScheduler::Checkpoint scheduler_checkpoint, ...
ALGO
0.952519
6.238611
{ "github_metadata": { "branch": "main", "commit_count": 658, "repo_created_at": "2023-11-21T00:34:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 314, "forks": 43, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "ea0bc28d...
5946686e-ecd0-4e2c-8047-abec22a7c243
Adham-Ismail/Particle-Pulse
SDL Trial/src/SDL Trial.cpp
#include <iostream> #define SDL_MAIN_HANDLED #include <SDL2/SDL.h> #include "Screen.h" #include <math.h> #include <stdlib.h> #include <time.h> #include "Particle.h" #include "Swarm.h" using namespace std; using namespace AdhamIsmail; int main() { srand(time(NULL)); Screen screen; if (screen.init() == false) { ...
ALGO
0.93223
5.244175
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-05-19T23:08: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": "313e577df537...
407da4e9-2f92-4cd5-a1b5-09277001f1de
tomoskozi/dipl2
codelance/dep/kodo_no_sliding/kodo/rs/transpose_vandermonde_matrix.hpp
// Copyright Steinwurf ApS 2011-2013. // Distributed under the "STEINWURF RESEARCH LICENSE 1.0". // See accompanying file LICENSE.rst or // http://www.steinwurf.com/licensing #pragma once #include <boost/make_shared.hpp> namespace kodo { /// @brief Construct the transposes the Vandermonde matrix in order to ...
TOOL
0.960781
5.962555
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-04-14T17:46:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae0b053b01...
5ae0fe73-fdfc-4a1a-b103-6c4d8f3a29f1
arturfb/cvrptw
src/ILS.hpp
#pragma once #include <iostream> #include <fstream> #include <random> #include "Solution.hpp" class ILS { public: ILS(Instance* inst); ~ILS(); void run(const bool verbose, const unsigned timeLimit, const double pfactor, const unsigned ils_stagn, const unsigned vns_stagn); private: Instance* m_instance;...
ALGO
0.997079
5.474916
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2016-11-10T12:29:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "788a6c484...
23bf16ce-b907-4bd0-8882-0dbd83cfa5ca
Abheetarora/leetcode-problems
Circular tour - GFG/circular-tour.cpp
// { Driver Code Starts #include<bits/stdc++.h> using namespace std; struct petrolPump { int petrol; int distance; }; // } Driver Code Ends /* The structure of petrolPump is struct petrolPump { int petrol; int distance; };*/ /*You are required to complete this method*/ class Solution{ public: ...
ALGO
0.999917
5.084455
{ "github_metadata": { "branch": "main", "commit_count": 1669, "repo_created_at": "2022-01-06T11:58:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7e835f0e7...
43bcb49c-de6a-4ab0-94e8-fc0cc317db23
Jr-Turing/Cpp_DSA_180days
Data Structures & Algorithms/Day 11/Problem07.cpp
/* Problem: Day of the Week Using Switch Statement */ #include<iostream> using namespace std; int main() { int i; cout<<"Enter the number: "; cin>>i; // Switch statement to map numbers to days of the week switch (i) { case 1: cout<<"Mon"; // Monday for input 1 br...
ALGO
0.998841
3.718414
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2025-05-14T05:43: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": "9af19b42b2e...
5f445912-ac35-4e29-a3df-1cb37373e8b3
hondajke/abab
Project/Project/Map.cpp
#include<vector> #include<cstdlib> #include<iostream> #include<ctime> #define _USE_MATH_DEFINES #include <math.h> #include "Map.h" using namespace std; double Rand_Double (double Limit=1) { double d = static_cast<double>(rand()) / RAND_MAX; double ans=d*Limit; return ans; } bool Is_Point_Already_...
ALGO
0.976848
3.959996
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2019-02-06T23:28:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "222f0786d...
92665ca5-1140-498f-828a-2b1b3b501bc3
psungkyu/ProblemSolving
BOJ/3109.cpp
#include <stdio.h> #include <string.h> #include <iostream> #define MAX_ROWS 10001 #define MAX_COLS 501 using namespace std; int ans = 0; int R, C; int dx[] = {-1, 0, 1}, dy[] = {1, 1, 1}; char map[MAX_ROWS][MAX_COLS]; bool visited[MAX_ROWS][MAX_COLS]; bool isViableRoute = false; void printMap() { for (int i = 0;...
ALGO
0.999834
4.333235
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2019-10-23T12:42: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": "3a66bd63d...
ea7f0819-db47-440a-9129-76823a9f859a
00anshjain/LeetcodePractice
315-count-of-smaller-numbers-after-self/315-count-of-smaller-numbers-after-self.cpp
class Solution { public: void merge(vector<pair<int, int>> &nums, vector<int> &cnt, int l, int m, int r, vector<pair<int, int>>& temp) { int i = l, j = m+1, k = l; int curr = 0; // vector<pair<int, int>> temp(r+1); while(i <= m && j <= r) { if(nums[i].first > ...
ALGO
0.999994
6.019464
{ "github_metadata": { "branch": "main", "commit_count": 2235, "repo_created_at": "2022-03-13T04:41:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "46a8a1644...
54455f67-ee2f-463e-8ae3-14e5a3ec4c56
nascimento-jgb/CPP-Modules
Exs/module_02/ex03/srcs/main.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.cpp :+: :+: :+: ...
ALGO
0.9997
5.510434
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2023-03-13T08:57:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7811bbc9d...
1c1d3b93-a2a4-4527-a719-452c7f477078
jsueprez/HackerRank
src/module/day_2.h
#ifndef DAY_2_H #define DAY_2_H #include <vector> using std::vector; /* * Complete the 'lonelyinteger' function below. * * The function is expected to return an INTEGER. * The function accepts INTEGER_ARRAY a as parameter. */ int lonelyinteger(vector<int> a) { sort(a.begin(), a.end()); for(auto el{0}; ...
ALGO
0.999263
5.026342
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2022-10-05T06: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": "eedd64792...
1ace4325-5c26-40f4-ad93-3d62d6f5e1c3
ASSERT-KTH/Supersonic
predictions/submissions-aizu-coop-gpt4/Codenet/p00207/240015030/response_5.cpp
#include <iostream> #include <stack> using namespace std; int Board[102][102]; bool visited[102][102]; int xs, ys, xg, yg; struct Point { int x; int y; }; void DFS(int c) { stack<Point> s; s.push({xs, ys}); while(!s.empty()) { Point p = s.top(); s.pop(); if(p.x < 0 |...
ALGO
0.999337
4.24087
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-02-03T10:33:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04c4f8947cd0f...
e9f4ef31-5f22-4f05-89cb-7fe2c1695114
SbrTa/Online-Judge
UVA/Graph/BFS/336 - A Node Too Far.cpp
#include<cstdio> #include<iostream> #include<vector> #include<map> #include<algorithm> #include<string> #include<cstring> #include<cmath> #include<cstdlib> #include<queue> #define inI(n) scanf("%d",&n) #define inL(n) scanf("%ld",&n) #define inLL(n) scanf("%lld",&n) #define inF(n) scanf("%f",&n) #define inD(n) scanf("%...
ALGO
0.9998
3.946972
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2018-02-20T19:15:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd101df69...
123c1f72-fd6b-4266-ba34-924a6c332d1b
aanoskov/Hungarian_algo
graph.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <vector> #include <climits> using namespace std; int main() { freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); unsigned int n; cin >> n; vector<int> par(n + 1, 0); vector<int> way(n + 1, 0); vector<vector<int>> g(n + 1, vector<...
ALGO
0.99997
3.436267
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-05-25T08:50:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5300bcbe0c...
5fb5d879-1fc3-436a-8dfe-e7cbe86a9d06
tiagostmec/nmpc_robo
src/otimizador.cpp
#include "ros/ros.h" #include "otimizador.h" #include "acado_common.h" #include "acado_auxiliary_functions.h" #include <stdio.h> #include <chrono> /* Some convenient definitions. */ #define NX ACADO_NX /* Number of differential state variables. */ #define NXA ACADO_NXA /* Number of algebraic variabl...
ALGO
0.99888
4.296335
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-03-05T15:44: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": "9436cb8ca090...
cde30270-5fc7-4289-a634-7420053ef523
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/06/0628/personal_submission/cf74c_abandon2.cpp
#include<bits/stdc++.h> using namespace std; const int N =1e5+10; struct DSU { std::vector<int> f, siz; DSU() {} DSU(int n) { init(n+1); } void init(int n) { f.resize(n); std::iota(f.begin(), f.end(), 0); siz.assign(n, 1); } int find(int x) { ...
ALGO
0.999918
3.041699
{ "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": "c687...
84fc2d98-124e-4178-8ee7-56224fe8470c
zerotheS/APL
Solusi_Tugas_No1.cpp
#include <iostream> using namespace std; int main() { int a,b,c; cout<<"Kelompok 18 APL"<<endl; cout<<" ** "<<endl; cout<<" **** "<<endl; cout<<" A ****** B "<<endl; cout<<" ******** "<<endl; cout<<" ********** "<<endl; cout<<" ************ "<<endl; ...
ALGO
0.999122
3.693404
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-04-18T07:58: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": "3ca9cafe5b44...
1493b425-b012-4583-a7c6-86f20b0c3c27
Rajanarender/CAndCPPCompleteSubject
candcpp/study/Manipulations/MatrixQuestions/MatrixMultiplication.cpp
#include<iostream> using namespace std; #define M 2 #define N 3 #define A 3 #define B 1 int main() { #if 0 //User input int x[2][3]; cout<<"Enter the Matrix Elements: "; for(int i =0;i<2;i++) { for(int j=0;j<3;j++) { cin>>x[i][j]...
ALGO
0.999842
3.628691
{ "github_metadata": { "branch": "CompleteSubject", "commit_count": 1, "repo_created_at": "2019-10-27T12:45:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4...
42a98c23-5584-4666-9999-69203d9b0a7d
JunSuHeo/Algorithm
Q16917.cpp
#include <iostream> #include <algorithm> using namespace std; int main(){ int source, fried, half, source_num, fried_num; int total_min = 0; cin >> source >> fried >> half >> source_num >> fried_num; // case 1 half로 다 샀을 경우 int total_1 = 0; if(fried_num >= source_num){ total_1 += so...
ALGO
0.999807
3.200752
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2018-09-16T07:19:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bfd7248f...
c9409fee-7009-4868-a958-7f91728a4db2
google-deepmind/open_spiel
open_spiel/games/nine_mens_morris/nine_mens_morris.cc
// Copyright 2019 DeepMind Technologies Limited // // 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 l...
ALGO
0.973601
7.064686
{ "github_metadata": { "branch": "master", "commit_count": 4660, "repo_created_at": "2019-07-22T13:50:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4631, "forks": 1006, "issues": 17, "pull_requests": 6 }, "file_meta": { "content_id": "e...
0bfcb084-0e3f-4029-9410-ae59784d2664
256shadesofgrey/HighestNumber
include/HighestNumberCombination.hpp
#ifndef HIGHEST_NUMBER_COMBINATION_HPP #define HIGHEST_NUMBER_COMBINATION_HPP #include <cstdint> #include <string> #include <vector> class HighestNumberCombination{ private: static int8_t log2_64(uint64_t n); static bool cmp(const uint64_t &a, const uint64_t &b); static void prepareRadixSort(uint64_t **data, co...
ALGO
0.99862
5.816888
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2022-11-12T05:53: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": "7d8b52519a2...
5af4f781-1c54-4719-a059-50ff70d8e448
shaurya127/Dynamic_programming
maximum_cut.cpp
#include <bits/stdc++.h> using namespace std; int max(int a, int b) { return (a > b)? a : b;} // function that eturns the maximum // number of rods that can be // made from the rod of length N int cuttingRod(int n,int a,int b,int c ) { if(n<0) return -1; if(n==0) return 0; int res=max(cuttingRod(n-a,...
ALGO
0.999597
4.25487
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2020-12-22T12:55: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": "813b623f4...
89388b94-c930-4fb7-988a-136d3fde32a1
Luca-Leoni/NF-DiagMC
src/Std.cpp
#include <NF/Flows/Std.h> #include <NF/Nets/MLinear.h> #include <ATen/TensorIndexing.h> #include <NF/Utils/RQS.h> #include <cstdio> #include <torch/torch.h> using namespace torch; using torch::indexing::Slice; // Helper function to create the mask torch::Tensor autoregressive_mask(int in_dim, int out_dim, int cond =...
DATA
0.982432
6.576496
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-04-12T10:08:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d54d397384e3...
2924d401-e2dc-4766-affe-cba2acfa25ea
emilyju0314/gpt_code_plagiarism
dataset/code_content_classifier/ai_code/train/0_0_2167.cpp
#include <iostream> #include <vector> #include <string> using namespace std; int countHappyPeople(const string& S, const vector<string>& people) { int count = 0; string recentChars = ""; for (const string& person : people) { recentChars += person; if (recentChars.length() > S.length()) { ...
ALGO
0.999525
4.840778
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2024-04-28T03:59:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5200272aba9...
489b0fb7-7f73-448d-9350-b62c898c920c
owenc4a4/blackjack
algorithms/quick_sort.cpp
#include <stdio.h> void sort(int *a, int start, int end) { int i = start; int j = end; int t; int x = a[(i + j) / 2]; while (i <= j) { while(a[j] > x) j--; while(a[i] < x) i++; printf("i:%d; j:%d\n", i, j); if (i <= j) { t = a[i]; a[i] = a[j]; ...
ALGO
0.999988
4.007785
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2013-06-07T07:06:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 11 }, "file_meta": { "content_id": "5c990d7b...
1dead18c-5924-4266-900c-cc5d8ec36200
5akur0/Sakuro_PKU_Introduction-to-Computing_A
第15章/maze.cpp
#include <bits/stdc++.h> using namespace std; const int dx[4] = { 0, 1, 0, -1 }; const int dy[4] = { 1, 0, -1, 0 }; int tx, ty, sx, sy; struct Node { int x, y, dist; }; int main() { int n, m; cin >> n >> m; vector<vector<char>> maze(n, vector<char>(m)); for (int i = 0; i < n; ++i) { for ...
ALGO
0.999993
4.60157
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-01-06T00:47: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": "8d484e4f9b55...
29b5b2f1-c918-4ae9-b6b4-e832828c71d0
yumcyaWiz/Photorealism-Book
chapter2/single_sphere_tracing.cpp
#include "vec3.h" #include "ray.h" #include "hit.h" #include "camera.h" #include "sphere.h" #include "image.h" int main() { //512x512の画像 Image img(512, 512); //原点(0, 0, 0)に置かれ、方向(0, 0, -1)に向いているカメラ PinholeCamera cam(Vec3(0, 0, 0), Vec3(0, 0, -1), 1.0); //(0, 0, -3)に置かれ、半径1の球 Sphere sphere(Vec3(0, 0, -3)...
ALGO
0.979407
4.86876
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-12-18T07:29:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a291367f...
06378e7f-d22b-4137-95b1-4a6ff1b09b1f
hmnt007/Cpp-Data-Structure
Graph/FIRESC.cpp
#include<bits/stdc++.h> #define REP(i,n) for (int i = 1; i <= n; i++) #define mod 1000000007 #define pb push_back #define ff first #define ss second #define ii pair<int,int> #define vi vector<int> #define vii vector<ii> #define lli long long int #define INF 1000000000 #define endl '\n' const double PI = 3.1415926535897...
ALGO
0.999943
4.03579
{ "github_metadata": { "branch": "master", "commit_count": 123, "repo_created_at": "2020-02-26T12:42:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e28a52d2...
80475932-3fee-4c5e-847a-71cbdb86c373
Swapnil0798/Data-Structure
project.cpp
using namespace std; #include<iostream> struct node { int data; struct node*next; }; typedef struct node NODE; typedef struct node* PNODE; typedef struct node** PPNODE; class singlyCLL { private: //characteristics PNODE Head; PNODE Tail; public: //Behaviours singlyCLL(); v...
ALGO
0.998437
4.504323
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-06-30T04:09: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": "ee1f1bb62af2...
daf130a2-22d1-4533-90eb-00d8f877b9d6
joe-siyuan-qiao/DetectoRS
mmdet/ops/nms/src/nms_cpu.cpp
// Modified from https://github.com/bharatsingh430/soft-nms/blob/master/lib/nms/cpu_nms.pyx, Soft-NMS is added // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. #include <torch/extension.h> template <typename scalar_t> at::Tensor nms_cpu_kernel(const at::Tensor& dets, const float threshold) { ...
ALGO
0.975542
6.954344
{ "github_metadata": { "branch": "master", "commit_count": 816, "repo_created_at": "2020-05-27T05:59:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1144, "forks": 175, "issues": 48, "pull_requests": 3 }, "file_meta": { "content_id": "28...
720d2161-808b-4662-8545-66326e947a2f
aklk1ng/code
cpp/cf/1634C.OKEA.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long void solve() { int n, k; cin >> n >> k; if (k == 1) { cout << "Yes\n"; for (int i = 1; i <= n; i++) { cout << i << '\n'; } return; } if (n % 2) { cout << "No\n"; return; } cout << "Yes\n"; for (int i = 1...
ALGO
0.999742
4.166505
{ "github_metadata": { "branch": "main", "commit_count": 495, "repo_created_at": "2022-02-09T13:42: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": "ce541062f3...
25ccdff2-5c10-4e7b-a60a-767af1cf7211
hszhsh/JavaScriptCore
Source/JavaScriptCore/heap/MarkingConstraintSet.cpp
/* * Copyright (C) 2017 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions a...
ALGO
0.992513
7.417474
{ "github_metadata": { "branch": "master", "commit_count": 186542, "repo_created_at": "2015-04-29T13:04:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 50, "forks": 17, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "312...
b65e1259-d52f-493c-9297-efb773eb7d36
slllju/ps_boj
boj_3653_bone.cpp
#include<bits/stdc++.h> using namespace std; typedef pair<int,int> pii; typedef vector<int> vi; typedef long long ll; #define f first #define s second int sum( vi &pt, int i ){ int res = 0; while( i>0 ){ res += pt[i]; i -= (i&-i); } return res; } void upt( vi &pt, int i, int x ){ w...
ALGO
0.999921
3.797418
{ "github_metadata": { "branch": "master", "commit_count": 84, "repo_created_at": "2020-05-16T01:54:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5782252c9...
87269556-d4a8-481c-9524-57eb0a192065
hajunsong/crabster_simulator
crabster_analysis/src/MBD_RecursiveII.cpp
#include "MBD_RecursiveII.h" MBD_RecursiveII::MBD_RecursiveII() { m_force = new Applied_Force(); m_motion = new Joint_Motrion(); } MBD_RecursiveII::~MBD_RecursiveII() { delete(m_force); delete(m_motion); } void MBD_RecursiveII::setData_BaseBody(BaseBodyData buf) { flag_contact[0].resize(1); flag_motion[0].resi...
ALGO
0.991171
4.190727
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2023-10-27T01:46: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": "9a28dd056...
666d1153-d74b-4111-8954-904cc0041419
JeroenMerks/BAPGC
MOODS/core/moods_misc.cpp
#include "moods.h" #include "moods_misc.h" using std::vector; using std::size_t; namespace MOODS { namespace misc{ // basically base-2 logarithm of a, rounded up size_t shift(size_t a) { size_t s = 0; size_t b = 1; while (b < a){ s += 1; b = b << ...
ALGO
0.975336
4.487398
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-02-19T20:15:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de035b3fe5...
1a6aa278-9401-433d-97c2-ca98113cacc3
BlessingsBlessedChongo/Population-Growth-Simulator
PopulationGrowthSimulator/PopulationGrowthSimulator.cpp
#include<iostream> #include<iomanip> #include<vector> using namespace std; //Define constants const int MAX_YEARS = 100; //Enum for growth models enum class GrowthModel{Exponential,Logisitic}; //Function to calculate population growth double calculateGrowth(double population, double growthRate, double deathRate) { re...
ALGO
0.99213
5.710953
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-09-27T14:58:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e2d8d25b60f0...
a1c864a0-ae15-499d-add6-751a3e1f46e2
bdosremedios/precision-cascade
benchmark/include/benchmark_GMRES.h
#ifndef BENCHMARK_GMRES_H #define BENCHMARK_GMRES_H #include "benchmark.h" #include "tools/arg_pkgs/LinearSystem.h" #include "tools/arg_pkgs/SolveArgPkg.h" #include "solvers/GMRES/GMRESSolve.h" template <template <typename> typename TMatrix, typename TPrecision> class NoProgressGMRESSolve: public cascade::GMRESSolve...
ALGO
0.946627
6.565046
{ "github_metadata": { "branch": "master", "commit_count": 658, "repo_created_at": "2023-07-05T20:42:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "58dc7592...
84732c19-0ff5-4c71-a53a-04daa119a6d6
MOMOKO606/CLRS-Practice-C-plus
InsertionSort05.cpp
//CLRS P18: Insertion sort //using file, functions, template #include <iostream> #include <fstream> #include<string> using namespace std; int Length(ifstream &input) { //检测是否打开文件 if (!input.is_open()) cout << "Error opening file"; //计算一维数组长度 int n = 0; double x; while (!input.eof()) { input >> x; n++; ...
ALGO
0.999145
3.930763
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2017-03-30T04:52: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": "81f939a45...
fc11a8d1-9ad7-4167-b646-4967833a9171
hofs86/psi2223
mod6/m6-ft02-001_versaoB.cpp
#include <iostream> #include <string> #include <locale> using namespace std; struct Aluno { string nome; float nota; Aluno *seguinte; }; Aluno *inicio = NULL; // Insere um elemento no final da lista void inserir_fim_lista() { Aluno *novoAluno, *aux; // criar novo no novoAluno = new Aluno; ...
TOOL
0.919583
5.100174
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2023-05-17T07: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": "889099dd3...
7d7aeace-3561-4435-a130-afb054313a85
ADJA/PlagiarismDetector
vkcup-2015-wildcard-2-samples-1.1/vkcup-2015-wildcard-2-samples-1.1/05/24322.cpp
#include <cstdio> #include <algorithm> #include <cstring> #define FOR(i,s,e) for (int i=(s); i<(e); i++) #define FOE(i,s,e) for (int i=(s); i<=(e); i++) #define FOD(i,s,e) for (int i=(s)-1; i>=(e); i--) #define CLR(a,x) memset(a, x, sizeof(a)) #define LLD long long int #define N 105 using namespace std; int n; LLD dp[...
ALGO
0.999882
3.42735
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2015-04-19T12:50:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2b760087...
f7d211ab-05b6-476e-981b-6be6d58b4725
teyter/keppnis
2021/vika08/b/lab.cpp
#include <bits/stdc++.h> #define rep(E, F) for (E = 0; E < (F); E++) #define INF (1 << 30) using namespace std; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<vii> vvii; typedef vector<int> vi; int bellman_ford(vvii& g, int s, int q) { int i, k, n = g.size(), x, w; vi d(g.size(), INF); d[s] = 0; ...
ALGO
0.999875
3.412594
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2019-11-28T03: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": "f8b79be68...
dc762134-aea2-4076-80e4-13d18efacfbe
neal2018/oj_env
codeforces/793/f.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; int main() { cin.tie(nullptr)->sync_with_stdio(false); cout << fixed << setprecision(20); int T; cin >> T; while (T--) { ll n, m; cin >> n >> m; vector<ll> a(n), pre(n, n), nex(n, -1); map<ll, vector<l...
ALGO
0.999985
4.374198
{ "github_metadata": { "branch": "master", "commit_count": 175, "repo_created_at": "2021-08-18T06:24:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c886d094...
d735807f-1876-4a67-943d-38b72817eebe
PriviteraGabriele/Programmazione_1
Esami/OOP/AL/Esame_26_09_2019_A/esame.cpp
#include<iostream> #include<cmath> #include<climits> #include<typeinfo> #include<cstdlib> #define DIM 50 using namespace std; class A { private: char *str; short len; public: A(short m, string source){ len = m; str = new char[len]; string tmp = "";...
TOOL
0.907276
3.239328
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-12-01T07:27: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": "da191634d3d...
8734800a-1dd3-4e7f-9427-5e085d03bfc9
CaioBraz49/ATP1---UNESP-RC
Lista_de_exercicios_1/2.cpp
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run a...
TOOL
0.956182
3.259478
{ "github_metadata": { "branch": "Listas_de_exercicios", "commit_count": 28, "repo_created_at": "2025-03-16T20:26:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_i...
08a22c3e-2e1b-4d1b-977d-e413b9092b51
LKolya97/program-work
5.7.04.cpp
// ConsoleApplication16.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; int main() { int *arr; int n, p, q, c, a,count,b; cout << "enter the size\n"; cin >> n; arr = new int[n]; for (int i = 0; i < n; i++) { cout << "enter the number...
ALGO
0.999426
3.618721
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2016-11-24T07: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": "c5591b16c...
78331ac9-d7ad-4fac-ba9d-2b5b22885d3a
gefeng/cp
codeforces/r863div3/D.cpp
#include <iostream> #include <utility> #include <cassert> #include <algorithm> #include <cmath> #include <array> #include <string> #include <vector> using LL = long long; bool inside(LL x, LL y, LL tx, LL ty, LL bx, LL by) { return x >= tx && x <= bx && y >= ty && y <= by; } bool dfs(int N, LL X, LL Y, std::vec...
ALGO
0.999828
4.507171
{ "github_metadata": { "branch": "main", "commit_count": 980, "repo_created_at": "2022-07-19T19:38: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": "c255fe230e...
18d0acb4-c56f-4505-aac5-887d3e300595
kojihigasa/compe
AtCoder/ABC/abc196/b.cpp
#include <iostream> #include <vector> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int h, w, x, y; cin >> h >> w >> x >> y; vector<vector<char>> map(h, vector<char>(w)); for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { cin >> map [i]...
ALGO
0.999837
3.930913
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2019-01-14T08:14: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": "30bf6a80...
f10535fd-37c0-453f-bfba-6ebdc837f0d2
jkjan/Studying-C
BFS 최단 거리/BFS 최단 거리/소스.cpp
#include <iostream> #include <vector> #include <algorithm> #include <deque> using namespace std; vector < vector <int> > graph; bool* visited; int a, b; // 촌수를 계산해야 하는 서로 다른 두 사람의 번호 int* distArray; void bfs(int, deque<int>*); int main() { int n; //전체 사람의 수 int m; // 부모 자식들 간의 관계의 개수 int u, v; // 입력되는 부모 번호 int...
ALGO
0.999923
3.874318
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2019-07-10T11:09:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75a50a538...
2c944e7e-1320-43d0-8aa9-9d7882b94b09
dew987/100Days-of-GFG-POTD
Day-19/Day-19_Permutations_of_a_given_string.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: void helper(set<string> &ans, string &S, int i) { if(i== S.length()){ ans.insert(S); return; } for(int k= i; k< S.length(); k++) ...
ALGO
0.999969
6.2416
{ "github_metadata": { "branch": "main", "commit_count": 187, "repo_created_at": "2023-06-24T10:33: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": "910585592a...
b92201d9-ddcb-4bf3-a3e5-35ab1ed3a344
DushyantBhardwaj07/CodeForces-DSA
A_Amr_and_Music.cpp
#include<bits/stdc++.h> using namespace std; #define yes "YES" #define no "NO" #define ll long long #define mod 1000000007 void display(vector<ll>v){ for(ll i=0;i<v.size();i++) cout<<v[i]<<' ';cout<<endl;} void display2d(vector<vector<ll>> v){for(ll i=0;i<v.size();i++){for(ll j=0;j<v[i].size();j++){cout<<v[i][j]<<' ';}...
ALGO
0.999997
3.993594
{ "github_metadata": { "branch": "master", "commit_count": 413, "repo_created_at": "2024-07-10T19:42:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab99a49b...
3315a753-65fd-496a-92b9-fde53a32151b
Project-OSRM/osrm-backend
include/engine/routing_algorithms.hpp
#ifndef OSRM_ENGINE_ROUTING_ALGORITHM_HPP #define OSRM_ENGINE_ROUTING_ALGORITHM_HPP #include "engine/algorithm.hpp" #include "engine/internal_route_result.hpp" #include "engine/phantom_node.hpp" #include "engine/routing_algorithms/alternative_path.hpp" #include "engine/routing_algorithms/direct_shortest_path.hpp" #inc...
TOOL
0.978665
6.789451
{ "github_metadata": { "branch": "master", "commit_count": 8731, "repo_created_at": "2011-09-22T10:05:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6955, "forks": 3646, "issues": 421, "pull_requests": 26 }, "file_meta": { "content_id": ...
f6d152c9-7f96-4b44-9056-88d699428fda
harsh28799/CDLAB
left_factoring.cpp
#include<bits/stdc++.h> using namespace std; class CFG { char count='1'; char s; vector <char> t; vector <char> n; vector <pair<char, string>> p; vector <char> total; void findLeftFactoring(); void removeLeftFactoring(char left, char right); public: CFG(char , vector <char>, vecto...
ALGO
0.999744
3.285216
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-09-05T12: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": "c486f05b87...
3ab045cd-b470-472a-9855-4168da4d6b7b
naoki-yoshioka/pastel
include/pastel/integrate/detail/update_nth_order_derivatives.hpp
#ifndef PASTEL_INTEGRATE_DETAIL_UPDATE_NTH_ORDER_ACCELERATIONS_HPP # define PASTEL_INTEGRATE_DETAIL_UPDATE_NTH_ORDER_ACCELERATIONS_HPP # include <cstddef> # include <tuple> # include <pastel/integrate/detail/derivative_coefficients.hpp> # include <pastel/integrate/detail/derivative_data_array.hpp> # include <pastel/c...
ALGO
0.992378
7.79505
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2017-12-21T08:05:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 17, "pull_requests": 0 }, "file_meta": { "content_id": "c4bf9423...
b37c0f01-6d18-4895-8e5b-4e21886ef173
mangofromage/OI
XVI/Słonie/slo.cpp
#include <iostream> #define min(a, b) a < b ? a : b const int MAXN = 1000002; int oryg[MAXN], masa[MAXN], cel[MAXN]; bool czy[MAXN] = {0}; int main() { std::ios_base::sync_with_stdio(0); int n = 0, minwgl = 1 << 30; std::cin >> n; for (int i = 0; i < n; ++i) { std::cin >> masa[i]; ...
ALGO
0.999966
3.417716
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2018-03-12T15:59:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34e22dd6f...
95f3b79a-47c9-4411-a728-4aac6893a861
F18/CFFC
cfrs/src/CFD/Gaussian2DState.cc
/* Gaussian2DState.cc: Subroutines for 2D Gaussian Solution State Classes. */ /* Include 2D Gaussian solution state header file. */ #ifndef _Gaussian2D_STATE_INCLUDED #include "Gaussian2DState.h" #endif // _Gaussian2D_STATE_INCLUDED /**************************************************************** * Gaussian2D_pSt...
ALGO
0.99959
4.869728
{ "github_metadata": { "branch": "master", "commit_count": 1856, "repo_created_at": "2024-01-15T11:24:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "24d0629...
d76af12a-3736-49e9-868e-64f95671d94b
MogaRiana/NewCode
Algorithms/Binary_Search/Upper_Bound/main.cpp
#include <bits/stdc++.h> using namespace std; typedef long long i64; typedef vector<i64> vi64; int main() { vi64 v = {1, 1, 1, 1, 2, 4, 4, 5, 6, 10, 10, 10, 20, 20}; sort(v.begin(), v.end()); i64 x; while (cin >> x) { i64 a = -1, l = 0, r = v.size() - 1; while (l <= r) { i64 m = l + (r - l) / ...
ALGO
0.999655
3.702369
{ "github_metadata": { "branch": "master", "commit_count": 146, "repo_created_at": "2023-02-17T14:08:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae7ca04c...
055a7d94-6f00-4a12-8e11-b280943eea8b
altynbek04/algo-implementation
labka_2/linked_list.cpp
#include <iostream> struct Node { int data; Node* next; Node(int data) : data(data), next(nullptr) {} }; class LinkedList { private: Node* head; public: LinkedList() : head(nullptr) {} ~LinkedList() { Node* current = head; Node* next = nullptr; while (current != null...
ALGO
0.999604
6.268638
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-06-18T13:12: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": "ee74bb5693d7...